/* ============================================
   Koallect LP — styles
   Deep blue / trust / enterprise
   ============================================ */

:root {
  --accent: #1a4bff;
  --accent-700: #0f3bcc;
  --accent-050: #eef2ff;
  --accent-100: #dbe3ff;

  --ink-900: #0a1736;
  --ink-800: #132551;
  --ink-700: #1e3368;
  --ink-500: #4d5e88;
  --ink-400: #6a7ca6;
  --ink-300: #9aa8c6;
  --ink-200: #c4cde0;
  --ink-100: #e3e8f2;
  --ink-050: #f3f5fa;

  --bg: #fbfcfe;
  --bg-elev: #ffffff;
  --bg-soft: #f3f5fa;
  --bg-dark: #0a1736;

  --line: #e3e8f2;
  --line-strong: #c4cde0;

  --warn: #c96820;
  --warn-bg: #fff4e8;
  --ok: #1a7f52;
  --ok-bg: #e6f5ed;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(10,23,54,.04), 0 1px 3px rgba(10,23,54,.06);
  --shadow-md: 0 2px 6px rgba(10,23,54,.05), 0 12px 28px rgba(10,23,54,.08);
  --shadow-lg: 0 10px 20px rgba(10,23,54,.06), 0 30px 60px rgba(10,23,54,.10);

  --font-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* Dark theme */
body[data-theme="dark"] {
  --bg: #070d1f;
  --bg-elev: #0d1630;
  --bg-soft: #0f1a38;
  --line: #1c2a52;
  --line-strong: #2a3b6a;
  --ink-900: #eef2ff;
  --ink-800: #dbe3ff;
  --ink-700: #c0cbee;
  --ink-500: #8a9bc4;
  --ink-400: #6f80a9;
  --ink-300: #5a6a92;
  --ink-200: #2a3b6a;
  --ink-100: #1c2a52;
  --ink-050: #0f1a38;
  --accent-050: #121e46;
  --accent-100: #1b2a5e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--ink-900);
  font-weight: 400;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }

/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  font-weight: 700;
}
.logo-mark {
  color: var(--accent);
  display: inline-flex;
}
.logo-text {
  font-size: 20px;
  letter-spacing: .02em;
}
.logo-sub {
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--ink-400);
  padding-left: 6px;
  border-left: 1px solid var(--line);
  margin-left: 2px;
}
.nav {
  display: flex;
  gap: 28px;
  font-size: 13.5px;
  color: var(--ink-500);
  font-weight: 500;
}
.nav a { transition: color .15s ease; }
.nav a:hover { color: var(--accent); }

@media (max-width: 960px) {
  .nav { display: none; }
  .logo-sub { display: none; }
}

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 14px rgba(26,75,255,.28);
}
.btn-primary:hover { background: var(--accent-700); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(26,75,255,.36); }
.btn-ghost {
  background: transparent;
  color: var(--ink-800);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============== HERO ============== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 120px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .55;
}
.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55%;
  height: 80%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%);
  filter: blur(40px);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--accent);
  background: var(--accent-050);
  padding: 8px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.hero-title {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: .01em;
  margin: 0 0 24px;
  color: var(--ink-900);
  text-wrap: pretty;
}
.hero-title span { display: block; }
.hero-title span:last-child { color: var(--accent); }

.hero-lead {
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-500);
  max-width: 540px;
  margin: 0 0 32px;
}

