/* ─────────────────────────────────────────────
   Costra LP — design tokens & layout
   warm cream + sienna + JP sans
   ───────────────────────────────────────────── */

:root {
  /* surface */
  --bg:        #faf7f1;          /* warm cream */
  --bg-2:      #f4efe5;          /* slight shade */
  --paper:    #ffffff;
  --ink:       #1a1815;          /* warm near-black */
  --ink-2:     #4a463f;
  --muted:     #8a8378;
  --line:      #e6dfd1;
  --line-2:    #efe9dc;

  /* accent */
  --accent:    #c84a1f;          /* sienna red */
  --accent-2:  #e87b4d;
  --accent-soft: #f7e6dc;
  --warn:      #b8631c;

  /* dark for product showcase */
  --dark:      #18140f;
  --dark-2:    #221c15;
  --dark-line: #2b251c;
  --dark-ink:  #f5efe2;
  --dark-mute: #8a8378;

  /* shadows */
  --shadow-sm: 0 1px 2px rgba(26,24,21,.04), 0 2px 8px rgba(26,24,21,.04);
  --shadow-md: 0 4px 12px rgba(26,24,21,.06), 0 12px 32px rgba(26,24,21,.08);
  --shadow-lg: 0 8px 24px rgba(26,24,21,.08), 0 24px 64px rgba(26,24,21,.12);

  /* type */
  --sans: "Noto Sans JP", -apple-system, "Helvetica Neue", "Hiragino Kaku Gothic ProN", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .hide-sm { display: none; }
}

/* ─────────────────────────────────────────────
   Reusable atoms
   ───────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.eyebrow__dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(200,74,31,.12);
}
.eyebrow--dark { color: var(--dark-ink); opacity: .8; }

.section-title {
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.section-title em {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
}
.section-title--light { color: var(--dark-ink); }
.section-title--light em { color: var(--accent-2); }

.section-lede {
  font-size: 16px;
  color: var(--ink-2);
  margin: 0;
  max-width: 600px;
  line-height: 1.8;
}

.section-head { margin-bottom: 64px; max-width: 720px; }
.section-head--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .section-lede { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, box-shadow .2s, color .2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn--solid {
  background: var(--ink);
  color: var(--bg);
}
.btn--solid:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200,74,31,.25);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn--ghost:hover { color: var(--ink); }
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn--text { background: transparent; color: var(--ink); padding: 0 4px; }
.btn--text:hover { color: var(--accent); }
.btn--lg { height: 54px; padding: 0 24px; font-size: 15px; }
.btn--block { width: 100%; }
.btn__arrow {
  transition: transform .2s;
}
.btn:hover .btn__arrow { transform: translateX(3px); }
.play-icon {
  width: 22px; height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  padding-left: 2px;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 18px;
}

/* ─────────────────────────────────────────────
   NAV
   ───────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, .82);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.logo__mark {
  width: 24px; height: 24px;
  color: var(--accent);
}
.logo__word {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.nav__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav__links a:hover { color: var(--ink); }
.nav__cta { display: flex; gap: 8px; align-items: center; }
@media (max-width: 820px) { .nav__links { display: none; } }

/* ─────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────── */

.hero {
  padding: 80px 0 44px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -20% auto auto;
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(200,74,31,.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero__head { max-width: 820px; }
.hero__head .eyebrow { justify-content: center; }

.hero__eyebrow {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}
.hero__eyebrow-en {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__eyebrow-jp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-2);
}

.hero__flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 42px;
}
.hero__phone { width: 100%; max-width: 264px; }
.hero__arrow {
  color: var(--accent);
  width: 88px;
  margin: 12px 0 6px;
  opacity: .9;
}
.hero__arrow svg { width: 100%; height: auto; display: block; }
.hero__result { width: 100%; max-width: 960px; }

.hero__title {
  font-size: clamp(44px, 5.6vw, 76px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  display: inline-block;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: rgba(200,74,31,.18);
  border-radius: 4px;
  z-index: -1;
}

.hero__sub {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-2);
  margin: 36px auto 0;
  max-width: 640px;
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--muted);
}
.meta-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
.meta-sep {
  width: 1px; height: 14px;
  background: var(--line);
  margin: 0 8px;
}

