:root {
  --paper: #f3eee3;
  --paper-deep: #e8dfcf;
  --ink: #1d1b17;
  --ink-soft: #5e594f;
  --line: #bcb2a2;
  --accent: #1f66d1;
  --accent-dark: #154e9d;
  --white: #fffdf8;
  --display: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --body: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Liberation Mono", monospace;
  --shell: min(1240px, calc(100% - 48px));
  --space-section: clamp(88px, 11vw, 168px);
  --focus: 3px solid #1769aa;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  scrollbar-color: var(--line) var(--paper);
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}

::selection { background: #b9d7ff; color: var(--ink); }

img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
p, h1, h2, h3, figure { margin: 0; }
.shell { width: var(--shell); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 10;
  inset: 12px auto auto 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: var(--focus); outline-offset: 4px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand img { border-radius: 9px; }

nav { display: flex; gap: clamp(20px, 4vw, 52px); }
nav a {
  display: grid;
  place-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: none;
}
nav a:hover { text-decoration: underline; }

.hero { padding-block: clamp(72px, 10vw, 144px) var(--space-section); }
.section-number {
  display: flex;
  gap: 20px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; }
h1 {
  max-width: 1100px;
  font-size: clamp(55px, 8.2vw, 116px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
h1 em { color: var(--accent); font-weight: 400; }
h2 { font-size: clamp(42px, 5.4vw, 76px); line-height: 0.98; letter-spacing: -0.04em; }
h3 { font-size: clamp(31px, 3vw, 44px); line-height: 1; letter-spacing: -0.03em; }

.hero-lower {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(440px, 1.25fr);
  gap: clamp(56px, 10vw, 150px);
  align-items: end;
  margin-top: clamp(56px, 8vw, 116px);
}
.hero-copy {
  max-width: 520px;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.capture-motif { position: relative; min-height: 112px; padding-top: 12px; overflow: hidden; }
.selection-text {
  position: relative;
  z-index: 1;
  padding: 4px 7px;
  font-family: var(--display);
  font-size: clamp(23px, 2.8vw, 35px);
  white-space: nowrap;
}
.selection-text::before {
  position: absolute;
  z-index: -1;
  inset: 2px 100% 2px 0;
  background: #b9d7ff;
  content: "";
  animation: select-text 5.5s ease-in-out infinite;
}
.trace {
  position: absolute;
  left: 54%;
  top: 61px;
  width: 1px;
  height: 27px;
  background: var(--accent);
}
.trace::after {
  position: absolute;
  top: 27px;
  left: 0;
  width: 110px;
  height: 1px;
  background: var(--accent);
  content: "";
}
.source-label {
  position: absolute;
  left: calc(54% + 118px);
  top: 72px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: reveal-source 5.5s ease-in-out infinite;
}
.source-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.app-stage { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.stage-heading {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr 0.75fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  margin-bottom: 64px;
}
.stage-heading > p:last-child { color: var(--ink-soft); }
.app-frame {
  padding: clamp(8px, 1.4vw, 18px);
  border: 1px solid var(--line);
  background: var(--paper-deep);
  box-shadow: 0 28px 70px rgb(49 37 21 / 14%);
}
.app-frame img {
  width: 100%;
  height: auto;
  border: 1px solid rgb(29 27 23 / 20%);
}
figcaption { margin-top: 12px; color: var(--ink-soft); font-size: 12px; letter-spacing: 0.04em; }

.flow { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.section-intro {
  display: grid;
  grid-template-columns: 0.5fr 2.25fr;
  gap: 32px;
  margin-bottom: 72px;
}
.flow-list { margin: 0; padding: 0; border-top: 1px solid var(--ink); list-style: none; }
.flow-list li {
  display: grid;
  grid-template-columns: 0.3fr 1.25fr 0.7fr;
  gap: 28px;
  align-items: start;
  padding-block: 34px;
  border-bottom: 1px solid var(--line);
}
.step-number { color: var(--accent-dark); font-family: var(--mono); font-size: 13px; }
.flow-list p { max-width: 590px; margin-top: 10px; color: var(--ink-soft); }
.step-note { justify-self: end; color: var(--ink-soft); font-size: 13px; }

.details { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); }
.detail {
  min-height: 560px;
  padding: 56px clamp(28px, 5vw, 72px) 60px 0;
  border-bottom: 1px solid var(--line);
}
.detail:nth-child(even) {
  padding-inline: clamp(28px, 5vw, 72px) 0;
  border-left: 1px solid var(--line);
}
.detail-compose {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.5fr 1fr 0.8fr;
  gap: 44px;
  min-height: 390px;
  padding-right: 0;
}
.detail h2 { margin-top: 36px; }
.detail > p:not(.section-number) { max-width: 610px; margin-top: 28px; color: var(--ink-soft); }
.detail-compose h2, .detail-compose > p:not(.section-number) { margin-top: 0; }

.provenance-example {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-top: 58px;
  font-family: var(--display);
  font-size: 23px;
}
.provenance-example mark { padding: 3px 7px; background: #b9d7ff; color: var(--ink); }
.provenance-example span {
  margin-left: 34%;
  padding: 7px 10px;
  border-left: 2px solid var(--accent);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 650;
}

pre {
  margin: 52px 0 0;
  padding: 26px;
  overflow: auto;
  border-left: 3px solid var(--accent);
  background: var(--ink);
  color: var(--white);
  font: 13px/1.8 var(--mono);
}
.budget { align-self: end; padding: 24px; border: 1px solid var(--line); }
.budget > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.budget strong { font-family: var(--mono); }
.budget-track { display: block; height: 6px; margin-top: 16px; background: var(--paper-deep); }
.budget-track span { display: block; width: 52%; height: 100%; background: var(--accent); }

.privacy {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr 0.5fr;
  gap: 36px;
  align-items: start;
  padding-block: var(--space-section);
  border-bottom: 1px solid var(--ink);
}
.privacy p:not(.section-number) {
  max-width: 680px;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 19px;
}
.local-stamp {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-dark);
  font: 650 16px/1.15 var(--mono);
  text-align: center;
  transform: rotate(8deg);
}

.pricing {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(54px, 9vw, 140px);
  padding-block: var(--space-section);
}
.price-copy h2 { margin-top: 36px; }
.price-copy > p:last-child { max-width: 580px; margin-top: 28px; color: var(--ink-soft); }
.purchase-panel { align-self: start; padding-top: 4px; }
.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.price > span:first-child { align-self: flex-start; margin-top: 15px; font: 30px var(--display); }
.price strong { font: 400 clamp(76px, 9vw, 120px)/0.8 var(--display); letter-spacing: -0.04em; }
.price > span:last-child {
  margin-left: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-transform: uppercase;
}
.buy-control {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 54px;
  margin-top: 28px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  font: 650 14px var(--body);
  letter-spacing: 0.04em;
  text-decoration: none;
}
a.buy-control:hover { background: var(--accent); border-color: var(--accent); }
.buy-control:disabled {
  border-color: #82796b;
  background: transparent;
  color: #6d6559;
  cursor: not-allowed;
  opacity: 1;
}
.sales-status {
  min-height: 48px;
  margin-top: 15px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}
.purchase-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--ink-soft);
  font-size: 12px;
}
.purchase-panel li::before { content: "✓"; margin-right: 7px; color: var(--accent-dark); }

.site-footer {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 24px;
  min-height: 140px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}
.site-footer p:nth-child(2) { text-align: center; }
.site-footer p:last-child { text-align: right; }

@keyframes select-text {
  0%, 12% { inset-inline-end: 100%; }
  28%, 72% { inset-inline-end: 0; }
  88%, 100% { inset-inline-end: 100%; }
}
@keyframes reveal-source {
  0%, 27%, 88%, 100% { opacity: 0; transform: translateX(-8px); }
  42%, 74% { opacity: 1; transform: translateX(0); }
}
