@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@300;400;500;600;700&display=swap');

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

/* ── Trace brand tokens ─────────────────────────────────────────
   Editorial dark — mirrors the iOS app palette so the web reads
   as the same product. Pure ink (#0A0A0A) bg, off-white text,
   warm sepia + cool graphite as duo accents, polaroid cream for
   card surfaces.
*/
:root {
    --bg: #0A0A0A;
    --bg-elevated: #141414;
    --bg-raised: #1C1C1C;
    --ink: #F2F2F0;
    --ink-dim: #A8A8A6;
    --ink-faint: #6E6E6C;
    --ink-ghost: #3A3A38;
    --stroke: rgba(255,255,255,0.08);
    --stroke-strong: rgba(255,255,255,0.16);
    --partner-warm: #E8DCC4;
    --partner-cool: #C9D2DA;
    --signal: #E8DCC4;
    --danger: #C8786A;
    --polaroid-white: #F6F2E8;
    --max-w: 1080px;
    --section-py: 96px;
    --px: 24px;
    --serif: 'Fraunces', 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

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

a {
    color: var(--ink);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover { opacity: 0.7; }

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

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--px);
}

/* ── Eyebrow ─────────────────────────────────────────────────── */
.eyebrow {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--stroke);
}

.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;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.nav-logo:hover { opacity: 1; }

.nav-logo-mark {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-cta {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--bg);
    background: var(--ink);
    padding: 10px 18px;
    border-radius: 999px;
    transition: transform 0.2s;
}

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

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 180px 0 80px;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 2;
    max-width: 760px;
    text-align: center;
}

.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.hero .eyebrow::before {
    content: '✻';
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: 0;
    color: var(--ink);
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(48px, 9vw, 96px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--ink);
}

.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--ink-dim);
}

.hero p {
    font-size: 18px;
    color: var(--ink-dim);
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.55;
}

