/* LEWO — lewohq.com  (v4: DARK paper-and-ink, polished)
   Brand from lewo-app/constants/designTokens.ts. Dark UI to match web.lewohq.com.
   Near-black ink canvas, paper text, a SINGLE warm gold accent used sparingly,
   Instrument Serif display + Inter body, LewoMark (gold double-tick). */

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

:root {
  --ink: #0A0A0A;
  --bg: #0A0A0A;
  --bg-2: #0E0F11;
  --surface: #131417;
  --card: #141619;
  --card-2: #181A1E;
  --border: rgba(255,255,255,0.09);
  --border-2: rgba(255,255,255,0.14);
  --hairline: rgba(255,255,255,0.06);

  --paper: #FAFAF7;
  --text: #F3F2EE;
  --text-dim: rgba(243,242,238,0.60);
  --text-faint: rgba(243,242,238,0.38);

  --accent: #C9A96E;          /* champagne gold — used sparingly */
  --accent-2: #DBC089;
  --accent-soft: rgba(201,169,110,0.14);
  --success: #4FB783; --danger: #E0746B;

  --radius: 18px; --radius-sm: 12px;
  --maxw: 1120px; --maxw-doc: 740px;
  --shadow: 0 30px 80px -32px rgba(0,0,0,0.8);
  --shadow-soft: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 40px -28px rgba(0,0,0,0.6);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); background: var(--bg); color: var(--text);
  line-height: 1.68; font-size: 17px; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent-2); }
