/* ============================================================
   Trace — darkroom editorial
   Shared by: landing (/trace), legal pages (privacy/terms/support),
   and the pairing fallback (/trace/pair). Keep those class names.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Schibsted+Grotesk:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
    --bg:        #0A0A0A;
    --bg2:       #131311;
    --ink:       #F2F0EA;
    --dim:       #A8A49B;
    --faint:     #6E6A61;
    --hairline:  rgba(242, 240, 234, 0.14);
    --hairline2: rgba(242, 240, 234, 0.07);
    --polaroid:  #F6F2E8;
    --warm:      #E4B268;
    --serif:     'Instrument Serif', Georgia, serif;
    --sans:      'Schibsted Grotesk', -apple-system, sans-serif;
    --mono:      ui-monospace, 'SF Mono', Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.container {
    width: min(1060px, 100% - 48px);
    margin-inline: auto;
}

/* ---------- Vignette ---------- */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1999;
    background: radial-gradient(120% 90% at 50% 20%, transparent 55%, rgba(0,0,0,0.5) 100%);
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Type helpers ---------- */
.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--warm);
}

.section-eyebrow { margin-bottom: 20px; }

.section-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(38px, 6vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.01em;
}

.section-title em, h1 em, .final-cta em {
    font-style: italic;
    color: var(--warm);
}

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 0;
    background: linear-gradient(rgba(10,10,10,0.92), rgba(10,10,10,0.75) 70%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-size: 22px;
    text-decoration: none;
}

.nav-logo-mark { width: 22px; height: 22px; }

.nav-cta {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--bg);
    background: var(--ink);
    padding: 9px 18px;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-cta:hover { transform: translateY(-1px); opacity: 0.9; }

/* ---------- Hero ---------- */
.hero {
    min-height: min(100svh, 920px);
    display: flex;
    align-items: center;
    padding: 130px 0 80px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
}

.hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(46px, 7.2vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.015em;
    margin: 18px 0 22px;
}

.hero-sub {
    font-size: 17px;
    color: var(--dim);
    max-width: 42ch;
    margin-bottom: 34px;
}

.hero-ctas {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hero-note {
    font-size: 13px;
    color: var(--faint);
}

.open-app-link {
    color: var(--warm);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.app-store-badge {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover { transform: translateY(-2px); opacity: 0.92; }
.app-store-badge svg { display: block; }

/* Fanned polaroid stack — the middle frame is BLURRED: the partner's
   hidden photo. The product, told in one glance. */
.hero-stack {
    position: relative;
    height: min(520px, 60vw);
}

.polaroid {
    position: absolute;
    background: var(--polaroid);
    padding: 10px 10px 40px;
    width: clamp(170px, 21vw, 240px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.polaroid img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    filter: saturate(0.92) contrast(1.02);
}

.polaroid figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: #8a8578;
}

.p1 { left: 4%;  top: 12%; --rot: -8deg; z-index: 1; }
.p2 { left: 30%; top: 2%;  --rot: 4deg;  z-index: 2; }
.p3 { left: 52%; top: 26%; --rot: 11deg; z-index: 3; }

.p2 img { filter: blur(10px) saturate(0.9); }
.p2::after {
    content: '';
    position: absolute;
    inset: 10px 10px 40px;
    background:
        radial-gradient(circle at 50% 46%, rgba(10,10,10,0.55) 0 14px, transparent 15px),
        rgba(20, 20, 18, 0.18);
}
.p2 figcaption::after { content: ' · SEALED'; color: var(--warm); }

/* Entrance: each polaroid fans out from flat. */
.polaroid {
    transform: rotate(var(--rot));
    animation: fan 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.p1 { animation-delay: 0.35s; }
.p2 { animation-delay: 0.5s; }
.p3 { animation-delay: 0.65s; }

@keyframes fan {
    from { transform: rotate(0deg) translateY(26px); opacity: 0; }
    to   { transform: rotate(var(--rot)) translateY(0); opacity: 1; }
}

/* Staggered hero copy reveal */
.reveal { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.r1 { animation-delay: 0.05s; }
.r2 { animation-delay: 0.15s; }
.r3 { animation-delay: 0.28s; }
.r4 { animation-delay: 0.42s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Steps ---------- */
.steps { padding: 110px 0; border-top: 1px solid var(--hairline2); }

.steps-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 44px;
    margin-top: 34px;
}

.steps-grid li {
    border-top: 1px solid var(--hairline);
    padding-top: 22px;
}

.step-num {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--warm);
}

.steps-grid h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 27px;
    margin: 12px 0 10px;
}

.steps-grid p {
    font-size: 15px;
    color: var(--dim);
}


/* ---------- The roll (revealed strip) ---------- */
.roll-strip {
    padding: 100px 0 90px;
    border-top: 1px solid var(--hairline2);
    overflow: hidden;
    text-align: center;
}

.strip {
    display: flex;
    justify-content: center;
    gap: 26px;
    padding: 26px 12px;
}

.strip .polaroid {
    position: static;
    flex: 0 0 auto;
    width: clamp(140px, 15vw, 190px);
    animation: none;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.s1 { transform: rotate(-5deg); }
.s2 { transform: rotate(3deg) translateY(14px); }
.s3 { transform: rotate(-2deg); }
.s4 { transform: rotate(5deg) translateY(10px); }
.s5 { transform: rotate(-4deg); }

.strip .polaroid:hover { transform: rotate(0deg) translateY(-6px); }

.strip-caption {
    margin-top: 26px;
    font-family: var(--serif);
    font-style: italic;
    font-size: 21px;
    color: var(--dim);
}

/* ---------- FAQ ---------- */
.faq-section { padding: 110px 0; border-top: 1px solid var(--hairline2); }

.faq {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 56px;
    margin-top: 34px;
}

.faq-item { border-top: 1px solid var(--hairline); padding-top: 20px; }

.faq-item h4 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 22px;
    margin-bottom: 8px;
}

.faq-item p { font-size: 14.5px; color: var(--dim); }

/* ---------- Final CTA ---------- */
.final-cta {
    padding: 130px 0 150px;
    text-align: center;
    border-top: 1px solid var(--hairline2);
}

.final-cta h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(44px, 7vw, 76px);
    line-height: 1.04;
    margin-bottom: 34px;
}

.final-cta .app-store-badge { display: inline-block; }

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--hairline);
    padding: 44px 0 54px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--serif);
    font-size: 20px;
}