/* Hero preview stack */
.hero__preview {
  position: relative;
  min-height: 470px;
}
.preview-stack {
  position: relative;
  width: 100%;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.card__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
.card__chrome--dark {
  background: var(--dark-2);
  border-bottom-color: var(--dark-line);
  color: var(--dark-mute);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot--r { background: #f04e3b; } .dot--y { background: #f4bf4f; } .dot--g { background: #58c764; }
.card__title { margin-left: 8px; }
.live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-2);
  font-weight: 500;
}
.live__dot {
  width: 6px; height: 6px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

.card--receipt {
  position: absolute;
  top: 0; left: 0;
  width: 58%;
  transform: rotate(-3deg);
  z-index: 2;
}
.card--dash {
  position: absolute;
  top: 70px; right: 0;
  width: 70%;
  z-index: 1;
  background: var(--dark);
  border-color: var(--dark-line);
  color: var(--dark-ink);
}
/* ── Hero phone: realistic device scanning a receipt (animated) ── */
.scanphone {
  position: relative;
  width: 100%;
  max-width: 270px;
  margin: 0 auto;
  aspect-ratio: 1080 / 2240;
  container-type: inline-size;
  /* brushed graphite‑titanium frame */
  background:
    linear-gradient(145deg, #6a655c 0%, #312d27 16%, #5d584f 33%, #2a2620 52%,
                            #514c43 68%, #29251f 84%, #5a554c 100%);
  border-radius: 13% / 6.2%;
  padding: 2.8%;
  box-shadow:
    0 38px 70px rgba(40,24,12,.30),
    0 10px 22px rgba(40,24,12,.18),
    inset 0 0 0 1px rgba(255,255,255,.14),
    inset 0 0 2px 1px rgba(0,0,0,.5);
}
/* side buttons */
.scanphone__btn {
  position: absolute;
  border-radius: 2px;
  background: linear-gradient(180deg, #4a443b, #211d18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.scanphone__btn--silence { left: -1.4%; top: 17%;   width: 1.6%; height: 3.6%; }
.scanphone__btn--vol-up  { left: -1.6%; top: 24%;   width: 1.8%; height: 7%; }
.scanphone__btn--vol-dn  { left: -1.6%; top: 33%;   width: 1.8%; height: 7%; }
.scanphone__btn--power   { right: -1.6%; top: 26%;  width: 1.8%; height: 9%; }

.scanphone__screen {
  position: relative;
  width: 100%; height: 100%;
  background: #0d0b09;
  border-radius: 10.5% / 5%;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: inset 0 0 0 1.5px #000;
}
/* dynamic island */
.scanphone__island {
  position: absolute;
  top: 2.8%; left: 50%; transform: translateX(-50%);
  width: 32%; height: 4.6%;
  min-height: 18px;
  background: #000;
  border-radius: 999px;
  z-index: 8;
}

/* iOS status bar */
.statusbar {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.4% 7% 1.4%;
  color: #fff;
}
.statusbar__time {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 4cqw;
  letter-spacing: .02em;
  padding-left: 3%;
}
.statusbar__icons {
  display: inline-flex;
  align-items: center;
  gap: 5%;
}
.si { display: inline-flex; fill: #fff; }
.si--signal { width: 6.6cqw; }
.si--wifi   { width: 6cqw; }
.si--batt {
  width: 9cqw; height: 4.4cqw;
  border: 1.4px solid rgba(255,255,255,.85);
  border-radius: 2.4px;
  position: relative;
  display: inline-flex; align-items: center;
  padding: 1px;
}
.si--batt::after {
  content: ""; position: absolute;
  right: -2.2px; top: 50%; transform: translateY(-50%);
  width: 1.4px; height: 35%;
  background: rgba(255,255,255,.55);
  border-radius: 0 1px 1px 0;
}
.si--batt i {
  display: block; height: 100%; width: 72%;
  background: #fff; border-radius: 1px;
}

/* Camera app */
.cam {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cam__top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3% 7% 2.6%;
  color: rgba(255,255,255,.92);
}
.cam__flash, .cam__hdr {
  width: 7.4cqw; height: 7.4cqw;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
}
.cam__flash svg, .cam__hdr svg { width: 60%; }
.cam__flash { color: #ffd98a; }
.cam__mode {
  font-family: var(--mono);
  font-size: 3.4cqw;
  letter-spacing: .14em;
  color: #ffd98a;
  background: rgba(255,217,138,.12);
  border: 1px solid rgba(255,217,138,.4);
  padding: .5em 1.1em;
  border-radius: 999px;
}

/* viewfinder — a warm, lit camera feed (not flat black) */
.cam__view {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(120% 78% at 50% 42%, #4c443a 0%, #322c25 46%, #1c1812 100%);
}
.scandoc {
  position: relative;
  width: 76%;
  background: linear-gradient(180deg, #fffefb, #f6f3ec);
  border-radius: 1.4cqw;
  padding: 1.5em 1.4em 1.6em;
  font-family: var(--mono);
  font-size: 4cqw; color: #2a241d; line-height: 1.62;
  transform: rotate(-2deg);
  box-shadow:
    0 1.6cqw 4cqw rgba(0,0,0,.5),
    0 0 0 1px rgba(0,0,0,.04);
}
.scandoc__head {
  display: flex; justify-content: space-between;
  font-weight: 600;
  padding-bottom: .55em; margin-bottom: .55em;
  border-bottom: 1px dashed rgba(40,36,29,.28);
}
.scandoc__row { display: flex; justify-content: space-between; white-space: nowrap; }
.scandoc__row b, .scandoc__total b { font-weight: 600; }
.scandoc__total {
  display: flex; justify-content: space-between;
  font-weight: 700;
  margin-top: .55em; padding-top: .55em;
  border-top: 1px solid rgba(40,36,29,.32);
}
/* OCR detection boxes — aligned to rows, pop in sequence */
.ocrbox {
  position: absolute;
  left: 7%; right: 7%;
  height: 9.4%;
  border: 1.5px solid var(--accent-2);
  border-radius: 3px;
  background: rgba(232,123,77,.13);
  opacity: 0;
}
.ocrbox--1 { top: 20%;  animation: ocrpop 3s ease-in-out infinite .55s; }
.ocrbox--2 { top: 31%;  animation: ocrpop 3s ease-in-out infinite 1.05s; }
.ocrbox--3 { top: 42%;  animation: ocrpop 3s ease-in-out infinite 1.55s; }
@keyframes ocrpop {
  0%, 100% { opacity: 0; transform: scale(.96); }
  18%, 72% { opacity: 1; transform: scale(1); }
}
/* viewfinder corner brackets */
.viewframe {
  position: absolute; inset: 8% 9%;
  pointer-events: none;
}
.viewframe::before, .viewframe::after {
  content: ""; position: absolute;
  width: 7%; aspect-ratio: 1;
  min-width: 14px;
  border: 2.5px solid rgba(255,255,255,.92);
}
.viewframe::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 7px; }
.viewframe::after  { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 7px; }
/* sweeping scan line */
.scanline {
  position: absolute; left: 11%; right: 11%;
  top: 12%; height: 8%;
  background: linear-gradient(180deg, transparent, rgba(232,123,77,.4), transparent);
  border-top: 1.5px solid rgba(232,123,77,.9);
  border-bottom: 1.5px solid rgba(232,123,77,.9);
  pointer-events: none;
  animation: scanmove 3s ease-in-out infinite;
}
@keyframes scanmove {
  0%   { top: 12%; opacity: 0; }
  12%  { opacity: 1; }
  86%  { opacity: 1; }
  100% { top: 76%; opacity: 0; }
}
/* AI chip floating over feed */
.cam__chip {
  position: absolute;
  left: 50%; bottom: 6%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .6em;
  padding: .65em 1.2em;
  background: rgba(20,16,12,.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  font-family: var(--mono); font-size: 3.5cqw; color: #f5efe2;
  white-space: nowrap;
}
.cam__chip-dot {
  width: .55em; height: .55em; border-radius: 50%;
  background: var(--accent-2);
  animation: blink 1.2s ease-in-out infinite;
}

/* bottom control bar */
.cam__bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  padding: 5% 9% 4%;
  background: #050403;
}
.cam__thumb {
  justify-self: start;
  width: 10cqw; height: 10cqw;
  border-radius: 18%;
  background:
    linear-gradient(135deg, #efe9dc, #d8cfbc) padding-box,
    linear-gradient(180deg, #fff, #f6f3ec) border-box;
  border: 1.5px solid rgba(255,255,255,.55);
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.cam__shutter {
  width: 17cqw; height: 17cqw;
  border-radius: 50%;
  background: #fbf9f5;
  box-shadow:
    0 0 0 2.4cqw transparent,
    0 0 0 calc(2.4cqw + 2px) rgba(255,255,255,.55);
}
.cam__flip {
  justify-self: end;
  width: 10cqw; height: 10cqw;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
}
.cam__flip svg { width: 56%; }
.cam__home {
  position: absolute;
  bottom: 1.6%; left: 50%; transform: translateX(-50%);
  width: 32%; height: 4px;
  background: rgba(255,255,255,.5);
  border-radius: 999px;
  z-index: 6;
}

/* Hero scan→result flow: tighten the vertical rhythm on smaller screens */
@media (max-width: 980px) {
  .hero__flow { margin-top: 34px; }
}
@media (max-width: 640px) {
  .hero__phone { max-width: 218px; }
  .hero__arrow { width: 68px; margin: 8px 0 2px; }
  .hero__flow { margin-top: 26px; }
  /* keep the eyebrow on one line so its dot stays attached */
  .hero__head .eyebrow {
    font-size: 10px;
    letter-spacing: .05em;
    gap: 8px;
    white-space: nowrap;
    margin-bottom: 18px;
  }
  /* the big display title is too large on phones — rebalance */
  .hero__title { font-size: 34px; line-height: 1.16; }
  .hero__title em::after { bottom: 2px; height: 6px; }
}
@media (max-width: 380px) {
  .hero__eyebrow-en { font-size: 8.5px; letter-spacing: .08em; }
  .hero__eyebrow-jp { font-size: 12.5px; }
  .hero__title { font-size: 31px; }
}

/* Receipt */
.receipt {
  position: relative;
  padding: 22px 20px 26px;
  background: linear-gradient(180deg, #fbfaf7 0%, #fff 100%);
}
.receipt__paper { font-family: var(--mono); font-size: 12.5px; color: var(--ink); line-height: 1.9; }
.receipt__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 8px;
}
.receipt__brand { font-weight: 700; font-family: var(--sans); font-size: 14px; }
.receipt__date { font-size: 11px; color: var(--muted); }
.receipt__row {
  display: flex;
  justify-content: space-between;
}
.receipt__total {
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px dashed var(--line);
  font-weight: 700;
  font-family: var(--sans);
}
.scan-line {
  position: absolute;
  left: 0; right: 0;
  top: 22%;
  height: 38px;
  background: linear-gradient(180deg, transparent, rgba(200,74,31,.18), transparent);
  animation: scan 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scan {
  0% { top: 18%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 88%; opacity: 0; }
}
.scan-tag {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot-pulse {
  width: 5px; height: 5px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: blink 1.2s ease-in-out infinite;
}

/* Dash card content */
.dash { padding: 22px 22px 24px; }
.dash__hero { margin-bottom: 14px; }
.dash__label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dark-mute);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dash__num {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--dark-ink);
  font-feature-settings: "tnum";
}
.dash__pct { font-size: 28px; opacity: .6; margin-left: 4px; }
.dash__delta {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent-2);
}
.dash__delta span { color: var(--dark-mute); }

.dash__chart { margin: 6px 0 16px; }
.dash__chart svg { width: 100%; height: 64px; }
.chart__labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dark-mute);
  margin-top: 2px;
}
.dash__rows { display: grid; gap: 8px; }
.dash__row {
  display: grid;
  grid-template-columns: 1fr 60px 44px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.dash__name { color: var(--dark-ink); }
.dash__bar {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
}
.dash__bar span {
  display: block;
  height: 100%;
  background: var(--accent-2);
  border-radius: 3px;
}
.dash__bar--warn span { background: #f0a060; }
.dash__val { font-family: var(--mono); font-size: 11.5px; color: var(--dark-ink); text-align: right; }
.dash__val--warn { color: #f0a060; }

.chip-insight {
  position: absolute;
  bottom: -28px;
  left: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 3;
  max-width: 260px;
}
.chip-insight__icon {
  width: 32px; height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.chip-insight__title { font-size: 13px; font-weight: 600; line-height: 1.4; }
.chip-insight__sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }


/* Logos row */
.logos {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--line-2);
}
.logos__label {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  text-align: center;
  margin-bottom: 18px;
}
.logos__row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
  font-weight: 600;
  font-size: 16px;
  color: var(--muted);
  opacity: .75;
  letter-spacing: .04em;
}

/* ─────────────────────────────────────────────
   PAIN
   ───────────────────────────────────────────── */

.pain {
  padding: 120px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pain .section-head { text-align: center; margin-left: auto; margin-right: auto; }
.pain .section-head .eyebrow { justify-content: center; }
.pain .section-lede { margin-left: auto; margin-right: auto; }

.pain__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 880px) { .pain__grid { grid-template-columns: 1fr; } }

.pain__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 32px 32px;
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.pain__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.pain__card--accent {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.pain__card--accent .pain__num { color: var(--accent-2); }
.pain__card--accent .pain__body { color: rgba(245,239,226,.7); }
.pain__card--accent .pain__metric-label { color: rgba(245,239,226,.55); }
.pain__card--accent .pain__meta { border-top-color: rgba(245,239,226,.12); }

.pain__num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--accent);
  margin-bottom: 16px;
}
.pain__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 14px;
  letter-spacing: -.005em;
}
.pain__body {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.85;
  margin: 0 0 28px;
}
.pain__body em { color: var(--accent); font-style: normal; font-weight: 600; }
.pain__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
}
.pain__metric {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
  color: inherit;
}
.pain__metric small { font-size: 14px; opacity: .7; margin-left: 2px; }
.pain__metric-label {
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: .08em;
}

.pain__footnote {
  margin-top: 36px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ─────────────────────────────────────────────
   FEATURES
   ───────────────────────────────────────────── */

.features { padding: 130px 0; }

.feature {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 88px;
  align-items: center;
  margin-bottom: 130px;
}
.feature:last-child { margin-bottom: 0; }
.feature--reverse { grid-template-columns: 1.15fr 1fr; }
.feature--reverse .feature__copy { order: 2; }
.feature--reverse .feature__visual { order: 1; }
@media (max-width: 980px) {
  .feature, .feature--reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 80px;
  }
  .feature--reverse .feature__copy { order: 1; }
  .feature--reverse .feature__visual { order: 2; }
}

.feature__tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 500;
}
.feature__title {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.feature__title em {
  font-style: normal;
  color: var(--accent);
}
.feature__body {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.9;
  margin: 0 0 28px;
}
.feature__list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 10px;
}
.feature__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink-2);
}

/* ───── STEP CARDS (bakuraku-style colored feature cards) ───── */
.step-card {
  background: var(--accent);
  color: #fff;
  border-radius: 28px;
  overflow: hidden;
  align-items: stretch;
  gap: 0;
  margin-bottom: 24px;
}
.step-card .feature__copy {
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.step-card .feature__visual {
  background: var(--bg);
  color: var(--ink);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.step-badge {
  display: inline-block;
  align-self: flex-start;
  background: #fbbf24;
  color: #3a2410;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .12em;
  padding: 7px 15px;
  border-radius: 9px;
  margin-bottom: 24px;
}
.step-card .feature__title { color: #fff; }
.step-card .feature__title em { color: #ffdca8; }
.step-card .feature__body { color: rgba(255,255,255,.9); }
.step-card .feature__list li { color: rgba(255,255,255,.94); }
.step-card .check { background: rgba(255,255,255,.22); color: #fff; }

/* dark variant for rhythm */
.step-card--dark { background: var(--dark); }
.step-card--dark .step-badge { background: var(--accent-2); color: #2a1206; }

@media (max-width: 980px) {
  .step-card .feature__copy { padding: 40px 28px 32px; }
  .step-card .feature__visual { padding: 0 22px; }
  .step-card { margin-bottom: 18px; }
}
@media (max-width: 640px) {
  .step-card .feature__copy { padding: 34px 24px 28px; }
  .step-badge { margin-bottom: 18px; }
}

/* OCR demo */
.feature__visual { min-width: 0; }
.ocr-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
}
.ocr-photo {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #faf8f3;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px 18px;
  font-family: var(--mono);
  font-size: 12px;
  transform: rotate(-1deg);
  box-shadow: var(--shadow-sm);
}
.ocr-photo__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--line);
}
.ocr-photo .receipt__brand { font-family: var(--sans); font-size: 13px; font-weight: 700; }
.ocr-photo .receipt__date { font-size: 10px; color: var(--muted); }
.ocr-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 5px 8px;
  margin: 2px -2px;
  border: 1.5px solid transparent;
  border-radius: 4px;
  white-space: nowrap;
  color: var(--ink-2);
}
.ocr-line--box {
  border-color: rgba(200,74,31,.45);
  background: rgba(200,74,31,.05);
}
.ocr-line--scan {
  border-color: var(--accent);
  background: rgba(200,74,31,.12);
  box-shadow: 0 0 0 3px rgba(200,74,31,.15);
  animation: bbox-pulse 1.6s ease-in-out infinite;
}
@keyframes bbox-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(200,74,31,.15); }
  50% { box-shadow: 0 0 0 7px rgba(200,74,31,.04); }
}

.ocr-demo__arrow {
  width: 24px;
  color: var(--muted);
}

.ocr-demo__table {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12.5px;
}
.ocr-table__head,
.ocr-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 64px 58px;
  gap: 8px;
  padding: 11px 16px;
  align-items: center;
}
@media (max-width: 640px) {
  .step-card .feature__visual { padding: 0 14px; }
  .ocr-demo { padding: 16px; gap: 10px; }
  .ocr-photo { font-size: 11px; }
  .ocr-table__head,
  .ocr-table__row {
    grid-template-columns: minmax(0, 1fr) 34px 50px 46px;
    gap: 6px;
    padding: 10px 11px;
    font-size: 11px;
  }
  .ocr-table__head { font-size: 9px; letter-spacing: .02em; }
  .ocr-table__row span:nth-child(2),
  .ocr-table__row span:nth-child(3) { white-space: nowrap; }
  .pill { font-size: 9px; padding: 3px 6px; }
}
.ocr-table__head {
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.ocr-table__row { white-space: nowrap; }
.ocr-table__row + .ocr-table__row { border-top: 1px solid var(--line-2); }
.ocr-table__row span:nth-child(1) { overflow: hidden; text-overflow: ellipsis; }
.ocr-table__row span:nth-child(2),
.ocr-table__row span:nth-child(3) { font-family: var(--mono); }
.ocr-table__row--active { background: rgba(200,74,31,.04); }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.pill--ok { background: #eef5ec; color: #3a7748; }
.pill--scan { background: var(--accent-soft); color: var(--accent); }

/* Dashboard demo */
.dash-demo {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-md);
}
.dash-demo__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-2);
}
.kpi__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.kpi__num {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  font-feature-settings: "tnum";
}
.kpi__num span { font-size: 18px; opacity: .55; margin-left: 2px; }
.kpi__delta {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.kpi__delta--down { color: #3a7748; }
.kpi__delta--up { color: var(--accent); }

.chart__title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}
.chart__legend {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 400;
}
.chart__legend i {
  display: inline-block;
  width: 12px; height: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.dash-demo__chart svg { width: 100%; height: 140px; }
.chart__xaxis {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}

/* Recipe demo */
.recipe-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .recipe-demo { grid-template-columns: 1fr; } }

.recipe-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.recipe-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 14px;
}
.recipe-card__name { font-size: 18px; font-weight: 700; }
.recipe-card__sub { font-size: 11.5px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.recipe-card__price { text-align: right; font-family: var(--mono); }
.recipe-card__price span { font-size: 18px; font-weight: 700; color: var(--ink); }
.recipe-card__price small { display: block; font-size: 10.5px; color: var(--muted); }

.recipe-card__ings {
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 14px;
}
.ing {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  padding: 6px 0;
  align-items: center;
  color: var(--ink-2);
}
.ing__amt { color: var(--muted); }
.ing__cost { color: var(--ink); }
.ing__up { color: var(--accent); font-size: 10px; }

.recipe-card__bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}
.recipe-card__label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.recipe-card__value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: -.01em;
}
.recipe-card__value--accent { color: var(--accent); }

