/* ============================================================================
   OneVerse — marketing + legal site
   Self-contained, zero dependencies. Warm editorial palette echoing the app,
   with a system-serif display face (New York on Apple devices) so the type
   matches the product. Light & dark aware, fluid across every screen size.
   ========================================================================= */

:root {
  /* Palette — 1:1 with the app's Theme.Palette (light) */
  --bg:          #f7f2e9;
  --bg-deep:     #efe7d8;
  --surface:     #fffefa;
  --surface-alt: #fbf7ee;
  --ink:         #272219;
  --ink-soft:    #6f675c;
  --ink-faint:   #9c948a;
  --accent:      #a9743b;
  --accent-deep: #8a5c2b;
  --accent-soft: #ebddc6;
  --sage:        #5c7a56;
  --sage-soft:   #dfe7db;
  --flame:       #c96f2e;
  --hairline:    #e5dccb;

  /* Elevation — warm, layered, never harsh */
  --shadow-sm: 0 1px 2px rgba(39, 34, 25, .04), 0 2px 8px rgba(39, 34, 25, .05);
  --shadow-md: 0 4px 12px rgba(39, 34, 25, .06), 0 14px 34px rgba(39, 34, 25, .08);
  --shadow-lg: 0 10px 30px rgba(39, 34, 25, .10), 0 40px 90px rgba(39, 34, 25, .16);
  --glow: rgba(169, 116, 59, .16);
  --glow-sage: rgba(92, 122, 86, .12);

  /* Type */
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius:    20px;
  --radius-lg: 28px;
  --maxw:      1120px;
  --prose:     680px;
  --ease:      cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #16120c;
    --bg-deep:     #100d08;
    --surface:     #221d15;
    --surface-alt: #2b241a;
    --ink:         #f2eadb;
    --ink-soft:    #b4aa97;
    --ink-faint:   #847a6c;
    --accent:      #c7934e;
    --accent-deep: #a9743b;
    --accent-soft: #3a2e1d;
    --sage:        #8aa783;
    --sage-soft:   #293322;
    --flame:       #e08a48;
    --hairline:    #39322a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.30), 0 2px 8px rgba(0,0,0,.28);
    --shadow-md: 0 4px 14px rgba(0,0,0,.34), 0 16px 40px rgba(0,0,0,.42);
    --shadow-lg: 0 12px 34px rgba(0,0,0,.44), 0 44px 100px rgba(0,0,0,.60);
    --glow: rgba(199, 147, 78, .16);
    --glow-sage: rgba(138, 167, 131, .10);
  }
}

/* ---- Reset & base ------------------------------------------------------- */
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* `clip` (not `hidden`) guards against any stray horizontal scroll without
     creating a scroll container — so the sticky nav keeps sticking to the viewport. */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

/* Ambient warmth — a fixed gradient wash plus a whisper of grain, so the page
   feels like paper rather than flat #fff. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 680px at 78% -8%, var(--glow), transparent 60%),
    radial-gradient(900px 620px at 8% 4%, var(--glow-sage), transparent 55%),
    linear-gradient(var(--bg), var(--bg-deep));
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.028'/%3E%3C/svg%3E");
}

a { color: var(--accent-deep); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

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

/* ---- Type scale --------------------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.12; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.35rem); letter-spacing: -.022em; margin: 0; }
h2 { font-size: clamp(1.85rem, 3.8vw, 2.7rem); margin: 0; }
h3 { font-size: 1.2rem; letter-spacing: 0; margin: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
}
.lead { font-size: clamp(1.12rem, 1.9vw, 1.35rem); line-height: 1.55; color: var(--ink-soft); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 16px; font-weight: 600; font-size: 1.02rem;
  background: linear-gradient(135deg, #2c261c, #191510);
  color: #fdfbf5;
  box-shadow: var(--shadow-md);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn.ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--hairline); box-shadow: var(--shadow-sm);
}
.btn.ghost:hover { color: var(--ink); }
.cta-note { font-size: .85rem; color: var(--ink-faint); margin: 14px 0 0; }

/* ---- Header / nav ------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--hairline); }
.nav .container { display: flex; align-items: center; gap: 14px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.06rem; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  object-fit: cover;
  border: 1px solid var(--hairline);
  box-shadow: 0 3px 10px rgba(39, 34, 25, .10);
}
.nav nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav nav a { color: var(--ink-soft); font-size: .95rem; font-weight: 500; }
.nav nav a:hover { color: var(--ink); }
.nav .btn { padding: 9px 18px; font-size: .92rem; border-radius: 12px; }
@media (max-width: 640px) {
  .nav nav { gap: 16px; }
  .nav nav .navlink { display: none; }
}

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero .container {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin: 0 0 32px; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-trust { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; color: var(--ink-soft); }
.hero-trust svg { width: 16px; height: 16px; stroke: var(--sage); fill: none; stroke-width: 2.2; }

@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: none; margin: 0 auto; }
  .hero .lead { margin-inline: auto; max-width: 46ch; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 8px; }
}

/* ---- Phone frame -------------------------------------------------------- */
.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -8% -12%; z-index: 0;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
  filter: blur(8px);
}
.phone {
  position: relative; z-index: 1;
  width: min(300px, 74vw);
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(150deg, #423b31, #1a1610 62%);
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1.5px rgba(255,255,255,.07),
    inset 0 2px 3px rgba(255,255,255,.10);
}
.phone img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 350 / 760;   /* lock to the real device ratio — never distort */
  object-fit: cover;
  border-radius: 36px;
  background: var(--bg);
}

