/*
 * SVAFF Brand Mesh — Shared Design Token System
 * Aligned with Ubuntu Circles (circle.svaff.org) design system.
 * Font: Plus Jakarta Sans | Colors: Daintree navy palette
 *
 * Source: svaff-shared repo — served at /assets/css/brand-mesh.css on all micro-sites
 * DO NOT edit per-site. All token changes happen here.
 */

/* ==========================================================================
   FONT FACE — Plus Jakarta Sans (matches Ubuntu Circles exactly)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,700&display=swap');

/* ==========================================================================
   DESIGN TOKENS — Ubuntu Circles palette (ground truth from circle.svaff.org)
   ========================================================================== */

:root {
    /* --- Core Canvas (Ubuntu Circles deep navy) --- */
    --svaff-bg-primary:      #032235;   /* Daintree — main background */
    --svaff-bg-surface:      #062d45;   /* Dark surface — section backgrounds */
    --svaff-bg-card:         #0a3a55;   /* Dark card — card backgrounds */
    --svaff-bg-border:       #124163;   /* Dark border — dividers */

    /* --- Brand Accents --- */
    --svaff-accent:          #bf4040;   /* Dull Red — primary CTAs, actions */
    --svaff-accent-hover:    #8f2e2e;   /* Dull Red dark — CTA hover */
    --svaff-accent-light:    #d45a5a;   /* Dull Red light — focus states */
    --svaff-gold:            #bfa854;   /* Sundance — gold highlights, links */
    --svaff-gold-light:      #d4c27a;   /* Sundance light */
    --svaff-gold-dark:       #8a7635;   /* Sundance dark */

    /* --- Typography --- */
    --svaff-text-primary:    #f5f5fb;   /* Whisper — main body text */
    --svaff-text-muted:      rgba(245, 245, 251, 0.6);
    --svaff-text-gold:       #bfa854;   /* Gold text accent */

    /* --- Semantic Status --- */
    --svaff-info:            #255D9E;
    --svaff-info-bg:         #D4E3FF;
    --svaff-error:           #AC3133;
    --svaff-error-focus:     #FD6C69;
    --svaff-error-bg:        #FFDAD7;

    /* --- Gold Gradient (circle tracker core) --- */
    --svaff-gold-start:      #BFA854;
    --svaff-gold-mid:        #D4B96A;
    --svaff-gold-end:        #A8933C;

    /* --- Shadows (Ubuntu Circles scale) --- */
    --shadow-1:  0 1px 2px rgba(0,0,0,.3), 0 0 1px rgba(0,0,0,.15);
    --shadow-2:  0 2px 6px rgba(0,0,0,.35), 0 0 2px rgba(0,0,0,.19);
    --shadow-3:  0 4px 12px rgba(0,0,0,.37), 0 0 4px rgba(0,0,0,.19);
    --shadow-4:  0 8px 24px rgba(0,0,0,.45), 0 0 6px rgba(0,0,0,.25);

    /* --- Border Radius (Ubuntu Circles scale) --- */
    --radius-xs:     4px;
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-card:   16px;
    --radius-button: 0px;   /* Square buttons — Ubuntu Circles style */
    --radius-pill:   999px;

    /* --- Layout --- */
    --nav-height:          72px;
    --touch-target:        44px;
    --content-max-width:   1200px;
    --border-subtle:       1px solid #124163;
    --container-px:        clamp(1.25rem, 5vw, 2.5rem);

    /* --- Fluid Typography Scale --- */
    --text-xs:   clamp(0.694rem, 0.67vw + 0.58rem, 0.75rem);
    --text-sm:   clamp(0.833rem, 0.75vw + 0.67rem, 0.875rem);
    --text-base: clamp(1rem, 0.85vw + 0.8rem, 1.0625rem);
    --text-md:   clamp(1.125rem, 1.1vw + 0.9rem, 1.25rem);
    --text-lg:   clamp(1.25rem, 1.5vw + 0.95rem, 1.5rem);
    --text-xl:   clamp(1.5rem, 2.2vw + 1.05rem, 2rem);
    --text-2xl:  clamp(1.875rem, 3vw + 1.2rem, 2.625rem);
    --text-3xl:  clamp(2.25rem, 4vw + 1.4rem, 3.375rem);
    --text-4xl:  clamp(2.75rem, 6vw + 1.5rem, 4.5rem);

    /* --- Backward-compat font-size aliases (point to fluid tokens) --- */
    --font-family:    'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-size-xs:   var(--text-xs);
    --font-size-sm:   var(--text-sm);
    --font-size-base: var(--text-base);
    --font-size-md:   var(--text-md);
    --font-size-lg:   var(--text-lg);
    --font-size-xl:   var(--text-xl);
    --font-size-2xl:  var(--text-2xl);
    --font-size-3xl:  var(--text-3xl);
    --font-size-4xl:  var(--text-4xl);

    /* --- Line Height Tokens --- */
    --leading-tight:   1.1;
    --leading-snug:    1.3;
    --leading-normal:  1.6;
    --leading-relaxed: 1.75;
    --leading-loose:   1.9;

    /* --- Fluid Spacing Scale --- */
    /* Floors raised so mobile sections breathe, not clump */
    --space-1:  clamp(0.25rem, 0.5vw, 0.5rem);
    --space-2:  clamp(0.5rem, 1vw, 0.75rem);
    --space-3:  clamp(0.75rem, 1.5vw, 1rem);
    --space-4:  clamp(1rem, 2vw, 1.5rem);
    --space-6:  clamp(1.75rem, 3vw, 2.5rem);
    --space-8:  clamp(2.5rem, 4vw, 3.5rem);
    --space-12: clamp(3.5rem, 6vw, 5rem);
    --space-16: clamp(4.5rem, 8vw, 7rem);
    --space-20: clamp(5.5rem, 10vw, 9rem);
    --section-gap: var(--space-16);

    /* Legacy section-padding alias */
    --section-padding: var(--space-16);

    /* --- Button Height Tokens --- */
    --btn-height-sm: 36px;
    --btn-height-md: 44px;
    --btn-height-lg: 52px;

    /* --- Transitions --- */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   GLOBAL RESET & BASE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--svaff-bg-primary);
    color: var(--svaff-text-primary);
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: var(--leading-normal);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================================================
   GLOBAL NAVIGATION — matches Ubuntu Circles nav aesthetic
   ========================================================================== */

