/* =====================================================================
   IssueFolio — marketing site
   Visual lane: "drafting table, not dashboard". Hairline rules, a faint
   measurement grid, monospaced data, real product screens, Paper reserved
   for the literal document. See web/DESIGN.md.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand (committed product colors, OKLCH) */
  --ink:         oklch(0.225 0.035 258);   /* #172033 — text + dark ground      */
  --ink-2:       oklch(0.44 0.030 257);    /* secondary text (≥5:1 on canvas)   */
  --ink-3:       oklch(0.51 0.022 256);    /* tertiary meta (≥5:1 on canvas)    */
  --blue:        oklch(0.53 0.20 262);    /* primary accent (≥5:1 as text too) */
  --blue-strong: oklch(0.515 0.208 262);   /* button fill (≥4.5:1 on white)     */
  --blue-ink:    oklch(0.40 0.16 264);     /* deep blue for hover/text accent   */
  --coral:       oklch(0.628 0.192 38);    /* #F05A47 — "the problem" mark      */
  --paper:       oklch(0.960 0.012 90);    /* #F6F3EA — document surface        */

  /* Neutrals (faint blue tint toward brand hue — never warm cream) */
  --canvas:      oklch(0.987 0.004 250);
  --mist:        oklch(0.965 0.007 250);
  --rule:        oklch(0.900 0.008 255);
  --rule-strong: oklch(0.820 0.012 255);

  /* Type */
  --font-sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans TC", "Microsoft YaHei", "Microsoft JhengHei", "Meiryo", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Menlo", Consolas, "PingFang SC", "PingFang TC", "Noto Sans CJK JP", "Apple SD Gothic Neo", monospace;

  /* Spacing (4px grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px; --s-10: 72px; --s-11: 96px;

  /* Radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;

  /* Z-index scale */
  --z-header: 100; --z-menu: 110; --z-skip: 200;

  --container: 1160px;
  --shadow-phone: 0 30px 60px -20px oklch(0.225 0.04 258 / 0.45), 0 12px 24px -16px oklch(0.225 0.04 258 / 0.35);
  --shadow-card: 0 1px 0 0 var(--rule);
  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quart */
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "ss01" 1;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
strong { font-weight: 700; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-5); }
.section { padding-block: clamp(var(--s-9), 8vw, var(--s-11)); position: relative; }
main section[id], #top { scroll-margin-top: 80px; }
.section-head { max-width: 46rem; margin-bottom: var(--s-8); }
.section-head-light .kicker, .section-head-light .section-title, .section-head-light .section-sub { color: var(--canvas); }
.section-head-light .kicker { color: oklch(0.78 0.10 262); }
.section-title { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 800; margin-top: var(--s-3); }
.section-sub { margin-top: var(--s-4); font-size: 1.075rem; color: var(--ink-2); max-width: 40rem; text-wrap: pretty; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.kicker::before { content: ""; width: 18px; height: 1.5px; background: var(--blue); display: inline-block; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: var(--z-skip);
  background: var(--ink); color: #fff; padding: var(--s-2) var(--s-4); border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 22px; border-radius: var(--r-md);
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue-strong); color: #fff; box-shadow: 0 1px 2px oklch(0.225 0.04 258 / 0.25); }
.btn-primary:hover { background: var(--blue-ink); transform: translateY(-1px); }
.btn-secondary { background: var(--canvas); color: var(--ink); border: 1.5px solid var(--rule-strong); }
.btn-secondary:hover { border-color: var(--ink-2); background: #fff; transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border: 1.5px solid var(--rule-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: var(--mist); }
.btn-ghost-light { color: var(--canvas); border: 1.5px solid oklch(0.55 0.02 260 / 0.6); background: transparent; }
.btn-ghost-light:hover { border-color: var(--canvas); background: oklch(0.3 0.02 260); }
.btn-sm { padding: 10px 16px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn .apple { width: 16px; height: 16px; fill: currentColor; }

/* App Store badge */
.store-badge {
  display: inline-flex; align-items: center; gap: var(--s-3);
  background: var(--ink); color: #fff;
  padding: 10px 18px 10px 14px; border-radius: var(--r-md);
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease);
}
.store-badge:hover { background: #000; transform: translateY(-1px); text-decoration: none; }
.store-badge .apple { width: 24px; height: 24px; fill: #fff; flex: none; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.05; }
.store-badge-text small { font-size: 0.66rem; letter-spacing: 0.02em; opacity: 0.85; }
.store-badge-text strong { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: oklch(0.987 0.004 250 / 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--ink); font-weight: 800; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name { font-size: 1.12rem; }
.nav-links { display: none; align-items: center; gap: var(--s-6); }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 0.97rem; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: var(--s-3); }
.nav-download { display: none; } /* shown on >= 860px; mobile uses the menu's Download */

/* Language switcher */
.lang-switch { position: relative; display: inline-flex; align-items: center; }
.lang-globe { width: 15px; height: 15px; color: var(--ink-2); position: absolute; left: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.lang-select {
  font-family: var(--font-sans); font-size: 0.84rem; font-weight: 600; color: var(--ink);
  background: var(--mist); border: 1.5px solid var(--rule-strong); border-radius: var(--r-sm);
  padding: 0 12px 0 30px; height: 36px; line-height: 1; cursor: pointer;
}
.lang-select:hover { border-color: var(--ink-2); }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border-radius: var(--r-sm); padding: 0 10px;
}
.nav-toggle span { height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-5) var(--s-6); border-bottom: 1px solid var(--rule); background: var(--canvas); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: var(--s-3) 0; color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--rule); }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: var(--s-3); }

/* ---------- Phone frame ---------- */
.phone { background: var(--ink); border-radius: 38px; padding: 7px; box-shadow: var(--shadow-phone); position: relative; }
.phone::after { /* subtle side button */
  content: ""; position: absolute; left: -2px; top: 18%; width: 2px; height: 12%; background: oklch(0.16 0.02 258); border-radius: 2px;
}
.phone-frame { border-radius: 32px; overflow: hidden; background: #fff; line-height: 0; }
.phone-frame img { width: 100%; height: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(var(--s-8), 6vw, var(--s-10)); padding-bottom: clamp(var(--s-9), 7vw, var(--s-11)); border-bottom: 1px solid var(--rule); }
.hero-grid {
  position: absolute; inset: -2px 0 auto 0; height: 100%;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 12%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 78% 12%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1fr; gap: var(--s-9); align-items: center; position: relative; }
.hero-copy { max-width: 38rem; }
.hero-copy h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); font-weight: 900; letter-spacing: -0.035em; margin-top: var(--s-5); }
.lede { margin-top: var(--s-5); font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 34rem; text-wrap: pretty; }
.hero-cta { margin-top: var(--s-7); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.trust-line { margin-top: var(--s-6); font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-3); letter-spacing: 0.01em; }

