:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --ink: #2B2620;
  --muted: #8A8074;
  --line: #E7E0D6;
  --accent: #E2673C;
  --accent-soft: #FBE6DC;
  --done: #2F9E6A;
  --done-soft: #DDF1E6;
  --hl: #FFE14D;
  --page: #EFE9DF;
  --count: #3B82C4;
  --count-deep: #1D4F80;
  --cell-bg: #FFFFFF;
  --cell-a: #F3C6B0;
  --cell-b: #D9785A;
  --cell-c: #9FB8C9;
  --grid: #C9C0B4;
  --radius: 22px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
}
a { color: inherit; }
img { display: block; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(251, 248, 243, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.lang { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.nav-cta { text-decoration: none; background: var(--ink); color: #fff; border-radius: 99px; padding: 8px 16px; font-size: 14px; font-weight: 700; }

/* hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 56px 16px 72px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.hero h1 { margin: 0; font-size: clamp(38px, 5.6vw, 64px); line-height: 1.15; letter-spacing: -0.04em; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 58%, var(--hl) 58%); padding: 0 2px; }
.lead { margin: 20px 0 28px; font-size: 19px; color: #5b5349; max-width: 520px; }
.fine { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 176px; padding: 10px 18px 10px 14px;
  background: #111; color: #fff; border-radius: 14px; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: 11px; opacity: .85; letter-spacing: .02em; }
.store b { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }

/* phone mock */
.hero-demo { display: flex; justify-content: center; }
.phone {
  width: 320px; height: 640px; border-radius: 46px; padding: 14px;
  background: #1b1916; box-shadow: 0 40px 80px -20px rgba(60, 40, 20, .35), inset 0 0 0 2px #3a3530;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.phone > * { background: var(--bg); }
.ph-top { border-radius: 34px 34px 0 0; padding: 34px 18px 8px; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.ph-back { font-size: 24px; line-height: 1; color: var(--ink); }
.ph-prog { display: flex; align-items: center; gap: 8px; padding: 2px 18px 0; font-size: 11px; }
.ph-page { font-weight: 700; }
.ph-prog b { color: var(--done); font-size: 12px; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.ph-nums { padding: 2px 18px 8px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line); }
.bar { flex: 1; height: 6px; border-radius: 99px; background: var(--page); overflow: hidden; display: block; }
.bar i { display: block; height: 100%; width: 0; background: var(--done); border-radius: 99px; transition: width .35s ease; }
.ph-chart { flex: 1; position: relative; background: var(--page) !important; display: flex; align-items: center; justify-content: center; padding: 14px; }
.ph-chart svg { width: 100%; height: 100%; }
.chip {
  position: absolute; left: 50%; top: 18px; transform: translate(-50%, -6px);
  background: var(--ink); color: #fff; border-radius: 99px; padding: 6px 12px; font-size: 12px; font-weight: 700;
  opacity: 0; transition: opacity .3s, transform .3s; white-space: nowrap;
}
.chip.on { opacity: 1; transform: translate(-50%, 0); }
.ph-bottom { border-radius: 0 0 34px 34px; padding: 10px 14px 22px; display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); background: var(--surface) !important; }
.ph-tool { width: 38px; text-align: center; color: var(--ink); font-size: 18px; }
.ph-next { flex: 1; background: var(--accent); color: #fff; border-radius: 14px; padding: 11px 12px; font-size: 14px; text-align: center; transition: transform .1s; }
.ph-next.press { transform: scale(.96); }
.ph-next b { font-weight: 800; }

/* features */
.feature {
  max-width: var(--max); margin: 0 auto; padding: 72px 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.feature.flip .feature-text { order: 2; }
.num { margin: 0 0 6px; color: var(--accent); font-weight: 800; font-size: 15px; letter-spacing: .04em; }
.feature h2 { margin: 0 0 14px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.25; letter-spacing: -0.035em; font-weight: 800; }
.feature-text > p { color: #5b5349; margin: 0 0 18px; }
.note { font-size: 14px; color: var(--muted) !important; }
.steps { list-style: none; padding: 0; margin: 22px 0; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps b { font-size: 16px; }
.steps span { font-size: 14px; color: var(--muted); }
.bullets { padding: 0; margin: 0; list-style: none; display: grid; gap: 8px; }
.bullets li { padding-left: 26px; position: relative; color: #4a433b; }
.bullets li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 12px; height: 7px; border-left: 2.5px solid var(--done); border-bottom: 2.5px solid var(--done); transform: rotate(-45deg); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 50px -30px rgba(60,40,20,.25); }
.feature-demo svg { display: block; width: 100%; height: auto; }

/* recognition demo */
.scan-page { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 14px; overflow: hidden; }
.scan-lines { display: grid; gap: 6px; margin-bottom: 14px; }
.scan-lines i { display: block; height: 7px; border-radius: 4px; background: var(--page); }
.scan-lines i:nth-child(1) { width: 46%; height: 10px; background: #e2dbd0; }
.scan-lines i:nth-child(2) { width: 82%; }
.scan-lines i:nth-child(3) { width: 64%; }
.scan-beam { position: absolute; left: 0; right: 0; top: 0; height: 60px; background: linear-gradient(to bottom, rgba(226,103,60,0), rgba(226,103,60,.22) 85%, rgba(226,103,60,.9) 100%); opacity: 0; pointer-events: none; }
.rec-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.rec-result span { background: var(--bg); border-radius: 14px; padding: 10px 12px; display: flex; align-items: baseline; gap: 4px; }
.rec-result b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rec-result small { color: var(--muted); font-weight: 600; }

/* try demo */
.try-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.try-label { font-weight: 800; font-size: 15px; }
.try-prog { flex: 1; display: flex; align-items: center; gap: 10px; }
.try-prog .bar { height: 8px; }
.try-prog b { color: var(--done); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.tappable { cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.try-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.try-foot span { flex: 1; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.try-next { border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 800; font-size: 15px; border-radius: 12px; padding: 10px 16px; cursor: pointer; }
.try-next:disabled { background: var(--line); color: var(--muted); cursor: default; }
.try-hint { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ink */
.ink-card { background: #fffdf9; }

/* extras */
.extras { max-width: var(--max); margin: 0 auto; padding: 32px 16px 72px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.extra { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.extra b { font-size: 17px; }
.extra span { font-size: 14px; color: var(--muted); }

/* download */
.download { text-align: center; padding: 80px 16px 96px; background: linear-gradient(180deg, var(--bg), #F6EEE3); }
.download img { margin: 0 auto 20px; border-radius: 22px; box-shadow: 0 16px 40px -16px rgba(60,40,20,.35); }
.download h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.035em; }
.download p { margin: 8px 0 26px; color: var(--muted); }
.download .stores { justify-content: center; }

.foot { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; padding: 28px 16px 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero, .feature { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-top: 32px; text-align: left; }
  .feature { padding: 48px 16px; }
  .feature.flip .feature-text { order: 0; }
  .extras { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  body { font-size: 16px; }
  .phone { width: 290px; height: 580px; }
  .store { min-width: 0; flex: 1; }
  .extras { grid-template-columns: 1fr; }
  .rec-result b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
