/* ============================================================
 * liway.app homepage — #1007 Gate 2
 *
 * Rebuilt from the round-2 design (design/designer-input/round-2/).
 * The design files are RENDERS, not source: 545 inline style="" attributes,
 * zero classes, and a ~69 KB proprietary runtime that fetches React from
 * unpkg. This is the rebuild against tokens.css, which also satisfies #578
 * (no in-browser Babel, no runtime JSX).
 *
 * Load order:  tokens.css  ->  home.css
 * tokens.css owns the palette. Nothing here should hard-code a brand hex;
 * where the design used a literal, it is mapped to its token below.
 * ============================================================ */

/* Webfaces (Geist, Newsreader) are declared in tokens.css so every page that
 * loads it shares one type system — see the note there. */

:root {
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  /* The design's device mock uses the platform UI stack deliberately — an app
   * screenshot should look like the platform, not like the marketing site. */
  --font-device: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;

  --shell: 1160px;
  --gutter: 32px;

  /* Hairlines. The design used rgba over cream/slate rather than a token,
   * because a solid border reads too heavy at 1px on these backgrounds. */
  --rule: rgba(20, 24, 26, 0.08);
  --rule-strong: rgba(20, 24, 26, 0.14);
  --rule-on-dark: rgba(249, 246, 242, 0.14);
}

/* ─── Reset + base ─────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-default);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Visible focus everywhere — the design specified none, and shipping a page
 * you cannot keyboard-navigate is not a faithful rebuild, it is a regression. */
:focus-visible {
  outline: 2px solid var(--euc-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--slate-950);
  color: var(--cream-100);
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ─── Shared type ──────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--euc-500);
  flex: none;
}
.eyebrow--accent { color: var(--euc-500); }
.eyebrow--on-dark { color: var(--euc-300); letter-spacing: 0.19em; font-size: 11.5px; font-weight: 700; }
.eyebrow--on-dark::before { width: 6px; height: 6px; border-radius: 50%; background: var(--euc-300); }
/* The numbered in-app eyebrows carry no marker — the number is the marker. */
.eyebrow--plain::before { display: none; }
.eyebrow--plain { gap: 0; }

.h2 {
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 18px;
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--slate-700);
  max-width: 440px;
}

/* Bulleted feature lists — square accent tick, not a disc. */
.ticks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--slate-700);
  list-style: none;
  padding: 0;
  margin: 0;
}
.ticks li { display: flex; gap: 11px; }
.ticks li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--euc-500);
  margin-top: 8px;
  flex: none;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--euc-500);
  color: var(--cream-100);
  transition: background 0.16s ease;
}
.btn:hover { background: var(--euc-600); color: #fff; }
.btn--sm { font-size: 16px; padding: 11px 24px; }
.btn--sm:hover { background: var(--euc-700); }

.link-underline {
  font-size: 14px;
  color: var(--euc-300);
  border-bottom: 1px solid rgba(146, 184, 168, 0.35);
  padding-bottom: 2px;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.link-underline:hover { color: var(--cream-100); border-color: var(--cream-100); }

.link-accent { color: var(--color-link); font-weight: 600; }
.link-accent:hover { text-decoration: underline; }

.store-badges { display: flex; align-items: center; gap: 12px; }
.store-badges img { height: 42px; width: auto; }

/* ─── Scroll progress bar ──────────────────────────────────────
 * Ported from the current production site (styles.css). A 3px strip pinned to
 * the top: faint cream track that stays visible over both the cream and the
 * slate-950 sections, eucalyptus fill growing left to right.
 * ------------------------------------------------------------ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 50;
  pointer-events: none;
  background: rgba(226, 216, 200, 0.35);
}
.scroll-progress > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--euc-500), var(--euc-400));
  border-radius: 0 1.5px 1.5px 0;
  transition: width 0.08s linear;
}

/* Site header lives in chrome.css — one component for every page. */

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  background: var(--slate-950);
  background-image:
    radial-gradient(ellipse 80% 60% at 80% 20%, rgba(93, 149, 131, 0.2), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(93, 149, 131, 0.1), transparent 60%);
  color: var(--cream-100);
  overflow: hidden;
}
.hero .shell {
  padding-top: 64px;
  padding-bottom: 72px;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(280px, 1fr);
  gap: 64px;
  align-items: center;
}
.hero-wordmark {
  height: clamp(72px, 8.4vw, 112px);
  width: auto;
  margin: 0 0 20px -8px;
  filter: invert(1) brightness(1.03);
}
.hero h1 {
  font-size: clamp(48px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--cream-100);
}
.hero h1 .display {
  color: var(--euc-300);
  white-space: nowrap;
  font-size: 1.08em;
  line-height: 0.9;
}
.hero-sub {
  font-size: 18px;
  line-height: 1.5;
  color: var(--cream-300);
  max-width: 460px;
  margin-bottom: 22px;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--cream-300);
}
.hero-trust::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--euc-300);
  box-shadow: 0 0 0 3px rgba(146, 184, 168, 0.22);
  flex: none;
}
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -60px;
}
.hero-art svg {
  width: 100%;
  max-width: 620px;
  height: auto;
  filter: drop-shadow(0 4px 24px rgba(93, 149, 131, 0.18));
}

