/* ═══════════════════════════════════════════════════════════════
   Sharphill — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img   { max-width: 100%; display: block; }
ul    { list-style: none; }
a     { text-decoration: none; color: inherit; }

/* ── Custom properties ────────────────────────────────────────── */
:root {
    --bg:           #ffffff;
    --fg:           #171c17;
    --green:        #2c5928;
    --green-mid:    #48794a;
    --amber:        #b07828;
    --muted:        #6b7265;
    --border:       #e8e8e8;
    --row-alt:      #f7f7f7;
    --footer-bg:    #fafafa;

    --font-head:    'Outfit', system-ui, sans-serif;
    --font-body:    'Inter', sans-serif;

    --pill-blur:    blur(7px) saturate(1.55) brightness(1.24);
    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
    --t:            0.28s;
    --radius-pill:  999px;
}

/* ── Base ─────────────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    background:   var(--bg);
    color:        var(--fg);
    line-height:  1.65;
}


/* ════════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════════ */

.site-header {
    position:       fixed;
    top:            0;
    left:           0;
    right:          0;
    z-index:        1000;
    display:        flex;
    justify-content: center;
    padding:        1.2rem 1.5rem;
    pointer-events: none;   /* clicks pass through empty space */
}

.site-nav {
    pointer-events: all;
    width:          96%;
    max-width:      1280px;
}

.nav-pill {
    --nav-fade: 0;
    --nav-ink-r: calc(23 + (255 - 23) * (1 - var(--nav-fade)));
    --nav-ink-g: calc(28 + (255 - 28) * (1 - var(--nav-fade)));
    --nav-ink-b: calc(23 + (255 - 23) * (1 - var(--nav-fade)));
    --nav-ink: rgb(var(--nav-ink-r), var(--nav-ink-g), var(--nav-ink-b));
    display:        flex;
    align-items:    center;
    justify-content: space-between;
    gap:            2rem;
    padding:        1rem 1.75rem;
    background:     rgba(255, 255, 255, calc(var(--nav-fade) * 0.8));
    border-radius:  18px;
    box-shadow:     0 calc(var(--nav-fade) * 6px) calc(var(--nav-fade) * 36px) rgba(0, 0, 0, calc(var(--nav-fade) * 0.08));
    transition:     background var(--t) var(--ease),
                    box-shadow var(--t) var(--ease);
}

.nav-logo img {
    height:     28px;
    width:      auto;
    display:    block;
    filter:     brightness(0) invert(calc(1 - var(--nav-fade)));
    transition: filter var(--t) var(--ease),
                opacity var(--t) var(--ease);
}
.nav-logo:hover img { opacity: 0.65; }

.nav-links {
    display:     flex;
    align-items: center;
    gap:         0.45rem;
}

.nav-links a {
    font-size:      0.835rem;
    font-weight:    500;
    letter-spacing: 0.01em;
    color:          var(--nav-ink);
    padding:        0.38rem 0.85rem;
    border-radius:  var(--radius-pill);
    text-shadow:    0 1px 10px rgba(0, 0, 0, calc(0.4 * (1 - var(--nav-fade))));
    transition:     background var(--t) var(--ease),
                    color var(--t) var(--ease),
                    text-shadow var(--t) var(--ease);
}
.nav-links a:hover {
    background: rgba(255, 255, 255, calc(0.14 + var(--nav-fade) * 0.78));
    color:      var(--nav-ink);
    text-shadow: none;
}

.nav-cta {
    background: var(--fg) !important;
    color:      #fff !important;
    padding:    0.38rem 1.1rem !important;
}
.nav-cta:hover {
    background: var(--green) !important;
    color:      #fff !important;
}

.nav-actions {
    display:       flex;
    align-items:   center;
    gap:           0;
    margin-left:   0.55rem;
    padding-left:  0.15rem;
}

.nav-icon-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           2.45rem;
    height:          2.45rem;
    padding:         0;
    border:          none;
    border-radius:   var(--radius-pill);
    background:      transparent;
    color:           var(--nav-ink);
    cursor:          pointer;
    text-shadow:     0 1px 10px rgba(0, 0, 0, calc(0.4 * (1 - var(--nav-fade))));
    transition:      background var(--t) var(--ease),
                     color var(--t) var(--ease),
                     text-shadow var(--t) var(--ease);
}

.nav-icon-btn svg {
    width:       1.4rem;
    height:      1.4rem;
    display:     block;
    flex-shrink: 0;
    fill:        currentColor;
}

.nav-icon-btn--pinterest svg {
    transform: scale(1.02);
}

.nav-icon-btn--youtube svg {
    transform: scale(1.22);
}

.nav-icon-btn--contact svg {
    transform: scale(1.08);
}

.nav-icon-btn:hover {
    background:  rgba(255, 255, 255, calc(0.14 + var(--nav-fade) * 0.78));
    color:       var(--nav-ink);
    text-shadow: none;
}

/* Contact button resets (it's a <button> not <a>) */
.nav-contact-btn {
    font-family: inherit;
    font-size:   inherit;
    line-height: inherit;
}

/* ── Mobile menu (hamburger) ───────────────────────────────── */
.nav-menu-btn {
    display:          none;
    align-items:      center;
    justify-content:  center;
    flex-shrink:      0;
    width:            2.65rem;
    height:           2.65rem;
    padding:          0;
    border:           1px solid rgba(23, 28, 23, calc(0.14 * var(--nav-fade)));
    border-radius:    13px;
    background:       rgba(255, 255, 255, calc(var(--nav-fade) * 0.92));
    box-shadow:       0 2px 12px rgba(0, 0, 0, calc(0.06 * var(--nav-fade)));
    cursor:           pointer;
    transition:       background var(--t) var(--ease),
                      border-color var(--t) var(--ease),
                      box-shadow var(--t) var(--ease);
}

.nav-menu-btn:hover {
    background:   rgba(255, 255, 255, calc(0.22 + var(--nav-fade) * 0.73));
    border-color: rgba(23, 28, 23, calc(0.1 + var(--nav-fade) * 0.12));
}

.nav-menu-btn__bars {
    display:        flex;
    flex-direction: column;
    justify-content: center;
    gap:            5px;
    width:          1.05rem;
}

.nav-menu-btn__bar {
    display:       block;
    height:        2px;
    width:         100%;
    background:    var(--nav-ink);
    border-radius: 1px;
    transition:    transform 0.3s var(--ease),
                   opacity 0.25s var(--ease),
                   background var(--t) var(--ease);
    transform-origin: center;
}

.nav-menu-btn[aria-expanded="true"] .nav-menu-btn__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-menu-btn[aria-expanded="true"] .nav-menu-btn__bar:nth-child(2) {
    opacity:   0;
    transform: scaleX(0);
}