/* Quad map */
.quad {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.quad__title { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.quad__grid {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 1fr 22px;
  flex: 1;
  min-height: 240px;
}
.quad__axis {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
}
.quad__axis--y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 6px 6px 6px 0;
  border-right: 1px dashed var(--line);
  grid-column: 1;
  grid-row: 1;
}
.quad__axis--y span {
  writing-mode: vertical-rl;
  white-space: nowrap;
  letter-spacing: .12em;
}
.quad__axis--x {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  grid-column: 2;
  grid-row: 2;
}
.quad__plot {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  background:
    linear-gradient(to right, transparent, transparent 49%, var(--line-2) 49%, var(--line-2) 51%, transparent 51%),
    linear-gradient(to bottom, transparent, transparent 49%, var(--line-2) 49%, var(--line-2) 51%, transparent 51%);
  border-left: 1px dashed transparent;
}
.quad__line { position: absolute; background: var(--line); }
.quad__line--h { left: 0; right: 0; top: 50%; height: 1px; }
.quad__line--v { top: 0; bottom: 0; left: 50%; width: 1px; }
.quad__lbl {
  position: absolute;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 2px 6px;
  background: var(--paper);
}
.quad__lbl--tl { top: 8px; left: 8px; }
.quad__lbl--tr { top: 8px; right: 8px; color: var(--accent); }
.quad__lbl--bl { bottom: 8px; left: 8px; }
.quad__lbl--br { bottom: 8px; right: 8px; }

.dot-plot {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot-plot::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(200,74,31,.15);
}
.dot-plot--warn::before { background: #b8631c; box-shadow: 0 0 0 3px rgba(184,99,28,.15); }
.dot-plot--mute { color: var(--muted); }
.dot-plot--mute::before { background: var(--muted); box-shadow: 0 0 0 3px rgba(138,131,120,.15); }

/* ─────────────────────────────────────────────
   PRODUCT (dark)
   ───────────────────────────────────────────── */

.product {
  background: var(--dark);
  color: var(--dark-ink);
  padding: 130px 0 130px;
  position: relative;
  overflow: hidden;
}
.product::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -20%;
  width: 60%; height: 60%;
  background: radial-gradient(ellipse at center, rgba(200,74,31,.16), transparent 60%);
  pointer-events: none;
}

.product__screen {
  margin-top: 12px;
  perspective: 1800px;
}

.screen {
  background: var(--paper);
  border-radius: 14px;
  border: 1px solid var(--dark-line);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.4);
  overflow: hidden;
  font-size: 13px;
  color: var(--ink);
  transform: rotateX(2deg);
  transform-origin: top center;
}
.screen__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.screen__url {
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 14px;
}
.screen__body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 600px;
}
@media (max-width: 880px) {
  .screen__body { grid-template-columns: 1fr; }
  .screen__side { display: none; }
}
.screen__side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  gap: 16px;
}
.side__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  padding: 6px 8px;
}
.side__mark { width: 22px; color: var(--accent); }
.side__store {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.side__store-name { font-weight: 600; font-size: 13px; }
.side__store-sub { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.side__nav { display: grid; gap: 2px; }
.side__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.side__item span {
  width: 16px;
  font-family: var(--mono);
  color: var(--muted);
  text-align: center;
}
.side__item--active {
  background: var(--paper);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.side__item--active span { color: var(--accent); }
.side__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.side__plan {
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: .08em;
}
.side__user { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.avatar {
  width: 26px; height: 26px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.screen__main { padding: 22px 26px 26px; background: var(--paper); overflow: hidden; }
.screen__topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 22px;
}
.screen__crumbs {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.screen__heading {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 0;
}
.screen__tools { display: flex; gap: 8px; align-items: center; }
.tool-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--bg);
}
.tool-pill--solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
}

.screen__kpis {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 880px) { .screen__kpis { grid-template-columns: 1fr; } }

.kpi-lg {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
.kpi-lg__label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.kpi-lg__num {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.kpi-lg__num span { font-size: 26px; opacity: .55; }
.kpi-lg__trend {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}
.kpi-lg__trend--down { color: #3a7748; }
.kpi-lg__bar {
  position: relative;
  height: 6px;
  background: var(--line-2);
  border-radius: 3px;
  margin: 18px 0 6px;
}
.kpi-lg__bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.kpi-lg__bar i {
  position: absolute;
  top: -3px;
  width: 1.5px;
  height: 12px;
  background: var(--ink);
}
.kpi-lg__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.kpi-sm-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}
.kpi-sm {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.kpi-sm__label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.kpi-sm__num {
  font-size: 22px;
  font-weight: 700;
  font-feature-settings: "tnum";
  letter-spacing: -.01em;
}
.kpi-sm__num span { font-size: 12px; opacity: .55; margin-left: 2px; }
.kpi-sm__num--accent { color: var(--accent); }
.kpi-sm__delta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
}

.screen__split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 880px) { .screen__split { grid-template-columns: 1fr; } }

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.panel__head--row { align-items: flex-start; }
.panel__head h5 { margin: 0; font-size: 14px; font-weight: 700; }
.panel__lede { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.panel__tabs {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  font-family: var(--mono);
  font-size: 11px;
}
.panel__tab {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}
.panel__tab--active {
  background: var(--ink);
  color: var(--bg);
}
.panel__more {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
}
.panel__chart {
  width: 100%;
  height: 140px;
}
.panel__xaxis {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}

.bar-list { display: grid; gap: 12px; }
.bar {
  display: grid;
  grid-template-columns: 100px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.bar__name { color: var(--ink); }
.bar__track {
  height: 6px;
  background: var(--line-2);
  border-radius: 3px;
  overflow: hidden;
}
.bar__fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar__fill--warn { background: var(--warn); }
.bar__num { font-family: var(--mono); font-size: 11.5px; text-align: right; }

.panel--insight {
  background: var(--bg-2);
}
.insight-list { display: grid; gap: 10px; margin-top: 12px; }
.insight {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.insight__icon {
  width: 32px; height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.insight__title { font-size: 13.5px; font-weight: 600; }
.insight__title em { font-style: normal; color: var(--accent); }
.insight__sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.6; font-family: var(--mono); }
.insight__sub em { font-style: normal; color: var(--ink); font-family: var(--mono); }
.insight__cta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
  cursor: pointer;
}
@media (max-width: 720px) {
  .insight { grid-template-columns: 32px 1fr; }
  .insight__cta { grid-column: 2; justify-self: start; }
}

/* ─────────────────────────────────────────────
   PRICING
   ───────────────────────────────────────────── */

.pricing { padding: 60px 0 130px; }

.plan-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 auto 40px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.plan-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  transition: background .2s, color .2s, box-shadow .2s;
}
.plan-switch__btn small {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--muted);
}
.plan-switch__btn.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.plan-switch__btn.is-active small {
  background: var(--accent-soft);
  color: var(--accent);
}
@media (max-width: 560px) {
  .plan-switch { flex-direction: column; left: 0; transform: none; margin-left: 0; border-radius: 16px; width: 100%; }
  .plan-switch__btn { justify-content: center; }
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.plans[hidden] { display: none; }
.plans--new .plan__amount { font-feature-settings: "tnum"; }
@media (max-width: 980px) { .plans { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; } }

.plan {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.plan--featured {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: translateY(-8px);
}
.plan--featured .plan__name { color: var(--accent-2); }
.plan--featured .plan__for,
.plan--featured .plan__note,
.plan--featured .plan__list li { color: rgba(245,239,226,.7); }
.plan--featured .btn--solid { background: var(--accent); color: var(--bg); }
.plan--featured .btn--solid:hover { background: var(--accent-2); box-shadow: 0 8px 20px rgba(200,74,31,.4); }
.plan--featured .check { background: rgba(200,74,31,.25); color: var(--accent-2); }

.plan__ribbon {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  padding: 4px 10px;
  border-radius: 999px;
}

.plan__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.005em;
}
.plan__for {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  padding: 18px 0;
}
.plan--featured .plan__price { border-color: rgba(245,239,226,.12); }
.plan__yen { font-size: 22px; font-weight: 500; opacity: .7; }
.plan__amount {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  font-feature-settings: "tnum";
}
.plan__amount--ask { font-size: 28px; }
.plan__per { font-size: 14px; color: var(--muted); margin-left: 2px; }

.plan__note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}

.plan__list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 10px;
  font-size: 13.5px;
}
.plan__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
}
.plan__list em { font-style: normal; color: var(--accent); font-weight: 600; }

/* ─────────────────────────────────────────────
   CTA
   ───────────────────────────────────────────── */

.cta {
  background: var(--ink);
  color: var(--bg);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(200,74,31,.22), transparent 60%);
  pointer-events: none;
}
.cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  position: relative;
}
.cta__inner > * { min-width: 0; }
@media (max-width: 880px) { .cta__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
.cta__title {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.cta__sub {
  font-size: 16px;
  color: rgba(245,239,226,.7);
  line-height: 1.85;
  margin: 0;
}

.cta__form {
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  gap: 14px;
}
.field { display: grid; gap: 6px; }
.field span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dark-mute);
}
.field input {
  height: 48px;
  background: var(--dark);
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  color: var(--bg);
  padding: 0 14px;
  font: inherit;
  outline: none;
  transition: border-color .15s;
}
.field input::placeholder { color: rgba(245,239,226,.3); }
.field input:focus { border-color: var(--accent); }
.cta__form .btn--solid {
  background: var(--accent);
  color: var(--bg);
}
.cta__form .btn--solid:hover {
  background: var(--accent-2);
}
.cta__fine {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dark-mute);
  text-align: center;
  margin: 4px 0 0;
}
.cta__fine a { color: var(--accent-2); }

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */

