/* Dipper website styles. Plain CSS, no build step, no external fonts or scripts.
   Tokens from brand/colors/dipper-colors.json and DipperDesign (NightSky mesh, Celebration). */
:root {
    --night: #0A0F2C;
    --night-high: #1F2B66;
    --starlight: #F6C453;
    --starlight-text: #8A6100;
    --drop: #15803D;
    --surface: #F6F7FB;
    --card: #FFFFFF;
    --ink: #0A0F2C;
    --ink-muted: #4A5070;
    --line: rgba(10, 15, 44, 0.10);
    --on-night: #F4F6FF;
    --on-night-muted: #C9CDE6;
    /* System rounded fonts only. Swap in a self-hosted open-license font (e.g. Nunito, SIL OFL) later. */
    --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
    --radius-card: 28px;
    --radius-tile: 18px;
    --max: 1160px;
    color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #0B0D1A;
        --card: #151829;
        --ink: #F4F6FF;
        --ink-muted: #B9BEDA;
        --line: rgba(244, 246, 255, 0.12);
        --starlight-text: #F6C453;
        --drop: #4ADE80;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--starlight-text); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--starlight); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 3.25rem; z-index: 20; background: var(--starlight); color: var(--night); padding: .5rem 1rem; border-radius: 999px; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-weight: 900; font-size: clamp(2.6rem, 6vw, 4.75rem); }
h2 { font-weight: 900; font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-weight: 800; font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.125rem, 2vw, 1.3rem); }
.muted { color: var(--ink-muted); }

/* Prelaunch bar */
.status-bar {
    position: sticky; top: 0; z-index: 10;
    background: rgba(10, 15, 44, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--on-night); text-align: center; font-weight: 800; font-size: .9375rem;
    padding: .55rem 1rem;
}
.status-bar .spark { color: var(--starlight); }
.status-bar.draft { background: #8A6100; }

/* Night surfaces: navy to violet mesh with a magenta glow (DipperDesign NightSky) */
.night {
    position: relative; isolation: isolate; color: var(--on-night);
    background:
        radial-gradient(60% 55% at 100% 100%, #733880 0%, transparent 70%),
        radial-gradient(55% 60% at 90% 10%, #3B2173 0%, transparent 70%),
        radial-gradient(70% 70% at 45% 60%, #293385 0%, transparent 75%),
        linear-gradient(160deg, #0A0F2B 0%, #121F57 45%, #212B6B 100%);
}
.night::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7; pointer-events: none;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 14%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 22% 72%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 37% 32%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 51% 86%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 63% 18%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 76% 58%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 88% 30%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 94% 80%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 14% 46%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 70% 92%, #fff 50%, transparent 51%);
}
.night .muted { color: var(--on-night-muted); }
.night a { color: var(--starlight); }

/* Header */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--on-night) !important; text-decoration: none; font-weight: 900; font-size: 1.6rem; }
.brand img { width: 52px; height: auto; }
.nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--on-night); text-decoration: none; font-weight: 700; font-size: .975rem; }
.nav a:not(.btn):hover { color: var(--starlight); }
@media (max-width: 860px) { .nav a:not(.btn) { display: none; } }