.nav-menu-btn[aria-expanded="true"] .nav-menu-btn__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-backdrop {
    display:        none;
    position:       fixed;
    inset:          0;
    top:            0;
    background:     rgba(12, 18, 14, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index:        1001;
    animation:      fadeIn 0.28s ease;
}

.nav-mobile-backdrop.open {
    display: block;
}

.nav-mobile-sheet {
    --nav-sheet-pad: 1.35rem;
    position:        fixed;
    z-index:         1002;
    left:            50%;
    right:           auto;
    width:           96%;
    max-width:       1280px;
    top:             calc(env(safe-area-inset-top, 0px) + 6rem);
    max-height:      min(72vh, 28rem);
    visibility:      hidden;
    opacity:         0;
    pointer-events:  none;
    transform:       translateX(-50%) translateY(-14px) scale(0.98);
    transform-origin: top center;
    transition:      opacity 0.32s var(--ease),
                     transform 0.38s cubic-bezier(0.34, 1.15, 0.48, 1),
                     visibility 0.38s;
}

.nav-mobile-sheet.open {
    visibility:     visible;
    opacity:        1;
    pointer-events: auto;
    transform:      translateX(-50%) translateY(0) scale(1);
}

.nav-mobile-sheet__glow {
    position:      absolute;
    inset:         -1px;
    border-radius:   18px;
    background:      linear-gradient(
        135deg,
        rgba(44, 89, 40, 0.35) 0%,
        rgba(255, 255, 255, 0.08) 42%,
        rgba(176, 120, 40, 0.2) 100%
    );
    opacity:         0.9;
    z-index:         0;
    pointer-events:  none;
}

.nav-mobile-sheet__inner {
    position:        relative;
    z-index:         1;
    padding:         var(--nav-sheet-pad);
    border-radius:   17px;
    background:      rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
    box-shadow:      0 24px 60px rgba(15, 22, 18, 0.22),
                     0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    overflow-y:      auto;
    max-height:      inherit;
}

.nav-mobile-sheet__head {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   1rem;
    padding-bottom:  0.85rem;
    border-bottom:   1px solid var(--border);
}

.nav-mobile-sheet__title {
    font-family:    var(--font-head);
    font-size:      0.72rem;
    font-weight:    800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color:          var(--green);
}

.nav-mobile-sheet__close {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           2.25rem;
    height:          2.25rem;
    margin:          -0.35rem -0.35rem -0.35rem 0;
    padding:         0;
    border:          none;
    border-radius:   10px;
    background:      transparent;
    font-size:       1.45rem;
    line-height:     1;
    color:           var(--muted);
    cursor:          pointer;
    transition:      background 0.2s, color 0.2s;
}

.nav-mobile-sheet__close:hover {
    background: rgba(0, 0, 0, 0.05);
    color:      var(--fg);
}

.nav-mobile-sheet__nav {
    display:       flex;
    flex-direction: column;
    gap:           0.35rem;
}

.nav-mobile-sheet__link {
    display:         block;
    width:           100%;
    padding:         0.85rem 1rem;
    border:          none;
    border-radius:   12px;
    font-family:     var(--font-head);
    font-size:       1.05rem;
    font-weight:     600;
    letter-spacing:  -0.02em;
    text-align:      left;
    text-decoration: none;
    color:           var(--fg);
    background:      transparent;
    cursor:          pointer;
    transition:      background 0.2s var(--ease), color 0.2s;
    opacity:         0;
    transform:       translateX(-10px);
}

.nav-mobile-sheet.open .nav-mobile-sheet__link {
    opacity:   1;
    transform: translateX(0);
}

.nav-mobile-sheet.open .nav-mobile-sheet__link:nth-child(1) { transition: opacity 0.35s 0.04s, transform 0.4s 0.04s, background 0.2s, color 0.2s; }
.nav-mobile-sheet.open .nav-mobile-sheet__link:nth-child(2) { transition: opacity 0.35s 0.08s, transform 0.4s 0.08s, background 0.2s, color 0.2s; }
.nav-mobile-sheet.open .nav-mobile-sheet__link:nth-child(3) { transition: opacity 0.35s 0.12s, transform 0.4s 0.12s, background 0.2s, color 0.2s; }
.nav-mobile-sheet.open .nav-mobile-sheet__link:nth-child(4) { transition: opacity 0.35s 0.16s, transform 0.4s 0.16s, background 0.2s, color 0.2s; }
.nav-mobile-sheet.open .nav-mobile-sheet__link:nth-child(5) { transition: opacity 0.35s 0.2s, transform 0.4s 0.2s, background 0.2s, color 0.2s; }
.nav-mobile-sheet.open .nav-mobile-sheet__link:nth-child(6) { transition: opacity 0.35s 0.24s, transform 0.4s 0.24s, background 0.2s, color 0.2s; }

.nav-mobile-sheet__link:hover,
.nav-mobile-sheet__link:focus-visible {
    outline:    none;
    background: rgba(44, 89, 40, 0.08);
    color:      var(--green);
}

.nav-mobile-sheet__link--cta {
    margin-top:     0.5rem;
    padding-top:    1rem;
    border-top:     1px solid var(--border);
    border-radius:  12px;
    font-weight:    700;
    text-align:     center;
    color:          #fff !important;
    background:     var(--fg) !important;
}

.nav-mobile-sheet__link--cta:hover,
.nav-mobile-sheet__link--cta:focus-visible {
    background: var(--green) !important;
    color:      #fff !important;
}

@media (prefers-reduced-motion: reduce) {
    .nav-mobile-sheet,
    .nav-mobile-sheet__link {
        transition-duration: 0.01ms !important;
    }

    .nav-mobile-sheet.open .nav-mobile-sheet__link {
        transition-delay: 0s !important;
    }

    .nav-menu-btn__bar {
        transition-duration: 0.01ms !important;
    }
}

/* ── Contact backdrop ────────────────────────────────────────── */
.contact-backdrop {
    display:    none;
    position:   fixed;
    inset:      0;
    background: rgba(0,0,0,0.35);
    z-index:    200;
    animation:  fadeIn 0.2s ease;
}
.contact-backdrop.open { display: block; }

/* ── Contact dropdown ────────────────────────────────────────── */
.contact-dropdown {
    display:       none;
    position:      fixed;
    top:           82px;
    right:         clamp(1rem, calc((100vw - 880px) / 2), 120px);
    left:          auto;
    width:         100%;
    max-width:     400px;
    background:    #fff;
    border-radius: 16px;
    box-shadow:    0 16px 48px rgba(0,0,0,0.18);
    z-index:       201;
    padding:       1.75rem;
    animation:     dropIn 0.22s cubic-bezier(0.34,1.3,0.64,1);
}
.contact-dropdown.open { display: block; }

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}

.contact-dropdown__header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-bottom:   1.25rem;
}
.contact-dropdown__title {
    font-family:    var(--font-head);
    font-size:      1.1rem;
    font-weight:    800;
    letter-spacing: -0.01em;
    color:          var(--fg);
}
.contact-dropdown__close {
    background: none;
    border:     none;
    font-size:  1.5rem;
    line-height: 1;
    cursor:     pointer;
    color:      var(--muted);
    padding:    0 0.25rem;
    transition: color 0.15s;
}
.contact-dropdown__close:hover { color: var(--fg); }