/* Hero scene */
.hero-scene { position: relative; min-height: 420px; display: flex; justify-content: center; align-items: center; }
.hero-scene .phone-hero { width: min(300px, 70vw); position: relative; z-index: 2; transform: rotate(-1.5deg); }
.measure { position: absolute; left: 0; top: 6%; bottom: 6%; display: flex; flex-direction: column; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.62rem; color: var(--ink-3); }
.measure i { width: 1px; flex: 1; background: var(--rule-strong); margin: 4px 0; }
.measure span { background: var(--canvas); padding: 2px 0; }

.pdf-float {
  position: absolute; right: -2%; top: 4%; z-index: 3;
  width: min(220px, 46vw); background: var(--paper);
  border: 1px solid var(--rule-strong); border-radius: var(--r-md);
  padding: var(--s-4); box-shadow: var(--shadow-phone); transform: rotate(3.5deg);
}
.pdf-head { display: flex; align-items: center; gap: var(--s-3); padding-bottom: var(--s-3); border-bottom: 1px solid var(--rule); margin-bottom: var(--s-3); }
.pdf-logo { width: 26px; height: 26px; border-radius: 6px; background: var(--blue); flex: none; position: relative; }
.pdf-logo::after { content: ""; position: absolute; inset: 6px; border: 2px solid #fff; border-radius: 2px; }
.pdf-meta strong { display: block; font-size: 0.78rem; color: var(--ink); }
.pdf-meta small { font-size: 0.62rem; color: var(--ink-3); font-family: var(--font-mono); }
.pdf-row { display: flex; align-items: center; gap: var(--s-2); padding: 7px 0; border-bottom: 1px dashed var(--rule); }
.pdf-row:last-child { border-bottom: 0; }
.pdf-num { font-family: var(--font-mono); font-size: 0.66rem; color: var(--blue); font-weight: 600; width: 18px; flex: none; }
.pdf-row-body { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.pdf-line { height: 5px; background: var(--rule-strong); border-radius: 3px; }
.pdf-line.w-70 { width: 70%; } .pdf-line.w-55 { width: 55%; } .pdf-line.w-65 { width: 65%; }
.pdf-line.w-40 { width: 40%; } .pdf-line.w-35 { width: 35%; }
.pdf-thumb { width: 34px; height: 26px; flex: none; border-radius: 4px; background: oklch(0.55 0.06 255); position: relative; overflow: hidden; }
.pdf-thumb:nth-child(odd) { background: oklch(0.62 0.08 200); }
.anno-circle { position: absolute; inset: -6px -10px; width: calc(100% + 20px); height: calc(100% + 12px); }
.anno-circle circle { stroke-dasharray: 126; stroke-dashoffset: 126; animation: drawIn 1.1s var(--ease) 0.5s forwards; }

.field-tag { position: absolute; z-index: 4; font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink); background: var(--canvas); border: 1px solid var(--rule-strong); padding: 4px 9px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 6px 16px -10px oklch(0.225 0.04 258 / 0.4); }
.field-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.field-tag-1 { top: 30%; right: -4%; }
.field-tag-2 { bottom: 14%; left: -6%; }
.field-tag-2 i { background: var(--blue); }

@keyframes drawIn { to { stroke-dashoffset: 0; } }

/* ---------- Proof strip ---------- */
.proof-strip { border-bottom: 1px solid var(--rule); background: var(--mist); }
.proof-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4) var(--s-7); padding-block: var(--s-6); }
.proof-item { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-2); font-weight: 500; }
.proof-item svg { width: 22px; height: 22px; fill: var(--blue); flex: none; }

