/* Cosa Nostra: The Commission — landing page.
   Direction: 1930s noir command centre. A near-black desk, one pool of warm
   lamp light, typed classification marks, brass hairlines, a single sheet of
   paper. Two families only: Newsreader (serif) and Special Elite (typewriter). */

/* ---------------------------------- Fonts --------------------------------- */

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 200 800;
    font-stretch: 100%;
    font-display: swap;
    src: url("./fonts/newsreader-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 200 800;
    font-stretch: 100%;
    font-display: swap;
    src: url("./fonts/newsreader-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 200 800;
    font-stretch: 100%;
    font-display: swap;
    src: url("./fonts/newsreader-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 200 800;
    font-stretch: 100%;
    font-display: swap;
    src: url("./fonts/newsreader-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Special Elite";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("./fonts/special-elite-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Special Elite";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("./fonts/special-elite-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------- Tokens ---------------------------------
   Semantic design tokens. Dark ("night desk") is the base; the light theme
   ("daylight archive") overrides the same tokens. Theme resolution order:
     1. data-theme="light|dark" on <html> (manual choice, cn_theme cookie)
     2. otherwise the operating system's prefers-color-scheme.
   The paper signup card intentionally keeps its physical paper/ink palette
   in both themes. */

:root {
    color-scheme: dark;

    /* Page + surfaces */
    --bg: #131114;
    --bg-raised: #1a1719;
    --bg-band: #17141a;
    --bg-vault: #0f0d10;
    --bg-foot: #0e0c0f;

    /* Text */
    --text: #cfc7b4;
    --text-dim: #948d7c;
    --heading: #e6ddc7;

    /* Borders + hairlines */
    --line: rgba(194, 160, 94, 0.22);
    --flag-ring: rgba(255, 255, 255, 0.18);

    /* Accents */
    --gold: #c2a05e;
    --gold-bright: #d9ba7a;
    --stamp-red: #c4604f; /* 4.6:1 on --bg */
    --oxblood: #77281f;

    /* Interactive states */
    --focus-ring: #d9ba7a;
    --accent-wash: rgba(194, 160, 94, 0.08);
    --btn-solid-bg: #c2a05e;
    --btn-solid-bg-hover: #d9ba7a;
    --btn-solid-text: #17120a;

    /* Hero foreground (sits on the photo + scrim, not the page background) */
    --hero-title: #ece3cd;
    --hero-lede: #c8c0ae;

    /* The paper prop — constant across themes */
    --paper: #e9dfc7;
    --ink: #241f16;
    --ink-soft: rgba(36, 31, 22, 0.72);

    --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --type: "Special Elite", "Courier New", monospace;
    --wrap: 72rem;
    --narrow: 46rem;
}

/* Light theme values. Duplicated below for the manual override — keep the
   two blocks identical. */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        color-scheme: light;
        --bg: #f3ecdd;
        --bg-raised: #ece3cd;
        --bg-band: #ece2c9;
        --bg-vault: #e8ddc2;
        --bg-foot: #e9e0ca;
        --text: #2c261b;
        --text-dim: #6d6452;
        --heading: #241f16;
        --line: rgba(110, 84, 38, 0.32);
        --flag-ring: rgba(36, 31, 22, 0.25);
        --gold: #755a24;
        --gold-bright: #5d471c;
        --stamp-red: #a03a2c;
        --oxblood: #77281f;
        --focus-ring: #755a24;
        --accent-wash: rgba(117, 90, 36, 0.1);
        --btn-solid-bg: #755a24;
        --btn-solid-bg-hover: #5d471c;
        --btn-solid-text: #f6efdd;
        --hero-title: #241f16;
        --hero-lede: #3d3526;
    }
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f3ecdd;
    --bg-raised: #ece3cd;
    --bg-band: #ece2c9;
    --bg-vault: #e8ddc2;
    --bg-foot: #e9e0ca;
    --text: #2c261b;
    --text-dim: #6d6452;
    --heading: #241f16;
    --line: rgba(110, 84, 38, 0.32);
    --flag-ring: rgba(36, 31, 22, 0.25);
    --gold: #755a24;
    --gold-bright: #5d471c;
    --stamp-red: #a03a2c;
    --oxblood: #77281f;
    --focus-ring: #755a24;
    --accent-wash: rgba(117, 90, 36, 0.1);
    --btn-solid-bg: #755a24;
    --btn-solid-bg-hover: #5d471c;
    --btn-solid-text: #f6efdd;
    --hero-title: #241f16;
    --hero-lede: #3d3526;
}

/* --------------------------------- Reset ---------------------------------- */

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

/* Set on <html> by the pre-paint script in index.html when a language
   switch is restoring scroll position; removed by main.js once it has
   scrolled into place (see the "Scroll restore" block there). */
html.scroll-restoring {
    visibility: hidden;
}

body {
    margin: 0;
    background-color: var(--bg);
    background-image: radial-gradient(900px 520px at 72% -6%,
    color-mix(in srgb, var(--gold) 7%, transparent),
    transparent 70%);
    color: var(--text);
    font-family: var(--serif);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1,
h2,
p,
dl,
dd,
figure {
    margin: 0;
}

a {
    color: var(--gold-bright);
    text-decoration-color: color-mix(in srgb, var(--gold-bright) 40%, transparent);
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--type);
    font-size: 0.8rem;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

/* Film grain over everything, barely there. */
.grain {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.wrap.narrow {
    max-width: var(--narrow);
}

.center {
    text-align: center;
}

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

.site-head {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 10;
    padding-top: clamp(1rem, 3vw, 1.75rem);
}

.head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    /* Keep the row clear of the fixed corner controls (theme + language). */
    padding-right: 2.5rem;
}

.wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-decoration: none;
}

.wordmark-name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.5rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hero-title);
}

.wordmark-sub {
    font-family: var(--type);
    font-size: clamp(0.66rem, 0.62rem + 0.2vw, 0.74rem);
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
}

/* One row of controls on a shared 2.5rem height: text link · hairline ·
   call-to-action. The theme and language switches float separately in the
   fixed corner cluster below. */
.site-head nav {
    display: flex;
    align-items: center;
    gap: clamp(0.9rem, 2.2vw, 1.4rem);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 2.5rem;
    font-family: var(--type);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--gold-bright);
}

/* Hairline between navigation and the utility cluster. */
.nav-sep {
    width: 1px;
    height: 1.15rem;
    background: var(--line);
}

/* Below this the longest translations can't hold the link on one line;
   it's a secondary anchor (the hero repeats it), so it drops out first. */
@media (max-width: 899px) {
    .nav-link,
    .nav-sep {
        display: none;
    }
}

/* ------------------------- Floating utility controls ----------------------- */

/* Fixed column pinned to the top-right corner, diagonally above the nav's
   call-to-action, and stays put while scrolling. Theme switch on top,
   language switch stacked below it. */
.floating-controls {
    position: fixed;
    top: clamp(0.7rem, 1.4vw, 1rem);
    right: clamp(0.7rem, 1.4vw, 1rem);
    z-index: 85;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

/* JS-only control: main.js removes [hidden] once wired up. */
.theme-toggle {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg) 60%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--text);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.theme-toggle:hover {
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    background: color-mix(in srgb, var(--gold) 14%, color-mix(in srgb, var(--bg) 60%, transparent));
}

/* The icon shows the theme the button switches TO. */
.theme-icon {
    grid-area: 1 / 1;
}

.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

.theme-light .theme-icon-sun {
    display: none;
}

.theme-light .theme-icon-moon {
    display: block;
}

@media (max-width: 480px) {
    .wordmark-name {
        font-size: 1.15rem;
        white-space: nowrap;
    }

    .head-row,
    .site-head nav {
        gap: 0.75rem;
    }

}

/* --------------------------- Language selector ---------------------------- */

.lang {
    position: relative;
}

/* Same circular footprint as the theme toggle (2.5rem, blurred glass, single
   icon) so the two read as one control family stacked in the corner. */
.lang summary {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg) 60%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    list-style: none;
    cursor: pointer;
    color: var(--text);
    transition: border-color 160ms ease, background-color 160ms ease;
}