.contact-form__row    { margin-bottom: 0.75rem; }
.contact-form__input  {
    width:         100%;
    padding:       0.6rem 0.85rem;
    border:        1.5px solid var(--border);
    border-radius: 8px;
    font-family:   var(--font-body);
    font-size:     0.9rem;
    color:         var(--fg);
    background:    #fff;
    outline:       none;
    transition:    border-color 0.2s;
}
.contact-form__input:focus  { border-color: var(--green); }
.contact-form__textarea     { resize: vertical; min-height: 100px; }
.contact-form__captcha      { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.contact-form__captcha-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.contact-form__captcha-input { width: 80px; flex-shrink: 0; }
.contact-form__submit {
    width:         100%;
    padding:       0.72rem;
    background:    var(--green);
    color:         #fff;
    border:        none;
    border-radius: 8px;
    font-family:   var(--font-body);
    font-size:     0.9rem;
    font-weight:   700;
    cursor:        pointer;
    transition:    background 0.2s;
}
.contact-form__submit:hover    { background: var(--green-mid); }
.contact-form__submit:disabled { opacity: 0.6; cursor: default; }
.contact-form__msg {
    margin-top:  0.75rem;
    font-size:   0.82rem;
    font-weight: 500;
    text-align:  center;
    min-height:  1.2em;
}
.contact-form__msg--ok    { color: var(--green); }
.contact-form__msg--error { color: #c0392b; }


/* ════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════ */

.hero {
    position:   relative;
    height:     100vh;
    min-height: 660px;
    display:    flex;
    align-items:     center;
    justify-content: center;
    overflow:   hidden;
}

.hero__bg {
    position:            absolute;
    inset:               0;
    z-index:             0;
    background-size:     cover;
    background-position: center;
    background-color:    #1a2e1a;   /* fallback while loading */
    opacity:    0;
    transform:  scale(1.06);
    filter:     none;
    transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
    will-change: transform;
}

.hero__video {
    position:        absolute;
    inset:           0;
    z-index:         1;
    width:           100%;
    height:          100%;
    object-fit:      cover;
    object-position: center;
    background-color: #1a2e1a;
    opacity:         0;
    transform:       scale(1.06);
    filter:          none;
    transition:      opacity 1.2s var(--ease), transform 1.2s var(--ease);
    will-change:     transform;
    pointer-events:  none;
}

.hero__bg.loaded {
    opacity:   1;
    transform: scale(1.06);
}

.hero__video.is-active {
    opacity:   1;
    transform: scale(1.06);
}

.hero--cinema.hero--image-only .hero__video {
    display: none;
}

.hero--cinema:not(.hero--revealed) .hero__content,
.hero--cinema:not(.hero--revealed) .hero__scroll {
    opacity:        0;
    animation:      none;
    pointer-events: none;
}

.hero--cinema .hero__content,
.hero--cinema .hero__scroll {
    transition: opacity 0.55s var(--ease);
}

.hero--cinema.hero--revealed .hero__content {
    animation: heroIn 1.1s 0.25s var(--ease) both;
    pointer-events: auto;
}

.hero--cinema.hero--revealed .hero__scroll {
    opacity: 1;
    animation: scrollBounce 2.2s var(--ease) infinite;
    pointer-events: auto;
}

.hero__replay {
    position:        absolute;
    right:           2rem;
    bottom:          2.25rem;
    z-index:         3;
    display:         inline-flex;
    align-items:     center;
    gap:             0.35rem;
    padding:         0.5rem 0.75rem;
    border:          1px solid rgba(255, 255, 255, 0.18);
    border-radius:   var(--radius-pill);
    background:      rgba(0, 0, 0, 0.42);
    color:           rgba(255, 255, 255, 0.82);
    font-family:     var(--font-body);
    font-size:       0.65rem;
    font-weight:     500;
    letter-spacing:  0.06em;
    text-transform:  none;
    cursor:          pointer;
    opacity:         0;
    pointer-events:  none;
    transition:      opacity 0.55s var(--ease),
                     transform var(--t) var(--ease),
                     background var(--t) var(--ease),
                     border-color var(--t) var(--ease);
}

.hero__replay svg {
    width:  0.85rem;
    height: 0.85rem;
    fill:   currentColor;
    opacity: 0.9;
}

.hero__replay.is-visible {
    opacity:        0.72;
    pointer-events: auto;
}

.hero__replay:hover {
    opacity:    0.92;
    background: rgba(0, 0, 0, 0.58);
    border-color: rgba(255, 255, 255, 0.28);
    transform:  none;
}

.hero__credit {
    position:       absolute;
    left:           2rem;
    bottom:         2.25rem;
    z-index:        3;
    margin:         0;
    font-size:      0.62rem;
    font-weight:    500;
    letter-spacing: 0.04em;
    color:          rgba(255, 255, 255, 0.55);
    text-shadow:    0 1px 8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.hero__overlay {
    display: none;
}

.hero__content {
    position:    relative;
    z-index:     3;
    text-align:  center;
    color:       #fff;
    max-width:   100%;
    padding:     2rem;
    padding-top: 6rem;
    animation:  heroIn 1.1s 0.25s var(--ease) both;
}

.hero--cinema .hero__content {
    animation: none;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.hero__label {
    display:        inline-block;
    font-size:      0.68rem;
    font-weight:    600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color:          rgba(255, 255, 255, 0.92);
    margin-bottom:  1.4rem;
}

.hero__title {
    font-family:    var(--font-head);
    font-size:      clamp(2.85rem, 6.5vw, 5.35rem);
    font-weight:    800;
    line-height:    1.03;
    letter-spacing: -0.025em;
    color:          #fff;
    margin-bottom:  1.25rem;
}

.hero__title--rotate {
    display:        flex;
    flex-direction: column;
    align-items:    flex-start;
    width:          max-content;
    max-width:      100%;
    font-size:      clamp(2.35rem, 5.5vw, 4.35rem);
    line-height:    1.12;
    margin-left:    auto;
    margin-right:   auto;
    text-align:     left;
}

.hero__rotate-line {
    display:         inline-flex;
    align-items:     baseline;
    justify-content: flex-start;
    gap:             0.35em;
    white-space:     nowrap;
}

.hero__rotate-slot {
    display:        inline-block;
    vertical-align: baseline;
    flex-shrink:    0;
    overflow:       hidden;
    transition:     width 0.35s var(--ease);
}

.hero__rotate {
    display:        inline-block;
    white-space:    nowrap;
    font-family:    'Caveat', cursive;
    font-size:      1.35em;
    font-weight:    700;
    font-style:     normal;
    color:          #ffb703;
    letter-spacing: 0.01em;
    vertical-align: baseline;
    line-height:    1;
    transition:     opacity 0.35s var(--ease),
                    transform 0.35s var(--ease),
                    font-size 0.35s var(--ease);
    text-shadow:
        0 0 18px rgba(255, 160, 0, 0.65),
        0 0 36px rgba(255, 120, 0, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.45);
}

.hero__rotate-future {
    flex-shrink: 0;
}

.hero__rotate.is-out {
    opacity:   0;
    transform: translateY(-0.35em);
}

@media (prefers-reduced-motion: reduce) {
    .hero__rotate {
        transition: none;
    }

    .hero__rotate-slot {
        transition: none;
    }
}

.hero__sub {
    font-size:     clamp(0.95rem, 1.75vw, 1.1rem);
    font-weight:   600;
    line-height:   1.75;
    color:         rgba(255, 255, 255, 0.78);
    max-width:     720px;
    margin:        0 auto 2.75rem;
}

.hero__label,
.hero__title,
.hero__sub,
.hero__scroll {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 2px 14px rgba(0, 0, 0, 0.38),
        0 4px 32px rgba(0, 0, 0, 0.28);
}

.btn {
    display:        inline-block;
    padding:        0.875rem 2.4rem;
    border-radius:  var(--radius-pill);
    font-family:    var(--font-body);
    font-size:      0.875rem;
    font-weight:    600;
    letter-spacing: 0.025em;
    transition:     transform var(--t) var(--ease),
                    box-shadow var(--t) var(--ease),
                    background var(--t) var(--ease);
}

.btn--hero {
    background: #ffffff;
    color:      var(--fg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}
.btn--hero:hover {
    transform:  translateY(-3px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
}

.hero__scroll {
    position:   absolute;
    bottom:     2.25rem;
    left:       50%;
    transform:  translateX(-50%);
    z-index:    3;
    display:    flex;
    flex-direction: column;
    align-items:    center;
    gap:        0.45rem;
    color:      rgba(255, 255, 255, 0.42);
    font-size:  0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    animation:  scrollBounce 2.2s var(--ease) infinite;
}

.hero__scroll:hover {
    color: rgba(255, 255, 255, 0.65);
}
.hero__scroll svg {
    width:  18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill:   none;
    stroke-linecap:  round;
    stroke-linejoin: round;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0);   }
    50%       { transform: translateX(-50%) translateY(7px); }
}


/* ════════════════════════════════════════════════════════════════
   SLALOM ROWS
   ════════════════════════════════════════════════════════════════ */

/* Home only: air after hero, before Mission 01 */
main:has(.row) {
    padding-top: clamp(2.2rem, 4.4vw, 4.2rem);
}

.row {
    display:     flex;
    align-items: stretch;
    min-height:  72vh;
    margin-bottom: 4.5rem;
    border-radius: 4px;
    overflow: hidden;
    gap:        1rem;
}

.row--even {
    flex-direction: row-reverse;
}

/* Text side — fills space beside fixed-width image column */
.row__text {
    flex:           1 1 0%;
    min-width:      0;
    display:        flex;
    flex-direction: column;
    justify-content: center;
    padding:        7rem 5.5rem;
}

/* Image side — 55% of row width, same height as text (stretch) */
.row__media {
    flex:           0 0 55%;
    width:          55%;
    max-width:      55%;
    min-width:      0;
    min-height:     0;
    overflow:       hidden;
    display:        flex;
    flex-direction: column;
}

.row__media img {
    flex:             1 1 auto;
    width:            100%;
    min-height:       0;
    object-fit:       cover;
    object-position:  center;
    display:          block;
    transition:       transform 0.72s var(--ease);
}
.row:hover .row__media img {
    transform: scale(1.045);
}

/* Featured mission (homepage) — intro row + full timeline below */
.row.row--featured {
    display:    block;
    min-height: auto;
    overflow:   visible;
    margin-bottom: 2rem;
}

.mission-featured__intro {
    max-width:   760px;
    margin:      0 auto;
    padding:     clamp(1.6rem, 3.2vw, 2.6rem) clamp(1.5rem, 4vw, 2.5rem) 1rem;
    text-align:  center;
}

.row__text--featured {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    padding:        0;
}

.row__text--featured .row__body {
    max-width:  560px;
    margin-left:  auto;
    margin-right: auto;
}

.row__text--featured .row__cta.row__cta--inline {
    display:         inline;
    margin-top:      0;
    align-self:      auto;
    white-space:     nowrap;
    border-bottom:   1.5px solid rgba(44, 89, 40, 0.35);
    padding-bottom:  0.12em;
}

.mission-timeline {
    position:   relative;
    max-width:  1180px;
    margin:     clamp(2.5rem, 5vw, 4.5rem) auto 0;
    padding:    0 clamp(1.25rem, 4vw, 2.5rem) 3.5rem;
}

.mission-timeline__track {
    position:       absolute;
    left:           50%;
    top:            0;
    bottom:         0;
    width:          5rem;
    transform:      translateX(-50%);
    pointer-events: none;
    z-index:        2;
}

.mission-timeline__start-dot {
    position:      absolute;
    top:           0;
    left:          50%;
    width:         15px;
    height:        15px;
    border-radius: 50%;
    background:    #333;
    transform:     translate(-50%, -50%);
    z-index:       1;
}

.mission-timeline__end-arrow {
    position:   absolute;
    bottom:     0;
    left:       50%;
    transform:  translate(-50%, 50%);
    color:      var(--green-mid);
    opacity:    0.55;
    line-height: 0;
}

.mission-timeline__end-arrow svg {
    display:      block;
    width:        22px;
    height:       22px;
    stroke:       currentColor;
    stroke-width: 2;
    fill:         none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mission-timeline__track svg {
    display: block;
    width:   100%;
    height:  100%;
}

.mission-timeline__track path {
    fill:            none;
    stroke:          var(--green-mid);
    stroke-width:    3;
    stroke-linecap:  round;
    stroke-linejoin: round;
    opacity:         0.45;
}

.mission-timeline__chapters {
    list-style: none;
    margin:     0;
    padding:    0;
    position:   relative;
    z-index:    1;
}

.mission-timeline__chapter {
    margin-bottom: clamp(4rem, 8vw, 6.5rem);
}

.mission-timeline__chapter:last-child {
    margin-bottom: 2.75rem;
}

.mission-timeline__chapter-inner {
    display:                 grid;
    grid-template-columns:   minmax(0, 1fr) 5rem minmax(0, 1fr);
    column-gap:              2.5rem;
    align-items:             center;
}

.mission-timeline__copy {
    grid-column: 1;
    grid-row:    1;
    text-align:  right;
    min-width:   0;
    justify-self: end;
    max-width:   420px;
}

.mission-timeline__media {
    grid-column:   3;
    grid-row:      1;
    border-radius: 12px;
    overflow:      hidden;
    aspect-ratio:  14 / 9;
    max-height:    min(38.4vh, 368px);
    box-shadow:    0 4px 24px rgba(0, 0, 0, 0.08);
    min-width:     0;
    justify-self:  start;
    width:         100%;
    max-width:     420px;
}

.mission-timeline__media img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    transition: transform 0.72s var(--ease);
}

.mission-timeline__chapter:hover .mission-timeline__media img {
    transform: scale(1.04);
}

.mission-timeline__chapter--flip .mission-timeline__copy {
    grid-column:  3;
    justify-self: start;
    text-align:   left;
}

.mission-timeline__chapter--flip .mission-timeline__media {
    grid-column:  1;
    justify-self: end;
}

.mission-timeline__badge {
    display:        inline-block;
    font-family:    var(--font-body);
    font-size:      0.62rem;
    font-weight:    600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color:          #fff;
    background:     var(--green);
    padding:        0.28rem 0.6rem;
    border-radius:  var(--radius-pill);
    line-height:    1.2;
    white-space:    nowrap;
    margin-bottom:  0.55rem;
}

.mission-timeline__title {
    font-family:    var(--font-head);
    font-size:      clamp(1.75rem, 3.2vw, 2.4rem);
    font-weight:    800;
    line-height:    1.1;
    letter-spacing: -0.02em;
    color:          var(--fg);
    margin-bottom:  0.85rem;
}

.mission-timeline__body {
    font-size:   1.025rem;
    line-height: 1.85;
    color:       var(--muted);
    max-width:   420px;
}

.mission-meanings {
    max-width:  1080px;
    margin:     clamp(3rem, 6vw, 5rem) auto 0;
    padding:    0 clamp(1.25rem, 4vw, 2.5rem) clamp(2.5rem, 5vw, 4rem);
}

.mission-meanings__heading {
    font-family:    var(--font-head);
    font-size:      clamp(1.65rem, 3.2vw, 2.2rem);
    font-weight:    800;
    color:          var(--fg);
    letter-spacing: -0.02em;
    text-align:     center;
    margin-bottom:  clamp(2rem, 4vw, 3rem);
}

.mission-meanings__grid {
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   clamp(1.5rem, 3vw, 2.5rem);
}

.mission-meanings__grid + .mission-meanings__grid {
    margin-top: clamp(2rem, 4vw, 3rem);
}

.mission-meanings__item {
    text-align: center;
    padding:    0 0.5rem;
}

.mission-meanings__icon {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           4.25rem;
    height:          4.25rem;
    margin:          0 auto 1.25rem;
    color:           var(--green-mid);
    opacity:         0.45;
}

.mission-meanings__icon svg {
    width:           100%;
    height:          100%;
    stroke:          currentColor;
    fill:            none;
    stroke-width:    1.6;
    stroke-linecap:  round;
    stroke-linejoin: round;
}

.mission-meanings__title {
    font-family:    var(--font-head);
    font-size:      1.15rem;
    font-weight:    700;
    line-height:    1.25;
    letter-spacing: -0.01em;
    color:          var(--fg);
    margin-bottom:  0.65rem;
}

.mission-meanings__text {
    font-size:   0.95rem;
    line-height: 1.75;
    color:       var(--muted);
    max-width:   30ch;
    margin:      0 auto;
}

/* Row typography */
.row__num {
    display:        block;
    font-family:    var(--font-head);
    font-size:      0.68rem;
    font-weight:    700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color:          var(--amber);
    margin-bottom:  1rem;
}

.row__heading {
    font-family:    var(--font-head);
    font-size:      clamp(2.6rem, 4.5vw, 3.9rem);
    font-weight:    800;
    color:          var(--fg);
    line-height:    1.04;
    letter-spacing: -0.022em;
    margin-bottom:  0.7rem;
}

.row__tagline {
    font-size:      0.75rem;
    font-weight:    600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color:          var(--green-mid);
    margin-bottom:  1.5rem;
}

.row__body {
    font-size:   1.025rem;
    line-height: 1.85;
    color:       var(--muted);
    max-width:   400px;
    margin-bottom: 0.35rem;
}

.row__cta {
    display:         inline-flex;
    align-items:     center;
    gap:             0.4em;
    margin-top:      2.35rem;
    align-self:      flex-start;
    padding:         0;
    border:          none;
    border-radius:   0;
    background:      transparent;
    color:           var(--green);
    font-size:       0.95rem;
    font-weight:     600;
    letter-spacing:  0.01em;
    text-decoration: none;
    border-bottom:   1.5px solid rgba(44, 89, 40, 0.35);
    padding-bottom:  0.12em;
    transition:      color var(--t) var(--ease),
                     border-color var(--t) var(--ease),
                     gap var(--t) var(--ease);
}

.row__cta:hover {
    color:         var(--green-mid);
    border-bottom-color: var(--green);
    background:  transparent;
    transform:     none;
}

.row__cta:hover .row__cta-arrow {
    transform: translateX(4px);
}

.row__cta-arrow {
    display:       inline-block;
    font-size:   1.05em;
    font-weight:   700;
    line-height:   1;
    transition:    transform var(--t) var(--ease);
}


/* ── Supportive missions grid (homepage) ─────────────────────── */

.missions-support {
    padding:       clamp(3rem, 6vw, 4.5rem) 2rem 5rem;
    margin-bottom:   1rem;
}

.missions-support__inner {
    max-width: 1200px;
    margin:    0 auto;
}

.missions-support__heading {
    font-family:    var(--font-head);
    font-size:      clamp(1.65rem, 3.2vw, 2.2rem);
    font-weight:    800;
    color:          var(--fg);
    letter-spacing: -0.02em;
    text-align:     center;
    margin-bottom:  2.75rem;
}

.missions-support__grid {
    display:               grid;
    grid-template-columns: repeat(2, 1fr);
    gap:                   1.75rem;
}

.mission-card {
    display:       flex;
    flex-direction: column;
    background:    #fff;
    border-radius: 12px;
    overflow:      hidden;
    box-shadow:    0 2px 16px rgba(0, 0, 0, 0.05);
    transition:    transform var(--t) var(--ease),
                   box-shadow var(--t) var(--ease);
}

.mission-card:hover {
    transform:  translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
}

.mission-card__media {
    position:     relative;
    display:      block;
    aspect-ratio: 16 / 7;
    overflow:     hidden;
    text-decoration: none;
}

.mission-card__media img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    transition: transform 0.72s var(--ease);
}

.mission-card:hover .mission-card__media img {
    transform: scale(1.04);
}

.mission-card__overlay {
    position:   absolute;
    inset:      auto 0 0;
    padding:    2.25rem 1.25rem 1rem;
    background: linear-gradient(
        to top,
        rgba(6, 14, 10, 0.82) 0%,
        rgba(6, 14, 10, 0.45) 55%,
        transparent 100%
    );
}

.mission-card__body {
    display:        flex;
    flex-direction: column;
    flex:           1;
    padding:        1.25rem 1.75rem 1.75rem;
}

.mission-card__num {
    display:        block;
    font-family:    var(--font-head);
    font-size:      0.58rem;
    font-weight:    700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color:          rgba(255, 210, 120, 0.95);
    margin-bottom:  0.35rem;
}

.mission-card__title {
    font-family:    var(--font-head);
    font-size:      1.4rem;
    font-weight:    800;
    line-height:    1.15;
    letter-spacing: -0.015em;
    color:          #fff;
    margin:         0;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.45),
        0 2px 12px rgba(0, 0, 0, 0.35);
}

.mission-card__tagline {
    font-size:      0.68rem;
    font-weight:    600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color:          var(--green-mid);
    margin-bottom:  0.85rem;
}

.mission-card__text {
    font-size:   0.9rem;
    line-height: 1.65;
    color:       var(--muted);
    flex:        1;
    display:     -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow:    hidden;
}

.mission-card__body .row__cta {
    margin-top: 1.25rem;
    font-size:  0.875rem;
}


/* ════════════════════════════════════════════════════════════════
   FADE-IN ANIMATION
   ════════════════════════════════════════════════════════════════ */

.fade-in {
    opacity:    0;
    transform:  translateY(26px);
    transition: opacity  0.9s var(--ease),
                transform 0.9s var(--ease);
}
.fade-in.visible {
    opacity:   1;
    transform: none;
}


/* ════════════════════════════════════════════════════════════════
   CTA SECTION
   ════════════════════════════════════════════════════════════════ */

.cta-section {
    background:  var(--row-alt);
    padding:     7rem 2rem;
    border-top:  1px solid var(--border);
}

.cta-section__inner {
    max-width: 1200px;
    margin:    0 auto;
}

.cta-section__header {
    text-align:    center;
    margin-bottom: 3.5rem;
}

.cta-section__title {
    font-family:    var(--font-head);
    font-size:      clamp(2rem, 4vw, 3rem);
    font-weight:    800;
    color:          var(--fg);
    letter-spacing: -0.02em;
    margin-bottom:  0.75rem;
}

.cta-section__sub {
    font-size:  1.05rem;
    color:      var(--muted);
    max-width:  500px;
    margin:     0 auto;
    line-height: 1.7;
}

.cta-grid {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   1.5rem;
    align-items:           stretch;
}

.cta-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.cta-grid > .cta-box,
.cta-grid-row__grid > .cta-box {
    height: 100%;
}

.cta-box {
    background:    #ffffff;
    border-radius: 15px;
    padding:       2rem 1.75rem;
    display:       flex;
    flex-direction: column;
    gap:           0.75rem;
    box-shadow:    0 2px 16px rgba(0, 0, 0, 0.05);
    transition:    transform var(--t) var(--ease),
                   box-shadow var(--t) var(--ease);
}

/* Equal-height cards: grow gap above the action block, not inside the body text */
.cta-box > .heart-cta,
.cta-box > .cta-socials,
.cta-box > .nl-form,
.cta-box > .crypto-tabs,
.cta-box > .cta-box__btn,
.cta-box > a.cta-box__btn,
.cta-box > a:not(.cta-box__btn) {
    margin-top: auto;
}

.cta-box > .heart-cta + .cta-box__btn,
.cta-box > .heart-cta + .heart-cta__msg {
    margin-top: 0;
}

.cta-box:hover {
    transform:  translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
}

.cta-box__title {
    font-family:    var(--font-head);
    font-size:      1.2rem;
    font-weight:    700;
    color:          var(--fg);
    letter-spacing: -0.01em;
}

.cta-box__body {
    font-size:   0.925rem;
    line-height: 1.65;
    color:       var(--muted);
}

.cta-box__link {
    display:     inline-block;
    font-size:   0.85rem;
    font-weight: 600;
    color:       var(--green);
    transition:  color var(--t) var(--ease),
                 letter-spacing var(--t) var(--ease);
    margin-top:  0.5rem;
}

.cta-box__link:hover {
    color:          var(--amber);
    letter-spacing: 0.02em;
}

.cta-box__btn {
    display:         inline-block;
    margin-top:      0;
    padding:         0.55rem 1.25rem;
    font-size:       0.85rem;
    font-weight:     600;
    font-family:     inherit;
    color:           #fff;
    background:      var(--green);
    border:          none;
    border-radius:   999px;
    cursor:          pointer;
    text-decoration: none;
    transition:      background var(--t) var(--ease), transform var(--t) var(--ease);
}

.cta-box__btn:hover {
    background: var(--amber);
    transform:  translateY(-1px);
}

.cta-box__btn:active {
    transform: translateY(0);
}

.cta-box__btn--icon {
    display:     inline-flex;
    align-items: center;
    gap:         0.45rem;
}

.cta-box__btn-icon {
    width:      1.1rem;
    height:     1.1rem;
    flex-shrink: 0;
    fill:       currentColor;
}

/* Crypto donation tabs (CTA row 2, box 3) */
.crypto-tabs {
    margin-top: 0.25rem;
    width:      100%;
}

.crypto-tabs__nav {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   0.35rem;
    margin-bottom:         1rem;
}

.crypto-tabs__tab {
    padding:       0.4rem 0.25rem;
    font-size:     0.68rem;
    font-weight:   600;
    font-family:   inherit;
    line-height:   1.2;
    color:         var(--muted);
    background:    transparent;
    border:        1px solid var(--border);
    border-radius: 999px;
    cursor:        pointer;
    transition:    color var(--t) var(--ease),
                   background var(--t) var(--ease),
                   border-color var(--t) var(--ease);
}

.crypto-tabs__tab:hover {
    color:       var(--fg);
    border-color: var(--fg);
}

.crypto-tabs__tab.is-active {
    color:            #fff;
    background:       var(--green);
    border-color:     var(--green);
}

.crypto-tabs__panels {
    display:         flex;
    justify-content: center;
    min-height:      180px;
}

.crypto-tabs__panel {
    display: none;
    width:   100%;
    text-align: center;
}

.crypto-tabs__panel.is-active {
    display: block;
}

.crypto-tabs__qr {
    display:      block;
    width:        180px;
    height:       180px;
    max-width:    100%;
    margin:       0 auto;
    border-radius: 8px;
    object-fit:   contain;
}

@media (max-width: 500px) {
    .crypto-tabs__tab {
        font-size: 0.62rem;
        padding:   0.35rem 0.15rem;
    }
}

/* Social share icons (Share #sharphill CTA) */
.cta-socials {
    display:     flex;
    align-items: center;
    gap:         0.55rem;
    margin-top:  0;
    flex-wrap:   wrap;
}

.cta-socials__link {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           34px;
    height:          34px;
    background:      transparent;
    color:           var(--fg);
    transition:      color     var(--t) var(--ease),
                     transform var(--t) var(--ease);
}

.cta-socials__link svg {
    width:  22px;
    height: 22px;
    fill:   currentColor;
}

.cta-socials__link:hover {
    color:     var(--amber);
    transform: translateY(-2px);
}

.cta-socials__link:active {
    transform: translateY(0);
}

/* Second row of CTA cards */
.cta-grid-row {
    grid-column: 1 / -1;
}

.cta-grid-row__grid {
    display:               grid;
    grid-template-columns: repeat(4, 1fr);
    gap:                   1.5rem;
    align-items:           stretch;
}

@media (max-width: 900px) {
    .cta-grid-row__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .cta-grid-row__grid {
        grid-template-columns: 1fr;
    }
}

/* Newsletter form */
.nl-form {
    width: 100%;
}

.nl-form__row {
    display:   flex;
    flex-wrap: wrap;
    gap:       0.5rem;
    width:     100%;
}

.nl-form__input {
    flex:          1 1 120px;
    padding:       0.55rem 0.9rem;
    font-size:     0.85rem;
    font-family:   inherit;
    color:         var(--ink);
    background:    var(--row-alt);
    border:        1px solid #ddd;
    border-radius: 999px;
    outline:       none;
    transition:    border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
    min-width:     0;
}

.nl-form__input::placeholder {
    color: #aaa;
}

.nl-form__input:focus {
    border-color: var(--green);
    box-shadow:   0 0 0 3px rgba(74, 124, 89, 0.12);
}

.nl-form__submit {
    flex-shrink: 0;
    white-space: nowrap;
}

.nl-form__submit--full {
    display:    block;
    width:      100%;
    margin-top: 0;
}

.nl-form__msg {
    margin-top:  0;
    font-size:   0.8rem;
    font-weight: 500;
    min-height:  0;
    color:       var(--muted);
}

.nl-form__msg--ok    { color: var(--green); }
.nl-form__msg--error { color: #c0392b; }

/* Heart counter (CTA box 1) */
.heart-cta {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    text-align:     center;
    gap:            0.25rem;
    margin:         0;
}

.heart-cta__badge {
    position:       relative;
    display:        flex;
    align-items:    center;
    justify-content: center;
    width:          4.25rem;
    height:         3.85rem;
    margin-bottom:  0;
}

.heart-cta__icon {
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    color:           var(--fg);
    pointer-events:  none;
    user-select:     none;
}

.heart-cta__icon svg {
    width:        4rem;
    height:       4rem;
    fill:         none;
    stroke:       currentColor;
    stroke-width: 1.35;
}

.heart-cta__count {
    position:    relative;
    z-index:     1;
    font-family: var(--font-head);
    font-size:   1.15rem;
    font-weight: 800;
    color:       var(--fg);
    line-height: 1;
    transition:  transform 0.25s var(--ease);
}

.heart-cta__count--bump {
    transform: scale(1.2);
}

.heart-cta__label {
    font-size:  0.8rem;
    color:      var(--muted);
    letter-spacing: 0.02em;
}

.heart-cta__msg {
    margin-top:  0;
    font-size:   0.8rem;
    font-weight: 500;
    min-height:  0;
}

.heart-cta__msg--ok    { color: var(--green); }
.heart-cta__msg--error { color: #c0392b; }

@media (max-width: 960px) {
    .cta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .cta-grid {
        grid-template-columns: 1fr;
    }
    .cta-section { padding: 4rem 1.5rem; }
}


/* ════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════ */

.site-footer {
    background:  var(--footer-bg);
    border-top:  1px solid var(--border);
    padding:     4rem 2rem 2.5rem;
}

.footer__inner {
    max-width: 1140px;
    margin:    0 auto;
    display:   flex;
    flex-direction: column;
    gap:       2rem;
}

.footer__top {
    display:         flex;
    align-items:     flex-start;
    justify-content: space-between;
    gap:             2rem;
}

.footer__logo img {
    height:     22px;
    width:      auto;
    opacity:    0.75;
    margin-bottom: 0.75rem;
    transition: opacity var(--t) var(--ease);
}
.footer__logo:hover img { opacity: 1; }

.footer__tagline {
    font-size:   0.875rem;
    color:       var(--muted);
    line-height: 1.6;
    max-width:   280px;
}

.footer__nav {
    display:     flex;
    align-items: center;
    gap:         0.2rem;
    flex-wrap:   wrap;
}

.footer__nav a {
    font-size:   0.845rem;
    font-weight: 500;
    color:       var(--muted);
    padding:     0.38rem 0.85rem;
    border-radius: var(--radius-pill);
    transition:  color var(--t) var(--ease),
                 background var(--t) var(--ease);
}
.footer__nav a:hover {
    color:      var(--fg);
    background: var(--border);
}

.footer__bottom {
    border-top:  1px solid var(--border);
    padding-top: 1.5rem;
}

.footer__copy {
    font-size: 0.78rem;
    color:     var(--muted);
    opacity:   0.65;
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
    .row,
    .row--even {
        flex-direction: column;
    }

    .mission-featured__intro {
        padding: 3rem 1.75rem 1.75rem;
    }

    .row__text--featured {
        padding: 0;
    }

    .mission-timeline {
        padding-top: 0;
    }

    .mission-timeline__track {
        display: none;
    }

    .mission-timeline__chapter-inner {
        grid-template-columns: 1fr;
        column-gap:            0;
        padding-left:          0;
    }

    .mission-meanings__grid {
        grid-template-columns: 1fr;
        gap:                   2.25rem;
    }

    .mission-meanings__item {
        max-width: 420px;
        margin:    0 auto;
    }

    .mission-timeline__copy,
    .mission-timeline__chapter--flip .mission-timeline__copy {
        grid-column:   1;
        grid-row:      1;
        justify-self:  stretch;
        max-width:     none;
        text-align:    left;
    }

    .mission-timeline__media,
    .mission-timeline__chapter--flip .mission-timeline__media {
        grid-column:  1;
        grid-row:     2;
        max-height:   240px;
        justify-self: stretch;
        max-width:    none;
    }

    .row__text {
        padding:    4.5rem 3rem;
        order:      2;
    }

    .row__media {
        flex:       1 1 auto;
        width:      100%;
        max-width:  none;
        min-height: min(52vw, 340px);
        order:      1;
    }

    .row__media img {
        min-height: min(52vw, 340px);
    }

    .missions-support__grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .nav-menu-btn {
        display: flex;
    }

    .footer__top {
        flex-direction: column;
        gap:            1.5rem;
    }
}

@media (max-width: 600px) {
    .row__text  { padding: 3.5rem 1.75rem; }
    .hero__title { font-size: 2.4rem; }

    .nav-pill   { gap: 1rem; }
    .nav-logo img { height: 24px; }
}

/* Disable parallax on mobile (iOS fix) */
@media (max-width: 768px) {
    .hero__bg,
    .hero__video {
        background-attachment: scroll;
    }
}


/* ════════════════════════════════════════════════════════════════
   PAGE HERO (subpages — shorter than full-height home hero)
   ════════════════════════════════════════════════════════════════ */

.page-hero {
    position:   relative;
    height:     52vh;
    min-height: 360px;
    display:    flex;
    align-items:     center;
    justify-content: center;
    overflow:   hidden;
}

.page-hero .hero__bg {
    background-attachment: fixed;
}

.page-hero .hero__content {
    animation:   heroIn 1.1s 0.2s var(--ease) both;
    padding-top: 7rem;
}


/* ════════════════════════════════════════════════════════════════
   STORY PAGE
   ════════════════════════════════════════════════════════════════ */

.story-intro {
    padding:    3.5rem 2rem 0;
    max-width:  900px;
    margin:     0 auto;
    text-align: center;
}

.story-intro p {
    font-family:    var(--font-head);
    font-size:      clamp(1.35rem, 2.8vw, 2rem);
    font-weight:    300;
    line-height:    1.55;
    color:          var(--fg);
}

.story-intro span {
    color: var(--green);
}

.story-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.story-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 4rem;
    align-items: start;
}

.story-prelude {
    margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
    padding-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
    border-bottom: 1px solid var(--border);
}

.story-crunch {
    margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
    padding-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
    border-bottom: 1px solid var(--border);
}

.story-heading {
    font-family:    var(--font-head);
    font-size:      clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight:    800;
    line-height:    1.1;
    letter-spacing: -0.02em;
    color:          var(--fg);
    margin-bottom:  1.75rem;
}

.story-body {
    font-size:     1rem;
    line-height:   1.8;
    color:         var(--muted);
    margin-bottom: 1.25rem;
}

.story-body a {
    color:                 #0d3310;
    font-weight:           600;
    text-decoration:       underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.22em;
    text-decoration-color: rgba(13, 51, 16, 0.45);
    text-decoration-skip-ink: auto;
    transition:            color 0.2s, text-decoration-color 0.2s;
}

.story-body a:hover {
    color:                 #07220a;
    text-decoration-color: rgba(7, 34, 10, 0.75);
}

/* Mission detail pages — primary title + section subheadings (h3) */
.mission-detail .mission-detail__sub {
    font-family:    var(--font-head);
    font-size:      clamp(1.32rem, 2.75vw, 1.72rem);
    font-weight:    800;
    line-height:    1.15;
    letter-spacing: -0.02em;
    color:          #4d554c;
    color:          color-mix(in srgb, var(--fg) 58%, var(--muted) 42%);
    margin-top:     clamp(1.85rem, 3.5vw, 2.75rem);
    margin-bottom:  0.65rem;
}

.mission-detail .mission-detail__sub:first-of-type {
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

/* Mission 1 — satellite map + cabin rendering duo */
.mission-detail__visual {
    display:         flex;
    flex-direction:  row;
    align-items:     flex-end;
    justify-content: flex-start;
    gap:             0;
    margin-top:      clamp(2rem, 4vw, 3rem);
    max-width:       100%;
}

.mission-detail__visual-map,
.mission-detail__visual-cabin {
    margin: 0;
}

.mission-detail__visual-map {
    flex:        1 1 58%;
    min-width:   0;
    position:    relative;
    z-index:     0;
}

.mission-detail__visual-map img {
    width:         100%;
    height:        auto;
    border-radius: 10px;
    box-shadow:    0 14px 40px rgba(23, 28, 23, 0.12);
    border:        1px solid var(--border);
}

.mission-detail__visual-cabin {
    flex:         0 1 46%;
    min-width:    0;
    margin-bottom: 0.35rem;
    margin-left:  -12%;
    position:     relative;
    z-index:      1;
}

.mission-detail__visual-cabin img {
    width:         100%;
    height:        auto;
    border-radius: 10px;
    box-shadow:    0 20px 50px rgba(23, 28, 23, 0.18);
    border:        1px solid var(--border);
}

.mission-detail__visual-caption {
    margin-top:    0.85rem;
    font-size:     0.9rem;
    line-height:   1.55;
    font-style:    italic;
    color:         var(--muted);
    text-align:    center;
}

@media (max-width: 720px) {
    .mission-detail__visual {
        flex-direction: column;
        align-items:    stretch;
    }

    .mission-detail__visual-cabin {
        align-self:    flex-end;
        flex:          0 1 auto;
        width:         min(100%, 22rem);
        margin-left:   0;
        margin-top:    -2.25rem;
        margin-bottom: 0;
    }
}

.story-aside {
    background:    var(--row-alt);
    border-radius: 12px;
    padding:       2rem 1.75rem;
    position:      sticky;
    top:           6rem;
}

.story-aside__heading {
    font-family:    var(--font-head);
    font-size:      0.7rem;
    font-weight:    700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color:          var(--green);
    margin-bottom:  1.25rem;
}

.story-checklist {
    list-style: none;
    display:    flex;
    flex-direction: column;
    gap: 0.85rem;
}

.story-checklist li {
    display:     flex;
    align-items: flex-start;
    gap:         0.65rem;
    font-size:   0.9rem;
    line-height: 1.55;
    color:       var(--fg);
}

.story-checklist li::before {
    content:     '✓';
    flex-shrink: 0;
    font-size:   0.8rem;
    font-weight: 700;
    color:       var(--green);
    margin-top:  0.1em;
}

.story-signature {
    margin-top:  2rem;
    font-family: var(--font-head);
    font-size:   1.05rem;
    font-weight: 700;
    color:       var(--fg);
}

.story-signature span {
    display:        block;
    font-family:    var(--font-body);
    font-size:      0.78rem;
    font-weight:    500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color:          var(--muted);
    margin-top:     0.2rem;
}

.story-manifesto-box {
    margin-top: 0;
}

.story-manifesto-box__desc {
    font-size:   0.88rem;
    line-height: 1.6;
    color:       var(--muted);
    margin:      0.5rem 0 1.25rem;
}

.story-manifesto-box__btn {
    display:        block;
    text-align:     center;
    padding:        0.7rem 1.25rem;
    background:     var(--green);
    color:          #fff;
    border-radius:  var(--radius-pill);
    font-family:    var(--font-body);
    font-size:      0.85rem;
    font-weight:    600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition:     background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.story-manifesto-box__btn:hover {
    background:  var(--green-mid);
    transform:   translateY(-2px);
    box-shadow:  0 6px 20px rgba(44, 89, 40, 0.25);
}

/* ── Mission detail (mini War Room sidebar) ───────────────────── */
.story-body--lead {
    font-size:   clamp(1.15rem, 2vw, 1.35rem);
    line-height: 1.65;
    color:       var(--fg);
    font-weight: 500;
}

.story-aside--mission {
    --ms-bg:     #0f140f;
    --ms-panel:  #151c15;
    --ms-border: rgba(255, 255, 255, 0.1);
    --ms-green:  #5aba54;
    --ms-text:   #ddeedd;
    --ms-muted:  #8aaa88;
    --ms-label:  rgba(255, 255, 255, 0.28);

    background:   var(--row-alt);
    border:       1px solid var(--border);
}

.ms-warbox {
    background:    var(--ms-bg);
    border-radius: 10px;
    border:        1px solid var(--ms-border);
    padding:       0.65rem 0.75rem;
    max-height:    min(68vh, 572px);
    overflow-y:    auto;
    overflow-x:    hidden;
    box-shadow:    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ms-warbox__empty {
    font-size:   0.85rem;
    line-height: 1.6;
    color:       var(--ms-muted);
    padding:     1.25rem 0.75rem;
    text-align:  center;
}

.ms-task {
    display:       flex;
    gap:           0.75rem;
    padding:       0.75rem 0.6rem;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    border:        1px solid transparent;
    font-family:   var(--font-body);
    transition:    background 0.2s, border-color 0.2s;
}

.ms-task:last-child {
    margin-bottom: 0;
}

.ms-task:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.ms-task--done {
    opacity: 0.5;
}

.ms-task__body {
    flex:     1;
    min-width: 0;
}

.ms-task__title {
    font-family:    var(--font-head);
    font-size:      0.92rem;
    font-weight:    700;
    color:          var(--ms-text);
    letter-spacing: -0.01em;
    margin-bottom:  0.28rem;
    line-height:    1.25;
}

.ms-task__desc {
    font-size:   0.74rem;
    line-height: 1.55;
    color:       var(--ms-muted);
    margin-bottom: 0.35rem;
}

.ms-task__more {
    display:         inline-block;
    font-size:      0.68rem;
    font-weight:     600;
    letter-spacing:  0.05em;
    color:           var(--ms-green);
    text-decoration: none;
}

.ms-task__more:hover {
    color: #8add84;
}

.ms-ring {
    flex-shrink: 0;
    margin-top:  0.05rem;
}

.ms-ring__track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 2.5;
}

.ms-ring__fill {
    fill: none;
    stroke: var(--ms-green);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.ms-ring__label {
    font-family: var(--font-head);
    font-size:   10px;
    font-weight: 700;
    fill:        var(--ms-text);
    dominant-baseline: middle;
    text-anchor: middle;
}

.ms-ring__check {
    fill: none;
    stroke: var(--ms-green);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ms-warbox__footer-link {
    display:         block;
    margin-top:      1rem;
    text-align:      center;
    font-size:       0.8rem;
    font-weight:     600;
    color:           var(--green);
    text-decoration: none;
    letter-spacing:  0.03em;
}

.ms-warbox__footer-link:hover {
    color: var(--green-mid);
}

/* ════════════════════════════════════════════════════════════════
   SHOP PAGE
   ════════════════════════════════════════════════════════════════ */

.shop-search {
    margin-bottom: 3rem;
}

.shop-search__input {
    width:         100%;
    padding:       0.85rem 1.25rem;
    font-family:   var(--font-body);
    font-size:     1rem;
    color:         var(--fg);
    background:    #fff;
    border:        1.5px solid var(--border);
    border-radius: var(--radius-pill);
    outline:       none;
    transition:    border-color 0.2s, box-shadow 0.2s;
}

.shop-search__input:focus {
    border-color: var(--green);
    box-shadow:   0 0 0 3px rgba(74, 124, 89, 0.12);
}

.shop-search__input::placeholder { color: #aaa; }

.shop-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap:                   1.75rem;
}

.shop-card {
    background:     var(--row-alt);
    border:         1px solid var(--border);
    border-radius:  12px;
    overflow:       hidden;
    display:        flex;
    flex-direction: column;
    transition:     transform 0.2s, box-shadow 0.2s;
}

.shop-card:hover {
    transform:  translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.07);
}

.shop-card__img-link { display: block; }

.shop-card__img {
    width:       100%;
    height:      180px;
    object-fit:  cover;
    display:     block;
}

.shop-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap:     0.5rem;
    flex:    1;
}

.shop-card__name {
    font-family:    var(--font-head);
    font-size:      1.1rem;
    font-weight:    700;
    color:          var(--fg);
    letter-spacing: -0.01em;
}

.shop-card__desc {
    font-size:   0.88rem;
    line-height: 1.65;
    color:       var(--muted);
    flex:        1;
}

.shop-card__link {
    display:         inline-block;
    margin-top:      0.25rem;
    font-size:       0.8rem;
    font-weight:     600;
    color:           var(--green);
    text-decoration: none;
    transition:      color 0.2s;
}

.shop-card__link:hover { color: var(--green-mid); }

.shop-empty {
    padding:    3rem 0;
    text-align: center;
    font-size:  1rem;
    color:      var(--muted);
}

/* ════════════════════════════════════════════════════════════════
   BLOG PAGE
   ════════════════════════════════════════════════════════════════ */

.blog-layout {
    display:               grid;
    grid-template-columns: 1fr 260px;
    gap:                   4rem;
    align-items:           start;
}

.blog-feed {
    padding-left:   2rem;
    display:        flex;
    flex-direction: column;
    gap:            0;
}

.blog-post-full {
    padding-bottom: 3.5rem;
    margin-bottom:  3.5rem;
    border-bottom:  1px solid var(--border);
}

.blog-post-full:last-child {
    border-bottom: none;
}

.blog-post-full__cover {
    width:         100%;
    max-height:    420px;
    object-fit:    cover;
    border-radius: 10px;
    margin-bottom: 1.75rem;
    display:       block;
}

.blog-post-full__header {
    margin-bottom: 1.25rem;
}

.blog-card__date {
    display:        block;
    font-size:      0.68rem;
    font-weight:    600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color:          var(--muted);
    margin-bottom:  0.5rem;
}

.blog-post-full__title {
    font-family:    var(--font-head);
    font-size:      clamp(1.6rem, 3vw, 2.25rem);
    font-weight:    800;
    line-height:    1.15;
    letter-spacing: -0.02em;
    color:          var(--fg);
}

.blog-post-full__title a {
    color:           inherit;
    text-decoration: none;
}

.blog-post-full__title a:hover { color: var(--green); }

.blog-post-full__content {
    margin-bottom: 1.25rem;
}

.blog-card__link {
    font-size:   0.8rem;
    font-weight: 600;
    color:       var(--green);
    text-decoration: none;
}

.blog-card__link:hover { color: var(--green-mid); }

/* ── Pagination ──────────────────────────────────────────────── */
.blog-pagination {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             1.5rem;
    padding-top:     1rem;
}

.blog-pagination__btn {
    font-size:       0.85rem;
    font-weight:     600;
    color:           var(--green);
    text-decoration: none;
    transition:      color 0.2s;
}

.blog-pagination__btn:hover { color: var(--green-mid); }

.blog-pagination__btn--disabled {
    color:  var(--border);
    cursor: default;
}

.blog-pagination__info {
    font-size:  0.78rem;
    color:      var(--muted);
    white-space: nowrap;
}

/* ── Single post ─────────────────────────────────────────────── */
.post-layout {
    display:               grid;
    grid-template-columns: 1fr 260px;
    gap:                   4rem;
    align-items:           start;
}

.post-content {
    font-size:   1rem;
    line-height: 1.7;
    color:       var(--fg);
}

/* Quill content styles for front-end rendering */
.ql-content h2 { font-family: var(--font-head); font-size: 1.7rem; font-weight: 800; margin: 2rem 0 0.6rem; line-height: 1.2; }
.ql-content h3 { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 0.4rem; }
.ql-content p  { margin-bottom: 0.65rem; line-height: 1.7; }
/* Collapse empty paragraphs Quill inserts as spacers */
.ql-content p:empty,
.ql-content p > br:only-child { display: block; margin: 0; line-height: 0; }
.ql-content ul, .ql-content ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.ql-content li { margin-bottom: 0.25rem; }
.ql-content blockquote { border-left: 3px solid var(--green); padding-left: 1.25rem; margin: 1.25rem 0; color: var(--muted); font-style: italic; }
.ql-content a  { color: var(--green); }
.ql-content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.ql-content strong { font-weight: 700; }

@media (max-width: 768px) {
    .post-layout  { grid-template-columns: 1fr; gap: 2rem; }
    .blog-layout  { grid-template-columns: 1fr; }
    .blog-sidebar { display: none; }
    .blog-feed    { padding-left: 0; }
}

@media (max-width: 768px) {
    .story-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .story-aside {
        position: static;
    }

    .page-hero {
        height: 44vh;
        min-height: 280px;
    }

    .page-hero .hero__bg {
        background-attachment: scroll;
    }
}

/* ── Simulation page (warroom-style app shell) ───────────────── */

.sim-body {
    height: 100%;
    background: #faf9f5;
}

.sim-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.sim-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.9rem 1.75rem;
    border-bottom: 1px solid #e4e4de;
    background: #faf9f5;
}

.sim-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sim-logo {
    height: 26px;
}

.sim-desc {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
    flex: 1;
    min-width: 0;
    text-align: right;
}

.sim-toolbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 0.85rem 1.75rem;
    border-bottom: 1px solid #e4e4de;
    background: #fff;
}

.sim-layout {
    display: grid;
    grid-template-columns: 1fr min(340px, 35%);
    gap: 1.5rem;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

.sim-board {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.sim-sidebar {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 0;
}

.sim-sidebar__controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #e4e4de;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sim-sidebar__explain {
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #e4e4de;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sim-sidebar__explain-title {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0 0 0.65rem;
}

.sim-sidebar__explain-text {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

.sim-sidebar__explain-more {
    margin: 0.85rem 0 0;
}

.sim-sidebar__link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
}

.sim-sidebar__link:hover {
    text-decoration: underline;
}

.sim-page--scroll {
    max-height: none;
    overflow: visible;
}

.sim-numbers {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1.75rem 2.5rem;
}

.sim-numbers__intro {
    margin: 0 0 1.5rem;
}

.sim-numbers__back {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--green);
    text-decoration: none;
}

.sim-numbers__back:hover {
    text-decoration: underline;
}

.sim-numbers__section {
    margin-bottom: 2.25rem;
}

.sim-numbers__heading {
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0 0 0.75rem;
}

.sim-numbers__subheading {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg);
    margin: 1.25rem 0 0.65rem;
}

.sim-numbers__text,
.sim-numbers__note {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--muted);
    margin: 0 0 1rem;
}

.sim-numbers__note {
    font-size: 0.82rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.sim-numbers__table-wrap {
    overflow-x: auto;
    border: 1px solid #e4e4de;
    border-radius: 8px;
    background: #fff;
}

.sim-numbers__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.sim-numbers__table th,
.sim-numbers__table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid rgba(44, 89, 40, 0.08);
}

.sim-numbers__table thead th {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green);
    background: rgba(44, 89, 40, 0.04);
}

