@font-face {
  font-family: "Plex Sans";
  src: url("/fonts/plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono"; /* taste-skill-ignore: the only monospace is real code */
  src: url("/fonts/plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #f6f7f7;
  --paper: #ffffff;
  --tone: #e9ecec;
  --salmon: #d9d3c6;
  --ink: #131416;
  --muted: #5b6165;
  --accent: #8a6414;
  --accent-press: #6f500f;
  --paper-dim: #c8cdcd;

  --t0: clamp(38px, 9.2vw, 150px);
  --t1: clamp(30px, 4.2vw, 64px);
  --t2: clamp(24px, 2.4vw, 36px);
  --body: 18px;
  --small: 14px;

  --edge: clamp(20px, 4.4vw, 56px);
  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
  font-family: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; }
h1, h2, h3, p, ul, figure, pre { margin: 0; }
ul { padding: 0; list-style: none; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: var(--radius);
  font-size: var(--small); z-index: 10;
}
.skip:focus { left: var(--edge); top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- navigation ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 24px var(--edge);
}
.wordmark { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: baseline; gap: clamp(14px, 2.2vw, 34px); }
.nav-links a { color: var(--ink); text-decoration: none; font-size: var(--small); }
.nav-links a:hover { color: var(--accent); }
.nav-enter { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 9vh, 96px) var(--edge) clamp(64px, 9vh, 112px); }
.hero-line {
  font-size: var(--t0);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
  max-width: 100%;
}
.code-chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 0.92em; min-width: 2.35em;
  padding: 0 0.14em;
  margin: 0 0.02em;
  vertical-align: -0.1em;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
  font-size: 0.34em;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-top: clamp(36px, 7vh, 88px);
}
.hero-say { font-size: var(--body); line-height: 1.55; max-width: 54ch; }
.hero-say strong { font-weight: 500; }
.hero-act { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 28px;
  background: var(--accent); color: var(--paper);
  font-size: var(--body); font-weight: 500;
  text-decoration: none; border: 0; border-radius: var(--radius);
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--accent-press); }
.btn:active { transform: translateY(1px); }
.quiet-link {
  color: var(--ink); font-size: var(--body);
  text-decoration: underline; text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.quiet-link:hover { color: var(--accent); }

/* ---------- how it works ---------- */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.how-text {
  display: flex; flex-direction: column;
  gap: clamp(28px, 6vh, 64px);
  padding: clamp(40px, 7vh, 80px) var(--edge);
}
.how-text h2 { font-size: var(--t2); font-weight: 600; letter-spacing: -0.02em; }
.how-stage { margin-top: auto; }
.clause {
  font-size: var(--t1); line-height: 0.98; letter-spacing: -0.035em;
  font-weight: 600; max-width: 15ch;
  transition: opacity .2s var(--ease);
}
.how-note { font-size: var(--body); line-height: 1.55; color: var(--muted); max-width: 34ch; margin-top: 20px; }

.how-shot {
  min-width: 0;
  background: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(20px, 3.4vh, 32px);
  padding: clamp(32px, 6vh, 64px) var(--edge);
}
.shots { display: grid; align-items: center; }
.shot {
  grid-area: 1 / 1; width: 100%; height: auto; display: block;
  opacity: 0; transition: opacity .2s var(--ease);
}
.shots[data-cur="0"] .shot[data-stage="0"],
.shots[data-cur="1"] .shot[data-stage="1"],
.shots[data-cur="2"] .shot[data-stage="2"],
.shots[data-cur="3"] .shot[data-stage="3"] { opacity: 1; }

.range { position: relative; height: 40px; }
.range-track {
  position: absolute; left: 0; right: 0; top: 16px; height: 8px;
  background: var(--tone); border-radius: 4px; overflow: hidden;
}
.range-fill { height: 8px; width: 0; background: var(--ink); border-radius: 4px; transition: width .18s var(--ease); }
.range input {
  position: absolute; inset: 0; width: 100%; height: 40px; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
.range input::-webkit-slider-runnable-track { height: 40px; background: transparent; }
.range input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; margin-top: 4px;
  background: var(--accent); border: 0; border-radius: 6px;
}
.range input::-moz-range-track { height: 40px; background: transparent; }
.range input::-moz-range-thumb {
  width: 32px; height: 32px; background: var(--accent); border: 0; border-radius: 6px;
}

.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stages button {
  width: 100%; text-align: left; padding: 6px 0 10px;
  background: none; border: 0; cursor: pointer;
  font-family: inherit; /* taste-skill-ignore */ font-size: var(--small); color: var(--muted);
  transition: color .16s var(--ease);
}
.stages button:hover { color: var(--ink); }
.stages button[aria-selected="true"] { color: var(--ink); font-weight: 600; }

/* ---------- feature fields ---------- */
.fields { display: grid; }
.fields > div {
  min-height: 72svh;
  display: grid; grid-template-rows: auto 1fr;
  gap: clamp(32px, 8vh, 88px);
  padding: clamp(40px, 7vh, 76px) var(--edge);
}
.field-say { font-size: var(--body); line-height: 1.58; max-width: 34ch; justify-self: end; align-self: start; }
.field-line {
  align-self: end;
  font-size: var(--t0); line-height: 0.92; letter-spacing: -0.045em;
  font-weight: 600; max-width: 13ch;
}
.field-a { background: var(--paper); }
.field-b { background: var(--tone); }
.field-b .field-say { justify-self: start; }
.field-b .field-line { justify-self: end; text-align: right; }
.field-c { background: var(--ink); color: var(--paper); }
.field-c .field-say { color: var(--paper-dim); }

/* ---------- api ---------- */
.api-say { min-width: 0; }
.api {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 88px);
  padding: clamp(72px, 11vh, 128px) var(--edge);
}
.api h2 { font-size: var(--t2); font-weight: 600; letter-spacing: -0.02em; }
.api-lead { margin-top: 20px; font-size: var(--body); line-height: 1.55; max-width: 42ch; }
.api-list { margin-top: 28px; display: grid; gap: 14px; font-size: var(--body); max-width: 40ch; }
.api-list li { padding-left: 22px; position: relative; }
.api-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; background: var(--accent); border-radius: 2px;
}
.api-list code { font-family: "Plex Mono", ui-monospace, monospace; /* taste-skill-ignore */ font-size: var(--small); }
.api-code { min-width: 0; }
.api-code pre {
  background: var(--ink); color: #f6f7f7;
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: "Plex Mono", ui-monospace, monospace; /* taste-skill-ignore */
  font-size: 13px; line-height: 1.85;
  tab-size: 2;
}
.api-code code { font-family: inherit; /* taste-skill-ignore */ }