/* Buttons and chips */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px;
    font-weight: 800; text-decoration: none; font-size: 1rem; border: 2px solid transparent;
}
.btn-gold { background: var(--starlight); color: var(--night) !important; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-ghost { border-color: rgba(244, 246, 255, .55); color: var(--on-night) !important; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px;
    font-weight: 800; font-size: .875rem; border: 1.5px solid currentColor;
}
.night .chip { color: var(--starlight); }

/* Hero */
.hero { padding-bottom: clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-top: clamp(1.5rem, 4vw, 3.5rem); }
.hero h1 { margin-top: 1rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero .fine { margin-top: 1.2rem; font-size: .9375rem; }
.hero-constellation { width: min(140px, 40%); margin-bottom: .5rem; }
.hero-phones { display: flex; justify-content: center; align-items: flex-end; gap: 1.25rem; }
.hero-phones .phone:first-child { transform: translateY(1.5rem); }
@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-phones .phone:first-child { transform: none; }
}

/* Phone frame: generic CSS frame, not Apple device art */
.phone { margin: 0; width: clamp(160px, 22vw, 270px); flex: none; }
.phone .frame {
    border-radius: 44px; padding: 9px; background: #10121C;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset, 0 24px 60px rgba(10, 15, 44, .35);
}
.phone img { width: 100%; height: auto; aspect-ratio: 644 / 1400; object-fit: contain; border-radius: 36px; background: #1a1d2e; }
.phone figcaption { margin-top: .7rem; font-size: .9rem; font-weight: 700; text-align: center; color: var(--ink-muted); }
.night .phone figcaption { color: var(--on-night-muted); }

/* Sections */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.alt { background: var(--card); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.flip > :first-child { order: 2; }
.phones { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.eyebrow { margin-bottom: .9rem; }
ul.points { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .8rem; }
ul.points li { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; }
ul.points li::before { content: "✦"; color: var(--starlight-text); font-size: 1rem; line-height: 1.6; }
.night ul.points li::before { color: var(--starlight); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.2rem; }
.card { background: var(--card); border-radius: var(--radius-card); padding: 1.6rem; border: 1px solid var(--line); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.6rem; }
.tile { display: flex; gap: .9rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-tile); padding: 1rem; }
.tile .icon { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; }
.tile .icon svg { width: 24px; height: 24px; }
.tile h3 { font-size: 1.0625rem; margin: .1rem 0 .2rem; }
.tile p { margin: 0; font-size: .9375rem; color: var(--ink-muted); }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: .8rem; align-items: start; }
.steps li::before {
    content: counter(step); width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
    background: var(--night); color: var(--starlight); font-weight: 900;
}
.steps h3 { margin-bottom: .2rem; }

.note { margin-top: 1.4rem; font-size: .9rem; color: var(--ink-muted); }

.closing { text-align: center; }
.closing .lead { max-width: 40rem; margin-inline: auto; }
.closing img { width: 140px; margin: 0 auto 1.2rem; }

.site-footer { padding-block: 3rem; }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: start; }
.site-footer .links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: .4rem; }
.site-footer p { font-size: .9375rem; }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Privacy page */
.doc { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.doc .wrap { max-width: 50rem; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.doc h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-top: 2.6rem; }
.doc h3 { margin-top: 1.6rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .45rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .65rem .7rem; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 800; }
.doc .table-scroll { overflow-x: auto; }
.callout { background: var(--card); border: 2px solid var(--starlight-text); border-radius: var(--radius-tile); padding: 1rem 1.2rem; margin: 1.2rem 0; }
.decision { display: inline-block; font-weight: 800; color: var(--starlight-text); }
.decision::before { content: "Decision needed: "; text-transform: none; }
.module { border-top: 1px solid var(--line); padding-top: .4rem; }
.module-label { display: inline-block; font-size: .75rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; border: 1.5px solid currentColor; margin-right: .4rem; vertical-align: .15em; }
.module-label.current { color: var(--drop); }
.module-label.planned { color: var(--starlight-text); }

/* Motion: constellation draws itself, star twinkles. Off for Reduce Motion. */
.draw { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.4s ease-out .3s forwards; }
.twinkle { animation: twinkle 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
    .draw { animation: none; stroke-dashoffset: 0; }
    .twinkle { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
    .status-bar { background: var(--night); backdrop-filter: none; -webkit-backdrop-filter: none; }
    .status-bar.draft { background: #8A6100; }
}
@media (prefers-contrast: more) {
    .card, .tile { border-width: 2px; border-color: currentColor; }
    .constellation-line { stroke-opacity: 1; }
    .night::before { opacity: .35; }
}

@media (max-width: 520px) { .hero-phones { gap: .6rem; } .hero-phones .phone { width: min(43%, 190px); } .phone img { border-radius: 24px; } }