.hero-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 36px;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
}
.meta-item {
  display: flex;
  gap: 14px;
  font-size: 13.5px;
  align-items: baseline;
}
.meta-label {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .1em;
  font-size: 11px;
}
.meta-value { color: var(--ink-700); }

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero visual — Package */
.hero-visual { position: relative; }
.package-stack {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 460px;
  margin: 0 auto;
}
.package {
  position: absolute;
  background: linear-gradient(140deg, #fdfaf2 0%, #f3ece0 100%);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  color: #3b3226;
  overflow: hidden;
  font-family: var(--font-jp);
}
.package-back {
  width: 70%; height: 78%;
  top: 2%; right: 2%;
  background: linear-gradient(140deg, #e8e0cf 0%, #d4c8af 100%);
  transform: rotate(4deg);
  filter: brightness(.96);
}
.package-back .pkg-stripe {
  width: 100%; height: 14px; background: #8e7a55;
  margin-bottom: 14px; border-radius: 3px;
}
.package-back .pkg-title {
  font-size: 13px; font-weight: 700; letter-spacing: .1em;
  color: #5a4a2d; margin-bottom: 16px;
}
.package-back .pkg-rows {
  display: grid; gap: 8px;
}
.package-back .pkg-rows div {
  height: 6px; background: #b8a37a; border-radius: 2px;
}
.package-back .pkg-rows div:nth-child(1) { width: 90%; }
.package-back .pkg-rows div:nth-child(2) { width: 70%; }
.package-back .pkg-rows div:nth-child(3) { width: 85%; }
.package-back .pkg-rows div:nth-child(4) { width: 60%; }
.package-back .pkg-rows div:nth-child(5) { width: 78%; }

.package-main {
  width: 78%; height: 88%;
  bottom: 0; left: 0;
  transform: rotate(-3deg);
}
.pkg-corner {
  position: absolute; width: 18px; height: 18px;
  border: 1.5px solid #a08757;
}
.pkg-corner-tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.pkg-corner-tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.pkg-corner-bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.pkg-corner-br { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.pkg-badge {
  position: absolute; top: 24px; right: 22px;
  font-size: 9px; font-weight: 800; letter-spacing: .12em;
  text-align: center; line-height: 1.3;
  color: #8e6e2a;
  border: 1.5px solid #8e6e2a;
  padding: 8px 10px; border-radius: 50%;
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-8deg);
}
.pkg-label {
  font-size: 12.5px; line-height: 1.6;
  color: #3b3226;
  margin-top: 8px;
  font-weight: 500;
}
.package-main > .pkg-label:first-of-type { margin-top: 60px; font-weight: 700; font-size: 14px; }
.pkg-label-sm {
  font-size: 10px; color: #7a684a;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #a08757;
}
.pkg-scan {
  position: absolute;
  left: -4%; right: -4%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 16px var(--accent);
  top: 40%;
  animation: pkgScan 4s ease-in-out infinite;
  opacity: .75;
}
@keyframes pkgScan {
  0%, 100% { top: 20%; opacity: .4; }
  50% { top: 90%; opacity: 1; }
}

.detect {
  position: absolute;
  border: 1.5px solid var(--accent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  animation: detectIn .6s ease both;
}
.detect-tag {
  position: absolute;
  top: -22px; left: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: .03em;
}
.detect-1 {
  top: 32%; left: 10%; width: 68%; height: 6%;
  animation-delay: .3s;
}
.detect-2 {
  top: 48%; left: 10%; width: 42%; height: 6%;
  border-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  animation-delay: .6s;
}
.detect-2 .detect-tag { background: var(--warn); }
.detect-3 {
  top: 64%; left: 10%; width: 76%; height: 6%;
  animation-delay: .9s;
}
@keyframes detectIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

.hero-ticker {
  margin-top: 32px;
  display: grid;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
}
.tick {
  display: flex; gap: 14px;
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.tick-key {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .08em;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.hsi-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, transparent, var(--ink-400));
  animation: hsi 2s ease-in-out infinite;
}
@keyframes hsi {
  0%, 100% { opacity: .2; transform: scaleY(.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}
.hsi-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--ink-400);
}
@media (max-width: 980px) { .hero-scroll-indicator { display: none; } }

/* Hero variants */
body[data-hero="report"] .package-stack { display: none; }
body[data-hero="minimal"] .hero-visual { display: none; }
body[data-hero="minimal"] .hero-inner { grid-template-columns: 1fr; text-align: left; max-width: 880px; }

/* ============== TRUST STRIP ============== */
.trust-strip {
  padding: 40px 0;
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-strip .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-text {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink-500);
  font-weight: 500;
  flex: 0 0 auto;
}
.trust-marks {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
  opacity: .6;
}
.tm {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink-700);
}

/* ============== SECTIONS ============== */
.section {
  padding: 120px 0;
  position: relative;
}
.section-head {
  max-width: 760px;
  margin-bottom: 64px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .005em;
  color: var(--ink-900);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.section-lead {
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-500);
  margin: 0;
}

/* ============== PROBLEM ============== */
.section-problem { background: var(--bg-soft); }
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 80px;
}
@media (max-width: 860px) { .problem-grid { grid-template-columns: 1fr; } }
.p-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color .2s ease, transform .25s ease;
}
.p-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.p-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--accent);
  background: var(--accent-050);
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 600;
}
.p-card h3 {
  font-size: 20px;
  margin: 0 0 12px;
  line-height: 1.5;
  color: var(--ink-900);
  font-weight: 700;
}
.p-card p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-500);
}
.p-tags {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.p-tags li {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 8px;
  background: var(--ink-050);
  color: var(--ink-700);
  border-radius: 3px;
}

/* OCR difficulty */
.ocr-difficulty {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.od-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.od-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--ink-500);
  font-weight: 600;
}
.od-samples {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .od-samples { grid-template-columns: repeat(2, 1fr); } }
.od-sample {
  border: 1px dashed var(--line-strong);
  padding: 16px;
  border-radius: 6px;
  background: var(--bg);
}
.od-sample-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}
.od-sample-body {
  color: var(--ink-700);
  line-height: 1.6;
  min-height: 56px;
}
.sample-tiny { font-size: 9px; line-height: 1.3; }
.sample-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 12px;
  height: 80px;
  display: flex; gap: 12px;
}
.tate-in-yoko { text-combine-upright: all; -webkit-text-combine: horizontal; font-weight: 700; }
.sample-lowcontrast {
  font-size: 11px;
  color: #b8c0d5;
  background: repeating-linear-gradient(45deg, #e8ebf2, #e8ebf2 4px, #e2e6ef 4px, #e2e6ef 8px);
  padding: 12px;
  border-radius: 4px;
}
.sample-decorative {
  font-family: "Brush Script MT", "Snell Roundhand", cursive;
  font-size: 18px;
  font-style: italic;
  color: #6b4e2a;
  letter-spacing: .05em;
}

/* ============== SOLUTION ============== */
.solution-list {
  display: grid;
  gap: 12px;
}
.sol-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color .2s ease;
}
.sol-row:hover { border-color: var(--accent); }
@media (max-width: 820px) {
  .sol-row { grid-template-columns: 1fr; gap: 12px; }
}
.sol-problem, .sol-answer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sol-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .15em;
  padding: 3px 8px;
  background: var(--ink-050);
  color: var(--ink-500);
  border-radius: 3px;
}
.sol-tag-answer {
  background: var(--accent);
  color: #fff;
}
.sol-problem > div { color: var(--ink-700); font-size: 14.5px; }
.sol-answer > div { color: var(--ink-900); font-size: 14.5px; font-weight: 500; }
.sol-answer strong { color: var(--accent); font-weight: 700; }
.sol-arrow {
  color: var(--ink-300);
  font-size: 20px;
  align-self: center;
  font-weight: 300;
}
@media (max-width: 820px) { .sol-arrow { transform: rotate(90deg); align-self: flex-start; } }

