/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0 0;
    background: linear-gradient(180deg, rgba(3, 8, 24, .72), transparent);
    transition: padding .35s var(--ease-out);
}

.site-header__inner {
    position: relative;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 62px;
    padding: 8px 10px 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    border: 1px solid rgba(196, 218, 255, .12);
    border-radius: 22px;
    background: rgba(5, 14, 36, .68);
    box-shadow: 0 18px 55px rgba(0, 5, 20, .2), inset 0 1px 0 rgba(255, 255, 255, .04);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    backdrop-filter: blur(18px) saturate(130%);
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.site-header__progress { position: absolute; right: 20px; bottom: -1px; left: 20px; height: 2px; overflow: hidden; border-radius: 999px; background: rgba(185,204,255,.065); pointer-events: none; }
.site-header__progress span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--moon-glow), var(--sky-light) 48%, var(--orange-mid)); box-shadow: 0 0 12px rgba(159,215,255,.45); transform: scaleX(var(--page-progress, 0)); transform-origin: left center; will-change: transform; }

.site-header.is-scrolled { padding-top: 7px; }
.site-header.is-scrolled .site-header__inner { border-color: rgba(196, 218, 255, .18); background: rgba(4, 12, 31, .88); box-shadow: 0 14px 42px rgba(0, 5, 20, .34); }
.admin-bar .site-header { top: 32px; }

.site-title { line-height: 1; }
.site-title a { display: flex; align-items: center; gap: 12px; color: var(--white); }
.site-title a:hover { color: var(--white); text-decoration: none; }
.site-title__icon,
.site-footer__icon { display: block; flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 0; background: transparent; box-shadow: none; object-fit: contain; }
.site-title__icon,
.site-footer__icon { border-radius: 50%; filter: drop-shadow(0 0 9px rgba(255,205,125,.52)) drop-shadow(0 0 22px rgba(255,181,71,.34)) drop-shadow(0 0 42px rgba(255,138,36,.2)); }
.site-title__wordmark { display: flex; align-items: center; gap: 10px; }
.site-title__name { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.045em; text-shadow: 0 0 4px rgba(255,255,255,.65), 0 0 11px rgba(255,255,255,.42), 0 0 25px rgba(220,231,255,.25), 0 0 50px rgba(185,204,255,.16); }

