/* Duskline site styles — tokens mirror DusklineShared/DesignTokens.swift.
   Unlike the Suzuri site, there is no light mode: the app is dusk, and a
   marketing page that goes white the moment a phone is in light mode would
   be selling a different product. The palette is the app's, exactly. */

:root {
    --canvas: #0E141C;      /* dusk base */
    --surface: #19222C;     /* cards */
    --elevated: #212E3A;    /* raised surfaces, card edges */
    --line: #2A3742;        /* hairlines */

    --dawn: #E4A868;        /* the one warm accent */
    --dawn-deep: #C9863D;   /* eyebrows, pressed */
    --firefly: #F2C879;     /* pin cores and glow */

    --text: #EDF1F4;
    --text-dim: #8B9AAA;
    --text-mute: #5B6976;

    --year-inner: #131C27;  /* the poster sky */
    --year-outer: #0B1017;
    --graticule: #1A2531;

    --display: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

    --wrap: 1100px;
}

/* Self-hosted, subset by scripts/subset-fonts.sh. No font CDN: a page that
   promises no third parties shouldn't open with a request to one. */
@font-face {
    font-family: "Newsreader";
    src: url("../fonts/Newsreader-Regular.ttf") format("truetype");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Newsreader";
    src: url("../fonts/Newsreader-Italic.ttf") format("truetype");
    font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
    font-family: "Hanken Grotesk";
    src: url("../fonts/HankenGrotesk-Regular.ttf") format("truetype");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Hanken Grotesk";
    src: url("../fonts/HankenGrotesk-SemiBold.ttf") format("truetype");
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Space Mono";
    src: url("../fonts/SpaceMono-Regular.ttf") format("truetype");
    font-weight: 400; font-style: normal; font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: var(--sans);
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--canvas);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover { color: var(--dawn); }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.12;
}

em { color: var(--dawn); font-style: italic; }

/* The tracked-mono eyebrow — the app's group-header voice */
.eyebrow {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dawn-deep);
}

.hairline {
    border: none;
    border-top: 1px solid var(--line);
    max-width: var(--wrap);
    margin: 0 auto;
}

:focus-visible {
    outline: 2px solid var(--dawn);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Header ---------- */

header {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wordmark {
    font-family: var(--display);
    font-size: 1.4rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wordmark img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
}

nav { display: flex; gap: 2rem; }

nav a, .footer-links a {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-mute);
}

nav a:hover, .footer-links a:hover { color: var(--dawn); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 3.5rem 2rem 4.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
    align-items: center;
}

/* the dusk reveal: warmth pooling behind the copy, never a hard shape */
.hero::before {
    content: "";
    position: absolute;
    left: -10%;
    top: 8%;
    width: 70%;
    height: 80%;
    background: radial-gradient(60% 60% at 40% 45%, rgba(228, 168, 104, 0.10), rgba(228, 168, 104, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-copy, .hero-visual { position: relative; z-index: 1; }

.hero-copy .eyebrow { display: block; margin-bottom: 1.25rem; }

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.6rem);
    line-height: 1.06;
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: 1.12rem;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 34em;
    margin-bottom: 2rem;
}

.platform-note {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-top: 1rem;
}

/* ---------- The call to action ---------- */

/* Swap .status for the App Store badge when there is a link to give it:
   <a class="badge" href="https://apps.apple.com/app/idXXXXXXXXX">
     <img src="images/badge-app-store.svg" alt="Download on the App Store">
   </a>  — and drop the .status line. Until then the page says what is true. */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.75rem 1.3rem;
}

.status .light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--firefly);
    box-shadow: 0 0 0 4px rgba(242, 200, 121, 0.14), 0 0 14px 3px rgba(242, 200, 121, 0.4);
    animation: breathe 4.2s ease-in-out infinite;
}

.badge img { height: 46px; display: block; }
.badge { display: inline-block; line-height: 0; }

/* ---------- The memory card (hero ornament) ---------- */

.memory {
    position: relative;
    max-width: 340px;
    margin: 0 auto;
}

.memory .pin {
    position: absolute;
    left: -13px;
    top: -13px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--dawn);
    box-shadow: 0 0 0 6px rgba(228, 168, 104, 0.16), 0 0 26px 6px rgba(228, 168, 104, 0.34);
    z-index: 2;
    animation: breathe 4.2s ease-in-out infinite;
}