.api-band {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 44px);
  align-items: end;
  padding: 0 var(--edge) clamp(64px, 9vh, 112px);
}
.api-band figure { margin: 0; min-width: 0; }
.api-band img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; display: block; border-radius: var(--radius); }
.api-band figcaption { margin-top: 14px; font-size: var(--small); color: var(--muted); max-width: 40ch; }

/* ---------- faq ---------- */
.faq { padding: clamp(64px, 10vh, 116px) var(--edge); }
.faq-head { font-size: var(--t2); font-weight: 500; color: var(--muted); margin-bottom: clamp(20px, 3vh, 32px); }
.faq-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 88px);
  padding: clamp(24px, 4vh, 40px) 0;
  align-items: baseline;
}
.faq-row h3 { font-size: var(--t2); line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; max-width: 22ch; }
.faq-row p { font-size: var(--body); line-height: 1.55; max-width: 42ch; }

/* ---------- close ---------- */
.close {
  padding: clamp(72px, 12vh, 140px) var(--edge);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  background: var(--paper);
}
.close h2 { font-size: var(--t1); line-height: 1; letter-spacing: -0.035em; font-weight: 600; max-width: 18ch; }
.close-side { display: grid; gap: 24px; justify-items: start; }
.close p { font-size: var(--body); line-height: 1.55; max-width: 42ch; }

/* ---------- footer ---------- */
.foot {
  background: var(--ink); color: var(--paper);
  padding: clamp(36px, 5vh, 56px) var(--edge) clamp(28px, 4vh, 40px);
  min-height: 62svh;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: clamp(40px, 8vh, 96px);
}
.foot-top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.foot-top p { font-size: var(--small); color: var(--paper-dim); max-width: 46ch; }
.foot-top .quiet-link { color: var(--paper); font-size: var(--small); }
.foot-domain {
  color: var(--paper); text-decoration: none;
  font-size: clamp(40px, 9vw, 132px); line-height: 0.92;
  letter-spacing: -0.045em; font-weight: 600;
  align-self: flex-start;
  transition: color .18s var(--ease);
}
.foot-domain:hover { color: var(--accent); }
.foot-meta { display: flex; justify-content: space-between; gap: 20px; font-size: var(--small); color: var(--paper-dim); }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .hero-line[data-reveal] { transform: none; }
.js .hero-line[data-reveal] .code-chip {
  clip-path: inset(0 100% 0 0);
  transition: clip-path .9s var(--ease) .15s;
}
.js .hero-line[data-reveal].in .code-chip { clip-path: inset(0 0 0 0); }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .wordmark { font-size: var(--small); }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-enter):nth-child(2),
  .nav-links a:not(.nav-enter):nth-child(3) { display: none; }

  .hero-foot { grid-template-columns: 1fr; align-items: start; }
  .hero-act { margin-top: 4px; }

  .how { grid-template-columns: 1fr; }
  .how-shot { order: -1; }
  .how-text { min-height: 0; }
  .how-stage { margin-top: 0; }
  .clause { max-width: 18ch; }


  .api { grid-template-columns: 1fr; }
  .api-band { grid-template-columns: 1fr; }
  .faq-row { grid-template-columns: 1fr; gap: 12px; }
  .faq-row h3 { max-width: none; }
  .foot-meta { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .fields > div { min-height: 64svh; gap: 24px; }
  .field-say, .field-b .field-say { justify-self: start; max-width: 32ch; }
  .field-b .field-line { justify-self: start; text-align: left; }
  .close { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero-line[data-reveal] .code-chip { clip-path: none; }
}