/* ---- Section scaffolding ------------------------------------------------ */
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 640px; margin: 0 auto clamp(38px, 5vw, 58px); text-align: center; }
.section-head .lead { margin: 16px auto 0; max-width: 52ch; }

/* ---- Steps -------------------------------------------------------------- */
.steps-band { position: relative; }
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  counter-reset: step;
}
.step {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 30px 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.step .num {
  counter-increment: step;
  width: 42px; height: 42px; border-radius: 13px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fffefa; display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
  box-shadow: 0 4px 12px var(--glow);
}
.step .num::before { content: counter(step); }
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 16px; } }

/* ---- Feature split (text + phone) --------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 84px); align-items: center; }
.split.reverse .split-visual { order: 2; }
.split-copy .eyebrow { margin-bottom: 14px; }
.split-copy h2 { margin-bottom: 18px; }
.split-copy p { color: var(--ink-soft); margin: 0 0 18px; }
.mini-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.mini-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-size: .98rem; }
.mini-list svg { width: 21px; height: 21px; flex: none; margin-top: 1px; stroke: var(--sage); fill: none; stroke-width: 2.2; }
.split-visual { display: flex; justify-content: center; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 34px; text-align: center; }
  .split.reverse .split-visual { order: -1; }
  .split-visual { order: -1; }
  .mini-list { text-align: left; max-width: 30ch; margin-inline: auto; }
  .split-copy .eyebrow { text-align: center; }
}

/* ---- Feature grid ------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.feature .ic {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 18px;
  background: var(--accent-soft); display: grid; place-items: center;
}
.feature .ic svg { width: 24px; height: 24px; stroke: var(--accent-deep); fill: none; stroke-width: 2; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---- Stat row ----------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; margin-top: 40px; }
.stat .n { font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 600; color: var(--accent-deep); line-height: 1; letter-spacing: -.02em; }
.stat .l { margin-top: 8px; font-size: .92rem; color: var(--ink-soft); }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; gap: 26px; } }

/* ---- Privacy band (inverted, warm-dark) --------------------------------- */
.band {
  background: linear-gradient(155deg, #2c261c, #191510);
  color: #f2eadb; border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 68px);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 320px at 88% -20%, var(--glow), transparent 60%);
}
.band > * { position: relative; }
.band .eyebrow { color: var(--accent); }
.band h2 { color: #f7f0e2; }
.band p { color: #cabfa9; max-width: 60ch; margin: 16px 0 0; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.band-grid .b { border-top: 1px solid rgba(242,234,219,.16); padding-top: 16px; }
.band-grid .b strong { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: #f7f0e2; margin-bottom: 4px; }
.band-grid .b span { font-size: .9rem; color: #b3a891; }
@media (max-width: 760px) { .band-grid { grid-template-columns: 1fr 1fr; gap: 22px 18px; } }
@media (max-width: 420px) { .band-grid { grid-template-columns: 1fr; } }

/* ---- Final CTA ---------------------------------------------------------- */
.cta { text-align: center; }
.cta h2 { max-width: 16ch; margin: 0 auto 18px; }
.cta .lead { margin: 0 auto 30px; max-width: 46ch; }

/* ---- Footer ------------------------------------------------------------- */
footer.site {
  border-top: 1px solid var(--hairline);
  margin-top: 20px;
  padding: 46px 0 60px;
}
footer.site .container { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
footer.site .brand { margin-right: auto; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
footer.site nav a, footer.site .copy { font-size: .9rem; color: var(--ink-faint); }
footer.site nav a:hover { color: var(--ink); }
footer.site .copy { width: 100%; margin-top: 8px; }

/* ---- Article (legal / support pages) ------------------------------------ */
.article { max-width: var(--prose); margin: 0 auto; padding: clamp(40px, 6vw, 72px) 24px clamp(56px, 8vw, 96px); }
.article .kicker { font-size: .88rem; color: var(--ink-faint); margin: 10px 0 0; }
.article h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin-bottom: 6px; }
.article h2 { font-size: clamp(1.4rem, 3vw, 1.7rem); margin: 44px 0 12px; }
.article h3 { font-size: 1.12rem; margin: 30px 0 6px; }
.article p { color: var(--ink); margin: 0 0 16px; }
.article p.intro { font-size: 1.12rem; color: var(--ink-soft); margin-top: 20px; }
.article a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.article a:hover { text-decoration-color: var(--accent); }
.callout {
  background: var(--surface); border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent); border-radius: 16px;
  padding: 22px 24px; margin: 22px 0; box-shadow: var(--shadow-sm);
}
.callout p { margin: 0 0 10px; }
.callout p:last-child { margin-bottom: 0; }
code { background: var(--surface-alt); border: 1px solid var(--hairline); padding: 1px 6px; border-radius: 6px; font-size: .88em; }

/* ---- Scroll reveal ------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}
