/* ============================================
   YESK — Landing styles
   Forest theme. Static HTML/CSS, no build step.
   ============================================ */

:root {
    --bg: #0E1610;
    --bg-raised: #182C1E;
    --card: #192A1E;
    --card-elevated: #2A4834;
    --clearing: #4E8C4A;
    --paper: #F4F1E8;
    --ink: #0E1610;
    --text: #ECF3ED;
    --text-dim: #A3B8A8;
    --text-muted: #5C7262;
    --gold: #E7B95F;
    --gold-hover: #F3CE85;
    --line: rgba(231, 185, 95, 0.18);
    --outline: #3A2A14;

    /* Forest tones taken from the app, used only inside the phones */
    --sage: #8EA594;
    --track: #223A2A;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --gutter: 16px;
    --max: 1360px;
    --nav-h: 64px;
    --section-y: clamp(72px, 9vw, 128px);
    --shadow-soft: 0 18px 40px -24px rgba(3, 6, 4, 0.7), 0 6px 14px -8px rgba(3, 6, 4, 0.5);
}

@media (min-width: 768px) {
    :root { --gutter: 32px; }
}

/* ---------- Base ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 900px) {
    body { font-size: 18px; }
}

h1, h2, h3, p, ol, ul {
    margin: 0;
}

ol, ul {
    padding: 0;
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

svg {
    fill: currentColor;
}

a {
    color: inherit;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
}

[id] {
    scroll-margin-top: calc(var(--nav-h) + 16px);
}

main {
    flex: 1 0 auto;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

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

.scene :focus-visible {
    outline-color: var(--ink);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--gold);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: min(100% - 2 * var(--gutter), var(--max));
    margin-inline: auto;
}

/* ---------- Type ---------- */

h1,
.section-title {
    font-weight: 700;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.75rem, 1.4rem + 5vw, 5.25rem);
    line-height: 1;
}

.section-title {
    font-size: clamp(2rem, 1.25rem + 2.8vw, 3.4rem);
    line-height: 1.05;
}

h3 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.lede {
    max-width: 34em;
    color: var(--text-dim);
    font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 8px;
    font: 600 1rem/1 var(--font);
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-icon {
    flex: none;
    width: 20px;
    height: 20px;
}

.btn-gold {
    background: var(--gold);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.btn-gold:hover {
    background: var(--gold-hover);
}

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

.btn-ink .btn-icon {
    color: var(--gold);
}

.btn-ink:hover {
    background: #1F3326;
}

/* ---------- Navigation ---------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(14, 22, 16, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--nav-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand img {
    width: 28px;
    height: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a[aria-current="page"] {
    color: var(--gold);
}

.nav-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    margin-left: 10px;
    min-height: 44px;
    color: var(--text-dim);
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.08em;
}

.nav-links .nav-lang a,
.nav-links .nav-lang span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: inherit;
    text-decoration: none;
}

.nav-links .nav-lang a:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-links .nav-lang [aria-current="true"] {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

@media (min-width: 600px) {
    .nav-links { gap: 4px; }
    .nav-links a { padding-inline: 12px; }
}

/* Keep all four destinations available, including at 320px and text zoom. */
@media (max-width: 599px) {
    :root { --nav-h: 108px; }
    .nav-inner { flex-direction: column; gap: 0; padding-block: 6px; }
    .nav-links { justify-content: center; flex-wrap: wrap; }
    .nav-links a { padding-inline: 9px; font-size: 0.875rem; }
    .nav-links .nav-lang { margin-left: 2px; }
}

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

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 7vw, 96px) 0 clamp(16px, 3vw, 40px);
    background: var(--bg);
}

