/* ============================================================
   Zenin — marketing & legal site
   Mirrors the in-app design system (LOTheme):
   · serif ultra-thin display headings
   · sans-serif light body
   · monospace thin for numbers
   · pure B&W, iOS semantic colors
   · 12px cards, 8px buttons, hairline borders
   ============================================================ */

:root {
    /* iOS semantic colors — light */
    --bg:            #ffffff;   /* systemBackground */
    --surface:       #f2f2f7;   /* secondarySystemBackground */
    --surface-2:     #ffffff;   /* tertiarySystemBackground */
    --border:        rgba(60,60,67,.20);   /* separator */
    --ink:           #000000;   /* label */
    --ink-2:         rgba(60,60,67,.62);    /* secondaryLabel */
    --ink-3:         rgba(60,60,67,.34);    /* tertiaryLabel */

    --radius-card:   12px;
    --radius-btn:    8px;
    --radius-tag:    100px;

    --maxw:          1040px;

    --serif:  ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --sans:   -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --mono:   ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #000000;
        --surface:   #1c1c1e;
        --surface-2: #2c2c2e;
        --border:    rgba(84,84,88,.55);
        --ink:       #ffffff;
        --ink-2:     rgba(235,235,245,.62);
        --ink-3:     rgba(235,235,245,.32);
    }
}

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

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

body {
    font-family: var(--sans);
    font-weight: 300;                 /* body = light */
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    letter-spacing: -.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* serif display utility */
.serif { font-family: var(--serif); font-weight: 200; letter-spacing: -.02em; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    border-bottom: .5px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--serif); font-weight: 300; font-size: 21px; letter-spacing: -.01em;
}
.brand .mark {
    width: 28px; height: 28px; border-radius: var(--radius-btn);
    background: var(--ink); color: var(--bg);
    display: grid; place-items: center;
    font-family: var(--serif); font-weight: 300; font-size: 16px;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--ink-2); font-size: 14px; font-weight: 500; transition: color .2s ease; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links .btn { padding: 9px 18px; font-size: 14px; }

/* ---------- Buttons (rectangular, 8px — like loButton) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--sans); font-weight: 500; font-size: 15px;
    background: var(--ink); color: var(--bg);
    padding: 13px 24px; border-radius: var(--radius-btn);
    border: .5px solid transparent;
    transition: opacity .2s ease;
}
.btn:hover { opacity: .82; }
.btn-secondary {
    background: var(--surface); color: var(--ink);
    border: .5px solid var(--border);
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 104px 0 56px; }
.eyebrow {
    display: inline-block; font-family: var(--sans);
    font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-2);
    border: .5px solid var(--border); border-radius: var(--radius-tag);
    padding: 6px 15px; margin-bottom: 32px;
}
.hero h1 {
    font-family: var(--serif); font-weight: 200;
    font-size: clamp(44px, 8vw, 88px); line-height: 1.04; letter-spacing: -.03em;
    margin-bottom: 26px;
}
.hero p.lead {
    font-size: clamp(17px, 2.2vw, 20px); font-weight: 300;
    color: var(--ink-2); max-width: 560px; margin: 0 auto 38px;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Phone mock ---------- */
.phone-stage { margin: 72px auto 0; max-width: 300px; }
.phone {
    position: relative;
    aspect-ratio: 9 / 19.5; border-radius: 48px;
    background: #0b0b0c; padding: 9px;
    box-shadow: 0 1px 0 rgba(255,255,255,.06) inset,
                0 40px 90px rgba(0,0,0,.28);
}
.phone-screen {
    position: relative;
    width: 100%; height: 100%; border-radius: 40px;
    background: var(--bg); border: .5px solid var(--border);
    display: flex; flex-direction: column; padding: 36px 18px 24px; gap: 16px; overflow: hidden;
}
/* Dynamic Island */
.phone-screen::before {
    content: ""; position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
    width: 78px; height: 22px; border-radius: 999px; background: #0b0b0c; z-index: 2;
}

/* Header: serif day number + completion ring (mirrors ClarityDashboardView) */
.ph-header { display: flex; align-items: flex-start; justify-content: space-between; }
.ph-dow   { font-family: var(--mono); font-size: 10px; letter-spacing: .28em; color: var(--ink-3); }
.ph-day   { font-family: var(--serif); font-weight: 200; font-size: 52px; line-height: 1; letter-spacing: -.02em; margin: 2px 0; }
.ph-month { font-family: var(--mono); font-size: 9px; letter-spacing: .2em; color: var(--ink-2); }
.ph-ring  { position: relative; width: 44px; height: 44px; flex: none; }
.ph-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.ph-ring .track { fill: none; stroke: var(--border); stroke-width: 2; }
.ph-ring .fill  { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.ph-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 9px; }