.hero-ctas {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

/* Polaroid floaters in hero — decorative, hidden on small screens */
.hero-polaroid {
    position: absolute;
    background: var(--polaroid-white);
    border-radius: 2px;
    padding: 10px 10px 28px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 1;
}

.hero-polaroid img {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: block;
}

.hero-polaroid-1 {
    top: 90px; left: 6%;
    width: 150px;
    transform: rotate(-8deg);
}

.hero-polaroid-2 {
    top: 130px; right: 8%;
    width: 175px;
    transform: rotate(7deg);
}

.hero-polaroid-3 {
    bottom: -30px; left: 12%;
    width: 130px;
    transform: rotate(-4deg);
    opacity: 0.6;
}

.hero-polaroid-4 {
    bottom: -40px; right: 14%;
    width: 145px;
    transform: rotate(10deg);
    opacity: 0.65;
}

@media (max-width: 900px) {
    .hero-polaroid-1, .hero-polaroid-4 { display: none; }
    .hero-polaroid-2 {
        top: 110px; right: -40px;
        width: 130px;
    }
    .hero-polaroid-3 {
        bottom: -20px; left: -30px;
        width: 110px;
    }
}

@media (max-width: 600px) {
    .hero-polaroid-2, .hero-polaroid-3 { display: none; }
}

/* ── App Store badge ─────────────────────────────────────────── */
.app-store-badge {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
}

.app-store-badge:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.app-store-badge svg {
    height: 52px;
    width: auto;
}

/* ── Sections ────────────────────────────────────────────────── */
section {
    padding: var(--section-py) 0;
}

.section-eyebrow {
    text-align: center;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-align: center;
    margin-bottom: 64px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ── How it works (3 phases) ─────────────────────────────────── */
.phases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.phase-card {
    padding: 32px 0;
    border-top: 1px solid var(--stroke);
}

.phase-num {
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 24px;
}

.phase-card h3 {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--ink);
}

.phase-card p {
    font-size: 15px;
    color: var(--ink-dim);
    line-height: 1.6;
}

/* ── Features (with polaroid visual) ─────────────────────────── */
.features-stack {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.feature-row.reverse {
    direction: rtl;
}

.feature-row.reverse > * {
    direction: ltr;
}

.feature-copy .eyebrow {
    margin-bottom: 16px;
    display: block;
}

.feature-copy h3 {
    font-family: var(--serif);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--ink);
}

.feature-copy p {
    font-size: 17px;
    color: var(--ink-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}

.feature-visual {
    aspect-ratio: 4 / 5;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--stroke);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-visual-polaroid {
    background: var(--polaroid-white);
    border-radius: 2px;
    padding: 14px 14px 42px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
    width: 60%;
    max-width: 240px;
    transform: rotate(-3deg);
}

.feature-visual-polaroid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

/* "27" cell motif used in features */
.feature-visual-counter {
    text-align: center;
}

.feature-visual-counter .num {
    font-family: var(--serif);
    font-size: 140px;
    font-weight: 400;
    line-height: 1;
    color: var(--ink);
}

.feature-visual-counter .denom {
    font-family: var(--serif);
    font-size: 32px;
    color: var(--ink-faint);
    margin-top: 4px;
}

/* Grid motif */
.feature-visual-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 32px;
    width: 100%;
}

.feature-visual-grid .cell {
    aspect-ratio: 1;
    border-radius: 4px;
    background: var(--bg-raised);
    position: relative;
}

.feature-visual-grid .cell.shot {
    background-image: linear-gradient(135deg, #5a4738, #2a201a);
}

.feature-visual-grid .cell.shot-cool {
    background-image: linear-gradient(135deg, #4a5560, #20272e);
}

.feature-visual-grid .cell.veiled {
    background: repeating-linear-gradient(
        -45deg,
        var(--bg-elevated),
        var(--bg-elevated) 4px,
        var(--ink-ghost) 4.5px,
        var(--ink-ghost) 5px
    );
}

@media (max-width: 800px) {
    .feature-row,
    .feature-row.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 32px;
    }
    .features-stack { gap: 64px; }
    .phases-grid { grid-template-columns: 1fr; gap: 8px; }
}

/* ── Pricing ─────────────────────────────────────────────────── */
.pricing {
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

.pricing-card {
    background: var(--bg-elevated);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
}

.pricing-card.popular {
    border-color: var(--partner-warm);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 32px;
    background: var(--partner-warm);
    color: var(--bg);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
}

.pricing-card h3 {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 16px;
}

.pricing-price {
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 4px;
}

.pricing-price-suffix {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink-faint);
    font-weight: 400;
}

.pricing-detail {
    font-size: 13px;
    color: var(--ink-faint);
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pricing-features li {
    font-size: 14px;
    color: var(--ink-dim);
    padding: 6px 0;
    border-bottom: 1px solid var(--stroke);
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-note {
    margin-top: 32px;
    font-size: 13px;
    color: var(--ink-faint);
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-top: 1px solid var(--stroke);
    padding: 24px 0;
}

.faq-item:last-child {
    border-bottom: 1px solid var(--stroke);
}

.faq-item h4 {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 10px;
}

.faq-item p {
    font-size: 15px;
    color: var(--ink-dim);
    line-height: 1.6;
}

/* ── Final CTA ───────────────────────────────────────────────── */
.final-cta {
    text-align: center;
    padding: 120px 0;
}

.final-cta h2 {
    font-family: var(--serif);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--stroke);
    padding: 48px 0;
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 6px;
}

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

.footer-author {
    font-size: 13px;
    color: var(--ink-faint);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 14px;
}

.footer-links a {
    color: var(--ink-dim);
}

.footer-links a:hover {
    color: var(--ink);
    opacity: 1;
}

.footer-sep { color: var(--ink-ghost); }

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

/* ── Legal pages ─────────────────────────────────────────────── */
.legal {
    padding: 140px 0 80px;
    max-width: 720px;
    margin: 0 auto;
}

.legal-back {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-dim);
    margin-bottom: 48px;
}

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

.legal h1 {
    font-family: var(--serif);
    font-size: clamp(40px, 6vw, 56px);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.05;
    margin-bottom: 8px;
    color: var(--ink);
}

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

.legal h2 {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--ink);
}

.legal h3 {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal p {
    font-size: 15px;
    color: var(--ink-dim);
    line-height: 1.75;
    margin-bottom: 14px;
}

.legal ul {
    padding-left: 20px;
    margin-bottom: 14px;
}

.legal li {
    font-size: 15px;
    color: var(--ink-dim);
    line-height: 1.75;
    margin-bottom: 6px;
}

.legal strong {
    color: var(--ink);
    font-weight: 500;
}

.legal a {
    color: var(--partner-warm);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(232, 220, 196, 0.4);
}

.legal a:hover {
    opacity: 1;
    text-decoration-color: var(--partner-warm);
}

/* ── Pair (Universal Link fallback) ──────────────────────────── */
.pair-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.pair-mark {
    width: 64px;
    height: 64px;
    margin-bottom: 32px;
}

.pair-title {
    font-family: var(--serif);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
    color: var(--ink);
    max-width: 480px;
}

.pair-subtitle {
    font-size: 16px;
    color: var(--ink-dim);
    max-width: 420px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.pair-code-box {
    background: var(--bg-elevated);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 24px 32px;
    margin-bottom: 40px;
    text-align: left;
    max-width: 360px;
    width: 100%;
}

.pair-code-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 8px;
}

.pair-code {
    font-family: var(--serif);
    font-size: 42px;
    letter-spacing: 8px;
    color: var(--ink);
    word-break: break-all;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --section-py: 64px;
        --px: 20px;
    }
    .hero { padding: 140px 0 60px; }
    .pricing-grid { grid-template-columns: 1fr; }
    .legal { padding-top: 120px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
