/*
 * Orbly marketing site.
 * Dark, minimal, keeps visual parity with the app: deep navy bg, mint
 * accent, gold highlight, generous whitespace. System font stack so no
 * webfont round-trip.
 */

:root {
    --bg:            #0D0F1A;
    --bg-elevated:   #161A2C;
    --border:        rgba(255, 255, 255, 0.08);
    --accent:        #7EFFDB;
    --accent-dim:    rgba(126, 255, 219, 0.55);
    --gold:          #D8C07A;
    --text:          #EDEEF5;
    --text-dim:      rgba(237, 238, 245, 0.68);
    --text-faint:    rgba(237, 238, 245, 0.40);

    --serif:         ui-serif, Georgia, "Times New Roman", serif;
    --sans:          -apple-system, BlinkMacSystemFont, "Segoe UI",
                     Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --mono:          ui-monospace, "SF Mono", Menlo, Monaco, Consolas,
                     "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Subtle radial glow in the centre, matching the app icon backdrop. */
    background:
        radial-gradient(ellipse at top, rgba(126, 255, 219, 0.04), transparent 60%),
        var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 120ms ease;
}
a:hover { color: var(--text); }

/* --- Layout --- */

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

main { flex: 1; }

/* --- Navigation --- */

.site-nav {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}
.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.site-nav .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.site-nav .logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(126, 255, 219, 0.30), transparent 60%),
        var(--bg-elevated);
    border: 2px solid var(--accent);
    position: relative;
}
.site-nav .logo-mark::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
.site-nav ul {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav ul a {
    color: var(--text-dim);
    font-size: 15px;
}
.site-nav ul a:hover { color: var(--text); }

/* --- Hero --- */

.hero {
    /* Fill (almost) the whole fold so the heading + CTA are immediately
       visible without scroll. svh (small viewport height) keeps the math
       stable when iOS Safari's address bar collapses. 80% leaves a
       deliberate ~20svh peek of the section below as a scroll cue. */
    min-height: 80svh;
    padding: 32px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Soft radial vignette behind the headline area so the animated circles
   don't fight the type. Stronger at center, fully transparent at edges,
   so the perimeter circles still read clearly. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 62% 46% at 50% 48%,
        rgba(13, 15, 26, 0.62),
        transparent 72%
    );
    z-index: 1;
    pointer-events: none;
}

/* Bottom fade so circles dissolve into the next section instead of
   sharp-cutting at the hero boundary. */
.hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(180deg, transparent, var(--bg) 92%);
    z-index: 2;
    pointer-events: none;
}

/* Animated background circles. The SVG is sized to the hero, sits behind
   content via z-index, and is decorative-only (pointer-events: none + aria
   marked at the element). The drawing JS injects <path> elements with
   randomized jitter; CSS just defines the canvas. */
.hero .bg-orbits {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}
.hero .container {
    position: relative;
    z-index: 3;
}
.hero h1 {
    font-family: var(--serif);
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
    color: var(--text);
}
.hero h1 em {
    font-style: italic;
    color: var(--accent);
}
.hero .tagline {
    font-size: clamp(18px, 2.3vw, 22px);
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--accent);
    color: var(--bg);
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    transition: transform 120ms ease, box-shadow 120ms ease;
    box-shadow: 0 8px 32px rgba(126, 255, 219, 0.12);
}
.cta:hover {
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 12px 40px rgba(126, 255, 219, 0.24);
}

.app-store-badge {
    display: inline-block;
    margin-top: 8px;
}

/* --- Sections --- */

section {
    padding: 64px 0;
}
section h2 {
    font-family: var(--serif);
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.02em;
    margin: 0 0 32px;
}
section.tinted {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* --- How-it-works 3-step --- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.steps .step {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg);
}
.steps .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(126, 255, 219, 0.12);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}
.steps h3 {
    font-family: var(--serif);
    font-size: 20px;
    margin: 0 0 8px;
}
.steps p {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

/* --- Feature grid --- */

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 48px;
}
.features .feature h3 {
    font-family: var(--serif);
    font-size: 22px;
    margin: 0 0 8px;
    color: var(--accent);
}
.features .feature p {
    color: var(--text-dim);
    margin: 0;
    font-size: 15px;
}

/* --- Article pages (privacy / support / terms) --- */

.article {
    padding: 64px 0 96px;
    max-width: 720px;
}
.article h1 {
    font-family: var(--serif);
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}
.article .subtitle {
    color: var(--text-faint);
    font-size: 15px;
    margin: 0 0 40px;
    font-family: var(--mono);
}
.article h2 {
    font-family: var(--serif);
    font-size: 24px;
    margin: 40px 0 12px;
    color: var(--accent);
}
.article h3 {
    font-size: 18px;
    margin: 28px 0 8px;
    color: var(--text);
}
.article p, .article li {
    color: var(--text-dim);
    line-height: 1.7;
}
.article ul, .article ol {
    padding-left: 24px;
}
.article li { margin: 6px 0; }
.article code {
    font-family: var(--mono);
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--accent);
}
.article hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* --- FAQ accordion --- */