/* ─── The leeway meter card (hero centrepiece) ─────────────── */
.meter {
  background: var(--cream-50);
  border-radius: 18px;
  padding: 16px 20px 14px;
  max-width: 520px;
  color: var(--slate-700);
}
.meter-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.meter-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-700);
  flex: 1;
  white-space: nowrap;
}
.meter-amount {
  background: var(--slate-950);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 4px 10px;
  border-radius: 7px;
}
.meter-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--safe-fg);
  flex: none;
  white-space: nowrap;
}
.meter-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--safe-fg);
}
.meter-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: var(--slate-100);
  margin-bottom: 6px;
}
.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 5px;
  border-radius: 999px;
  background: var(--euc-500);
}
.meter-tick {
  position: absolute;
  top: -5px;
  width: 1.5px;
  height: 15px;
  background: #b9b3a6;
}
.meter-knob {
  position: absolute;
  top: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--cream-50);
  border: 2.5px solid var(--euc-700);
  transform: translateX(-7.5px);
}
.meter-scale {
  position: relative;
  height: 22px;
  font-size: 11px;
  font-weight: 600;
}
.meter-scale span {
  position: absolute;
  transform: translateX(-50%);
  background: var(--euc-100);
  color: var(--slate-700);
  padding: 3px 8px;
  border-radius: 999px;
}
.meter-scale .is-today {
  background: var(--slate-950);
  color: #fff;
  padding: 3px 9px;
  letter-spacing: 0.08em;
}
.meter-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 8px;
  white-space: nowrap;
}
.meter-foot strong { color: var(--slate-950); font-weight: 600; }

/* ─── Generic two-column feature row ───────────────────────── */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 64px;
  align-items: center;
}
.split--start { align-items: start; }

/* ─── Device mock ──────────────────────────────────────────── */
.device {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--slate-950);
  border-radius: 57px;
  padding: 11px;
  box-shadow: 0 50px 90px -44px rgba(29, 33, 38, 0.55);
  margin-inline: auto;
}
.device-screen {
  background: #efefef;
  border-radius: 46px;
  overflow: hidden;
  font-family: var(--font-device);
  aspect-ratio: 430 / 932;
  position: relative;
}
.device-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 26px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-950);
}
.device-notch {
  position: absolute;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  width: 106px;
  height: 30px;
  border-radius: 999px;
  background: #0a0a0a;
}

/* ─── In-the-app numbered cards ────────────────────────────── */
.feature {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 56px;
  align-items: start;
  padding: 76px 0;
  border-top: 1px solid var(--rule);
}
.feature:first-of-type { border-top: 0; }
.feature-copy { padding-top: 8px; }
.feature h3 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}
/* The description paragraph in a numbered card.
 *
 * This was `.feature p` and that was a real bug: specificity (0,1,1) beat every
 * class-only rule on paragraphs nested anywhere inside the row — the five
 * `.eyebrow` labels, the "Still safe…" line inside card 01, and all four
 * `.insight` rows, which are `<p>` inside `.app-card` inside `.feature`. The
 * insights rendered slate-700 on a dark navy card and were close to unreadable;
 * both the design's #d6dee9 and the #fff meant to fix it were dead declarations
 * that never applied. Target the paragraph explicitly instead of reaching down
 * the tree. */
