/* landing.css
   ══════════════════════════════════════════════════════════════════════════════
   The splash and the landing page under it. Everything lives inside #splash
   (.splash.landing), which is its own scroll container: the document itself never
   scrolls, so when Play hides the splash the landing goes with it and nothing can
   scroll under the player (touch on the mobile XY pad). All rules are scoped under
   .splash / .landing so nothing reaches the player.
   Fonts are self-hosted (fonts/, SIL OFL) so no visitor IP goes to Google.
   ══════════════════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/spectral-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Spectral';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/spectral-latin-400-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Spectral';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/spectral-latin-600-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Spectral';
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/spectral-latin-600-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/work-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/work-sans-latin-500-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Work Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/work-sans-latin-600-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}

/* ── Root: the scroll container ── */
.splash {
    --l-night: #16120F;
    --l-ink: #1F1A15;
    --l-paper: #EFE8DB;
    --l-sand: #E6DCCB;
    --l-rust: #9A3B1F;
    --l-rust-dark: #6E2913;
    --l-body: #4A4037;
    --l-muted: #5A4F44;
    --l-prose: #2E2620;
    --l-mist: #C9BFAF;
    --l-stone: #A89C8A;
    --l-def: #E3D9C8;
    --l-rule-dark: #3A322B;
    --l-serif: 'Spectral', Georgia, serif;
    --l-sans: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --l-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

    position: fixed;
    inset: 0;
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--l-night);
    color: var(--l-ink);
    font-family: var(--l-sans);
    transition: opacity 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .splash {
        scroll-behavior: smooth;
    }
}

.splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.landing a {
    color: var(--l-rust);
}

.landing a:hover {
    color: var(--l-rust-dark);
}

.landing button {
    font-family: inherit;
}

.landing :focus-visible {
    outline: 2px solid var(--l-rust);
    outline-offset: 3px;
}

.splash-hero :focus-visible,
.l-dark :focus-visible {
    outline-color: var(--l-paper);
}

.landing img {
    max-width: 100%;
}

@keyframes splashIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splashPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }
}

/* ══ Hero (the splash proper) ══ */
.splash-hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 24px 24px 40px;
    background: var(--l-night);
    color: var(--l-paper);
}

.splash-corner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.splash-nav-link,
.landing .splash-nav-link {
    color: var(--l-mist);
    text-decoration: none;
    font-size: 15px;
    padding: 12px 14px;
}

.landing .splash-nav-link:hover {
    color: var(--l-paper);
}

.splash-login {
    display: inline-flex;
    align-items: center;
    background: none;
    border: 0;
    color: var(--l-mist);
    font-size: 15px;
    padding: 12px 14px;
    cursor: pointer;
}

.splash-login:hover,
.splash-gear:hover {
    color: var(--l-paper);
}

.splash-gear {
    display: flex;
    background: none;
    border: 0;
    color: var(--l-mist);
    padding: 12px;
    cursor: pointer;
}

.splash-gear svg {
    width: 20px;
    height: 20px;
    display: block;
}

.splash-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 28px;
    padding: 40px 0;
}

.splash-logo {
    animation: splashIn 0.9s ease both;
}

.splash-logo img {
    width: min(560px, 86vw);
    height: auto;
    display: block;
}

.splash-def {
    margin: 0;
    font-family: var(--l-serif);
    font-size: 22px;
    line-height: 1.45;
    color: var(--l-def);
    max-width: 560px;
    animation: splashIn 0.9s 0.18s ease both;
}

.splash-def-word {
    font-style: italic;
    font-weight: 600;
}

.splash-def-meta {
    font-family: var(--l-mono);
    font-size: 14px;
    color: var(--l-stone);
    padding: 0 6px;
}

.splash-loader {
    width: 160px;
    height: 2px;
    margin-top: 12px;
    background: rgba(239, 232, 219, 0.12);
    border-radius: 1px;
    overflow: hidden;
    animation: splashIn 0.9s 0.3s ease both;
}

.splash-loader-fill {
    height: 100%;
    width: 0%;
    background: var(--l-paper);
    border-radius: 1px;
    transition: width 0.4s ease;
}

.splash-cta {
    margin-top: -14px;
    font-size: 14px;
    color: var(--l-stone);
    animation: splashIn 0.9s 0.4s ease both, splashPulse 2.8s 1.3s ease-in-out infinite;
}

/* .is-ready is set by sorle-landing.js on `sorle-ready` (FMOD up, Play shown) */
.splash.is-ready .splash-loader {
    display: none;
}

.splash-ready {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    animation: splashIn 0.4s ease both;
}

/* The filled paper button: Play on the splash, Start in the host panel, Play at the
   bottom of the page. */
.splash-solo,
.l-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--l-paper);
    color: var(--l-night);
    border: 0;
    border-radius: 999px;
    font-family: var(--l-sans);
    font-size: 19px;
    font-weight: 600;
    padding: 18px 64px;
    cursor: pointer;
    transition: background 0.15s;
}