.sim-numbers__table tbody th {
    font-weight: 600;
    color: var(--fg);
}

.sim-numbers__table tbody tr:last-child th,
.sim-numbers__table tbody tr:last-child td {
    border-bottom: none;
}

.sim-numbers__list {
    margin: 0.5rem 0 1rem;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--fg);
}

.sim-numbers__list li {
    padding-left: 0.25rem;
}

.sim-numbers__sources {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--muted);
}

.sim-numbers__sources a {
    color: var(--green);
}

.sim-numbers__algo {
    background: #f4f9f6;
    border-left: 3px solid #2d7a4f;
    border-radius: 0 6px 6px 0;
    padding: 0.9rem 1.15rem;
    margin: 0.65rem 0 1.35rem;
}

.sim-numbers__algo-formula {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.81rem;
    color: #163524;
    line-height: 1.75;
    white-space: pre-wrap;
    margin: 0 0 0.55rem;
}

.sim-numbers__algo-explain {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.62;
    margin: 0;
}

.sim-numbers__step-label {
    font-family: var(--font-head);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2d7a4f;
    margin: 1.5rem 0 0.3rem;
}

.sim-numbers__divider {
    border: none;
    border-top: 1px solid #e4e4de;
    margin: 2rem 0;
}

.sim-toggle--sidebar {
    display: flex;
    flex-direction: row;
    width: 100%;
    padding: 3px;
}