.feature-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-700);
  margin-bottom: 20px;
  max-width: 420px;
}
/* Odd cards put the art second, even cards first — the design alternates so
 * the eye zig-zags down the page instead of running a straight gutter. */
.feature--flip .feature-copy { order: 2; }

/* ─── App surfaces ────────────────────────────────────────────
 * The five in-app illustrations are drawn as the app's OWN dark UI, not as
 * cream marketing cards — that is what the design specifies, and it is the
 * honest choice: these are pictures of the product, so they should look like
 * the product.
 *
 * They therefore carry the APP's palette, which is deliberately NOT the
 * marketing palette in tokens.css. Do not hoist these into tokens.css:
 * that file is the locked marketing-site brand palette (see its header), and
 * these are screenshots living inside it. Scoped here on purpose.
 * ------------------------------------------------------------ */
.app-card {
  --app-surface: #0b1220;
  --app-surface-2: #101a2b;
  --app-surface-3: #2a3547;
  --app-green: #22c55e;
  --app-green-deep: #1e4d33;
  --app-on-green: #06280f;
  --app-slate: #7c8aa0;
  --app-slate-deep: #5a6779;
  --app-on-slate: #111c2c;
  --app-amber: #f59e0b;
  --app-blue: #3b82f6;
  --app-blue-pale: #bfd9f7;
  --app-text-dim: #b6c0cf;
  --app-text-dimmer: #8794ab;
  --app-rule: rgba(255, 255, 255, 0.09);
  --app-rule-strong: rgba(255, 255, 255, 0.18);

  background: var(--app-surface);
  border-radius: 22px;
  padding: 20px;
  color: #fff;
  font-family: var(--font-device);
  box-shadow: 0 40px 70px -44px rgba(11, 18, 32, 0.65);
  width: 100%;
}
.app-card + .app-card { margin-top: 14px; }
.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.app-title { font-size: 18px; font-weight: 600; white-space: nowrap; }
.app-pill {
  background: var(--safe-bg);
  color: var(--safe-fg);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  flex: none;
  white-space: nowrap;
}
.app-meta { font-size: 12.5px; color: var(--app-text-dim); flex: none; }
.app-rule { border-top: 1px solid var(--app-rule); }
.app-note {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--app-text-dim);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--app-rule);
}
/* Legend swatch used across the breakdown and flow charts. */
.swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  flex: none;
}
/* Stat triplet under the breakdown bar. */
.app-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 0;
}
.app-stats .n { font-size: 17px; font-weight: 600; }
.app-stats .k { font-size: 12px; color: var(--app-text-dimmer); margin-top: 2px; }

/* Diverging six-month flow chart: money in grows up from the axis,
 * money out grows down. The axis is a real 1px line, not implied. */
.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  height: 72px;
  margin-bottom: 10px;
}
.flow-col { display: flex; flex-direction: column; height: 100%; }
.flow-in { flex: 1; display: flex; align-items: flex-end; }
.flow-in > i { width: 100%; background: var(--app-green-deep); border-radius: 3px 3px 0 0; }
.flow-axis { height: 1px; background: var(--app-rule-strong); }
.flow-out { flex: 0.62; display: flex; align-items: flex-start; }
.flow-out > i { width: 100%; background: var(--app-slate-deep); border-radius: 0 0 3px 3px; }

/* ─── Ambient insight rows (05) ────────────────────────────── */
.insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.insight {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.45;
  /* White, not the design's #d6dee9: these sentences are the feature of
   * section 05 and should read as content, not as a caption. 16.19:1.
   * (Neither colour rendered at all until the `.feature p` leak above was
   * fixed — the text was slate-700 on dark navy.) */
  color: #fff;
  margin: 0;
}
.insight svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* ─── How it works ─────────────────────────────────────────── */
.how { background: var(--cream-200); }
.how .shell { padding-top: 88px; padding-bottom: 88px; }
.how .h2 { max-width: 760px; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin: 34px 0 30px;
}
.step {
  background: var(--cream-50);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 26px 26px 22px;
}
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--slate-950);
  color: var(--cream-100);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.step-title { font-size: 17px; font-weight: 700; color: var(--slate-950); margin-bottom: 8px; }