.lang summary::-webkit-details-marker {
    display: none;
}

.lang summary:hover,
.lang[open] summary {
    border-color: var(--gold-bright);
    background: color-mix(in srgb, var(--gold) 14%, color-mix(in srgb, var(--bg) 60%, transparent));
}

.lang-flag {
    display: block;
    /* en.svg and de.svg ship at a different native aspect ratio than the
       rest (~1.9:1 and 5:3 vs. everyone else's 3:2); without object-fit the
       default SVG "meet" behavior letterboxes them inside the fixed box,
       so they render visibly smaller than the other flags. */
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px var(--flag-ring);
}

.lang-flag-current {
    transition: box-shadow 160ms ease;
}

.lang summary:hover .lang-flag-current,
.lang[open] summary .lang-flag-current {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold-bright) 70%, transparent);
}

.lang-list {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    z-index: 60;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    min-width: 10.5rem;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    box-shadow: 0 24px 44px -20px rgba(0, 0, 0, 0.85);
}

.lang-list a {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.55rem 0.8rem 0.45rem;
    font-family: var(--type);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
}

.lang-list a:hover {
    color: var(--gold-bright);
    background: var(--accent-wash);
}

.lang-list a.is-current {
    color: var(--gold);
}

.lang-list a.is-current::after {
    content: " ✓";
}