.main-navigation .primary-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.main-navigation .primary-menu > li > a { display: block; padding: 9px 12px; border-radius: 100px; color: rgba(255,255,255,.7); font-size: .78rem; font-weight: 700; white-space: nowrap; transition: color .2s ease, background .2s ease, transform .2s ease; }
.main-navigation .primary-menu > li > a:hover { background: rgba(159,215,255,.09); color: var(--white); text-decoration: none; transform: translateY(-1px); }
.main-navigation .primary-menu > li > a.is-current-section { background: rgba(159,215,255,.085); color: var(--white); }
.main-navigation .primary-menu > li.nav-cta > a { padding-inline: 16px; background: linear-gradient(135deg, var(--orange-mid), var(--orange)); color: #171022; box-shadow: 0 9px 24px rgba(255,138,36,.2); }
.main-navigation .primary-menu > li.nav-cta > a:hover { background: linear-gradient(135deg, #FFD275, #FF932E); color: var(--night); }
.main-navigation .primary-menu > li.nav-cta > a.is-current-section { box-shadow: 0 0 0 3px rgba(255,181,71,.12), 0 10px 28px rgba(255,138,36,.3); }
.menu-toggle { display: none; }

/* Sections */
.home-flow {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 55% 10% at 95% 2%, rgba(141,174,255,.22), transparent 72%),
        radial-gradient(ellipse 50% 12% at 105% 58%, rgba(120,132,255,.19), transparent 72%),
        radial-gradient(ellipse 60% 12% at -8% 80%, rgba(255,138,36,.09), transparent 74%),
        radial-gradient(ellipse 60% 12% at -8% 80%, rgba(86,139,255,.16), transparent 74%),
        linear-gradient(180deg, #060C22 0%, #081A3B 20%, #0C275A 39%, #16244F 59%, #081A3B 78%, #03071A 100%);
}
.home-flow::before { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .1; pointer-events: none; background-image: radial-gradient(circle at center, rgba(255,255,255,.18) 0 1px, transparent 1.4px); background-size: 64px 64px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 16%, transparent 65%, #000); mask-image: linear-gradient(180deg, #000, transparent 16%, transparent 65%, #000); }
.home-flow::after { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: radial-gradient(ellipse 52% 18% at 88% 24%, rgba(86,139,255,.08), transparent 72%), radial-gradient(ellipse 46% 17% at 8% 43%, rgba(255,138,36,.055), transparent 74%), radial-gradient(ellipse 55% 18% at 92% 67%, rgba(141,174,255,.07), transparent 74%), radial-gradient(ellipse 48% 16% at 5% 86%, rgba(86,139,255,.06), transparent 74%); }
.home-flow > section { overflow: visible; background: transparent; isolation: isolate; }
.section { position: relative; padding: clamp(88px, 9vw, 132px) 0; scroll-margin-top: 84px; }
.admin-bar .section { scroll-margin-top: 116px; }
.container { width: min(860px, calc(100% - 48px)); margin: 0 auto; }
.container--wide { width: min(1140px, calc(100% - 48px)); }
.section--alt {
    overflow: visible;
    background: transparent;
    color: var(--white);
}
.section--dusk {
    overflow: visible;
    background: transparent;
    color: var(--white);
}
.section--night { overflow: visible; background: transparent; color: var(--white); }
.section--night::before { content: ''; position: absolute; width: 680px; height: 680px; top: -360px; right: -170px; border-radius: 50%; background: radial-gradient(circle, rgba(220,231,255,.12) 0%, rgba(86,139,255,.08) 34%, transparent 69%); filter: blur(3px); }
.section__header { max-width: 700px; margin: 0 auto clamp(42px, 5vw, 66px); text-align: center; }
.section__header--left { max-width: 620px; margin: 0 0 clamp(42px, 5vw, 66px); text-align: left; }
.section__eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--moon-light); font: 700 .66rem/1.2 'Space Grotesk', sans-serif; letter-spacing: .2em; }
.section__eyebrow::before { content: ''; width: 24px; height: 1px; background: linear-gradient(90deg, var(--moon-glow), var(--orange)); box-shadow: 0 0 10px rgba(141,174,255,.35); }
.section__header:not(.section__header--left) .section__eyebrow { justify-content: center; }
.section__title { margin-bottom: 18px; color: var(--dark); font-size: clamp(2.15rem, 4vw, 3.35rem); font-weight: 800; line-height: 1.24; letter-spacing: -.05em; text-wrap: balance; }
.section__lead { color: var(--gray); font-size: clamp(.96rem, 1.35vw, 1.05rem); line-height: 2; text-wrap: pretty; }
.section--night .section__title { color: var(--white); }
.section--night .section__lead { color: var(--text-soft); }
.section--night .section__eyebrow { color: var(--sky-light); }
.home .section--alt .section__title,
.home .section--dusk .section__title { color: var(--white); }
.home .section--alt .section__lead,
.home .section--dusk .section__lead { color: var(--text-soft); }
.home .section--alt .section__eyebrow,
.home .section--dusk .section__eyebrow { color: var(--moon-light); }

/* Guided page journey */
.journey-nav { position: fixed; z-index: 70; top: 50%; right: 20px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border: 1px solid rgba(185,204,255,.1); border-radius: 999px; background: rgba(4,12,31,.54); box-shadow: 0 16px 42px rgba(0,5,22,.22), inset 0 1px 0 rgba(255,255,255,.04); transform: translateY(-50%); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); }
.journey-nav::before { content: ''; position: absolute; top: 24px; bottom: 24px; left: 50%; width: 1px; background: linear-gradient(180deg, rgba(159,215,255,.08), rgba(185,204,255,.2), rgba(255,181,71,.1)); transform: translateX(-50%); }
.journey-nav a { position: relative; display: grid; width: 20px; height: 30px; place-items: center; color: var(--white); }
.journey-nav a::after { content: ''; position: relative; z-index: 2; width: 5px; height: 5px; border: 1px solid rgba(220,231,255,.46); border-radius: 50%; background: #07142e; box-shadow: 0 0 0 4px rgba(141,174,255,0); transition: width .25s var(--ease-out), height .25s var(--ease-out), border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.journey-nav a span { position: absolute; right: 27px; padding: 5px 8px; border: 1px solid rgba(185,204,255,.12); border-radius: 8px; background: rgba(4,12,31,.88); color: rgba(255,255,255,.72); font: 700 .58rem/1 'Space Grotesk', sans-serif; letter-spacing: .08em; white-space: nowrap; opacity: 0; transform: translateX(5px); transition: opacity .2s ease, transform .25s var(--ease-out); pointer-events: none; }
.journey-nav a:hover { text-decoration: none; }
.journey-nav a:hover span,
.journey-nav a:focus-visible span { opacity: 1; transform: none; }
.journey-nav a[aria-current="location"]::after { width: 8px; height: 8px; border-color: #ffe19a; background: var(--orange-mid); box-shadow: 0 0 0 4px rgba(255,181,71,.11), 0 0 14px rgba(255,181,71,.65); }
.journey-nav a:focus-visible { outline-offset: 2px; border-radius: 8px; }

/* Footer */
.site-footer { position: relative; padding: 90px 0 32px; overflow: hidden; background: #020615; color: var(--text-soft); }
.site-footer::before { content: ''; position: absolute; top: 0; left: 50%; width: min(1140px, calc(100% - 48px)); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(185,204,255,.36), rgba(255,181,71,.26), transparent); }
.site-footer__stars { position: absolute; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.site-footer__star { position: absolute; top: var(--star-y); left: var(--star-x); display: block; border-radius: 50%; transform: translate(-50%, -50%); }
.site-footer__star--first { width: 4px; height: 4px; background: #ffe58a; box-shadow: 0 0 3px #fff3bd, 0 0 10px rgba(255,214,88,.95), 0 0 22px rgba(255,181,71,.42); }
.site-footer__star--first::before,
.site-footer__star--first::after { content: ''; position: absolute; top: 50%; left: 50%; border-radius: 999px; background: linear-gradient(transparent, rgba(255,226,128,.92), transparent); transform: translate(-50%, -50%); }
.site-footer__star--first::before { width: 1px; height: 17px; }
.site-footer__star--first::after { width: 17px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,226,128,.9), transparent); }
.site-footer__star--second { width: 2.5px; height: 2.5px; background: #ffd66b; box-shadow: 0 0 7px rgba(255,205,82,.72); opacity: .8; }
.site-footer__star--third { width: 1.5px; height: 1.5px; background: #ffbe45; box-shadow: 0 0 4px rgba(255,181,71,.46); opacity: .58; }
.site-footer__star--first { animation: star-pulse 5.8s ease-in-out infinite; }
.site-footer__star--first:nth-child(2) { animation-delay: -2.1s; animation-duration: 7.2s; }
.site-footer__star--first:nth-child(3) { animation-delay: -4.4s; animation-duration: 6.5s; }
.site-footer__inner { position: relative; z-index: 2; width: min(1140px, calc(100% - 48px)); margin: 0 auto; }
.site-footer__main { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; padding-bottom: 48px; }
.site-footer__logo-row { display: flex; align-items: center; gap: 14px; }
.site-footer__icon { width: 42px; height: 42px; }
.site-footer__logo { color: var(--white); font: 700 2rem/1 'Space Grotesk', sans-serif; letter-spacing: -.055em; text-shadow: 0 0 4px rgba(255,255,255,.65), 0 0 11px rgba(255,255,255,.42), 0 0 25px rgba(220,231,255,.25), 0 0 50px rgba(185,204,255,.16); }
.site-footer__tagline { margin-top: 20px; color: rgba(255,255,255,.63); font-size: .86rem; line-height: 1.9; letter-spacing: .05em; }
.site-footer__legal ul { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; }
.site-footer__legal a { color: rgba(255,255,255,.63); font-size: .78rem; letter-spacing: .04em; transition: color .2s ease; }
.site-footer__legal a:hover,
.site-footer__legal a:focus-visible { color: var(--white); }
.site-footer__copy { display: flex; justify-content: space-between; gap: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.56); font: 500 .65rem/1.5 'Space Grotesk', sans-serif; letter-spacing: .09em; }

@keyframes star-pulse { 0%, 100% { opacity: .72; filter: brightness(.92); } 50% { opacity: 1; filter: brightness(1.18); } }

/* Interior pages */
body:not(.home) .site-main,
body:not(.home) main#main { min-height: 72vh; }
body:not(.home) .site-main { padding: 84px 0 110px; background: radial-gradient(circle at 90% 0%, rgba(86,139,255,.14), transparent 32%), radial-gradient(circle at 6% 80%, rgba(255,138,36,.07), transparent 28%), linear-gradient(180deg, #07152f, #030817); }
body:not(.home) .content-area { width: 100%; }
body:not(.home) .post,
body:not(.home) .page-content,
body:not(.home) .error-404 { padding: clamp(28px, 5vw, 58px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); background: var(--glass-panel-strong); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%); }
body:not(.home) .entry-title,
body:not(.home) .page-title { margin-bottom: 24px; color: var(--text-bright); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.25; letter-spacing: -.05em; }
body:not(.home) .entry-content,
body:not(.home) .entry-summary,
body:not(.home) .archive-description { color: var(--text-soft); }
body:not(.home) .entry-meta { color: var(--text-muted); }
body:not(.home) .entry-content > * + * { margin-top: 1.2em; }
body:not(.home) .entry-content ul,
body:not(.home) .entry-content ol { padding-left: 1.5em; }
.search-form { display: flex; gap: 10px; margin-top: 24px; }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; min-height: 50px; padding: 11px 15px; border: 1px solid var(--glass-border); border-radius: 14px; background: linear-gradient(145deg, rgba(28,61,120,.38), rgba(4,12,31,.58)); color: var(--white); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.search-form .search-field::placeholder { color: rgba(255,255,255,.5); }
.search-form .search-submit { min-height: 50px; padding: 0 20px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--orange-mid), var(--orange)); color: #211424; cursor: pointer; font-weight: 700; box-shadow: 0 10px 28px rgba(255,138,36,.24); }

.legal-page { width: min(860px, calc(100% - 48px)); margin: 72px auto 110px; padding: clamp(30px, 6vw, 68px); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); background: var(--glass-panel-strong); color: var(--text-soft); box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%); }
.legal-page__back { display: inline-flex; margin-bottom: 38px; color: var(--moon-light); font-size: .84rem; font-weight: 700; }
.legal-page h1 { color: var(--text-bright); font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.3; letter-spacing: -.045em; }
.legal-page__date { margin: 12px 0 38px; color: var(--text-muted); font-size: .8rem; line-height: 1.8; }
.legal-page h2 { margin: 2.2em 0 .7em; padding-top: .8em; border-top: 1px solid rgba(185,204,255,.12); color: var(--text-bright); font-size: clamp(1.2rem, 3vw, 1.55rem); line-height: 1.5; }
.legal-page h3 { margin: 1.8em 0 .6em; color: var(--text-bright); font-size: 1.02rem; line-height: 1.6; }
.legal-page p + p { margin-top: 1em; }
.legal-page ul { list-style: none; margin: 1em 0; padding-left: 0; }
.legal-page ol { margin: 1em 0; padding-left: 1.8em; }
.legal-page ul > li { position: relative; padding-left: 1.05em; }
.legal-page ul > li::before { content: ''; position: absolute; top: .78em; left: .1em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.legal-page li + li { margin-top: .35em; }
.legal-page li > ul,
.legal-page li > ol { margin: .4em 0 .2em; }
.legal-page a { color: var(--moon-light); text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.legal-page a:hover { color: var(--white); }
.legal-page strong { color: var(--text-bright); }
.legal-page__note { color: var(--text-muted); font-size: .84rem; }
.legal-page__table { width: 100%; margin: 1.4em 0; border-collapse: collapse; font-size: .92rem; }
.legal-page__table th,
.legal-page__table td { padding: 15px 16px; border-top: 1px solid rgba(185,204,255,.12); text-align: left; vertical-align: top; line-height: 1.85; }
.legal-page__table tr:last-child th,
.legal-page__table tr:last-child td { border-bottom: 1px solid rgba(185,204,255,.12); }
.legal-page__table th { width: 30%; color: var(--text-bright); font-weight: 700; }
.legal-page__table td > * + * { margin-top: .6em; }
.legal-page__table td ul { margin: .4em 0 0; }

/* Responsive */
@media (max-width: 760px) {
    .site-header { padding: 8px 0 0; }
    .site-header.is-scrolled { padding-top: 5px; }
    .site-header__inner { width: min(100% - 24px, 1180px); min-height: 58px; padding: 7px 8px 7px 12px; border-radius: 19px; }
    .site-title__icon { width: 32px; height: 32px; }
    .menu-toggle { position: relative; z-index: 2; display: grid; gap: 6px; width: 42px; height: 42px; place-content: center; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.035); color: var(--white); cursor: pointer; }
    .menu-toggle span[aria-hidden] { display: block; width: 17px; height: 1.5px; background: var(--white); transition: .2s ease; }
    .menu-toggle[aria-expanded="true"] span[aria-hidden]:first-of-type { transform: translateY(3.75px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span[aria-hidden]:last-of-type { transform: translateY(-3.75px) rotate(-45deg); }
    .main-navigation { position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; visibility: hidden; max-height: calc(100vh - 110px); overflow-y: auto; padding: 10px; border: 1px solid rgba(185,204,255,.14); border-radius: 18px; background: rgba(4,12,31,.97); box-shadow: 0 22px 50px rgba(0,0,0,.35); opacity: 0; transform: translateY(-8px); transition: .25s var(--ease-out); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
    .main-navigation.is-open { visibility: visible; opacity: 1; transform: none; }
    .main-navigation .primary-menu { display: none; flex-direction: column; align-items: stretch; }
    .main-navigation .primary-menu.is-open { display: flex; }
    .main-navigation .primary-menu > li > a { padding: 12px 16px; text-align: center; }
    .section { padding: 88px 0; }
    .container, .container--wide { width: min(100% - 36px, 1120px); }
    .section__header, .section__header--left { margin-bottom: 40px; text-align: left; }
    .section__header:not(.section__header--left) .section__eyebrow { justify-content: flex-start; }
    .section__title { font-size: 2rem; }
    .site-footer { padding-top: 72px; }
    .site-footer__star--first::before { height: 13px; }
    .site-footer__star--first::after { width: 13px; }
    .site-footer__inner { width: min(100% - 36px, 1140px); }
    .site-footer__main { padding-bottom: 38px; }
    .site-footer__copy { flex-direction: column; gap: 8px; }
    .site-footer__legal ul { flex-direction: column; gap: 12px; }
    .legal-page { width: min(100% - 28px, 860px); margin: 40px auto 72px; border-radius: 28px; }
    .legal-page__table tr { display: block; padding: 14px 0; border-top: 1px solid rgba(185,204,255,.12); }
    .legal-page__table tr:last-child { border-bottom: 1px solid rgba(185,204,255,.12); }
    .legal-page__table th,
    .legal-page__table td,
    .legal-page__table tr:last-child th,
    .legal-page__table tr:last-child td { display: block; width: auto; padding: 0; border: 0; }
    .legal-page__table th { margin-bottom: 4px; }
}

@media (max-width: 1320px) {
    .journey-nav { display: none; }
}

@media (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
    .admin-bar .section { scroll-margin-top: 130px; }
}
@media (max-width: 600px) {
    .admin-bar .site-header { top: 0; }
    .admin-bar .section { scroll-margin-top: 84px; }
}

@media (max-width: 430px) {
    .site-title__name { font-size: 1.1rem; }
    .search-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