.step p { font-size: 15px; line-height: 1.55; color: var(--slate-700); margin-bottom: 14px; }
.step-time {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--euc-700);
  background: var(--euc-100);
  padding: 4px 10px;
  border-radius: 999px;
}
.how-close { font-size: 17px; line-height: 1.6; color: var(--slate-700); max-width: 720px; }
.how-close strong { color: var(--slate-950); }

/* ─── Who it's for ─────────────────────────────────────────── */
.audience .shell { padding-top: 88px; padding-bottom: 88px; }
.audience-lead {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}
.audience-sub { font-size: 16px; line-height: 1.6; color: var(--slate-500); max-width: 380px; }
.audience p { font-size: 17px; line-height: 1.6; color: var(--slate-700); margin-bottom: 20px; }
.signals { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; margin: 0; }
.signals li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--slate-700);
}
.signals li::before { content: "\00B7"; color: var(--euc-500); font-weight: 700; flex: none; }

/* ─── Security ─────────────────────────────────────────────── */
.security {
  background: var(--slate-950);
  color: var(--cream-100);
}
.security .shell { padding-top: 88px; padding-bottom: 88px; }
.security .eyebrow { color: var(--euc-300); }
.security .eyebrow::before { background: var(--euc-300); }
.security .h2 { color: var(--cream-100); margin-bottom: 40px; }
.security .h2 .display { color: var(--euc-300); }
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 34px 44px;
}
.security-point h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--cream-100);
  margin-bottom: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-on-dark);
}
.security-point p { font-size: 15px; line-height: 1.6; color: var(--cream-300); }
.security-more { margin-top: 40px; }
.security-more a { color: var(--euc-300); font-weight: 600; }
.security-more a:hover { color: var(--cream-100); }

/* ─── Closing CTA ──────────────────────────────────────────── */
.cta { text-align: center; }
.cta .shell { padding-top: 96px; padding-bottom: 96px; }
.cta .eyebrow { justify-content: center; }
.cta h2 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
}
.cta p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--slate-700);
  max-width: 520px;
  margin: 0 auto 28px;
}
.cta .store-badges { justify-content: center; }
.cta-web { margin-top: 20px; font-size: 15px; color: var(--slate-500); }

/* Site footer lives in chrome.css — one component for every page. */

/* ============================================================
 * RESPONSIVE
 * The design was delivered as two files — a desktop landing and a mobile
 * homepage. They are ONE responsive page here (matching the existing prod
 * pattern), not device detection and not a second URL.
 * ============================================================ */
@media (max-width: 980px) {
  .hero .shell {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 56px;
  }
  /* The hero art is decorative and costs a full screen of scroll before the
   * value proposition on a phone. The mobile design drops it; so do we. */
  .hero-art { display: none; }
  .split, .feature { gap: 40px; }
  .feature { padding: 56px 0; }
  .feature--flip .feature-copy { order: 0; }
}

/* Below ~820px every auto-fit track whose minimum exceeds the available column
 * would force the page wider than the viewport. Collapse them explicitly rather
 * than hiding the symptom with overflow-x on the body — a sideways-scrolling
 * page is the single most common phone regression and it must fail loudly in
 * review, not be masked. */
@media (max-width: 820px) {
  .split,
  .feature,
  .steps,
  .insights,
  .security-grid { grid-template-columns: 1fr; }
  .device { max-width: min(380px, 100%); }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .site-nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .hero h1 { font-size: clamp(38px, 10vw, 52px); }
  .hero h1 .display { white-space: normal; }
  .hero-sub { font-size: 16.5px; }
  .meter { padding: 14px 16px 12px; }
  .meter-head { flex-wrap: wrap; gap: 8px; }
  .meter-label { flex: 1 0 100%; }
  .how .shell, .audience .shell, .security .shell { padding-top: 64px; padding-bottom: 64px; }
  .cta .shell { padding-top: 72px; padding-bottom: 72px; }
  .store-badges img { height: 38px; }
}