/* -------------------------------- Buttons --------------------------------- */

.btn {
    display: inline-block;
    font-family: var(--type);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.9em 1.7em 0.75em;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn-solid {
    background: var(--btn-solid-bg);
    border-color: var(--btn-solid-bg);
    color: var(--btn-solid-text);
}

.btn-solid:hover {
    background: var(--btn-solid-bg-hover);
    border-color: var(--btn-solid-bg-hover);
}

.btn-outline {
    border-color: color-mix(in srgb, var(--gold) 50%, transparent);
    color: var(--gold-bright);
}

.btn-outline:hover {
    border-color: var(--gold-bright);
    background: var(--accent-wash);
}

.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    font-size: 0.7rem;
    /* Sized for the longest translation ("Rejoindre le Discord") so the nav
       holds the exact same shape in every language. */
    min-width: 13.5rem;
    /* Special Elite renders high; the asymmetric padding recenters it. */
    padding: 0.15em 1.2em 0;
}

/* On small screens the fixed width no longer fits next to the wordmark;
   the button falls back to its natural size. */
@media (max-width: 559px) {
    .btn-small {
        min-width: 0;
    }
}

.btn-ink {
    background: var(--oxblood);
    border-color: var(--oxblood);
    color: #f0e8d4;
}

.btn-ink:hover {
    background: #8d3226;
    border-color: #8d3226;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

/* Subtle inline spinner while the signup request is in flight. */
.btn.is-loading::after {
    content: "";
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    margin-left: 0.6em;
    vertical-align: -0.08em;
    border: 1.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 700ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .btn.is-loading::after {
        animation: none;
        border-right-color: currentColor;
        opacity: 0.5;
    }
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------- Stamp ---------------------------------- */

.stamp {
    display: inline-block;
    font-family: var(--type);
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--stamp-red);
    border: 1px solid currentColor;
    border-radius: 2px;
    padding: 0.55em 0.95em 0.4em;
    transform: rotate(-1.6deg);
    box-shadow: inset 0 0 14px color-mix(in srgb, var(--stamp-red) 12%, transparent);
}

.stamp-small {
    font-size: 0.66rem;
    padding: 0.4em 0.7em 0.3em;
    letter-spacing: 0.18em;
    margin-left: 0.3em;
    vertical-align: 0.1em;
}

/* Keep the hero stamp comfortably inside narrow viewports. */
@media (max-width: 480px) {
    .stamp.hero-stamp {
        font-size: 0.68rem;
        letter-spacing: 0.16em;
    }
}

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

.hero {
    position: relative;
    min-height: clamp(600px, 96svh, 920px);
    display: flex;
    align-items: flex-end;
    isolation: isolate;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    z-index: -2;
    /* Dissolve the photo itself before its bottom edge so the hand-off into
       the section below never shows a hard line. */
    -webkit-mask-image: linear-gradient(to bottom,
    #000 62%,
    rgba(0, 0, 0, 0.82) 74%,
    rgba(0, 0, 0, 0.55) 84%,
    rgba(0, 0, 0, 0.26) 92%,
    transparent 100%);
    mask-image: linear-gradient(to bottom,
    #000 62%,
    rgba(0, 0, 0, 0.82) 74%,
    rgba(0, 0, 0, 0.55) 84%,
    rgba(0, 0, 0, 0.26) 92%,
    transparent 100%);
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    /* The bottom fade eases into the page background over several stops —
       a single hard stop reads as a visible band on large dark screens. */
    background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 75%, transparent),
    color-mix(in srgb, var(--bg) 15%, transparent) 30%,
    color-mix(in srgb, var(--bg) 34%, transparent) 55%,
    color-mix(in srgb, var(--bg) 52%, transparent) 70%,
    color-mix(in srgb, var(--bg) 70%, transparent) 80%,
    color-mix(in srgb, var(--bg) 85%, transparent) 88%,
    color-mix(in srgb, var(--bg) 95%, transparent) 94%,
    var(--bg) 100%),
    linear-gradient(to right,
            color-mix(in srgb, var(--bg) 55%, transparent),
            transparent 55%);
}

