/* Browsers keep this file for a day: when it changes, raise ?v= on the stylesheet link in every page (same for a replaced image).
   Darak website: "Morning Edition" (design-exports/v8-website), with the cover shelf.
   Same tokens as the app (Assets.xcassets).
   Fonts are subset to Latin (default OpenType features, kerning kept) and cut to what the site uses:
   Literata roman 400-600 (optical size 17-72, the smallest serif text is 17px), Literata italic 400 only
   (optical size 18-72), Instrument Sans 400-600 at normal width. */
@font-face { font-family: "Literata"; src: url("/fonts/Literata-Variable.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/Literata-Italic-Variable.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/InstrumentSans-Variable.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
    color-scheme: light dark;
    --surface: #FBF6EE; --tint: #F4E6D6;
    --ink: #1C1916; --ink-2: #4F4740; --muted: #756A5E;
    --border: #E6DCCD; --accent: #9E2B25;
    --serif: "Literata", Georgia, "Times New Roman", serif;
    --sans: "Instrument Sans", -apple-system, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #16130F; --tint: #2B231B;
        --ink: #EEE7DC; --ink-2: #BDB3A6; --muted: #8F8579;
        --border: #332C24; --accent: #E0796B;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* Top bar */
.top { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; padding: 28px 28px 0; font-family: var(--sans); font-size: 14px; }
.top.narrow { max-width: 680px; }
.top nav a { color: var(--ink-2); text-decoration: none; margin-left: 22px; }
.top nav a[aria-current] { color: var(--ink); }
.top nav a:hover { color: var(--accent); }
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); text-decoration: none; }
.mark img { width: 26px; height: 26px; border-radius: 6px; }

/* Hero */
.hero { text-align: center; max-width: 820px; margin: 0 auto; padding: 96px 28px 0; }
.hero .eyebrow { font-style: italic; color: var(--accent); font-size: 20px; margin: 0 0 22px; }
.hero h1 { font-weight: 500; font-size: clamp(48px, 8vw, 96px); line-height: 1.0; letter-spacing: -0.03em; margin: 0 0 28px; text-wrap: balance; }
.hero h1 em, .outro h2 em { font-weight: 400; color: var(--accent); }
.hero .dek { font-size: 21px; color: var(--ink-2); max-width: 31em; margin: 0 auto 34px; text-wrap: balance; }
/* Apple's badge, unaltered. The margin is its required clear space (a quarter of its height). */
.badge { display: inline-block; line-height: 0; margin: 13px; border-radius: 9px; }
.badge img { display: block; height: 50px; width: auto; }
.get { display: flex; justify-content: center; align-items: center; gap: 10px; margin: -13px 0; }
/* The QR code only helps where the visitor can't install: wide screens with a mouse. */
.qr { display: none; align-items: center; gap: 12px; font-family: var(--sans); font-size: 13px; line-height: 1.35; color: var(--muted); text-align: left; }
.qr img { width: 68px; height: 68px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
@media (min-width: 861px) and (hover: hover) { .qr { display: flex; } }
.small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 16px auto 0; }

