/* =========================================
   GARA WEBSITE - GLOBAL STYLES
   ========================================= */

:root {
    --navy: #101e2c;
    --cream: #f7f4ed;
    --white: #ffffff;
    --amber: #e5a45b;
    --muted: #b8c3cc;
    --text-secondary: #465463;
    --accent-on-light: #86501c;
    --section-border: #d9d7d0;
    --content-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--cream);
    color: var(--navy);
    line-height: 1.6;
}

/* Keep the footer at the bottom of short pages, in normal flow. */
main {
    flex: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Keyboard navigation: retain native outlines and provide a two-color ring. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
iframe:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--navy);
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--cream);
    color: var(--navy);
    font-weight: 700;
    transform: translateY(calc(-100% - 2rem));
}

.skip-link:focus {
    transform: translateY(0);
}

/* =========================================
   HEADER AND NAVIGATION
   ========================================= */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.25rem 5%;
    background: var(--navy);
    color: var(--white);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
    min-width: 0;
    line-height: 1.25;
}

.logo-image {
    width: 80px;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-call {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--amber);
}

.logo-name {
    font-size: 0.75rem;
    color: var(--muted);
}

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Shared minimum targets also apply to in-page navigation on wide screens. */
.main-nav a,
.about-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--amber);
}

.main-nav .nav-join {
    padding: 0.65rem 1.1rem;
    border: 1px solid var(--amber);
    border-radius: 4px;
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
    min-height: 650px;
    background: var(--navy);
    color: var(--white);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 5rem 8%;
}

.eyebrow {
    margin: 0 0 1rem;
    color: var(--amber);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 720px;
    margin: 0 0 1.5rem;
    font-size: clamp(2.6rem, 4.5vw, 5rem);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-description {
    max-width: 540px;
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.button {
    display: inline-block;
    padding: 0.9rem 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform 0.2s ease,
                background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--amber);
    color: var(--navy);
}

.button-primary:hover {
    background: #f4bc7d;
}

.button-secondary {
    border: 1px solid #6c7a87;
    color: var(--white);
}

/* =========================================
   BRIDGE PHOTOGRAPH
   ========================================= */

.hero-image {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: var(--navy);
}

.hero-image img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    object-position: center 65%;
}

.image-caption {
    position: absolute;
    right: 1.5rem;
    bottom: 1.5rem;
    padding: 0.5rem 0.8rem;
    background: rgba(16, 30, 44, 0.7);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: 3px;
}

/* =========================================
   WELCOME SECTION
   ========================================= */

.welcome-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 6rem 5%;
    background: var(--cream);
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.welcome-section > p {
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2rem 5%;
    background: var(--navy);
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer p {
    margin: 0;
}

/* =========================================
   SHARED INTERIOR-PAGE COMPONENTS
   About-prefixed components are also reused by other pages.
   ========================================= */

.about-intro {
    padding: 5rem max(6%, calc((100% - 1080px) / 2));
    background: var(--navy);
    color: var(--white);
}

.about-intro h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(2.6rem, 5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.about-intro > p:not(.eyebrow) {
    max-width: 650px;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: 1.15rem;
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 2.5rem;
}

.about-page p a:not(.button),
.radio-page p a:not(.button),
.about-links a {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.about-page .eyebrow,
.radio-page .eyebrow {
    color: var(--accent-on-light);
}

/* Restore the light accent within dark introductions. */
.about-intro .eyebrow {
    color: var(--amber);
}

.about-copy {
    max-width: 65ch;
}

.about-section,
.radio-section {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 4rem 5%;
    border-top: 1px solid var(--section-border);
    scroll-margin-top: 2rem;
}

.about-section h3 {
    line-height: 1.3;
}

.about-timeline {
    padding-left: 1.5rem;
    margin: 2.5rem 0;
    border-left: 3px solid var(--amber);
    list-style: none;
    max-width: 70ch;
}

.about-timeline li + li {
    margin-top: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 3rem;
    margin-top: 2rem;
}

.about-grid-wide {
    grid-column: 1 / -1;
    max-width: 80ch;
}

.about-officers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.about-officers > div {
    padding: 1.25rem;
    background: var(--white);
}

.about-officers dt {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.about-officers dd {
    margin: 0.5rem 0 0;
    font-weight: 700;
}

.about-officers dd span {
    display: block;
    color: var(--accent-on-light);
    font-size: 0.9rem;
}

/* Shared radio/resource grid and card shells; headings remain distinct. */
.radio-grid,
.resources-page .resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.radio-card,
.resources-page .resource-card {
    min-width: 0;
    padding: 1.5rem;
    background: var(--white);
    border-top: 3px solid var(--amber);
    overflow-wrap: anywhere;
}

/* =========================================
   REPEATERS AND NETS
   ========================================= */

.radio-section > p {
    max-width: 80ch;
}

.radio-card h3 {
    margin-top: 0;
    line-height: 1.3;
}

.radio-settings {
    margin: 0;
}

.radio-settings > div {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e3e5e6;
}

.radio-settings dt {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.radio-settings dd {
    margin: 0.25rem 0 0;
    font-weight: 600;
}

.radio-note {
    padding-left: 1rem;
    border-left: 3px solid var(--amber);
}

.radio-steps {
    max-width: 75ch;
    padding-left: 1.5rem;
}

.radio-steps li {
    margin-bottom: 1rem;
}

/* =========================================
   ACTIVITIES
   ========================================= */

/* The calendar deliberately uses a wider container. */
.activities-page #upcoming-events {
    width: 100%;
    max-width: 1600px;
}

.activities-calendar {
    display: block;
    width: 100%;
    height: 600px;
    border: 0;
    margin-top: 1.5rem;
    background: var(--white);
}

/* =========================================
   RESOURCES
   ========================================= */

.resources-page .resource-card h3 {
    margin: 0 0 1rem;
    line-height: 1.3;
}

.resources-page .resource-label {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

/* =========================================
   RESPONSIVE LAYOUT
   Keep component-specific thresholds: section spacing changes at 900px
   for About-derived sections and at 700px for radio sections.
   ========================================= */

@media (max-width: 900px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        gap: 1rem;
    }

    /* Compact-screen padding supplements the shared 44px targets. */
    .main-nav a,
    .about-links a {
        padding: 0.5rem 0.25rem;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 5rem 6%;
    }

    .hero-image {
        height: 600px;
        min-height: 0;
    }

    .welcome-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 4rem 6%;
    }

    .about-section {
        padding: 3rem 6%;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 700px) {
    .radio-section {
        padding: 3rem 6%;
    }

    .radio-grid,
    .resources-page .resource-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .activities-calendar {
        height: 500px;
    }
}

@media (max-width: 520px) {
    .logo-image {
        width: 64px;
    }

    .hero-content {
        padding: 4rem 6%;
    }

    .hero-image {
        height: 450px;
    }

    .main-nav {
        gap: 0.5rem;
    }

    .main-nav a {
        font-size: 0.8rem;
    }

    .site-footer {
        flex-direction: column;
    }
}

/* Respect motion preferences without changing focus/skip-link positioning. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .main-nav a,
    .button {
        transition: none;
    }

    .button:hover {
        transform: none;
    }
}