.splash-solo:hover,
.l-play:hover {
    background: #FFFFFF;
}

.splash-solo svg,
.l-play svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.splash-solo:disabled,
.l-play[aria-disabled="true"] {
    opacity: 0.55;
    cursor: default;
}

.l-play[aria-disabled="true"]:hover {
    background: var(--l-paper);
}

.splash-session-row,
.splash-panel-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Underlined text buttons: Host / Join, and the panel actions */
.splash-entry,
.splash-session-btn {
    background: none;
    border: 0;
    color: var(--l-mist);
    font-family: var(--l-sans);
    font-size: 15px;
    padding: 12px 16px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--l-muted);
}

.splash-entry:hover,
.splash-session-btn:hover {
    color: var(--l-paper);
    text-decoration-color: var(--l-stone);
}

.splash-back {
    color: var(--l-stone);
}

.splash-entry-locked {
    opacity: 0.55;
}

.splash-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    animation: splashIn 0.3s ease both;
}

.splash-panel-title {
    font-size: 15px;
    color: var(--l-mist);
}

.splash-panel-sub {
    font-size: 15px;
    color: var(--l-stone);
}

.splash-room-code {
    font-family: var(--l-mono);
    font-size: 40px;
    letter-spacing: 0.3em;
    padding-left: 0.3em;
    color: var(--l-paper);
}

.splash-code-input,
.splash-name-input {
    background: rgba(239, 232, 219, 0.06);
    border: 1px solid var(--l-muted);
    border-radius: 12px;
    color: var(--l-paper);
    font-family: var(--l-sans);
    outline: none;
    text-align: center;
    transition: border-color 0.15s;
}

.splash-code-input {
    font-family: var(--l-mono);
    font-size: 28px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 10px 16px 10px calc(16px + 0.3em);
    width: 200px;
}

.splash-name-input {
    font-size: 15px;
    padding: 10px 14px;
    width: 240px;
}

.splash-code-input::placeholder,
.splash-name-input::placeholder {
    color: var(--l-stone);
}

.splash-code-input:focus,
.splash-name-input:focus {
    border-color: var(--l-mist);
}

.splash-error {
    font-size: 14px;
    color: #E39478;
    min-height: 18px;
}

.splash-scroll,
.landing .splash-scroll {
    align-self: center;
    color: var(--l-stone);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
}

.landing .splash-scroll:hover {
    color: var(--l-paper);
}

.splash-scroll svg {
    width: 18px;
    height: 18px;
}

/* ══ Landing sections ══ */
.l-sec {
    padding: 104px 24px;
}

.l-paper {
    background: var(--l-paper);
}

.l-sand {
    background: var(--l-sand);
}

.l-dark {
    background: var(--l-ink);
    color: var(--l-paper);
}

.l-night {
    background: var(--l-night);
    color: var(--l-paper);
}

.l-wrap {
    max-width: 1180px;
    margin: 0 auto;
}

.l-kicker {
    margin: 0;
    font-family: var(--l-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--l-rust);
}

.l-h2 {
    margin: 0;
    font-family: var(--l-serif);
    font-weight: 600;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
}

/* 1. About */
.l-about {
    padding-top: 120px;
    padding-bottom: 96px;
}

.l-about .l-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 64px;
    align-items: center;
}

.l-about-text {
    flex: 999 1 520px;
    min-width: 0;
}

.l-about-text .l-kicker {
    margin-bottom: 20px;
}

.l-about h1 {
    margin: 0;
    font-family: var(--l-serif);
    font-weight: 600;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.l-lede {
    margin: 28px 0 0;
    font-size: 19px;
    line-height: 1.6;
    color: var(--l-body);
    max-width: 560px;
}

.l-pad {
    flex: 1 1 340px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
}

.l-pad svg {
    width: 100%;
    height: auto;
    display: block;
}

.l-pad figcaption {
    font-size: 15px;
    line-height: 1.55;
    color: var(--l-body);
}

.l-pad strong {
    color: var(--l-ink);
}

/* 2. Made by hand: photo log */
.l-head-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 64px;
    align-items: flex-end;
    margin-bottom: 48px;
}

.l-head-row .l-h2,
.l-head-row p {
    flex: 1 1 420px;
}

.l-head-row p {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    color: var(--l-body);
}

.l-log {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 230px;
    grid-auto-flow: dense;
    gap: 14px;
}

.l-log figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    background: var(--l-ink);
}

.l-log .tall {
    grid-row: span 2;
}

.l-log .wide {
    grid-column: span 2;
}

.l-log img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.l-log figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    margin-right: 12px;
    background: var(--l-paper);
    color: var(--l-ink);
    font-family: var(--l-mono);
    font-size: 12px;
    line-height: 1.4;
    padding: 6px 10px;
}

@media (max-width: 720px) {
    .l-log .tall {
        grid-row: span 1;
    }

    .l-log .wide {
        grid-column: span 1;
    }
}