img, svg { display: block; max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.doc { max-width: var(--maxw-doc); }

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; line-height: 1.05; margin: 0; }
h3, h4 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.accent { color: var(--accent); }
em.serif-i { font-style: italic; }

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand:hover { color: var(--text); }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,0.06); }
.brand .wordmark { font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1; color: var(--text); letter-spacing: 0.01em; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(10,10,10,0.72); backdrop-filter: saturate(150%) blur(16px); border-bottom: 1px solid var(--hairline); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-dim); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta { background: var(--paper); color: #0A0A0A !important; padding: 10px 20px; border-radius: 999px; font-weight: 600; }
.nav-cta:hover { background: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15.5px; cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--paper); color: #0A0A0A; }
.btn-primary:hover { background: #fff; color: #0A0A0A; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 116px 0 92px; }
.hero::before { content:""; position:absolute; inset:0; pointer-events:none; background:
   radial-gradient(50% 55% at 82% 0%, rgba(201,169,110,0.10), transparent 62%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(48px, 7.4vw, 88px); margin-bottom: 24px; }
.hero .tagline { font-size: clamp(18px, 2.1vw, 21px); color: var(--text-dim); max-width: 500px; margin-bottom: 34px; }
.cta-row { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 13px; border-radius: 999px; background: var(--surface); color: var(--text-dim); font-size: 13px; font-weight: 600; margin-bottom: 28px; border: 1px solid var(--border); letter-spacing: 0.01em; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero-note { margin-top: 24px; color: var(--text-faint); font-size: 13.5px; }

/* Chat mockup */
.mock { position: relative; justify-self: center; width: 308px; background: linear-gradient(180deg,#16181B,#111316); border: 1px solid var(--border); border-radius: 30px; padding: 18px 16px 22px; box-shadow: var(--shadow); }
.mock-top { display:flex; align-items:center; gap:11px; padding: 2px 4px 15px; border-bottom: 1px solid var(--hairline); margin-bottom: 16px; }
.mock-avatar { width: 38px; height: 38px; border-radius: 50%; background: #0A0A0A; box-shadow: 0 0 0 1px var(--border); display:grid; place-items:center; color: var(--accent); font-family: var(--serif); font-style: italic; font-size: 20px; }
.mock-name { font-weight: 600; font-size: 15px; }
.mock-status { font-size: 12px; color: var(--text-faint); }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 14px; margin-bottom: 10px; line-height: 1.5; }
.bubble.in { background: var(--surface); color: var(--text); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; }
.bubble.out { background: var(--accent-soft); color: var(--text); border: 1px solid rgba(201,169,110,0.3); margin-left: auto; border-bottom-right-radius: 5px; }
.bubble.out .tick { color: var(--accent); font-size: 12px; letter-spacing: -2px; }
.mock-enc { text-align: center; font-size: 11.5px; color: var(--text-faint); margin-top: 12px; }

/* ---------- Trust bar ---------- */
.trustbar { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: var(--bg-2); }
.trustbar .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 44px; padding: 22px 0; color: var(--text-dim); font-size: 14px; font-weight: 500; }
.trustbar .row span { display: inline-flex; align-items: center; gap: 9px; }
.trustbar svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 1.7; }

/* ---------- Sections ---------- */
section { padding: 96px 0; position: relative; }
.eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; font-size: 12px; margin-bottom: 16px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section-head .eyebrow { text-align: center; }
.section-title { font-size: clamp(36px, 5.2vw, 58px); margin-bottom: 16px; }
.section-sub { color: var(--text-dim); font-size: 18px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--border-2); background: var(--card-2); }
.card .ico { width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 20px; }
.card .ico svg { width: 23px; height: 23px; stroke: var(--accent); fill: none; stroke-width: 1.7; }
.card h3 { font-size: 18px; margin-bottom: 9px; }
.card p { color: var(--text-dim); margin: 0; font-size: 15.5px; }

/* Split band */
.band { background: var(--bg-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.split h2 { font-size: clamp(34px, 4.6vw, 50px); margin-bottom: 18px; }
.split p { color: var(--text-dim); font-size: 17px; margin-bottom: 14px; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; }
.checklist li { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 15px; color: var(--text); font-size: 16px; }
.checklist li svg { flex: none; width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 2; margin-top: 2px; }

/* Refined visual panel (replaces big emoji) */
.visual { aspect-ratio: 5/4; border-radius: var(--radius); background: radial-gradient(120% 120% at 50% 0%, #17191D, #0E0F11); border: 1px solid var(--border); display: grid; place-items: center; box-shadow: var(--shadow-soft); }
.visual svg { width: 96px; height: 96px; stroke: var(--accent); fill: none; stroke-width: 1.2; opacity: .9; }

/* CTA */
.cta-band { text-align: center; }
.cta-card { background: linear-gradient(180deg,#16181B,#0E0F11); border: 1px solid var(--border); border-radius: 28px; padding: 78px 32px; box-shadow: var(--shadow); }
.cta-card h2 { font-size: clamp(36px, 5.2vw, 58px); margin-bottom: 16px; }
.cta-card p { color: var(--text-dim); font-size: 18px; margin-bottom: 32px; }
.cta-card .cta-row { justify-content: center; }
.cta-card .muted { color: var(--text-faint); font-size: 13.5px; margin-top: 24px; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Store badges ---------- */
.store-badges { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta-card .store-badges, .section-head + .store-badges { justify-content: center; }
.store-badge { display: inline-flex; align-items: center; gap: 12px; padding: 11px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-2); color: var(--text); min-width: 196px; transition: transform .15s ease, border-color .2s ease, background .2s ease; }
.store-badge:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); background: var(--card-2); }
.store-badge svg { width: 26px; height: 26px; flex: none; fill: var(--text); }
.store-badge .bt { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.store-badge .bt small { font-size: 11px; color: var(--text-dim); font-weight: 500; letter-spacing: 0.01em; }
.store-badge .bt strong { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.store-badge.web svg { fill: none; stroke: var(--text); stroke-width: 1.7; }
.hero .store-badges { margin-top: 26px; }
.hero .store-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); margin: 30px 0 12px; font-weight: 600; }
@media (max-width: 480px) { .store-badge { min-width: 0; flex: 1 1 100%; justify-content: center; } }

/* ---------- Doc pages ---------- */
.doc-hero { padding: 84px 0 22px; }
.doc-hero h1 { font-size: clamp(44px, 6.4vw, 64px); margin-bottom: 14px; }
.doc-meta { color: var(--text-faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; font-family: var(--sans); }
.doc-body { padding-top: 8px; padding-bottom: 100px; }
.doc-body h2 { font-size: 32px; margin: 52px 0 16px; scroll-margin-top: 96px; }
.doc-body h3 { font-size: 18px; margin: 28px 0 8px; color: var(--text); }
.doc-body p, .doc-body li { color: var(--text-dim); }
.doc-body ul { padding-left: 22px; }
.doc-body li { margin-bottom: 9px; }
.doc-body strong { color: var(--text); }
.lead { font-size: 20px; color: var(--text); margin-bottom: 12px; line-height: 1.55; }
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--radius-sm); padding: 22px 24px; margin: 28px 0; }
.callout.warn { border-left-color: var(--danger); }
.callout p { margin: 0; color: var(--text-dim); }
.callout strong { color: var(--text); }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin: 28px 0 42px; }
.toc strong { display: block; margin-bottom: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); }
.toc ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.toc li { margin-bottom: 8px; }
.toc a { font-size: 15px; color: var(--text-dim); }
.toc a:hover { color: var(--accent-2); }
table.kv { width: 100%; border-collapse: collapse; margin: 22px 0; }
table.kv td, table.kv th { border: 1px solid var(--border); padding: 12px 16px; text-align: left; font-size: 15px; vertical-align: top; }
table.kv th { background: var(--surface); color: var(--text); font-weight: 600; }
table.kv td { color: var(--text-dim); }
table.kv td:first-child { color: var(--text); font-weight: 600; width: 32%; }
code { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; font-size: 14px; color: var(--accent-2); }
.doc-body a, .lead a, .callout a { color: var(--accent-2); border-bottom: 1px solid rgba(201,169,110,0.35); }
.doc-body a:hover, .callout a:hover { border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); background: var(--bg-2); padding: 64px 0 42px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand { max-width: 290px; }
.footer-brand p { color: var(--text-faint); font-size: 14px; margin-top: 16px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-dim); font-size: 15px; margin-bottom: 12px; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom { border-top: 1px solid var(--hairline); margin-top: 48px; padding-top: 26px; color: var(--text-faint); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 60px; }
  .mock { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .toc ul { columns: 1; }
  .nav-links { display: none; }
  .visual { display: none; }
  section { padding: 64px 0; }
}