.hero-grid {
    display: grid;
    align-items: center;
    gap: 56px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.hero-copy .btn {
    margin-top: 8px;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-visual .phone {
    --pw: min(76vw, 300px);
}

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
    .hero-visual .phone { --pw: clamp(260px, 24vw, 320px); }
}

/* ---------- Phone frames with unedited simulator screenshots ---------- */

.phone {
    --pw: 300px;
    position: relative;
    flex: none;
    width: var(--pw);
    aspect-ratio: 1206 / 2622;
    height: calc(var(--pw) * 2622 / 1206);
    padding: 0.5em;
    border-radius: 2.4em;
    background: #060A07;
    box-shadow:
        inset 0 0 0 0.07em rgba(236, 243, 237, 0.16),
        0 2.2em 3.6em -1.6em rgba(3, 6, 4, 0.6),
        0 0.9em 1.6em -0.9em rgba(3, 6, 4, 0.45);
    color: var(--text);
    font-size: calc(var(--pw) / 20);
    line-height: 1.25;
    letter-spacing: 0;
    text-align: left;
}

.phone-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 1.95em;
    background: linear-gradient(180deg, #182C1E 0%, #0E1610 62%);
}

/* Preserve the complete capture in the freestanding frames. The illustrated
   phone has a fixed opening and intentionally crops to fill it. */
.phone-screenshot {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.diorama-phone .phone-screenshot {
    object-fit: cover;
}

/* ---------- Scenes ---------- */

.scenes {
    isolation: isolate;
    overflow: hidden;
    overflow: clip;
}

.scene {
    position: relative;
    overflow: hidden;
    overflow: clip;
    background: var(--clearing);
    color: var(--ink);
}

.scene-copy p,
.s2-text p {
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

/* Scene 1: the records live inside the phone. The original app capture is
   projected onto the illustrated display as a single flat surface. */
.scene-1 {
    z-index: 1;
    overflow: visible;
    padding-top: 40px;
}
.scene1-grid {
    display: flow-root;
    position: relative;
    /* Put the seam just below the casing; only the original shadow tip
       crosses onto the next scene. Its shape and direction stay intact. */
    min-height: calc(min((100vw - 2 * var(--gutter)) * 0.76, 1000px) * 0.94);
}
.scene-copy {
    position: relative;
    z-index: 5;
    width: 29%;
    max-width: 24rem;
    padding-top: clamp(190px, 20vw, 290px);
}
.scene-copy p { margin-top: 20px; }
.diorama {
    position: absolute;
    right: -40px;
    top: 0;
    width: min(76%, 1000px);
    aspect-ratio: 1;
    container-type: inline-size;
    isolation: isolate;
}
.phone-archive,
.archive-shadow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
}
.archive-shadow { z-index: 0; fill: var(--ink); overflow: visible; }
.phone-archive { z-index: 1; }
.diorama-phone {
    position: absolute;
    z-index: 2;
    top: 7.6%;
    left: 14.3%;
    /* Match the opening in the 1000 × 1000 illustration: the right edge
       is slightly taller, so a uniform skew cannot fit all four corners.
       Container units keep the projection aligned at every scene size. */
    transform: perspective(220cqw) rotateY(-18deg) skewY(12deg);
    transform-origin: top left;
}
.diorama-phone .phone {
    --pw: 31.65cqw;
    height: 68.5cqw;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.diorama-phone .phone-screen {
    background: transparent;
    border-radius: 4.2cqw;
}
@media (min-width: 900px) and (max-width: 1199px) {
    .scene1-grid { min-height: calc((100vw - 2 * var(--gutter)) * 0.8 * 0.94 + 30px); }
    .scene-copy { padding-top: 200px; width: 31%; }
    .diorama { top: 30px; right: -65px; width: 80%; }
}
@media (max-width: 899px) {
    .scene-1 { padding-top: 64px; }
    .scene1-grid { min-height: 0; }
    .scene-copy { width: 100%; max-width: 34rem; padding: 0; }
    .diorama {
        --art-width: clamp(400px, 125vw, 800px);
        position: relative;
        top: auto;
        right: auto;
        width: var(--art-width);
        max-width: none;
        margin-top: 24px;
        margin-bottom: calc(var(--art-width) * -0.06);
        margin-left: calc(50% - var(--art-width) / 2);
    }
}

/* Scene 2: rays, two phones, floor */
.scene-2 {
    --s2-pw: min(70vw, 270px);
    padding-top: clamp(72px, 9vw, 120px);
}

.rays {
    position: absolute;
    top: clamp(300px, 30vw, 470px);
    left: 50%;
    width: 1800px;
    height: 1800px;
    background: url("public/diorama/rays.svg") center / contain no-repeat;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.scene2-title {
    position: relative;
    z-index: 2;
    max-width: 14em;
    margin-inline: auto;
    text-align: center;
}

.scene2-row {
    position: relative;
    z-index: 3;
    display: grid;
    justify-items: center;
    gap: 40px;
    margin-top: clamp(40px, 6vw, 72px);
}

.s2-text {
    max-width: 22rem;
    text-align: center;
}

.s2-text h3 {
    font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
}

.s2-text p {
    margin-top: 10px;
}

.s2-phone .phone {
    --pw: var(--s2-pw);
}

/* stacked: text A, phone A, text B, phone B */
.s2-text-a { order: 1; }
.s2-phone-a { order: 2; }
.s2-text-b { order: 3; }
.s2-phone-b { order: 4; }

@media (min-width: 900px) {
    .scene2-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        gap: 56px 48px;
    }

    .s2-text-a, .s2-phone-a, .s2-text-b, .s2-phone-b { order: 0; }
    .s2-text { text-align: left; }
    .s2-text-a, .s2-phone-b { justify-self: end; }
    .s2-phone-a, .s2-text-b { justify-self: start; }
}

@media (min-width: 1100px) {
    .scene-2 { --s2-pw: clamp(240px, 19vw, 280px); }

    .scene2-row {
        grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
        align-items: start;
        column-gap: clamp(28px, 3vw, 48px);
    }

    .s2-text { margin-top: calc(var(--s2-pw) * 0.42); }
    .s2-text-a { justify-self: end; text-align: right; }
    .s2-text-b { justify-self: start; margin-top: calc(var(--s2-pw) * 0.42 + 56px); }
    .s2-phone-b { margin-top: 56px; }
}

.floor {
    position: relative;
    z-index: 2;
    margin-top: calc(var(--s2-pw) * -0.62);
    padding: calc(var(--s2-pw) * 0.62 + 48px) 0 clamp(56px, 7vw, 88px);
    background: var(--paper);
}

.floor-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.floor-note {
    max-width: 34rem;
    font-size: 0.9375rem;
}

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

.features {
    padding: var(--section-y) 0;
}

.features-grid {
    display: grid;
    gap: 40px;
}

.feature {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-content: start;
    column-gap: 16px;
    padding: 28px 0;
}

.feature-num {
    grid-row: span 2;
    width: 56px;
    height: auto;
    margin-top: 2px;
}

.feature h3 {
    font-size: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
}

.feature p {
    margin-top: 8px;
    color: var(--text-dim);
}

@media (min-width: 900px) {
    .features-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        align-items: start;
        column-gap: 64px;
    }

    .feature-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 48px;
    }
}

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

.faq {
    padding-top: 24px;
}

.faq-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.faq .section-title {
    font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
    line-height: 1.15;
}

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

.acc-item {
    border-bottom: 1px solid var(--line);
}

.acc-heading {
    font-size: inherit;
    letter-spacing: normal;
}

.acc-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    min-height: 64px;
    padding: 16px 0;
    border: 0;
    background: none;
    color: var(--text);
    font: 600 clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem)/1.35 var(--font);
    letter-spacing: -0.01em;
    text-align: left;
    cursor: pointer;
}

