:root {
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-sans: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --bg: #eef4f2;
    --bg-elevated: #f7faf9;
    --surface: #ffffff;
    --fg: #132028;
    --fg-muted: #4a5c66;
    --accent: #0d7c72;
    --accent-hover: #0a635c;
    --accent-soft: rgba(13, 124, 114, 0.12);
    --border: rgba(19, 32, 40, 0.1);
    --border-subtle: rgba(19, 32, 40, 0.06);
    --nav-bg: rgba(247, 250, 249, 0.88);
    --nav-fg: #132028;
    --nav-border: rgba(19, 32, 40, 0.08);
    --overlay-bg: rgba(238, 244, 242, 0.96);
    --hero-grad-1: #c8e4de;
    --hero-grad-2: #eef4f2;
    --hero-grad-3: #d4e8f0;
    --hero-orb: rgba(13, 124, 114, 0.28);
    --hero-orb-2: rgba(47, 110, 140, 0.18);
    --grid-line: rgba(19, 32, 40, 0.045);
    --shadow-soft: 0 20px 60px rgba(19, 32, 40, 0.08);
    --content-max: 720px;
    --page-pad: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f171c;
        --bg-elevated: #152028;
        --surface: #1a262e;
        --fg: #e8f0ee;
        --fg-muted: #9ab0b8;
        --accent: #3dbeb0;
        --accent-hover: #5fd0c3;
        --accent-soft: rgba(61, 190, 176, 0.16);
        --border: rgba(232, 240, 238, 0.12);
        --border-subtle: rgba(232, 240, 238, 0.06);
        --nav-bg: rgba(15, 23, 28, 0.9);
        --nav-fg: #e8f0ee;
        --nav-border: rgba(232, 240, 238, 0.1);
        --overlay-bg: rgba(15, 23, 28, 0.97);
        --hero-grad-1: #143038;
        --hero-grad-2: #0f171c;
        --hero-grad-3: #1a2a38;
        --hero-orb: rgba(61, 190, 176, 0.22);
        --hero-orb-2: rgba(80, 140, 180, 0.16);
        --grid-line: rgba(232, 240, 238, 0.04);
        --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.35);
    }
}

[data-theme="dark"] {
    --bg: #0f171c;
    --bg-elevated: #152028;
    --surface: #1a262e;
    --fg: #e8f0ee;
    --fg-muted: #9ab0b8;
    --accent: #3dbeb0;
    --accent-hover: #5fd0c3;
    --accent-soft: rgba(61, 190, 176, 0.16);
    --border: rgba(232, 240, 238, 0.12);
    --border-subtle: rgba(232, 240, 238, 0.06);
    --nav-bg: rgba(15, 23, 28, 0.9);
    --nav-fg: #e8f0ee;
    --nav-border: rgba(232, 240, 238, 0.1);
    --overlay-bg: rgba(15, 23, 28, 0.97);
    --hero-grad-1: #143038;
    --hero-grad-2: #0f171c;
    --hero-grad-3: #1a2a38;
    --hero-orb: rgba(61, 190, 176, 0.22);
    --hero-orb-2: rgba(80, 140, 180, 0.16);
    --grid-line: rgba(232, 240, 238, 0.04);
    --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.35);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
}

.content {
    margin-top: calc(var(--nav-row-height) + var(--web-app-banner-height));
    padding: var(--section-gap) var(--page-pad) calc(var(--section-gap) * 2);
    min-height: calc(100vh - var(--nav-row-height) - var(--web-app-banner-height) - 80px);
}

.page-shell {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
}

.page-shell h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.page-shell h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
}

.page-shell h3 {
    font-family: var(--font-sans);
    font-weight: 650;
    font-size: 1.05rem;
    margin: 1.5rem 0 0.5rem;
}

.page-shell p,
.page-shell li {
    color: var(--fg-muted);
    margin: 0 0 0.85rem;
}

.page-shell ul {
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}

.status-text {
    font-size: 0.9rem;
    color: var(--fg-muted);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-min);
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

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

/* --- HERO (index only) --- */
body.page-home {
    overflow-x: clip;
}

body.page-home .content {
    margin-top: 0;
    padding: 0;
    min-height: 100vh;
}

.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
        calc(var(--web-app-banner-height) + var(--nav-row-height) + clamp(32px, 8vh, 72px))
        var(--page-pad)
        clamp(48px, 10vh, 96px);
    overflow: hidden;
}

.hero__plane {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 55% at 78% 28%, var(--hero-orb), transparent 60%),
        radial-gradient(ellipse 55% 45% at 12% 78%, var(--hero-orb-2), transparent 55%),
        linear-gradient(145deg, var(--hero-grad-1) 0%, var(--hero-grad-2) 42%, var(--hero-grad-3) 100%);
    animation: hero-breathe 14s ease-in-out infinite alternate;
}

.hero__plane::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
    opacity: 0.9;
}

.hero__plane::after {
    content: "";
    position: absolute;
    width: min(52vw, 520px);
    height: min(52vw, 520px);
    right: -4%;
    top: 18%;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    box-shadow:
        inset 0 0 0 40px color-mix(in srgb, var(--accent) 6%, transparent),
        0 0 80px var(--hero-orb);
    animation: hero-ring 18s ease-in-out infinite alternate;
}

.hero__copy {
    position: relative;
    z-index: 1;
    max-width: 34rem;
    animation: hero-rise 0.9s ease-out both;
}

.hero__brand {
    font-family: var(--font-display);
    font-weight: 650;
    font-size: clamp(2.75rem, 8vw, 4.75rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--fg);
    margin: 0 0 1.25rem;
}

.hero__headline {
    font-family: var(--font-sans);
    font-weight: 550;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--fg);
    margin: 0 0 0.75rem;
}

.hero__support {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    color: var(--fg-muted);
    margin: 0 0 1.75rem;
    max-width: 28rem;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.9rem 1.75rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 650;
    font-size: 1rem;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-soft);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(13, 124, 114, 0.22);
}

@keyframes hero-breathe {
    from { filter: saturate(1) brightness(1); }
    to { filter: saturate(1.08) brightness(1.03); }
}

@keyframes hero-ring {
    from { transform: translate(0, 0) scale(1); opacity: 0.85; }
    to { transform: translate(-3%, 4%) scale(1.06); opacity: 1; }
}

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__plane,
    .hero__plane::after,
    .hero__copy {
        animation: none;
    }
}

footer {
    margin-top: auto;
    padding: 24px var(--page-pad) 32px;
    text-align: center;
    color: var(--fg-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-subtle);
}

footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

footer a:hover {
    color: var(--accent);
}

body.page-home footer {
    position: relative;
    z-index: 2;
    background: transparent;
    border-top: none;
    margin-top: -72px;
    padding-top: 0;
}