/* ============== FLOW (Overview) ============== */
.section-overview {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-050), transparent 70%),
    var(--bg);
}
.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr) ;
  grid-template-areas: "s1 c1 s2 c2 s3 c3 s4 c4 s5";
  grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr 40px 1fr;
  gap: 0;
  align-items: stretch;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
}
@media (max-width: 980px) {
  .flow {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }
  .flow-connector { display: none; }
}
.flow-step {
  padding: 20px 16px;
  border-radius: 10px;
  transition: background .3s ease, transform .3s ease;
  position: relative;
}
.flow-step.active {
  background: var(--accent-050);
}
.flow-step-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.flow-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink-400);
  padding-top: 4px;
}
.flow-step-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-050);
  border: 1px solid var(--accent-100);
  transition: background .3s ease, color .3s ease;
}
.flow-step.active .flow-step-icon {
  background: var(--accent);
  color: #fff;
}
.flow-step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.flow-step-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-500);
}
.flow-connector {
  align-self: center;
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  margin-top: 30px;
}
.flow-connector-fill {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .6s ease;
}
.flow-connector.active .flow-connector-fill { transform: scaleX(1); }

/* ============== TECHNOLOGY ============== */
.section-technology { background: var(--bg-soft); }
.tech-block {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: center;
  margin-bottom: 100px;
}
.tech-block:last-child { margin-bottom: 0; }
.tech-block-reverse { grid-template-columns: 1.1fr 1fr; }
.tech-block-reverse .tech-meta { order: 2; }
.tech-block-reverse .tech-visual { order: 1; }
@media (max-width: 980px) {
  .tech-block, .tech-block-reverse { grid-template-columns: 1fr; gap: 40px; }
  .tech-block-reverse .tech-meta { order: 1; }
  .tech-block-reverse .tech-visual { order: 2; }
}
.tech-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.tech-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-900);
  margin: 0 0 18px;
}
.tech-desc {
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink-500);
  margin: 0 0 24px;
}
.tech-desc strong { color: var(--ink-900); font-weight: 700; }
.tech-points {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.tech-points li {
  display: flex; gap: 10px;
  font-size: 14px;
  color: var(--ink-700);
  line-height: 1.7;
}
.tech-points li span {
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 8px;
  padding-top: 8px;
}

.tech-visual {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

/* Compare OCR */
.compare { display: grid; gap: 14px; }
.compare-row {
  padding: 18px 20px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  line-height: 1.7;
}
.compare-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 5px 10px;
  border-radius: 3px;
  text-align: center;
}
.compare-bad { background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 20%, transparent); }
.compare-bad .compare-tag { background: var(--warn); color: #fff; }
.compare-bad .compare-body { color: #6b3b1a; }
.mistake { color: var(--warn); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; }
.compare-good { background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 20%, transparent); }
.compare-good .compare-tag { background: var(--ok); color: #fff; }
.compare-good .compare-body { color: #0f4a30; font-weight: 500; }
.correct { color: var(--ok); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; font-weight: 600; }
.compare-arrow {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: .2em;
}

/* Structure demo */
.structure-demo {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 12px;
  align-items: center;
}
@media (max-width: 640px) { .structure-demo { grid-template-columns: 1fr; } }
.struct-input, .struct-output {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.8;
}
.struct-input-label, .struct-output > .struct-field:first-of-type {
  /* label handled separately */
}
.struct-input-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-400);
  letter-spacing: .1em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.struct-input-body { color: var(--ink-700); font-size: 11.5px; line-height: 1.7; }
.struct-arrow { text-align: center; color: var(--accent); font-size: 20px; font-weight: 300; }
@media (max-width: 640px) { .struct-arrow { transform: rotate(90deg); } }
.struct-output { font-family: var(--font-mono); }
.struct-field {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 11.5px;
}
.struct-field:last-child { border-bottom: none; }
.sf-key { color: var(--accent); flex: 0 0 100px; font-weight: 600; }
.sf-val { color: var(--ink-700); font-family: var(--font-jp); }

/* Report */
.report {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.report-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--ink-900);
  color: #fff;
}
.report-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
}
.report-status {
  font-size: 11px;
  color: var(--ink-200);
  font-weight: 500;
}
.report-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.report-row:last-child { border-bottom: none; }
.report-row.warn { background: color-mix(in srgb, var(--warn) 4%, transparent); }
.report-crop {
  aspect-ratio: 1.6 / 1;
  background: repeating-linear-gradient(45deg, #f0eadb, #f0eadb 6px, #e8ddc3 6px, #e8ddc3 12px);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.crop-box {
  font-size: 10px;
  color: #6b4e2a;
  background: rgba(255,255,255,.85);
  padding: 3px 6px;
  border-radius: 2px;
  border: 1px solid var(--accent);
}
.crop-box-warn { border-color: var(--warn); }
.report-info { font-size: 13px; line-height: 1.7; }
.ri-label { font-weight: 700; color: var(--ink-900); margin-bottom: 2px; font-size: 13px; }
.ri-text { color: var(--ink-500); font-size: 12px; margin-bottom: 6px; }
.ri-match { font-size: 11px; font-family: var(--font-mono); font-weight: 600; letter-spacing: .05em; }
.ri-match.ok { color: var(--ok); }
.ri-match.warn { color: var(--warn); }
.ri-ref { font-size: 10px; font-family: var(--font-mono); color: var(--ink-400); margin-top: 4px; }

/* ============== USECASE / BEFORE-AFTER ============== */
.ba-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 860px) { .ba-wrap { grid-template-columns: 1fr; } }
.ba-col {
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  position: relative;
}
.ba-before { background: var(--bg-soft); }
.ba-after {
  background: linear-gradient(155deg, var(--ink-900), var(--ink-800));
  color: #e3e8f2;
  border-color: var(--ink-800);
}
.ba-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.ba-after .ba-head { border-bottom-color: rgba(255,255,255,.12); }
.ba-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  padding: 5px 10px;
  background: var(--ink-100);
  color: var(--ink-500);
  border-radius: 3px;
  font-weight: 600;
}
.ba-tag-after { background: var(--accent); color: #fff; }
.ba-title { font-size: 18px; font-weight: 700; color: var(--ink-900); }
.ba-after .ba-title { color: #fff; }
.ba-flow { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.ba-flow li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: flex-start;
  font-size: 13.5px;
}
.ba-step {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink-100);
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.ba-after .ba-step { background: var(--accent); color: #fff; }
.ba-flow strong { display: block; color: var(--ink-900); font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.ba-after .ba-flow strong { color: #fff; }
.ba-flow small { color: var(--ink-500); font-size: 12px; line-height: 1.6; }
.ba-after .ba-flow small { color: var(--ink-200); }
.ba-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.ba-after .ba-kpi { border-top-color: rgba(255,255,255,.12); }
.kpi {
  padding: 12px;
  text-align: center;
  background: var(--bg-elev);
  border-radius: 6px;
}
.ba-before .kpi { background: var(--bg-elev); }
.ba-after .kpi { background: rgba(255,255,255,.06); }
.kpi-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-500);
  margin-bottom: 2px;
}
.kpi-good .kpi-num { color: var(--accent); }
.ba-after .kpi-good .kpi-num { color: #6d90ff; }
.kpi-label {
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-400);
  font-family: var(--font-mono);
}
.ba-after .kpi-label { color: var(--ink-300); }

/* ============== PROCESS ============== */
.section-process { background: var(--bg-soft); }
.process-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 40px 0 20px;
}
@media (max-width: 980px) { .process-timeline { grid-template-columns: 1fr; } }
.process-timeline::before {
  content: "";
  position: absolute;
  top: 58px;
  left: 5%; right: 5%;
  height: 2px;
  background: var(--line-strong);
  z-index: 0;
}
@media (max-width: 980px) { .process-timeline::before { display: none; } }
.pt-step {
  position: relative;
  z-index: 1;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease;
}
.pt-step:hover { transform: translateY(-2px); border-color: var(--accent); }
.pt-dot {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 16px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg-soft);
  box-shadow: 0 0 0 2px var(--accent);
}
@media (max-width: 980px) { .pt-dot { left: 20px; transform: none; } }
.pt-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--accent);
  font-weight: 600;
  margin: 6px 0 10px;
}
.pt-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 8px;
  line-height: 1.5;
}
.pt-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-500);
}
.process-note {
  margin-top: 40px;
  padding: 24px 28px;
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  border-radius: 0 8px 8px 0;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: center;
}
.pn-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--accent);
  font-weight: 700;
}
.pn-text { color: var(--ink-700); font-size: 14px; line-height: 1.8; }