.footer {
  background: var(--dark);
  color: var(--dark-mute);
  padding: 60px 0 30px;
  border-top: 1px solid var(--dark-line);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 720px) { .footer__inner { grid-template-columns: 1fr; } }
.footer__brand .logo { color: var(--dark-ink); }
.footer__tag {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--dark-mute);
  max-width: 280px;
  line-height: 1.7;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 540px) { .footer__cols { grid-template-columns: repeat(2, 1fr); } }
.footer__h {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dark-ink);
  margin-bottom: 14px;
}
.footer__cols a {
  display: block;
  font-size: 13px;
  color: var(--dark-mute);
  padding: 4px 0;
  transition: color .15s;
  cursor: pointer;
}
.footer__cols a:hover { color: var(--dark-ink); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--dark-line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dark-mute);
}
.footer__legal a { color: var(--dark-mute); }
.footer__legal a:hover { color: var(--dark-ink); }

/* ─────────────────────────────────────────────
   MOBILE / PHONE OPTIMIZATION (≤ 640px)
   ───────────────────────────────────────────── */

@media (max-width: 640px) {
  /* Tighter vertical rhythm — desktop paddings are too tall on phones */
  .hero { padding: 52px 0 36px; }
  .pain { padding: 72px 0; }
  .features { padding: 72px 0; }
  .feature, .feature--reverse { margin-bottom: 64px; gap: 30px; }
  .product { padding: 76px 0; }
  .pricing { padding: 44px 0 72px; }
  .cta { padding: 76px 0; }
  .footer { padding: 48px 0 28px; }
  .section-head { margin-bottom: 40px; }
  .logos { margin-top: 56px; }

  /* Type: pull the big display sizes down a notch */
  .section-title { font-size: 30px; }
  .feature__title { font-size: 28px; }
  .hero__sub { font-size: 15.5px; line-height: 1.8; }
  .section-lede { font-size: 15px; }

  /* Nav: tighten the CTA cluster */
  .nav__inner { gap: 12px; }
  .nav__cta { gap: 6px; }
  .btn { height: 42px; padding: 0 15px; font-size: 13.5px; }
  .btn--lg { height: 50px; padding: 0 20px; font-size: 14.5px; }

  /* Hero CTAs go full-width-ish and stack cleanly */
  .hero__ctas { gap: 14px; }
  .hero__ctas .btn--solid { width: 100%; }

  /* Mock dashboard (Feature 02): shrink dense numbers so 3 columns breathe */
  .dash-demo { padding: 20px 18px 18px; }
  .dash-demo__top { gap: 12px; }
  .dash-demo__top .kpi__num { font-size: 24px; }
  .dash-demo__top .kpi__num span { font-size: 13px; }
  .kpi__label { font-size: 9.5px; }

  /* Recipe + quad demos: comfortable padding */
  .recipe-card, .quad { padding: 18px; }
  .quad__grid { min-height: 220px; }

  /* Product showcase mock: let the topbar tools wrap, ease padding */
  .screen__main { padding: 18px 16px 20px; }
  .screen__topbar { flex-wrap: wrap; gap: 12px; }
  .screen__heading { font-size: 18px; }
  .kpi-lg__num { font-size: 46px; }
  .kpi-lg__num span { font-size: 22px; }
  .kpi-sm-stack { gap: 8px; }

  /* Pricing: featured card no longer pops up out of flow on a single column */
  .plan--featured { transform: none; }
  .plan { padding: 28px 24px; }

  /* CTA form padding */
  .cta__form { padding: 22px; }
}