/* Goal cards: round checkbox + pillar + streak */
.ph-goal {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 12px; border-radius: var(--radius-card);
    border: .5px solid var(--border); background: var(--bg);
}
.ph-goal.done { background: var(--surface); border-color: color-mix(in srgb, var(--border) 50%, transparent); }
.ph-check { width: 23px; height: 23px; border-radius: 50%; border: 1.5px solid var(--border); flex: none; display: grid; place-items: center; }
.ph-check.on { border-color: var(--ink); }
.ph-check.on::after { content: "✓"; font-size: 11px; font-weight: 600; color: var(--ink); }
.ph-goal-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-goal-text .t { font-size: 14px; font-weight: 400; }
.ph-goal.done .ph-goal-text .t { color: var(--ink-3); text-decoration: line-through; }
.ph-goal-text .p { font-family: var(--sans); font-size: 10px; font-weight: 500; color: var(--ink-3); letter-spacing: .01em; }
.ph-streak { margin-left: auto; text-align: center; flex: none; }
.ph-streak b { display: block; font-family: var(--mono); font-weight: 300; font-size: 14px; }
.ph-streak small { font-family: var(--mono); font-size: 8px; color: var(--ink-3); }

/* Compound Progress card */
.ph-compound { border: .5px solid var(--border); border-radius: var(--radius-card); background: var(--surface); padding: 13px 14px; }
.ph-compound-h { font-family: var(--sans); font-size: 9px; font-weight: 600; letter-spacing: .14em; color: var(--ink-3); margin-bottom: 9px; }
.ph-row { display: flex; align-items: center; gap: 9px; height: 19px; }
.ph-row .l { font-size: 11px; color: var(--ink-2); width: 44px; flex: none; }
.ph-row .track { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ph-row .track > i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.ph-row .v { font-family: var(--mono); font-size: 10px; color: var(--ink-2); width: 30px; text-align: right; flex: none; }

/* Dashed "add a goal" row */
.ph-add { display: flex; align-items: center; gap: 7px; padding: 11px 12px; border-radius: var(--radius-card); border: 1px dashed var(--border); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.ph-add::before { content: "+"; font-size: 15px; font-weight: 300; line-height: 1; }

/* ---------- Sections ---------- */
section.block { padding: 80px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section-head h2 {
    font-family: var(--serif); font-weight: 200;
    font-size: clamp(32px, 5vw, 52px); letter-spacing: -.025em; margin-bottom: 16px;
}
.section-head p { color: var(--ink-2); font-size: 18px; font-weight: 300; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
    background: var(--surface); border: .5px solid var(--border);
    border-radius: var(--radius-card); padding: 28px;
    transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: var(--ink-3); transform: translateY(-3px); }
.card .ic {
    width: 40px; height: 40px; border-radius: var(--radius-btn);
    background: var(--ink); color: var(--bg);
    display: grid; place-items: center; font-size: 18px; font-weight: 300;
    margin-bottom: 20px;
}
.card .ic.num { font-family: var(--serif); font-size: 20px; }
.card h3 { font-family: var(--sans); font-size: 18px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 15px; font-weight: 300; }

/* ---------- CTA band ---------- */
.band {
    background: var(--ink); color: var(--bg);
    border-radius: var(--radius-card); text-align: center;
    padding: 72px 32px; margin: 16px 0;
}
.band h2 { font-family: var(--serif); font-weight: 200; font-size: clamp(32px, 5vw, 50px); letter-spacing: -.025em; margin-bottom: 16px; }
.band p { opacity: .72; font-size: 18px; font-weight: 300; margin-bottom: 30px; }
.band .btn { background: var(--bg); color: var(--ink); }

/* ---------- Footer ---------- */
.footer { border-top: .5px solid var(--border); padding: 48px 0; margin-top: 32px; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer .brand { font-size: 19px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-2); font-size: 14px; font-weight: 400; }
.footer-links a:hover { color: var(--ink); }
.copy { color: var(--ink-3); font-size: 13px; width: 100%; font-weight: 400; }

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 24px; max-width: 720px; margin: 0 auto; }
.legal .back { font-size: 14px; color: var(--ink-2); display: inline-block; margin-bottom: 32px; font-weight: 400; }
.legal .back:hover { color: var(--ink); }
.legal h1 { font-family: var(--serif); font-weight: 200; font-size: clamp(38px, 6vw, 56px); letter-spacing: -.025em; margin-bottom: 10px; }
.legal .updated { color: var(--ink-3); font-size: 14px; margin-bottom: 40px; font-weight: 400; }
.legal h2 { font-family: var(--sans); font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 44px 0 14px; }
.legal h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink-2); font-size: 16px; font-weight: 300; margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: .5px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .tldr {
    background: var(--surface); border: .5px solid var(--border);
    border-radius: var(--radius-card); padding: 20px 22px; margin-bottom: 36px;
    font-size: 15px; font-weight: 300;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .grid { grid-template-columns: 1fr; }
    .nav-links a:not(.btn) { display: none; }
    .hero { padding: 72px 0 40px; }
}