/* 3. Who it's for */
.l-who {
    padding-top: 112px;
    padding-bottom: 112px;
}

.l-who .l-h2 {
    margin-bottom: 48px;
    max-width: 720px;
}

.l-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 48px 40px;
}

.l-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-top: 1.5px solid var(--l-ink);
    padding-top: 22px;
}

.l-card h3 {
    margin: 0;
    font-family: var(--l-serif);
    font-weight: 600;
    font-size: 26px;
    line-height: 1.2;
}

.l-card p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--l-body);
}

.l-card .l-kicker {
    color: var(--l-rust);
}

.l-card a {
    font-size: 16px;
    font-weight: 500;
    align-self: flex-start;
}

/* 4. Places (dark) */
.l-places .l-wrap {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.l-places-head {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 64px;
    align-items: flex-end;
    justify-content: space-between;
}

.l-places-head p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--l-mist);
    max-width: 420px;
}

.l-place-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    column-gap: 32px;
    border-top: 1px solid var(--l-body);
}

.l-place-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--l-body);
    min-width: 0;
}

.l-place-list img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    background: var(--l-rule-dark);
}

.l-place-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.l-place-name {
    font-family: var(--l-serif);
    font-size: 21px;
    line-height: 1.2;
}

.l-place-sub {
    font-family: var(--l-mono);
    font-size: 12px;
    color: var(--l-stone);
}

.l-outline-btn {
    align-self: flex-start;
    background: none;
    border: 1.5px solid var(--l-paper);
    color: var(--l-paper);
    border-radius: 999px;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 28px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.l-outline-btn:hover {
    background: var(--l-paper);
    color: var(--l-ink);
}

.l-outline-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: default;
}

.l-outline-btn[aria-disabled="true"]:hover {
    background: none;
    color: var(--l-paper);
}

/* 5. From Josef */
.l-josef {
    padding-top: 120px;
    padding-bottom: 120px;
}

.l-josef .l-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 56px;
    align-items: flex-start;
}

.l-portrait {
    flex: 1 1 300px;
    max-width: 400px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.l-portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 30%;
    display: block;
}

.l-portrait figcaption {
    font-family: var(--l-mono);
    font-size: 12px;
    color: var(--l-muted);
}

.l-letter {
    flex: 999 1 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 640px;
}

.l-letter .l-h2 {
    font-size: clamp(30px, 3.6vw, 42px);
    line-height: 1.12;
}

.l-letter p {
    margin: 0;
    font-family: var(--l-serif);
    font-size: 21px;
    line-height: 1.6;
    color: var(--l-prose);
}

.l-sign {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.l-sign img {
    width: 44px;
    height: auto;
    display: block;
}

.landing .l-sign a {
    font-family: var(--l-serif);
    font-style: italic;
    font-size: 24px;
    color: var(--l-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.l-letter .l-credits {
    margin: 18px 0 0;
    font-family: var(--l-sans);
    font-size: 14px;
    line-height: 1.7;
    color: var(--l-muted);
    border-top: 1px solid var(--l-mist);
    padding-top: 18px;
}

/* 6. Closing (dark) */
.l-closing {
    padding-top: 112px;
    padding-bottom: 48px;
}

.l-closing .l-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
}

.l-closing .l-vortex {
    width: 72px;
    height: auto;
    display: block;
}

.l-closing .l-h2 {
    font-size: clamp(32px, 4.2vw, 52px);
}

.l-closing p {
    margin: 0;
    font-size: 17px;
    color: var(--l-mist);
}

.l-footer {
    margin-top: 96px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--l-rule-dark);
    padding-top: 28px;
    font-size: 13px;
    color: var(--l-stone);
    text-align: left;
}

.l-fmod {
    display: flex;
    align-items: center;
    gap: 12px;
}

.l-fmod img {
    height: 18px;
    width: auto;
    display: block;
    opacity: 0.8;
}

.l-footer-links {
    display: flex;
    gap: 8px 24px;
    flex-wrap: wrap;
}

.landing .l-footer-links a,
.l-footer-links button {
    color: var(--l-mist);
    font-size: 13px;
}

.landing .l-footer-links a:hover,
.l-footer-links button:hover {
    color: var(--l-paper);
}

.l-footer-links button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 720px) {
    .l-sec {
        padding: 72px 20px;
    }

    .l-about .l-wrap,
    .l-josef .l-wrap {
        gap: 40px;
    }

    .l-closing {
        padding-bottom: 40px;
    }

    .l-footer {
        margin-top: 64px;
    }
}

@media (max-width: 420px) {
    .splash-hero {
        padding: 12px 16px 28px;
    }

    .splash-def {
        font-size: 19px;
    }

    .splash-solo,
    .l-play {
        padding: 18px 48px;
    }

    .l-sec {
        padding: 64px 16px;
    }

    .l-place-name {
        font-size: 19px;
    }
}