.sim-toggle--sidebar .sim-toggle__btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
}

.sim-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem 1.75rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: #e4e4de transparent;
}

.sim-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-bottom: 2rem;
}

.sim-toggle {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(44, 89, 40, 0.08);
    border: 1px solid rgba(44, 89, 40, 0.15);
}

.sim-toggle__btn {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sim-toggle__btn.is-active {
    background: var(--green);
    color: #fff;
}

.sim-timeline {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.sim-timeline__label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--fg);
}

.sim-timeline__input {
    width: 100%;
    accent-color: var(--green);
    cursor: pointer;
}

.sim-timeline__ends {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.sim-canvas {
    position: relative;
    width: 100%;
}

.sim-flows {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.sim-flow-path {
    opacity: 0.85;
    stroke: var(--green);
    stroke-width: 3;
}

.sim-flow-path--animate {
    stroke-dasharray: 8 6;
    animation: sim-flow-dash 1.2s linear infinite;
}

@keyframes sim-flow-dash {
    to { stroke-dashoffset: -28; }
}

.sim-flow-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    fill: var(--green);
}

.sim-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
}

.sim-population-box {
    grid-column: 1;
}

.sim-box {
    background: #fff;
    border: 1px solid #e4e4de;
    border-radius: 10px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sim-box__title {
    font-family: var(--font-head);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    margin: 0 0 1rem;
}

.sim-public-sector-box {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
    padding: 1rem 1.5rem;
}

.sim-public__desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 0;
    max-width: 640px;
    margin-inline: auto;
}