.svaff-nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    height: var(--nav-height);
    background-color: rgba(3, 34, 53, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.svaff-nav__logo {
    display: flex;
    align-items: center;
    min-height: var(--touch-target);
    flex-shrink: 0;
}

.svaff-nav__logo img {
    height: 52px;   /* Bigger logo */
    width: auto;
}

.svaff-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.svaff-nav__item {
    display: flex;
}

.svaff-nav__link {
    color: var(--svaff-text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 0 14px;
    min-height: var(--touch-target);
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: color var(--transition-fast), background-color var(--transition-fast);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.svaff-nav__link:hover {
    color: var(--svaff-gold);
}

/* Active state: 2px gold bottom border via pseudo-element */
.svaff-nav__link--active {
    color: var(--svaff-gold);
}

.svaff-nav__link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background-color: var(--svaff-gold);
    border-radius: 1px;
}

.svaff-nav__link--cta {
    background-color: var(--svaff-accent);
    color: var(--svaff-text-primary) !important;
    padding: 0 20px;
    font-weight: 700;
    margin-left: 8px;
    border-radius: var(--radius-button);
    letter-spacing: 0.02em;
}

.svaff-nav__link--cta::after {
    display: none; /* no underline on CTA pill */
}

.svaff-nav__link--cta:hover {
    background-color: var(--svaff-accent-hover) !important;
    color: var(--svaff-text-primary) !important;
}

/* Tickets link — gold outline treatment */
.svaff-nav__link--tickets {
    color: var(--svaff-gold) !important;
    border: 1px solid rgba(191, 168, 84, 0.45);
    padding: 0 16px;
    margin: 0 4px;
}
.svaff-nav__link--tickets:hover {
    background: rgba(191, 168, 84, 0.1);
    border-color: var(--svaff-gold);
}

/* Dropdown toggle button — inherits .svaff-nav__link styles, needs button reset */
.svaff-nav__dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    font-family: inherit;
}

/* Chevron icon */
.svaff-nav__chevron {
    flex-shrink: 0;
    opacity: 0.65;
    transition: transform 0.2s ease, opacity 0.2s;
}
.svaff-nav__dropdown-toggle[aria-expanded="true"] .svaff-nav__chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* Dropdown panel — hidden by default, revealed on hover OR JS open */
.svaff-nav__item--has-dropdown {
    position: relative;
}

.svaff-nav__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 170px;
    background: rgba(2, 26, 40, 0.97);
    border: 1px solid rgba(191, 168, 84, 0.2);
    border-top: 2px solid var(--svaff-gold);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    z-index: 10000;
    box-shadow: var(--shadow-3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Show on hover (desktop) */
.svaff-nav__item--has-dropdown:hover > .svaff-nav__dropdown,
.svaff-nav__dropdown.svaff-nav__dropdown--open {
    display: block;
}

.svaff-nav__dropdown-link {
    display: block;
    padding: 0.6rem 1.2rem;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--svaff-text-primary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.svaff-nav__dropdown-link:hover,
.svaff-nav__dropdown-link--active {
    background: rgba(191, 168, 84, 0.1);
    color: var(--svaff-gold);
}

/* Mobile hamburger */
.svaff-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid rgba(191, 168, 84, 0.3);
}

.svaff-nav__bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--svaff-text-primary);
    transition: transform var(--transition-base), opacity var(--transition-base);
}

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