/* Very small phones (≤ 380px): reclaim header space */
@media (max-width: 380px) {
  .nav__cta .btn--ghost { display: none; }
  .wrap { padding: 0 16px; }
}

/* Mobile hero: ensure the insight chip matches the full-width cards
   (higher specificity so it wins over the base .chip-insight max-width) */
@media (max-width: 980px) {
  .preview-stack .chip-insight { max-width: none; width: 100%; }
}

/* ─────────────────────────────────────────────
   PRODUCT DASHBOARD — keep the full desktop layout on phones,
   scaled down to fit (JS sets the inline transform + wrapper height).
   "見せる" image of how much gets datafied — legibility is secondary.
   ───────────────────────────────────────────── */
@media (max-width: 880px) {
  .product__screen { perspective: none; }
  /* JS sets scale() inline; this is the no-JS fallback baseline */
  .screen { transform: none; transform-origin: top left; }

  /* override the single-column collapses → restore desktop grids */
  .screen__body  { grid-template-columns: 220px 1fr; }
  .screen__side  { display: flex; }
  .screen__kpis  { grid-template-columns: 1fr 2fr; }
  .screen__split { grid-template-columns: 1.3fr 1fr; }
  .kpi-sm-stack  { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
  .screen .insight     { grid-template-columns: 32px 1fr auto; }
  .screen .insight__cta { grid-column: auto; justify-self: auto; }

  /* restore the desktop sizing the ≤640 block had shrunk */
  .screen__main    { padding: 22px 26px 26px; }
  .screen__topbar  { flex-wrap: nowrap; gap: 0; }
  .screen__heading { font-size: 20px; }
  .kpi-lg__num     { font-size: 56px; }
  .kpi-lg__num span { font-size: 26px; }
}