.sim-population-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sim-pop-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(44, 89, 40, 0.1);
}

.sim-pop-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sim-pop-row--fund:last-child {
    border-bottom: 1px solid #b8dff0;
    padding-bottom: 0.85rem;
}

.sim-pop-row:first-child {
    padding-top: 0;
}

.sim-pop-row__main {
    flex: 1;
    min-width: 0;
}

.sim-pop-row__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 0.15rem;
}

.sim-pop-row__income {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.sim-pop-row__power {
    font-size: 0.78rem;
    font-weight: 500;
    margin: 0.35rem 0 0;
}

.sim-pop-row__power-base {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
}

.sim-pop-row__hint {
    font-size: 0.68rem;
    color: var(--muted);
    margin: 0.15rem 0 0;
    font-style: italic;
}

.sim-wealth-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(44, 89, 40, 0.12);
    overflow: hidden;
}

.sim-wealth-bar__fill {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--green-mid), var(--green));
    transition: width 0.35s ease;
    width: 0;
}

.sim-wealth-bar--corp .sim-wealth-bar__fill {
    background: linear-gradient(90deg, #6b8f6a, var(--green-mid));
}

.sim-wealth-bar--fund .sim-wealth-bar__fill {
    background: linear-gradient(90deg, #2e7d9c, #4db8d8);
}

.sim-pop-row--fund {
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #f0faff 0%, #f8fdff 100%);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    border: 1px solid #b8dff0;
    border-bottom: 1px solid #b8dff0;
}

.sim-pop-row--fund + * {
    border-top: none;
}

.sim-pop-row:has(+ #simCwFundRow) {
    border-bottom: none;
}

.sim-pop-row__name--fund {
    color: #1f6b8a;
}


/* Confetti canvas */
.sim-confetti {
    position: fixed;
    inset: 0;
    z-index: 900;
    pointer-events: none;
    display: none;
}

.sim-cw-fund__desc {
    font-size: 0.68rem;
    color: #4a8fa8;
    margin: 0.4rem 0 0;
    font-style: italic;
    line-height: 1.4;
}

.sim-spending-icons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
}

.sim-spending-icons__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fg);
}