/* ============== SECURITY ============== */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .sec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-card {
  padding: 28px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease;
}
.sec-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.sec-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-050);
  margin-bottom: 20px;
}
.sec-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 10px;
  line-height: 1.5;
}
.sec-card p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-500);
  margin: 0;
}

/* ============== BENEFITS ============== */
.section-benefits {
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, var(--accent-050), transparent 70%),
    var(--bg);
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .benefits-grid { grid-template-columns: 1fr; } }
.bn {
  padding: 32px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease;
}
.bn:hover { transform: translateY(-2px); }
.bn-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -.02em;
  margin-bottom: 20px;
  display: block;
  line-height: 1;
}
.bn h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 10px;
  line-height: 1.5;
}
.bn p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-500);
  margin: 0;
}

/* ============== CTA ============== */
.section-cta {
  padding: 80px 0 140px;
}
.cta-card {
  background: linear-gradient(155deg, var(--ink-900), #0f2a6e);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 72px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-card::before {
  content: "";
  position: absolute;
  top: -40%; left: -10%;
  width: 60%; height: 180%;
  background: radial-gradient(circle, rgba(26,75,255,.3), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 0%, transparent 80%);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  color: #8ba5ff;
  margin-bottom: 24px;
  font-weight: 600;
}
.cta-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 20px;
  letter-spacing: .01em;
}
.cta-lead {
  font-size: 15px;
  line-height: 2;
  color: #c0cbee;
  max-width: 640px;
  margin: 0 auto 36px;
}
.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.section-cta .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
.section-cta .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.cta-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12.5px;
  color: #9aa8c6;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
}
@media (max-width: 560px) {
  .cta-card { padding: 48px 28px; }
  .cta-foot { grid-template-columns: 1fr; }
}
.cf-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: #6d90ff;
  margin-right: 12px;
  font-weight: 600;
}

/* ============== FOOTER ============== */
.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  padding: 60px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-tag {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-500);
  line-height: 1.7;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.fcol-title {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: .15em;
  color: var(--ink-400);
  margin-bottom: 14px;
  font-weight: 600;
}
.fcol a {
  display: block;
  font-size: 13px;
  color: var(--ink-700);
  padding: 5px 0;
  transition: color .15s ease;
}
.fcol a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-400);
  font-family: var(--font-mono);
}

/* ============== REVEAL ANIMATION ============== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============== TWEAKS PANEL ============== */
.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 260px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  font-size: 13px;
}
.tp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--ink-900);
  color: #fff;
}
.tp-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  font-weight: 600;
}
.tp-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 24px; height: 24px;
}
.tp-body { padding: 16px; display: grid; gap: 16px; }
.tp-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--ink-500);
  margin-bottom: 8px;
  font-weight: 600;
}
.tp-swatches { display: flex; gap: 8px; }
.tp-swatches button {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid var(--line);
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.tp-swatches button.active { border-color: var(--ink-900); transform: scale(1.08); }
.tp-segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.tp-segmented button {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-500);
  transition: background .15s, color .15s;
}
.tp-segmented button.active {
  background: var(--accent);
  color: #fff;
}