.svaff-footer {
    background-color: var(--svaff-bg-surface);
    border-top: var(--border-subtle);
    padding: var(--space-12) var(--space-8) var(--space-8);
}

.svaff-footer__inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-8);
    align-items: start;
}

.svaff-footer__brand img {
    height: 36px;
    width: auto;
    margin-bottom: var(--space-3);
}

.svaff-footer__tagline {
    font-size: var(--text-sm);
    color: var(--svaff-text-muted);
    max-width: 280px;
    line-height: var(--leading-relaxed);
}

.svaff-footer__links {
    display: flex;
    gap: clamp(16px, 2vw, 28px);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.svaff-footer__link {
    color: var(--svaff-text-muted);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.svaff-footer__link:hover {
    color: var(--svaff-gold);
}

.svaff-footer__bottom {
    max-width: var(--content-max-width);
    margin: var(--space-8) auto 0;
    padding-top: var(--space-6);
    border-top: var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.svaff-footer__copy {
    font-size: var(--text-xs);
    color: var(--svaff-text-muted);
}

/* ==========================================================================
   SHARED UTILITY CLASSES
   ========================================================================== */

.u-container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.u-section {
    /* Use padding-block so horizontal padding from .u-container is never clobbered */
    padding-block: var(--section-padding);
}

.u-section--sm {
    padding-block: var(--space-12);
}

.u-text-center { text-align: center; }
.u-text-muted  { color: var(--svaff-text-muted); }

/* Buttons — square corners, Ubuntu Circles style */
.u-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--btn-height-md);
    padding: 0 28px;
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: 700;
    border-radius: var(--radius-button);
    transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.02em;
}

/* Size modifiers */
.u-btn--sm {
    min-height: var(--btn-height-sm);
    padding: 0 16px;
    font-size: var(--text-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.u-btn--lg {
    min-height: var(--btn-height-lg);
    padding: 0 36px;
    font-size: var(--text-base);
}

.u-btn--full {
    width: 100%;
    justify-content: center;
}

.u-btn--primary {
    background-color: var(--svaff-accent);
    color: var(--svaff-text-primary);
}

.u-btn--primary:hover {
    background-color: var(--svaff-accent-hover);
    color: var(--svaff-text-primary);
    box-shadow: 0 4px 12px rgba(191, 64, 64, 0.3);
}

.u-btn--outline {
    background-color: transparent;
    color: var(--svaff-gold);
    border: 1px solid var(--svaff-gold);
}

.u-btn--outline:hover {
    background-color: rgba(191, 168, 84, 0.1);
    color: var(--svaff-gold-light);
}

.u-card {
    background-color: var(--svaff-bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-card);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.u-card:hover {
    border-color: var(--svaff-gold);
    box-shadow: var(--shadow-3);
}

/* ==========================================================================
   SKIP LINK (accessibility)
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background-color: var(--svaff-accent);
    color: var(--svaff-text-primary);
    padding: 8px 16px;
    font-weight: 700;
    font-size: var(--text-sm);
    z-index: 99999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================================
   FORM BASE — applied to all SVAFF forms
   ========================================================================== */

.svaff-form { display: flex; flex-direction: column; gap: var(--space-4); }

.form-group { display: flex; flex-direction: column; gap: 0.375rem; }

.form-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: rgba(245, 245, 251, 0.9);
    letter-spacing: 0.01em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 560px) {
    .form-row, .form-row--3 { grid-template-columns: 1fr; }
}

/* Input / textarea / select — 56px height for comfortable MD touch targets */
.svaff-form input[type="text"],
.svaff-form input[type="email"],
.svaff-form input[type="url"],
.svaff-form input[type="tel"],
.svaff-form textarea,
.svaff-form select {
    width: 100%;
    height: 56px;
    padding: 0 1rem;
    background: rgba(6, 45, 69, 0.8);
    border: 1px solid rgba(18, 65, 99, 0.9);
    color: var(--svaff-text-primary);
    font-family: var(--font-family);
    font-size: var(--text-base);
    border-radius: 0;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    -webkit-appearance: none;
}
.svaff-form textarea {
    height: auto;
    min-height: 120px;
    padding: 1rem;
    resize: vertical;
    line-height: var(--leading-relaxed);
}
.svaff-form input:focus,
.svaff-form textarea:focus,
.svaff-form select:focus {
    border-color: var(--svaff-gold);
    background: rgba(6, 45, 69, 1);
    box-shadow: 0 0 0 3px rgba(191, 168, 84, 0.15);
}
.svaff-form input::placeholder,
.svaff-form textarea::placeholder {
    color: rgba(245, 245, 251, 0.3);
    font-size: var(--text-sm);
}

/* Radio / Checkbox fieldsets */
.form-fieldset {
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.form-fieldset legend {
    font-size: var(--text-sm);
    font-weight: 600;
    color: rgba(245, 245, 251, 0.9);
    margin-bottom: 0.5rem;
    float: left;
    width: 100%;
}
.form-radio {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: var(--text-sm);
    color: rgba(245, 245, 251, 0.85);
    cursor: pointer;
}
.form-radio input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    accent-color: var(--svaff-gold);
    cursor: pointer;
}

/* Error / success states */
.form-errors {
    background: rgba(172, 49, 51, 0.15);
    border: 1px solid rgba(172, 49, 51, 0.5);
    padding: var(--space-4);
    font-size: var(--text-sm);
}
.form-errors ul { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.25rem; }
.form-errors li { color: #ff8a8a; }

.form-success {
    background: rgba(25, 100, 60, 0.15);
    border: 1px solid rgba(50, 180, 100, 0.3);
    padding: var(--space-6);
}
.form-success h3 { color: #6fcf97; font-size: var(--text-lg); margin-bottom: 0.5rem; }
.form-success p { color: rgba(245, 245, 251, 0.8); font-size: var(--text-sm); }

.form-note {
    font-size: var(--text-sm);
    color: rgba(245, 245, 251, 0.5);
    margin-bottom: var(--space-4);
}
/* ==========================================================================
   RESPONSIVE — MOBILE NAV
   ========================================================================== */

@media (max-width: 900px) {
    /* Nav bar — tighten horizontal padding */
    .svaff-nav {
        padding: 0 1.5rem;
    }

    /* Show hamburger */
    .svaff-nav__toggle {
        display: flex;
    }

    /* ── Drawer — slides down from below the nav bar ── */
    .svaff-nav__links {
        display: flex;           /* always in DOM so transition works */
        flex-direction: column;
        gap: 0;
        overflow: hidden;
        max-height: 0;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background-color: rgba(3, 34, 53, 0.99);
        border-bottom: var(--border-subtle);
        padding: 0;
        transition: max-height 0.35s ease;
        /* ensure drawer overlays page content */
        z-index: 9998;
    }

    .svaff-nav__links--open {
        max-height: 640px;
        padding-bottom: 1rem;
    }

    /* ── Top-level items ── */
    .svaff-nav__item {
        display: flex;
        flex-direction: column; /* so dropdown flows naturally below the toggle */
        width: 100%;
    }

    /* All nav links and dropdown toggles: full-width, left-aligned, 48px touch target */
    .svaff-nav__link,
    .svaff-nav__dropdown-toggle {
        width: 100%;
        min-height: var(--touch-target);
        padding: 0 1.5rem;
        text-align: left;
        justify-content: space-between;
        font-size: var(--text-base);
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    /* Active underline not appropriate in full-width drawer */
    .svaff-nav__link--active::after {
        display: none;
    }

    /* Tickets CTA: full-width, centred, with margin */
    .svaff-nav__link--cta {
        margin: 0.75rem 1.5rem;
        width: calc(100% - 3rem);
        justify-content: center;
        border-bottom: none;
    }

    .svaff-nav__link--tickets {
        margin: 0.5rem 1.5rem;
        width: calc(100% - 3rem);
        justify-content: center;
        border: 1px solid rgba(191, 168, 84, 0.4);
        border-bottom: 1px solid rgba(191, 168, 84, 0.4);
    }

    /* ── Submenus: standard drop-down below parent, indented ── */
    .svaff-nav__dropdown {
        /* Override desktop absolute positioning — flow naturally in the column */
        position: static;
        display: none;           /* hidden by default; JS adds --open class */
        flex-direction: column;
        width: 100%;
        background-color: rgba(2, 26, 40, 0.6); /* slightly deeper tint */
        border: none;
        border-top: 1px solid rgba(191, 168, 84, 0.12);
        border-bottom: 1px solid rgba(191, 168, 84, 0.12);
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0.25rem 0;
        min-width: unset;
        /* Smooth open animation */
        overflow: hidden;
    }

    /* JS toggles this class — show as flex column */
    .svaff-nav__dropdown--open {
        display: flex;
    }

    /* Submenu links: indented from the left, full-width, generous touch target */
    .svaff-nav__dropdown-link {
        width: 100%;
        min-height: var(--touch-target);
        padding: 0 1.5rem 0 2.75rem; /* 2.75rem left indent */
        display: flex;
        align-items: center;
        font-size: var(--text-sm);
        font-weight: 400;
        color: rgba(245, 245, 251, 0.8);
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .svaff-nav__dropdown-link:last-child {
        border-bottom: none;
    }

    .svaff-nav__dropdown-link:hover,
    .svaff-nav__dropdown-link--active {
        background: rgba(191, 168, 84, 0.08);
        color: var(--svaff-gold);
    }

    /* Shared layout tokens */
    .u-container {
        padding: 0 1.5rem;
    }

    .svaff-footer {
        padding: var(--space-8) 1.5rem var(--space-6);
    }

    .svaff-footer__inner {
        grid-template-columns: 1fr;
    }

    .svaff-footer__links {
        justify-content: flex-start;
    }

    .svaff-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    /* Footer: stack brand left, links below in 2-column grid */
    .svaff-footer__links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px clamp(16px, 2vw, 28px);
        justify-content: start;
        width: 100%;
    }
}

/* ==========================================================================
   MOBILE SPACING CORRECTIONS (≤ 480px)
   The fluid clamp() scale floors still resolve too large at narrow viewports.
   These overrides bring section/container padding back to a comfortable rhythm.
   ========================================================================== */
@media (max-width: 480px) {
    /* Consistent 24px gutters on small phones — matches MD preferred gutter */
    .u-container {
        padding: 0 1.5rem;
    }

    /* Pull section vertical padding back to a deliberate mobile rhythm */
    .u-section {
        padding-block: 3rem;
    }

    .u-section--sm {
        padding-block: 2rem;
    }

    /* Footer */
    .svaff-footer {
        padding: 2.5rem 1.5rem 1.5rem;
    }
}

/* ==========================================================================
   MOTION SYSTEM — Scroll reveals, hero entrance, nav, interactions
   (matches svaff-shared/css/brand-mesh.css motion block)
   ========================================================================== */

/* ── Scroll reveal base state ── */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity  0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Faster reveal for cards */
.involve-card[data-reveal],
.prog-card[data-reveal],
.stat-card[data-reveal],
.news-card[data-reveal] {
    transition-duration: 0.55s;
}

/* ── Hero text entrance ── */
.hero-enter {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity  0.8s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-enter--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Sticky nav — frosted glass on scroll ── */
.site-header {
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.site-header--scrolled {
    background: rgba(2, 26, 40, 0.82) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 1px 0 rgba(191, 168, 84, 0.15), 0 4px 24px rgba(0,0,0,0.35);
}

/* ── Button ripple ── */
.u-btn--primary {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transform: scale(0);
    animation: ripple-expand 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* ── Button shimmer sweep on hover ── */
.u-btn--primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255,255,255,0.12) 50%,
        transparent 80%
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.u-btn--primary:hover::after {
    left: 160%;
}

/* ── Gold accent line — draws in on scroll ── */
.section-header__title,
.about-strip__title,
.community-programs__title,
.newsletter-strip__title {
    position: relative;
}

.section-header__title::after,
.about-strip__title::after,
.community-programs__title::after,
.newsletter-strip__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(to right, var(--svaff-gold), transparent);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.heading-line--drawn::after {
    width: 60px;
}

/* ── Magnetic cards — smooth reset ── */
.involve-card,
.prog-card,
.news-card,
.stat-card {
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease;
}

/* ── Page hero clip-path entrance (inner pages) ── */
.page-hero--entering {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-hero--entered {
    clip-path: inset(0 0 0% 0);
}

/* ── Hero image columns — smooth parallax reset ── */
.hero__img-col {
    transition: transform 0.15s linear;
}

/* ==========================================================================
   SCROLL PROGRESS BAR — gold line across top of viewport
   ========================================================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(to right, var(--svaff-gold), #e8c84a, var(--svaff-gold));
    z-index: 9999;
    pointer-events: none;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(191, 168, 84, 0.6);
}

/* ==========================================================================
   SCROLL-TO-TOP BUTTON
   ========================================================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 500;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 26, 40, 0.9);
    border: 1px solid rgba(191, 168, 84, 0.45);
    color: #bfa854;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    transition:
        opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.2s ease,
        border-color 0.2s ease;
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.scroll-top-btn--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    background: rgba(191, 168, 84, 0.12);
    border-color: #bfa854;
}

.scroll-top-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   NAV — height morph + active current-page indicator
   ========================================================================== */
.site-header--scrolled .header-inner {
    height: 52px;
}

.site-header--scrolled .site-logo img {
    height: 40px;
}

.nav-link--current {
    color: #bfa854 !important;
    position: relative;
}

.nav-link--current::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0.85rem;
    right: 0.85rem;
    height: 1.5px;
    background: #bfa854;
    border-radius: 1px;
}

/* ==========================================================================
   REDUCED MOTION — all motion overrides
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    .hero-enter,
    .site-header,
    .btn-ripple,
    .u-btn--primary::after,
    .section-header__title::after,
    .about-strip__title::after,
    .community-programs__title::after,
    .newsletter-strip__title::after,
    .page-hero--entering,
    .hero__img-col {
        transition: none !important;
        animation: none !important;
    }

    [data-reveal] { opacity: 1; transform: none; }
    .hero-enter   { opacity: 1; transform: none; }
    .page-hero--entering { clip-path: none; }
    .scroll-progress     { transition: none; }
    .scroll-top-btn      { transition: none; }
    .site-header--scrolled .header-inner { transition: none; }
}