details.faq {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 12px 0;
    background: var(--bg-elevated);
    overflow: hidden;
}
details.faq summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
    content: "+";
    color: var(--accent);
    font-size: 20px;
    transition: transform 120ms ease;
}
details.faq[open] summary::after {
    transform: rotate(45deg);
}
details.faq .faq-body {
    padding: 0 20px 16px;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.6;
}

/* --- Footer --- */

.site-footer {
    margin-top: 64px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 14px;
}
.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}
.site-footer .links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.site-footer .links a {
    color: var(--text-dim);
    font-size: 14px;
}
.site-footer .links a:hover { color: var(--text); }
.site-footer .copy {
    font-size: 13px;
}

/* --- 404 --- */

.notfound {
    padding: 96px 24px;
    text-align: center;
}
.notfound h1 {
    font-family: var(--serif);
    font-size: clamp(48px, 10vw, 96px);
    color: var(--accent);
    margin: 0 0 16px;
}
.notfound p {
    color: var(--text-dim);
    font-size: 18px;
    margin: 0 0 32px;
}

/* --- Responsive --- */

@media (max-width: 720px) {
    .steps { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
    .site-nav { padding: 16px 0; }
    .site-nav .container { flex-direction: column; align-items: flex-start; }
    /* Mobile: keep the hero filling the small viewport, but tighten the
       top padding now that the nav stacks vertically. */
    .hero { min-height: 78svh; padding: 16px 0 0; }
    section { padding: 48px 0; }
}

/* --- Phone mockup placeholders ---

   A CSS-only phone frame so the page works without screenshots, but is
   ready to drop them in. To add real screenshots, replace
       <div class="phone-screen"></div>
   with
       <img class="phone-screen" src="/images/screenshot-foo.png" alt="…">
   and the existing aspect ratio + frame will hold. Image should be
   1320×2868 (6.9" iPhone, the same source we ship to ASC). */

.phone-mockup {
    /* Aspect 9:19.5, capped to a sensible width. */
    width: 100%;
    max-width: 280px;
    aspect-ratio: 9 / 19.5;
    margin: 0 auto;
    padding: 10px;
    background: linear-gradient(180deg, #2A2D3F, #1A1C2A);
    border-radius: 38px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    position: relative;
}
.phone-mockup::before {
    /* Dynamic Island */
    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 84px;
    height: 26px;
    border-radius: 14px;
    background: #000;
    z-index: 2;
}
.phone-screen {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    object-fit: cover;
    background:
        radial-gradient(circle at 50% 35%, rgba(126, 255, 219, 0.18), transparent 55%),
        linear-gradient(180deg, #161A2C, #0D0F1A 80%);
    overflow: hidden;
    position: relative;
}
.phone-screen[data-placeholder]::after {
    /* When no <img> is supplied, the data-placeholder attribute tells the
       reader where the real screenshot will live. Pure typographic — no
       fake-app dressing, so it doesn't get mistaken for the real thing. */
    content: attr(data-placeholder);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.6;
}

/* Showcase section: dedicated home for the hero-grade screenshot
   (Score Reveal). Sits immediately below the hero so the highest-
   converting asset is the first thing a scrolling visitor sees. */
.showcase {
    padding: 96px 0;
}
.showcase .container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
}
.showcase h2 {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 36px);
}
.showcase p {
    color: var(--text-dim);
    font-size: 17px;
    line-height: 1.7;
    margin: 0;
}
.showcase .phone-mockup {
    max-width: 280px;
    justify-self: end;
}
@media (max-width: 720px) {
    .showcase {
        padding: 56px 0;
    }
    .showcase .container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    .showcase .phone-mockup {
        justify-self: center;
    }
}

/* Step variant: tiny phones inside each how-it-works card. */
.steps .phone-mockup.phone-mini {
    max-width: 140px;
    margin: 0 auto 18px;
    padding: 6px;
    border-radius: 22px;
}
.steps .phone-mockup.phone-mini .phone-screen {
    border-radius: 17px;
}
.steps .phone-mockup.phone-mini::before {
    top: 10px;
    width: 46px;
    height: 14px;
    border-radius: 8px;
}
.steps .phone-mockup.phone-mini .phone-screen[data-placeholder]::after {
    font-size: 9px;
    padding: 12px;
}

/* --- Video placeholder --- */

.video-section {
    text-align: center;
}
.video-frame {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 50%, rgba(126, 255, 219, 0.10), transparent 60%),
        var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}
.video-frame::after {
    /* Play-button visual hint so the placeholder reads as "video here". */
    content: "▶";
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(126, 255, 219, 0.12);
    border: 1px solid var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 22px;
    text-transform: none;
    letter-spacing: 0;
    transform: translateX(2px);
}
.video-frame .video-label {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .hero .bg-orbits { display: none; }
}