/* ---------- Problem ---------- */
.problem-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-6); margin-top: var(--s-7); align-items: start; }
.problem-col { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s-6); background: var(--canvas); }
.problem-before { background: var(--mist); }
.problem-after { border-color: oklch(0.78 0.10 262); box-shadow: 0 0 0 1px oklch(0.82 0.10 262) inset; }
.col-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.problem-after .col-label { color: var(--blue); }
.col-head { font-size: 1.12rem; font-weight: 600; margin-top: var(--s-2); letter-spacing: -0.01em; }
.problem-col ul { margin-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.problem-col li { position: relative; padding-left: var(--s-5); color: var(--ink-2); font-size: 0.98rem; }
.problem-col li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 1.5px; background: var(--ink-3); }
.problem-after li::before { background: var(--blue); }
.problem-arrow { display: none; color: var(--blue); justify-content: center; }
.problem-arrow svg { width: 56px; height: auto; }

/* ---------- Features ---------- */
.features { background: var(--canvas); }
.feature { display: grid; grid-template-columns: 1fr; gap: var(--s-7); align-items: center; padding-block: var(--s-8); border-top: 1px solid var(--rule); }
.feature:first-of-type { border-top: 0; }
.feature-shot { display: flex; justify-content: center; }
.feature-shot .phone { width: min(290px, 78vw); }
.feature-copy h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: var(--s-3); }
.feature-copy > p { margin-top: var(--s-4); color: var(--ink-2); font-size: 1.05rem; max-width: 34rem; text-wrap: pretty; }
.feature-kicker { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; }
.feature-bullets { margin-top: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.feature-bullets li { position: relative; padding-left: var(--s-6); color: var(--ink); font-size: 0.97rem; }
.feature-bullets li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 16px; height: 16px; border: 1.5px solid var(--blue-strong); border-radius: 4px; }
.feature-bullets li::after { content: ""; position: absolute; left: 5px; top: 0.62em; width: 6px; height: 3px; border-left: 2px solid var(--blue-strong); border-bottom: 2px solid var(--blue-strong); transform: rotate(-45deg); }

/* ---------- How it works ---------- */
.how { background: var(--mist); border-block: 1px solid var(--rule); }
.steps { list-style: none; padding: 0; margin-top: var(--s-7); display: grid; grid-template-columns: 1fr; gap: var(--s-5); }
.step { background: var(--canvas); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s-6); position: relative; }
.step-no { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; color: var(--blue); display: inline-block; padding-bottom: var(--s-2); border-bottom: 2px solid var(--blue); }
.step h3 { font-size: 1.3rem; margin-top: var(--s-4); }
.step p { margin-top: var(--s-3); color: var(--ink-2); }