.hero-content {
    width: 100%;
    padding-bottom: clamp(3.5rem, 9vh, 6.5rem);
}

.hero-stamp {
    margin-bottom: clamp(1.25rem, 3vh, 2rem);
}

.hero-title {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 460;
    font-size: clamp(2.7rem, 8vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
    color: var(--hero-title);
    max-width: 11em;
    text-wrap: balance;
}

.hero-title em {
    font-style: italic;
    font-weight: 420;
    color: var(--gold-bright);
}

.hero-lede {
    margin-top: 1.4rem;
    max-width: 33em;
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    color: var(--hero-lede);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2.1rem;
}

.hero-note {
    margin-top: 1.5rem;
    font-family: var(--type);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
}

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

.section {
    padding-block: clamp(4.25rem, 9vw, 7rem);
}

.section-line {
    border-top: 1px solid var(--line);
}

/* Section background rhythm below the hero. Every treated section fades from
   and back to the page base so consecutive backgrounds blend, never cut. */

/* Introduction: clean base with a faint desk-lamp pool, upper left. The top
   layer eases the pool in from the hero boundary so the section starts at
   exactly the page background — no visible seam. */
.section--lamp {
    background: linear-gradient(to bottom,
    var(--bg),
    color-mix(in srgb, var(--bg) 55%, transparent) 12%,
    transparent 30%),
    radial-gradient(560px 420px at 12% 10%,
            color-mix(in srgb, var(--gold) 5%, transparent),
            transparent 70%);
}

/* Gallery: a slightly raised band that frames the screenshots. */
.section--band {
    background: linear-gradient(to bottom,
    var(--bg),
    var(--bg-band) 14%,
    var(--bg-band) 86%,
    var(--bg));
}

/* The promise: soft atmospheric glow, off to the right. */
.section--glow {
    background: radial-gradient(720px 520px at 85% 30%,
    color-mix(in srgb, var(--gold) 4.5%, transparent),
    transparent 70%);
}

/* Signup: a deeper vault shade that lets the paper card carry the light. */
.section--vault {
    background: linear-gradient(to bottom,
    var(--bg),
    var(--bg-vault) 16%,
    var(--bg-vault) 84%,
    var(--bg));
}

/* Community: a low ember of lamplight behind the final invitation. */
.section--ember {
    background: radial-gradient(640px 420px at 50% 62%,
    color-mix(in srgb, var(--gold) 6%, transparent),
    transparent 72%);
}

.eyebrow {
    font-family: var(--type);
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.1rem;
}

h2 {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 480;
    font-size: clamp(1.7rem, 3.6vw, 2.45rem);
    line-height: 1.16;
    letter-spacing: -0.01em;
    color: var(--heading);
    text-wrap: balance;
    margin-bottom: 1.4rem;
}

.section p + p {
    margin-top: 1.1rem;
}

/* ---------------------------- Gallery stream ------------------------------
   Continuously moving horizontal image stream. Without JS it is a plain
   scrollable, snap-aligned row; main.js upgrades it to an infinite marquee
   (class .stream-marquee) or, under prefers-reduced-motion, keeps the
   scroll-snap behavior and just wires up the buttons (.stream-static). */

.section-head {
    max-width: var(--narrow);
    margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.section-note {
    color: var(--text-dim);
}

.stream-viewport {
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    /* Fade the stream out near the viewport edges. */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}

.stream-marquee .stream-viewport {
    overflow-x: hidden;
    scroll-snap-type: none;
    scrollbar-width: none;
}

.stream-track {
    display: flex;
    align-items: flex-start;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    width: max-content;
    margin: 0;
    padding: 0 clamp(1.25rem, 5vw, 2.5rem);
    list-style: none;
    will-change: transform;
}

.stream-marquee .stream-track {
    padding-inline: 0;
}

.stream-item {
    flex: none;
    width: min(620px, 82vw);
    scroll-snap-align: center;
}

.stream-figure {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    padding: 10px;
    transition: border-color 300ms ease, opacity 300ms ease, transform 300ms ease;
}

/* In marquee mode the centered image reads at full strength; its neighbors
   recede until they glide into the middle. */
.stream-marquee .stream-item .stream-figure {
    opacity: 0.55;
    transform: scale(0.97);
}

.stream-marquee .stream-item.is-center .stream-figure {
    opacity: 1;
    transform: none;
    border-color: color-mix(in srgb, var(--gold-bright) 50%, transparent);
}

.stream-figure:has(.zoom:hover),
.stream-figure:has(.zoom:focus-visible) {
    border-color: color-mix(in srgb, var(--gold-bright) 50%, transparent);
}

.stream-figure figcaption {
    font-family: var(--type);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.9rem 0.25rem 0.4rem;
}

.stream-controls {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: clamp(1.25rem, 3vw, 1.75rem);
}

.stream-btn {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
    border-radius: 50%;
    background: transparent;
    color: var(--gold-bright);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.stream-btn:hover {
    border-color: var(--gold-bright);
    background: var(--accent-wash);
}

/* Pause/play button shows the action it will perform next. */
.stream .stream-icon-play {
    display: none;
}

.stream.is-paused .stream-icon-play {
    display: block;
}

.stream.is-paused .stream-icon-pause {
    display: none;
}

.stream-static #stream-toggle {
    display: none;
}

/* Image buttons that open the lightbox. */
.zoom {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
}

.zoom img {
    transition: filter 180ms ease;
}

.zoom:hover img,
.zoom:focus-visible img {
    filter: brightness(1.1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------- Pillars --------------------------------- */

.pillars {
    margin-top: 2.5rem;
    border-top: 1px solid var(--line);
}

.pillar {
    display: grid;
    grid-template-columns: minmax(11rem, 14rem) 1fr;
    gap: 0.5rem 2rem;
    padding: 1.05rem 0 0.9rem;
    border-bottom: 1px solid var(--line);
}

@media (max-width: 620px) {
    .pillar {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

.pillar dt {
    font-family: var(--type);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    padding-top: 0.25rem;
}

.pillar dd {
    color: var(--text);
}

/* ------------------------------ Paper / form ------------------------------ */

.paper {
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    background-blend-mode: multiply;
    color: var(--ink);
    border-radius: 3px;
    padding: clamp(1.75rem, 5vw, 3.25rem);
    box-shadow: 0 40px 70px -35px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.25);
}

.eyebrow-ink {
    color: var(--oxblood);
}

.paper-title {
    color: var(--ink);
}

.paper-copy {
    color: var(--ink-soft);
}

.paper a {
    color: var(--oxblood);
    text-decoration-color: rgba(119, 40, 31, 0.4);
}

#subscribe-form {
    margin-top: 2rem;
}

.field label {
    display: block;
    font-family: var(--type);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}

.field input {
    width: 100%;
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--ink);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(36, 31, 22, 0.45);
    border-radius: 0;
    padding: 0.45em 0;
}

.field input::placeholder {
    color: rgba(36, 31, 22, 0.35);
}

.field input:focus {
    outline: none;
    border-bottom-color: var(--oxblood);
    box-shadow: 0 1px 0 var(--oxblood);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Reserve the widget's space up front so it never shifts the form. */
.turnstile-slot {
    min-height: 65px;
    margin-block: 1.4rem;
}

.form-status {
    font-family: var(--type);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    margin-top: 1rem;
    min-height: 1.4em;
}

.form-status.is-error {
    color: var(--oxblood);
}

.form-status.is-success {
    color: #3c5233;
}

.privacy {
    margin-top: 1.6rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--ink-soft);
    border-top: 1px solid rgba(36, 31, 22, 0.2);
    padding-top: 1.1rem;
}

/* ------------------------------- Community -------------------------------- */

.community .btn {
    margin-top: 1.6rem;
}

.community p {
    max-width: 38em;
    margin-inline: auto;
}

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

.site-foot {
    background: var(--bg-foot);
    border-top: 1px solid var(--line);
    padding-block: 2rem 2.5rem;
}

.foot-row {
    /* Column, not row-wrap: some translations fit both lines side by side,
       others wrap to two lines, so a row layout changes footer height across
       languages. Always stacking keeps the shape fixed regardless of locale. */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: var(--type);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.foot-row a {
    color: var(--text-dim);
    text-transform: none;
}

.foot-row a:hover {
    color: var(--gold-bright);
}

/* ------------------------ Theme switch cross-fade ------------------------- */

/* Manual theme switches cross-fade the whole page via the View Transitions
   API (snapshots include gradients and the hero photo). */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 340ms;
    animation-timing-function: ease;
}

/* Fallback for browsers without that API: main.js holds .theme-fade on
   <html> for the duration of a manual switch so color properties glide. */
.theme-fade,
.theme-fade *,
.theme-fade *::before,
.theme-fade *::after {
    transition: background-color 340ms ease,
    color 340ms ease,
    border-color 340ms ease,
    box-shadow 340ms ease,
    fill 340ms ease,
    stroke 340ms ease !important;
}

@media (prefers-reduced-motion: reduce) {

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }
}

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

/* Scroll reveals only apply once JS marks the document; without JS
   everything is simply visible. */
.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {

    .hero-stamp,
    .hero-title,
    .hero-lede,
    .cta-row,
    .hero-note {
        animation: rise-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .hero-title {
        animation-delay: 90ms;
    }

    .hero-lede {
        animation-delay: 180ms;
    }

    .cta-row {
        animation-delay: 270ms;
    }

    .hero-note {
        animation-delay: 360ms;
    }

    .hero-stamp {
        animation-name: stamp-in;
        animation-duration: 600ms;
        animation-delay: 500ms;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes stamp-in {
    0% {
        opacity: 0;
        transform: scale(1.6) rotate(-6deg);
    }

    60% {
        opacity: 1;
        transform: scale(0.97) rotate(-1.2deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(-1.6deg);
    }
}

/* -------------------------------- Lightbox -------------------------------- */

.lightbox {
    border: none;
    padding: clamp(1rem, 4vw, 3rem);
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    background: transparent;
}

.lightbox[open] {
    display: grid;
    place-items: center;
}

.lightbox::backdrop {
    background: rgba(10, 9, 11, 0.85);
}

.lightbox-figure {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    padding: 10px;
    max-width: 100%;
}

.lightbox-figure img {
    display: block;
    max-width: min(1400px, calc(100vw - 2rem - 22px));
    max-height: calc(100dvh - 2rem - 5rem);
    width: auto;
    height: auto;
}

.lightbox-figure figcaption {
    font-family: var(--type);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.9rem 0.25rem 0.4rem;
}

.lightbox-close {
    position: absolute;
    top: clamp(0.75rem, 2.5vw, 1.5rem);
    right: clamp(0.75rem, 2.5vw, 1.5rem);
    z-index: 5;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    color: var(--gold-bright);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease;
}

.lightbox-close:hover {
    border-color: var(--gold-bright);
    color: var(--heading);
}

body.modal-open,
body:has(dialog[open]) {
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .lightbox[open] .lightbox-figure {
        animation: lightbox-in 200ms ease both;
    }
}

@keyframes lightbox-in {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

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

.error-page {
    min-height: 100svh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
}

.error-page .stamp {
    margin-bottom: 2rem;
}

.error-page h1 {
    font-family: var(--serif);
    font-weight: 460;
    font-size: clamp(1.9rem, 5vw, 3rem);
    line-height: 1.15;
    color: var(--heading);
    max-width: 18em;
    text-wrap: balance;
    margin-bottom: 1.2rem;
}

.error-page p {
    color: var(--text-dim);
}

.error-page .cta-row {
    justify-content: center;
}

[hidden] {
    display: none !important;
}