/* Tour: the three screens, each above its step. */
.tour { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1040px; margin: 0 auto; padding: 56px 28px 24px; text-align: center; }
/* The bezel stays near-black in both modes, like the phone itself. */
.phone { width: min(270px, 100%); margin: 0 auto 26px; border-radius: 40px; padding: 8px; background: #1C1916; box-shadow: 0 40px 80px -40px rgba(28,25,22,.5); }
.phone img { display: block; width: 100%; height: auto; border-radius: 32px; }
@media (prefers-color-scheme: dark) { .phone { box-shadow: 0 0 0 1px var(--border), 0 40px 80px -40px rgba(0,0,0,.8); } }
.step span { font-style: italic; color: var(--accent); }
.step h2 { font-size: 22px; font-weight: 600; margin: 2px 0 6px; line-height: 1.3; }
.step p { margin: 0 auto; color: var(--ink-2); font-size: 17px; max-width: 19em; text-wrap: balance; }
/* Phones: only the Today screen, then the three steps as rows of text. */
@media (max-width: 760px) {
    .tour { display: block; padding: 44px 28px 0; text-align: left; }
    .step { padding: 22px 0; border-top: 1px solid var(--border); }
    .step:first-child { border-top: 0; padding-top: 0; }
    .step:last-child { border-bottom: 1px solid var(--border); }
    .step + .step .phone { display: none; }
    .phone { margin-bottom: 36px; }
    .step p { margin: 0; max-width: none; text-wrap: pretty; }
}

/* Shelf: a tilted wall of real covers */
.shelf { position: relative; overflow: hidden; padding: 56px 0 40px; }
.shelf .heading { position: relative; z-index: 1; text-align: center; padding: 0 28px; margin-bottom: 40px; }
.shelf h2 { font-weight: 500; font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.02em; margin: 0 0 8px; }
.shelf .heading p { color: var(--ink-2); margin: 0 auto; max-width: 32em; text-wrap: balance; }
.wall { --cover-w: 168px; --cover-h: 252px; --gap: 14px; transform: rotate(-3deg); width: 120%; margin-left: -10%; display: grid; gap: var(--gap); }
.row { overflow: hidden; }
/* Each track holds the same set of 8 covers four times, wide enough for a 3600px window.
   The trailing padding makes every set exactly 25% of the track, so moving it by 25% loops seamlessly. */
.track { display: flex; gap: var(--gap); padding-right: var(--gap); width: max-content; animation: shelf-left 70s linear infinite; will-change: transform; backface-visibility: hidden; }
.set { display: flex; gap: var(--gap); }
.row.right .track { animation-name: shelf-right; animation-duration: 80s; }
.track img { display: block; width: var(--cover-w); height: var(--cover-h); object-fit: cover; border-radius: 3px; outline: 0.5px solid rgba(0,0,0,.6); outline-offset: -0.5px; box-shadow: 0 12px 24px -12px rgba(28,25,22,.35); }
@keyframes shelf-left { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-25%, 0, 0); } }
@keyframes shelf-right { from { transform: translate3d(-25%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
/* Same specificity as .row.right .track, so both rows stop. */
@media (prefers-reduced-motion: reduce) { .row.left .track, .row.right .track { animation: none; } }
.fade { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, var(--surface)); pointer-events: none; }

/* Closing call to action */
.outro { text-align: center; padding: 56px 28px 88px; }
.outro h2 { font-weight: 500; font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; text-wrap: balance; }

/* Article pages (support, privacy) */
.article { max-width: 680px; margin: 0 auto; padding: 72px 28px 80px; }
/* Upright, so the article pages never load the italic font. */
.article .eyebrow { color: var(--accent); font-size: 18px; margin: 0 0 10px; }
.article h1 { font-weight: 500; font-size: clamp(38px, 6vw, 56px); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 14px; }
.article .meta { font-family: var(--sans); font-size: 14px; color: var(--muted); margin: 0 0 40px; }
.article .lede { margin: 0 0 40px; }
.article h2 { font-size: 22px; font-weight: 600; margin: 40px 0 10px; line-height: 1.3; }
.article p, .article li { color: var(--ink-2); font-size: 17px; }
.article ul { padding-left: 20px; }
.article li { margin: 0 0 8px; }
.summary-box { background: var(--tint); border-radius: 14px; padding: 20px 24px; }
.summary-box h2 { margin-top: 0; font-size: 18px; }
.summary-box ul { margin: 0; }

footer { text-align: center; font-family: var(--sans); font-size: 13px; color: var(--muted); padding: 0 28px 48px; }
/* Wraps on narrow screens instead of overflowing */
footer nav { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
.legal { max-width: 560px; margin: 22px auto 0; font-size: 11.5px; line-height: 1.5; }

@media (max-width: 860px) { .wall { --cover-w: 120px; --cover-h: 180px; } }
@media (max-width: 600px) { .hero { padding-top: 64px; } .top nav a { margin-left: 16px; } }