/* ---------- Use cases ---------- */
.uses-grid { margin-top: var(--s-7); display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.use { background: var(--canvas); padding: var(--s-6); }
.use-label { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.use h3 { font-size: 1.18rem; margin-top: var(--s-2); }
.use p { margin-top: var(--s-2); color: var(--ink-2); font-size: 0.96rem; }

/* ---------- Compare (ink) ---------- */
.compare { background: var(--ink); color: var(--canvas); }
.compare .section-head-light { max-width: 50rem; }
.compare-table { margin-top: var(--s-7); border: 1px solid oklch(0.34 0.02 260); border-radius: var(--r-lg); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; align-items: center; min-width: 620px; }
.compare-row > div { padding: var(--s-4) var(--s-4); border-bottom: 1px solid oklch(0.30 0.02 260); border-right: 1px solid oklch(0.30 0.02 260); font-size: 0.9rem; min-height: 52px; display: flex; align-items: center; }
.compare-row > div:nth-child(4n) { border-right: 0; }
.compare-row > div:first-child { font-weight: 600; color: oklch(0.92 0.01 250); }
.compare-row:last-child > div { border-bottom: 0; }
.compare-head > div { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: oklch(0.72 0.02 255); background: oklch(0.27 0.02 258); }
.compare-head .col-best { color: var(--blue); }
.compare-row [data-dash] { color: oklch(0.5 0.02 257); font-family: var(--font-mono); }
.compare-row [data-check] { color: var(--blue); }
.compare-row [data-check] svg { width: 20px; height: 20px; }
.compare-row .col-best { background: oklch(0.265 0.03 260); color: oklch(0.97 0.01 250); font-weight: 600; }
.compare-row .col-best[data-check] svg { color: oklch(0.82 0.13 262); }
.compare-head .col-best { background: oklch(0.30 0.04 262); }

/* ---------- Pricing ---------- */
.plans { margin-top: var(--s-7); display: grid; grid-template-columns: 1fr; gap: var(--s-5); align-items: start; }
.plan { border: 1px solid var(--rule-strong); border-radius: var(--r-lg); padding: var(--s-7); background: var(--canvas); position: relative; }
.plan-best { border-color: var(--blue-strong); box-shadow: 0 0 0 1px var(--blue-strong); }
.plan-badge { position: absolute; top: -12px; left: var(--s-6); background: var(--blue-strong); color: #fff; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: var(--r-pill); }
.plan-head h3 { font-size: 1.3rem; }
.plan-price { margin-top: var(--s-2); font-family: var(--font-mono); }
.plan-price strong { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.plan-price span { font-size: 0.85rem; color: var(--ink-3); }
.plan-tag { margin-top: var(--s-3); color: var(--ink-2); min-height: 3em; }
.plan ul { margin-top: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.plan li { position: relative; padding-left: var(--s-6); color: var(--ink); font-size: 0.97rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px; border-left: 2px solid var(--blue-strong); border-bottom: 2px solid var(--blue-strong); transform: rotate(-45deg); }
.plan .btn { margin-top: var(--s-6); }
.pricing-note { margin-top: var(--s-5); font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); }

/* ---------- Sample ---------- */
.sample { background: var(--paper); border-block: 1px solid var(--rule); }
.sample-head { text-align: center; margin-inline: auto; }
.sample-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-7);
  margin-top: var(--s-9); margin-inline: auto; max-width: 52rem;
}
.sample-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--canvas); border: 1px solid var(--rule); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.sample-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-phone); border-color: var(--rule-strong); }
.sample-thumb { width: 100%; aspect-ratio: 1 / 1.414; object-fit: cover; background: var(--paper); display: block; }
.sample-card-body { padding: var(--s-4) var(--s-5) var(--s-5); flex: 1; }
.sample-card-body h3 { font-size: 1.05rem; font-weight: 700; }
.sample-card-body p { margin-top: var(--s-2); font-size: 0.9rem; color: var(--ink-2); min-height: 2.6em; }
.sample-open { display: inline-block; margin-top: var(--s-4); font-family: var(--font-mono); font-size: 0.8rem; color: var(--blue-ink); }
.sample-card:hover .sample-open { color: var(--blue); }
@media (max-width: 640px) { .sample-gallery { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-inner { display: grid; grid-template-columns: 1fr; gap: var(--s-7); }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item:first-child { border-top: 1px solid var(--rule); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: var(--s-5) 0; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.3rem; color: var(--blue); transition: transform 0.2s var(--ease); flex: none; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--blue-ink); }
.faq-a { overflow: hidden; }
.faq-a p { padding: 0 0 var(--s-5); color: var(--ink-2); max-width: 46rem; }

/* ---------- Final CTA ---------- */
.final-cta { position: relative; background: var(--ink); color: var(--canvas); overflow: hidden; padding-block: clamp(var(--s-9), 7vw, var(--s-11)); }
.final-grid {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(oklch(0.30 0.02 260) 1px, transparent 1px), linear-gradient(90deg, oklch(0.30 0.02 260) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(90% 80% at 50% 40%, #000, transparent 75%);
  pointer-events: none;
}
.final-inner { position: relative; text-align: center; max-width: 48rem; }
.final-inner h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 800; }
.final-inner > p { margin-top: var(--s-4); color: oklch(0.80 0.01 250); font-size: 1.08rem; }
.final-actions { margin-top: var(--s-7); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); }
.final-cta .trust-line { color: oklch(0.65 0.01 250); margin-top: var(--s-5); }

/* ---------- Footer ---------- */
.site-footer { background: var(--mist); border-top: 1px solid var(--rule); padding-block: var(--s-9) var(--s-5); }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: var(--s-8); }
.footer-tag { margin-top: var(--s-3); color: var(--ink-3); font-size: 0.95rem; max-width: 22rem; }
.footer-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-7); }
.footer-nav h4 { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 500; margin-bottom: var(--s-3); }
.footer-nav div { display: flex; flex-direction: column; gap: var(--s-2); }
.footer-nav a { color: var(--ink-2); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--ink); }
.footer-base { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--rule); }
.footer-base p { color: var(--ink-3); font-size: 0.82rem; max-width: 60rem; }

