:root {
  --paper: #f7f5f0;
  --paper-2: #efece5;
  --card: #ffffff;
  --line: #e8e4db;
  --line-soft: #f0ede6;
  --ink: #201d18;
  --ink-soft: #555047;
  --muted: #8e887c;
  --amber: #c75b1e;
  --amber-bright: #e07a3a;
  --amber-bg: #f7efe6;
  --amber-text: #9a4514;
  --sage: #55795b;
  --sage-bg: #eff2ed;
  --sage-text: #44614a;
  --terra: #b24e33;
  --dusk: #5c6b85;
  --dusk-bg: #eef0f4;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(32, 29, 24, 0.08);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-text);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

h1, h2, .display {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.lede {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 38em;
}

.muted { color: var(--muted); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 245, 240, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand img { height: 34px; width: auto; }
.badge-mark img { width: 56px; height: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a:hover { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}

.lang button {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-ink {
  background: var(--ink);
  color: #f7f5f0;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-amber {
  background: var(--amber);
  color: #fff;
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 20px 20px;
  background: var(--paper);
}

.mobile-menu a,
.mobile-menu .btn {
  display: block;
  padding: 12px 0;
  font-weight: 600;
}

.mobile-menu.open { display: block; }

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  margin: 18px 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.hero .lede { margin-bottom: 28px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

.chip strong { color: var(--sage-text); font-weight: 700; }

.stage {
  position: relative;
  min-height: 520px;
}

.badge-card,
.phone,
.dock {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--line);
}

.badge-card {
  left: 0;
  top: 36px;
  width: 220px;
  border-radius: 22px;
  padding: 18px 18px 16px;
  z-index: 2;
}

.badge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.status-rec {
  color: var(--amber-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-rec::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.badge-mark {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  border-radius: 16px;
  background:
    radial-gradient(circle at 70% 28%, rgba(199, 91, 30, 0.16), transparent 36%),
    var(--paper-2);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.badge-foot {
  font-size: 13px;
  color: var(--ink-soft);
}

.badge-foot b { display: block; color: var(--ink); font-size: 15px; }

.dock {
  left: 24px;
  bottom: 28px;
  width: 172px;
  border-radius: 16px;
  padding: 12px 14px;
  z-index: 1;
}

.dock small { color: var(--muted); font-size: 11px; }
.dock b { display: block; font-size: 14px; }

.phone {
  right: 0;
  top: 0;
  width: 280px;
  border-radius: 36px;
  padding: 12px;
  z-index: 3;
  box-shadow: var(--shadow);
}

.phone-notch {
  width: 92px;
  height: 18px;
  background: var(--ink);
  border-radius: 0 0 14px 14px;
  margin: 0 auto 10px;
}

.phone-screen {
  background: var(--paper);
  border-radius: 26px;
  padding: 16px 14px 18px;
  min-height: 460px;
}

.phone-date { font-size: 11px; color: var(--muted); }
.phone-hi { font-family: var(--serif); font-size: 22px; line-height: 1.3; margin: 4px 0 14px; }

.score-card,
.row-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.score-card { padding: 14px 14px 10px; margin-bottom: 10px; }

.score-top { display: flex; align-items: flex-end; justify-content: space-between; }
.score-num { font-family: var(--serif); font-size: 42px; line-height: 0.9; }
.score-num span { font-size: 14px; color: var(--muted); margin-left: 2px; }
.score-side { text-align: right; font-size: 12px; color: var(--ink-soft); }

.curve { width: 100%; height: 58px; margin-top: 10px; }

.phone-link {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line-soft);
  margin-top: 8px;
  color: var(--ink);
}

.row-card { padding: 0; }
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  font-size: 13px;
}
.row + .row { border-top: 1px solid var(--line-soft); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot.sage { background: var(--sage); }
.dot.amber { background: var(--amber); }
.chev { margin-left: auto; color: var(--muted); }

/* Sections */
section { position: relative; padding: 88px 0; }
.section-rule { border-top: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 44px); margin: 10px 0 14px; }

/* Problem */
.chat {
  max-width: 360px;
  margin-bottom: 36px;
}

.bubble {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  margin-bottom: 8px;
}

.bubble.in { background: var(--paper-2); color: var(--ink-soft); border-bottom-left-radius: 4px; }
.bubble.out {
  background: var(--amber-bg);
  color: var(--ink);
  font-weight: 600;
  border-bottom-right-radius: 4px;
  float: right;
  clear: both;
}

.chat::after { content: ""; display: block; clear: both; }
.chat .aside {
  clear: both;
  padding-top: 8px;
  font-size: 13px;
  color: var(--terra);
  font-weight: 600;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.fact {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 20px 22px;
  margin-top: 14px;
}

.fact h3 { font-family: var(--sans); font-size: 16px; margin-bottom: 6px; }
.fact p { color: var(--ink-soft); font-size: 14px; }

.quote {
  border-left: 3px solid var(--amber);
  padding: 4px 0 4px 16px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
  margin-top: 28px;
}

/* Dual */
.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 32px 28px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.panel.night {
  background: #1b1916;
  color: #edeae3;
  border-color: #343028;
}

.panel.night .muted,
.panel.night .lede { color: #c4bfb4; }

.panel .tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}

.panel h3 {
  font-family: var(--serif);
  font-size: 32px;
  margin-bottom: 12px;
}

.panel p { color: var(--ink-soft); margin-bottom: 18px; }
.panel.night p { color: #c4bfb4; }

.panel ul { margin-top: auto; list-style: none; }
.panel li {
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}
.panel.night li { border-top-color: #343028; }

.soon {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #2e251d;
  color: #eaa875;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
}

.step .n {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 14px;
}

.step h3 { font-family: var(--sans); font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--ink-soft); }

/* Principles */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.principle {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 26px 22px;
}

.principle .idx {
  font-family: var(--serif);
  color: var(--amber);
  font-size: 20px;
  margin-bottom: 10px;
}

.principle h3 { font-family: var(--sans); font-size: 20px; margin-bottom: 8px; }
.principle p { color: var(--ink-soft); font-size: 15px; }

.redlines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.redlines span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

/* Markets */
.markets {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 14px;
}

.market {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
}

.market h3 { font-family: var(--serif); font-size: 26px; margin: 8px 0 10px; }
.market p { color: var(--ink-soft); }

/* Progress */
.progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.prog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}

.prog .state {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.prog .state.done { color: var(--sage-text); }
.prog .state.doing { color: var(--amber-text); }
.prog .state.todo { color: var(--muted); }

.prog h3 { font-family: var(--sans); font-size: 18px; margin-bottom: 8px; }
.prog p { font-size: 14px; color: var(--ink-soft); }

/* CTA */
.cta-box {
  background: #1b1916;
  color: #edeae3;
  border-radius: 28px;
  padding: 40px 40px 36px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
}

.cta-box h2 { font-size: clamp(28px, 3.6vw, 42px); margin: 10px 0 14px; }
.cta-box .lede { color: #c4bfb4; }

.form { display: grid; gap: 12px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #8b857a;
  margin-bottom: 6px;
}

input, select, textarea {
  width: 100%;
  background: #262420;
  border: 1px solid #343028;
  border-radius: 12px;
  padding: 12px 14px;
  color: #edeae3;
  outline: none;
}

input:focus, select:focus, textarea:focus { border-color: var(--amber); }
textarea { min-height: 88px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { font-size: 12px; color: #8b857a; }

.form-ok {
  display: none;
  padding: 28px 8px;
  text-align: center;
}

.form-ok.show { display: block; }
.form.hidden { display: none; }

/* Footer */
footer {
  position: relative;
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.foot img { height: 40px; width: auto; }
.foot p { font-size: 13px; color: var(--muted); max-width: 360px; margin-top: 10px; }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--amber); }

.foot-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }

.legal { margin-top: 28px; font-size: 12px; color: var(--muted); }

/* Inner pages */
.page { padding: 48px 0 80px; }
.page h1 { font-size: clamp(32px, 4vw, 48px); margin: 12px 0 20px; }
.page h2 { font-size: 24px; margin: 36px 0 12px; }
.page p, .page li { color: var(--ink-soft); }
.page ul { padding-left: 1.2em; margin: 8px 0 16px; }
.page li { margin: 6px 0; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-actions .nav-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .hero-grid, .problem-grid, .dual, .steps, .principles, .markets, .progress, .cta-box, .form-row, .foot {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 40px; }
  .stage {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    gap: 12px 14px;
    align-items: start;
  }
  .badge-card,
  .phone,
  .dock {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
  }
  .badge-card { grid-column: 1; grid-row: 1; }
  .dock { grid-column: 1; grid-row: 2; }
  .phone { grid-column: 2; grid-row: 1 / span 2; width: min(280px, 100%); justify-self: end; }
  section { padding: 64px 0; }
  .cta-box { padding: 28px 22px; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .stage {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .badge-card,
  .dock,
  .phone {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    justify-self: stretch;
  }
  .phone { max-width: 340px; justify-self: center; }
  .badge-card { max-width: 280px; }
  .dock { max-width: 220px; }
}