.card {
    background: var(--surface);
    border: 1px solid var(--elevated);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
}

.snap {
    aspect-ratio: 16 / 10;
    /* the warmth sits over the ground the route actually covers, not in an
       empty corner of the frame. Same rule as the app: warmth comes from the
       memories, never from a shape drawn beside them. */
    background:
        radial-gradient(44% 58% at 34% 72%, rgba(228, 168, 104, 0.20), rgba(228, 168, 104, 0) 70%),
        radial-gradient(36% 48% at 72% 32%, rgba(228, 168, 104, 0.13), rgba(228, 168, 104, 0) 72%),
        #101821;
    position: relative;
}

.snap svg { width: 100%; height: 100%; display: block; }

.snap .street { stroke: #1E2A36; stroke-width: 1; fill: none; }

.snap .route {
    stroke: var(--dawn);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    /* pathLength="100" on the path, so the dash math does not have to be
       re-derived every time the route is redrawn. */
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 2.8s 0.35s ease-out forwards;
}

.snap .light { fill: var(--firefly); }
/* .halo takes its fill from the gradient declared in the SVG itself */

.card-body { padding: 16px 18px 18px; }

.card-note {
    font-family: var(--display);
    font-style: italic;
    font-size: 1.16rem;
    line-height: 1.35;
    color: #F1E9DE;
}

.card-meta {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    color: var(--text-mute);
    margin-top: 12px;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

@keyframes breathe {
    0%, 100% { opacity: 0.62; transform: scale(0.94); }
    50%      { opacity: 1;    transform: scale(1.06); }
}

/* ---------- Sections ---------- */

section {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-header { margin-bottom: 2.75rem; }
.section-header .eyebrow { display: block; margin-bottom: 0.8rem; }
.section-header h2 { font-size: 1.9rem; }
.section-header p {
    color: var(--text-dim);
    max-width: 40em;
    margin-top: 0.9rem;
}

/* ---------- Screenshots ---------- */

/* A strip that scrolls sideways rather than shrinking six phones onto one
   line. The shots are dark on a dark page, so each carries a hairline to
   separate the screen from the ground it sits on. */
.shot-strip {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.shot {
    flex: 0 0 auto;
    width: 220px;
    margin: 0;
    scroll-snap-align: start;
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.shot figcaption {
    margin-top: 0.75rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text-dim);
}

@media (min-width: 720px) {
    .shot { width: 260px; }
}

/* ---------- Features ---------- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.6rem;
}

.feature-card .eyebrow {
    display: block;
    margin-bottom: 0.9rem;
    color: var(--dawn-deep);
}

.feature-card h3 {
    font-size: 1.22rem;
    margin-bottom: 0.6rem;
}

.feature-card p {
    font-size: 0.97rem;
    line-height: 1.65;
    color: var(--text-dim);
}

/* ---------- How it works: numbered beats ---------- */

.beats { display: grid; gap: 2.25rem; }

.beat {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1.25rem;
    border-top: 1px solid var(--line);
    padding-top: 1.6rem;
}

.beat-n {
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    color: var(--dawn-deep);
    padding-top: 0.35rem;
}

.beat h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.beat p { color: var(--text-dim); max-width: 42em; }

.beat .said {
    font-family: var(--display);
    font-style: italic;
    color: #F1E9DE;
    font-size: 1.1rem;
    margin-top: 0.7rem;
}

/* ---------- The quiet statement (anti-scoreboard) ---------- */

.quiet {
    text-align: center;
    max-width: 760px;
}

.quiet .field {
    width: 132px;
    height: 99px;
    margin: 0 auto 1.9rem;
    display: block;
}

.quiet h2 { font-size: 1.9rem; margin-bottom: 1.25rem; }

.quiet p {
    font-size: 1.08rem;
    line-height: 1.78;
    color: var(--text-dim);
}

.quiet p + p { margin-top: 1rem; }

/* ---------- Privacy band ---------- */

.privacy-highlight {
    max-width: none;
    background: linear-gradient(var(--year-outer), var(--year-inner));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 3.5rem 2rem;
    text-align: center;
}

.privacy-highlight .inner { max-width: 660px; margin: 0 auto; }

.privacy-highlight p {
    font-size: 1.05rem;
    line-height: 1.78;
    color: var(--text-dim);
}

.privacy-highlight strong { color: var(--text); font-weight: 400; }

.privacy-highlight a {
    color: var(--dawn);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(228, 168, 104, 0.45);
}

/* ---------- Get ---------- */

.get { text-align: center; }
.get h2 { font-size: 1.9rem; margin-bottom: 0.9rem; }
.get > p {
    max-width: 36em;
    margin: 0 auto 1.4rem;
    color: var(--text-dim);
}

.tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    max-width: 720px;
    margin: 2.25rem auto 2.5rem;
    text-align: left;
}

.tier {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.5rem 1.6rem;
}

.tier.paid { border-color: rgba(228, 168, 104, 0.35); }

.tier .eyebrow { display: block; margin-bottom: 0.8rem; }
.tier h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.tier ul { list-style: none; }

.tier li {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-dim);
    padding-left: 1.15rem;
    position: relative;
    margin-bottom: 0.55rem;
}

.tier li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--dawn-deep);
}