/* ---------- Reveal animation ----------
   Default (JS off / app.js fails): fully visible. html.reveal is added by an inline head
   script, so the hidden state only applies when JS is present to un-hide it. A CSS failsafe
   forces visible after 3s regardless — content is never stranded blank. */
html.reveal [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
html.reveal [data-reveal].is-visible { opacity: 1; transform: none; }
html.reveal [data-reveal].is-visible:nth-child(2) { transition-delay: 0.05s; }
html.reveal [data-reveal].is-visible:nth-child(3) { transition-delay: 0.10s; }
@keyframes revealShow { to { opacity: 1; transform: none; } }
html.reveal [data-reveal] { animation: revealShow 0.01s ease 3s forwards; }

/* ---------- Responsive ---------- */
@media (min-width: 620px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .uses-grid { grid-template-columns: 1fr 1fr; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-download { display: inline-flex; }
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-9); }
  .feature { grid-template-columns: 1fr 1fr; gap: var(--s-9); }
  .feature-rev .feature-shot { order: 2; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .faq-inner { grid-template-columns: 0.8fr 1.2fr; gap: var(--s-9); }
  .sample-gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1.4fr; }
  .problem-arrow { display: flex; }
  .problem-grid { grid-template-columns: 1fr auto 1fr; }
}

@media (min-width: 1000px) {
  .uses-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Hero: simplify on small screens ---------- */
@media (max-width: 619px) {
  .hero-scene { min-height: 360px; }
  .hero-scene .phone-hero { width: min(220px, 60vw); }
  .measure { display: none; }
  .field-tag { display: none; }
  .pdf-float { width: min(150px, 42vw); top: -2%; right: 0; padding: var(--s-3); }
  .pdf-float .pdf-head { padding-bottom: var(--s-2); margin-bottom: var(--s-2); }
  .pdf-meta strong { font-size: 0.7rem; }
  .pdf-row { padding: 5px 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html.reveal [data-reveal] { opacity: 1 !important; transform: none !important; animation: none !important; }
  .anno-circle circle { stroke-dashoffset: 0 !important; animation: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .mobile-menu, .final-grid, .hero-grid { display: none !important; }
  body { background: #fff; }
}
