/* Watabook marketing site — "Service Manual" design system.
   Tokens lifted directly from the app's DESIGN.md (Direction B). Keep this
   file the single source of truth for every page on this site. */

:root {
  /* ground / surface */
  --ground: #E7E9E5;
  --surface: #F4F6F2;
  --raised: #FBFBF9;
  --hairline: #D3D7CF;

  /* ink */
  --ink: #181B1C;
  --ink-2: #565C5C;
  --ink-3: #8A908F;

  /* accent — blueprint-blue */
  --accent: #1F4B75;
  --accent-ink: #FFFFFF;
  --accent-tint: #E2E9F0;
  --accent-pressed: #173A5C;

  /* urgency scale (used sparingly — the meter on the hero mock) */
  --safe: #2E7D5B;
  --gentle: #A9761F;
  --stop: #B23B3B;

  --font-serif: 'Spectral', Georgia, serif;
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 20px;

  --shadow-sheet: 0 -12px 36px rgba(16, 18, 19, 0.12);
  --shadow-card: 0 24px 60px rgba(24, 27, 28, 0.16);

  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-pressed); }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

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

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(231, 233, 229, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}
.wordmark .mark {
  width: 28px;
  height: 28px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
.mobile-toggle svg { width: 24px; height: 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease-out, border-color .18s ease-out, color .18s ease-out;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-pressed); color: #fff; }
.btn-secondary { background: var(--raised); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--ink-3); }

.store-row { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
}
.store-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.store-btn .l1 { font-size: 9px; letter-spacing: .04em; text-transform: uppercase; opacity: .72; display: block; line-height: 1; }
.store-btn .l2 { font-family: var(--font-serif); font-size: 15px; font-weight: 500; line-height: 1.2; display: block; margin-top: 2px; }

/* ---------- section header motif: "§ 0N  LABEL ————" ---------- */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
}
.sec-num { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--accent); white-space: nowrap; }
.sec-label { font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.sec-rule { flex: 1; height: 1px; background: var(--hairline); }

/* ---------- hero ---------- */
.hero { padding: 88px 0 96px; }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.kicker { font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.hero .lead { font-size: 17px; line-height: 1.65; color: var(--ink-2); margin: 0 0 32px; max-width: 46ch; }
.free-note { font-size: 13px; color: var(--ink-3); margin: 20px 0 0; }
.free-note b { color: var(--ink-2); font-weight: 600; }

.phone-stage { display: flex; justify-content: center; }
.phone {
  width: 300px;
  background: var(--ink);
  border-radius: 34px;
  padding: 12px;
  box-shadow: var(--shadow-card);
}
.screen { background: var(--ground); border-radius: 24px; overflow: hidden; padding: 18px 16px 22px; }
.screen-bar { margin-bottom: 16px; }
.chip-code {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: var(--r-sm);
  padding: 3px 8px;
}
.screen-title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; margin: 2px 0 6px; }
.screen-body { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; margin: 0 0 16px; }
.meter { display: flex; gap: 6px; margin-bottom: 6px; }
.seg { flex: 1; height: 6px; border-radius: 3px; background: #E4E7E0; }
.seg.on { background: var(--gentle); }
.meter-label { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.meter-label b { color: var(--gentle); font-weight: 700; }
.row-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 10px; }
.row-card:last-child { margin-bottom: 0; }
.row-title { font-size: 12.5px; font-weight: 600; }
.row-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ---------- features ---------- */
.features { padding: 8px 0 96px; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.feat { background: var(--surface); padding: 32px; }
.feat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-tint);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feat-icon svg { width: 20px; height: 20px; }
.feat .sec-num { display: block; margin-bottom: 6px; }
.feat h3 { font-family: var(--font-serif); font-weight: 600; font-size: 19px; margin: 0 0 10px; }
.feat p { font-size: 14px; line-height: 1.65; color: var(--ink-2); margin: 0; }

/* ---------- pricing ---------- */
.pricing { padding: 8px 0 100px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 32px; }
.plan.pro { border: 1.5px solid var(--accent); background: var(--raised); position: relative; }
.plan .badge {
  position: absolute;
  top: -12px;
  right: 28px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-sm);
}
.plan-name { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.plan-price { font-family: var(--font-mono); font-size: 32px; font-weight: 600; margin: 14px 0 4px; }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--ink-3); font-family: var(--font-sans); }
.plan-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.plan ul { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.plan li { font-size: 13.5px; color: var(--ink-2); padding-left: 20px; position: relative; line-height: 1.5; }
.plan li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 2px; background: var(--hairline); }
.plan.pro li::before { background: var(--accent); }
.price-note { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 18px; }

/* ---------- generic content section (support, about-ish blocks) ---------- */
.section { padding: 8px 0 96px; }
.section .lead { max-width: 62ch; color: var(--ink-2); font-size: 15.5px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--hairline); padding: 40px 0; }
.foot-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { font-size: 13px; color: var(--ink-2); }
.foot-copy { font-size: 12px; color: var(--ink-3); }

/* ---------- legal pages (privacy / terms) ---------- */
.legal-page { padding: 56px 0 96px; }
.legal-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }
.legal-header h1 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(28px, 4vw, 38px); margin: 0 0 10px; }
.legal-header .meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.legal-body { max-width: 760px; }
.legal-body h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 40px 0 12px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; }
.legal-body p { color: var(--ink-2); line-height: 1.75; margin: 0 0 14px; font-size: 14.5px; }
.legal-body ul, .legal-body ol { margin: 8px 0 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.legal-body li { color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.legal-body li::marker { color: var(--accent); }
.toc { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 36px; }
.toc h3 { font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.toc ol { margin: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.toc a { font-size: 13.5px; }
.note-box { background: var(--accent-tint); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 18px 22px; margin: 20px 0; }
.note-box p { margin: 0; color: var(--ink); font-size: 13.5px; }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin-top: 28px;
}
.contact-card .label { font-weight: 600; margin-bottom: 6px; }
.contact-card p { margin: 0; font-size: 13.5px; }
.back-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 32px;
}
.back-nav svg { width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-links, .nav-right .btn { display: none; }
  .mobile-toggle { display: block; }
  .hero .container { grid-template-columns: 1fr; }
  .phone-stage { order: -1; margin-bottom: 8px; }
  .feat-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 48px 0 64px; }
  .container { padding: 0 18px; }
}

/* mobile nav sheet, toggled by js/script.js */
.mobile-sheet {
  display: none;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--ground);
  z-index: 15;
  padding: 24px;
  overflow-y: auto;
}
.mobile-sheet.open { display: block; }
.mobile-sheet a {
  display: block;
  padding: 16px 4px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.mobile-sheet .btn { width: 100%; margin-top: 20px; }