/* ---------- Footer ---------- */

footer {
    border-top: 1px solid var(--line);
    padding: 2rem;
}

.footer-content {
    max-width: var(--wrap);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-wordmark {
    font-family: var(--display);
    font-size: 1.05rem;
    color: var(--text);
}

.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; }

.copyright {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    color: var(--text-mute);
}

/* ---------- Inner pages ---------- */

.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.page-content .eyebrow { display: block; margin-bottom: 0.9rem; }
.page-content h1 { font-size: 2.1rem; margin-bottom: 0.6rem; }

.page-content .updated {
    font-family: var(--mono);
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-bottom: 2.5rem;
}

.page-content h2 {
    font-size: 1.35rem;
    margin: 2.6rem 0 0.75rem;
}

.page-content p {
    margin-bottom: 1rem;
    line-height: 1.78;
    color: var(--text-dim);
}

.page-content .lead { color: var(--text); font-size: 1.1rem; }

.page-content ul { margin: 0 0 1rem 1.4rem; color: var(--text-dim); }
.page-content li { margin-bottom: 0.45rem; line-height: 1.65; }

.page-content a {
    color: var(--dawn);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(228, 168, 104, 0.4);
}

/* who is on the other end of a request, in the app's own mono voice */
.asked {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--dawn-deep);
    display: block;
    margin: -0.4rem 0 1.4rem;
}

.contact-email {
    text-align: center;
    margin: 2rem 0;
    padding: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 1.25rem;
}

.contact-email a {
    color: var(--dawn);
    text-decoration: none;
}

.support-topics { display: grid; gap: 1rem; margin-top: 1.5rem; }

.support-topic {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.4rem 1.6rem;
}

.support-topic .eyebrow { display: block; margin-bottom: 0.7rem; }
.support-topic h3 { font-size: 1.1rem; margin-bottom: 0.45rem; }
.support-topic p { font-size: 0.95rem; margin: 0; color: var(--text-dim); }

/* ---------- 404 ---------- */

.not-found { text-align: center; padding: 6rem 2rem; }
.not-found .eyebrow { display: block; margin-bottom: 1rem; }
.not-found h1 { font-size: 2.2rem; margin-bottom: 1rem; }
.not-found p { color: var(--text-dim); margin-bottom: 2rem; }
.not-found .back { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dawn); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 2rem;
        text-align: center;
    }
    .hero .tagline { margin-left: auto; margin-right: auto; }
    .hero h1 { font-size: 2.3rem; }
    .memory { margin-top: 0.5rem; }
    header { flex-direction: column; gap: 1rem; }
    .beat { grid-template-columns: 1fr; gap: 0.4rem; }
    .footer-content { flex-direction: column; text-align: center; }
    section { padding: 3rem 1.5rem; }
}

/* ---------- Motion ---------- */

/* The app flattens the firefly breath to a steady glow under reduce-motion;
   so does the site. The route arrives already drawn rather than drawing. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .status .light, .memory .pin {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .snap .route {
        animation: none;
        stroke-dashoffset: 0;
    }
    a { transition: none; }
}