.footer-brand img { width: 19px; height: 19px; }

.footer-author {
    margin-top: 8px;
    font-size: 12px;
    color: var(--faint);
}

.footer-links {
    margin-top: 18px;
    font-size: 13px;
    color: var(--dim);
}

.footer-links a { color: var(--dim); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-sep { margin: 0 10px; color: var(--faint); }

.footer-copy {
    margin-top: 14px;
    font-size: 12px;
    color: var(--faint);
}

/* ============================================================
   Legal pages (privacy / terms / support)
   ============================================================ */
.legal {
    max-width: 720px;
    margin-inline: auto;
    padding: 140px 24px 90px;
}

.legal-back {
    display: inline-block;
    font-size: 13px;
    color: var(--faint);
    text-decoration: none;
    margin-bottom: 30px;
}

.legal-back:hover { color: var(--ink); }

.legal h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(38px, 6vw, 54px);
    line-height: 1.05;
    margin-bottom: 10px;
}

.legal-date { font-size: 13px; color: var(--faint); margin-bottom: 38px; }

.legal h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 28px;
    margin: 44px 0 12px;
    padding-top: 26px;
    border-top: 1px solid var(--hairline2);
}

.legal h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 26px 0 8px;
}

.legal p { font-size: 15px; color: var(--dim); margin-bottom: 12px; }

.legal ul { margin: 0 0 14px 20px; }

.legal li { font-size: 15px; color: var(--dim); margin-bottom: 8px; }

.legal li strong, .legal p strong { color: var(--ink); font-weight: 600; }

.legal a { color: var(--warm); text-decoration: none; }
.legal a:hover { text-decoration: underline; }

/* ============================================================
   Pairing fallback (/trace/pair)
   ============================================================ */
.pair-page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
}

.pair-mark { width: 44px; height: 44px; margin-bottom: 28px; }

.pair-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(36px, 7vw, 56px);
    line-height: 1.06;
    margin-bottom: 16px;
}

.pair-subtitle {
    font-size: 15px;
    color: var(--dim);
    max-width: 40ch;
    margin-bottom: 34px;
}

.pair-code-box {
    background: var(--bg2);
    border: 1px solid var(--hairline);
    padding: 22px clamp(18px, 6vw, 44px) 26px;
    margin-bottom: 34px;
    max-width: 100%;
}

.pair-code-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--warm);
    margin-bottom: 8px;
}

.pair-code {
    font-family: var(--serif);
    font-size: clamp(28px, 9vw, 44px);
    letter-spacing: 0.16em;
    white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero { padding: 110px 0 60px; min-height: auto; }

    .hero-grid { grid-template-columns: 1fr; gap: 26px; }

    .hero-stack {
        height: 330px;
        margin-top: 16px;
        max-width: 480px;
    }

    .polaroid { width: clamp(150px, 38vw, 190px); }
    .p1 { left: 0; }
    .p2 { left: 26%; }
    .p3 { left: 50%; top: 22%; }

    .steps, .pricing, .faq-section { padding: 76px 0; }

    .steps-grid { grid-template-columns: 1fr; gap: 30px; }

    .faq { grid-template-columns: 1fr; gap: 28px; }

    .strip {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-inline: 24px;
    }
    .strip::-webkit-scrollbar { display: none; }

    .final-cta { padding: 90px 0 110px; }

    .legal { padding-top: 120px; }
}