.sim-spending-icons__label {
    flex: 1;
    font-weight: 500;
    color: var(--muted);
    text-transform: capitalize;
}

.sim-corp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sim-corp-sector__name {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.sim-retained {
    border-top: 1px solid rgba(44, 89, 40, 0.12);
    padding-top: 0.85rem;
}

.sim-retained__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 0 0 0.4rem;
}

.sim-retained__val {
    font-size: 0.78rem;
    margin: 0.35rem 0 0;
    color: var(--fg);
}

.sim-disclaimer {
    text-align: center;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 1.25rem;
    font-style: italic;
}

.sim-disclaimer__link {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sim-disclaimer__link:hover {
    color: var(--green);
}

.sim-co2 {
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #e4e4de;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sim-co2__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.55rem;
}

.sim-co2__label {
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
}

.sim-co2__value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fg);
}

.sim-co2__track {
    height: 10px;
    border-radius: 5px;
    background: rgba(44, 89, 40, 0.1);
    overflow: hidden;
}

.sim-co2__fill {
    height: 100%;
    border-radius: 5px;
    width: 0%;
    transition: width 0.4s ease, background 0.4s ease;
}

.sim-co2__ends {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.sim-error {
    color: #b03828;
    text-align: center;
    padding: 2rem;
}

@media (max-width: 900px) {
    .sim-layout {
        grid-template-columns: 1fr;
    }

    .sim-board {
        grid-column: 1;
        grid-row: 2;
    }

    .sim-sidebar {
        grid-column: 1;
        grid-row: 1;
        position: static;
    }

    .sim-co2 {
        display: none;
    }

    .sim-sidebar__explain {
        display: none;
    }
}

@media (max-width: 768px) {
    .sim-header {
        flex-wrap: wrap;
        gap: 0.6rem 1rem;
        padding: 0.85rem 1.25rem;
    }

    .sim-desc {
        flex-basis: 100%;
    }

    .sim-main {
        padding: 1rem 1.25rem 1.25rem;
    }

    .sim-page {
        max-height: none;
        overflow: auto;
    }

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

    .sim-pop-row {
        flex-direction: column;
    }

    .sim-spending-icons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sim-flow-path--animate {
        animation: none;
        stroke-dasharray: none;
    }

    .sim-wealth-bar__fill {
        transition: none;
    }
}