.acc-trigger:hover {
    color: var(--gold-hover);
}

.acc-icon {
    position: relative;
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.acc-icon::before,
.acc-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
}

.acc-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.acc-trigger[aria-expanded="true"] .acc-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.acc-panel {
    padding: 0 56px 24px 0;
    color: var(--text-dim);
}

.acc-panel[hidden] {
    display: none;
}

.acc-panel a,
.policy a,
.support-detail a {
    color: var(--gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.acc-panel a:hover,
.policy a:hover,
.support-detail a:hover {
    color: var(--gold-hover);
}

/* ---------- Privacy & Support ---------- */

.page {
    padding: clamp(48px, 7vw, 96px) 0 var(--section-y);
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 40rem;
    gap: 32px;
}

.page-header h1 {
    font-size: clamp(2.25rem, 1.6rem + 2vw, 3rem);
    line-height: 1.08;
}

.page-meta {
    margin-top: 14px;
    color: var(--text-dim);
    font-size: 0.9375rem;
}

.page-lede {
    max-width: 24em;
    margin-top: 16px;
    color: var(--text-dim);
}

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

.policy-item {
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.policy-item h2 {
    font-size: clamp(1.25rem, 1.12rem + 0.5vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.policy-item p {
    max-width: 38em;
    margin-top: 8px;
    color: var(--text-dim);
}

/* Support: copy and correspondence pavilion share one open field. */
.support-scene {
    background: var(--clearing);
    color: var(--ink);
}

.support-stage {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    min-height: 620px;
    padding-block: 48px;
}

.support-copy {
    position: relative;
    z-index: 1;
    padding-left: clamp(0px, 3vw, 40px);
}

.support-eyebrow {
    margin-bottom: 24px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.support-copy h1 {
    font-size: clamp(3.5rem, 6.5vw, 6rem);
    line-height: 1.03;
    letter-spacing: -0.065em;
}

.support-lede {
    max-width: 24em;
    margin-top: 24px;
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    text-wrap: pretty;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 44px;
    margin-top: 40px;
    padding-bottom: 8px;
    border-bottom: 2px solid currentColor;
    font-size: clamp(1.5rem, 2.6vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    text-decoration: none;
}

.contact-email svg {
    flex: 0 0 28px;
}

.contact-email:hover {
    color: var(--outline);
    border-bottom-width: 4px;
    padding-bottom: 6px;
}

.support-scene :focus-visible {
    outline-color: var(--ink);
}

.support-email-hint {
    max-width: 26em;
    margin-top: 14px;
    font-size: 0.8125rem;
}

.support-illustration {
    display: block;
    width: 100%;
    max-width: 640px;
    justify-self: end;
}

.support-illustration img {
    width: 100%;
    height: auto;
}

.support-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    padding: 56px clamp(0px, 3vw, 40px) 64px;
}

.support-detail h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.support-detail p {
    max-width: 33em;
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.65;
}

@media (max-width: 767px) {
    .support-stage {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 44px;
        padding-bottom: 12px;
    }

    .support-copy { padding-left: 0; }
    .support-eyebrow { margin-bottom: 18px; }
    .support-copy h1 { font-size: clamp(3.5rem, 12vw, 5rem); }
    .support-lede { margin-top: 20px; }
    .contact-email { margin-top: 28px; }

    .support-illustration {
        width: min(100%, 440px);
        margin-top: 28px;
        justify-self: center;
    }

    .support-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding: 36px 0 44px;
    }
}

/* ---------- Reveal on scroll (added by script.js) ---------- */

.reveal {
    opacity: 0;
    transform: translateY(8px);
}

.reveal.is-revealed {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media print {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
