/* Specfold landing page. Same tokens as the builder app (Brand/DESIGN.md §2.4, app/app/globals.css):
   warm charcoal, chalk-line red for brand marks only, green for actions, white cards on a warm canvas,
   Barlow Condensed headings over Inter. */
:root {
  --ink: #2b2724;
  --text: #3a3632;
  --text-2: #5e5852;
  --line: #ddd8d0;
  --card: #ffffff;
  --canvas: #eeece7;
  --canvas-2: #f9f8f6;
  --btn-2: #dcdad5;

  --rail: #2b2724;
  --rail-2: #3a3632;
  --on-dark: #ffffff;
  --on-dark-2: #d9d4cc;

  --accent: #b3361f;
  --accent-on-dark: #ee8468;
  --go: #388523;
  --go-hover: #276515;
  --focus: #8a827a;

  --warning: #cdb52d; --warning-bg: #f5f0d1; --warning-fg: #645916;
  --info-bg: #e2f1fd; --info-fg: #225c8c;
  --success-bg: #e7f0e5; --success-fg: #1a430f;
  --source: #49646f; --source-bg: #eef1f2;
  --order: #225c8c; --order-bg: #e2f1fd;
  --packet: #388523; --packet-bg: #e7f0e5;
  --selection: #6b4fcb; --selection-bg: #efeafb;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Inter", sans-serif;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-low: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 2px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  font-feature-settings: "lnum", "tnum";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
a { color: inherit; }
mark { background: var(--warning-bg); color: var(--warning-fg); border-radius: 3px; padding: 0 3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* Type */
.display, .heading-lg, .heading, h3 { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.display { font-size: clamp(56px, 9.5vw, 128px); line-height: 0.92; letter-spacing: 0.002em; }
.heading-lg { font-size: clamp(40px, 5.6vw, 68px); line-height: 0.98; }
.heading { font-size: clamp(32px, 4vw, 52px); line-height: 1.02; }
h3 { font-size: 25px; line-height: 1.1; }
.body-lg { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; color: var(--text-2); }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius); border: 2px solid transparent;
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .1s, border-color .1s, color .1s;
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-primary { background: var(--go); color: #fff; }
.btn-primary:hover { background: var(--go-hover); }
.btn-ghost { background: var(--btn-2); color: var(--ink); }
.btn-ghost:hover { background: #cfccc6; }
.on-dark .btn-ghost { background: transparent; border-color: var(--on-dark-2); color: var(--on-dark); }
.on-dark .btn-ghost:hover { background: var(--rail-2); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.on-dark :focus-visible { outline-color: var(--on-dark-2); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: var(--rail); color: var(--on-dark); border-bottom: 1px solid transparent; }
.nav.scrolled { border-bottom-color: rgba(255, 255, 255, 0.1); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.wordmark {
  display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1;
  font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 0.02em; text-transform: uppercase;
}
.wordmark::after { content: ""; width: 38px; height: 3px; margin-top: 4px; border-radius: 2px; background: var(--accent); }
.nav nav { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
.nav nav a { text-decoration: none; color: var(--on-dark-2); }
.nav nav a:hover { color: var(--on-dark); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.sign-in { font-size: 15px; font-weight: 600; color: var(--on-dark); text-decoration: none; }
.sign-in:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Hero (dark, like the app's rail) */
.hero { background: var(--rail); color: var(--on-dark-2); padding: clamp(48px, 8vw, 96px) 0 var(--section); }
.hero .display { color: var(--on-dark); }
.hero .eyebrow { color: var(--accent-on-dark); }
.hero-sub {
  display: grid; grid-template-columns: minmax(0, 640px) auto; gap: 40px;
  align-items: end; justify-content: space-between; margin-top: 32px;
}
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; color: var(--on-dark-2); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  margin-top: clamp(48px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1.1fr);
  align-items: center; gap: 20px;
  padding: clamp(16px, 3vw, 36px);
  background: var(--canvas); border-radius: var(--radius-lg);
}
.sources { display: grid; gap: 12px; }
.src-card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-low); color: var(--text); }
.src-card:nth-child(2) { margin-left: 24px; }
.src-card:nth-child(3) { margin-left: 8px; }
.src-head { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.src-head .pg { margin-left: auto; }
.src-text { font-size: 14px; line-height: 1.5; }
.file-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 6px;
  border-radius: var(--radius-sm); background: var(--source-bg); color: var(--source); flex: none;
}
.arrow { color: var(--text-2); display: flex; justify-content: center; }

.schedule { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px 20px; color: var(--text); }
.sched-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; color: var(--ink); padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.sched-head .rev { font-weight: 600; color: var(--accent); }
.sched-room { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); padding: 14px 0 4px; }
.sched-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sched-row:last-child { border-bottom: 0; }
.item { font-size: 16px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.order { font-size: 12px; color: var(--text-2); text-align: right; flex: none; line-height: 1.35; }
.order strong { font-weight: 700; color: var(--ink); font-size: 16px; }
.order.open { align-self: center; padding: 3px 10px; border-radius: var(--radius-sm); background: var(--warning-bg); color: var(--warning-fg); font-weight: 700; }
.chg { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info-fg); }
.cite {
  display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--source);
  margin: -4px 0 0; padding: 8px 10px; background: var(--source-bg); border-radius: var(--radius-sm);
}
.cite .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--source); flex: none; transform: translateY(-1px); }
.kind {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--radius-sm); background: var(--canvas); color: var(--text-2);
}
.kind-order { background: var(--order-bg); color: var(--order); }
.kind-sub { background: var(--packet-bg); color: var(--packet); }
.kind-client { background: var(--selection-bg); color: var(--selection); }

/* Sections */
.section { padding: var(--section) 0; }
.band { padding: var(--section) 0; background: var(--card); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.prose p { color: var(--text-2); font-size: 18px; line-height: 1.55; }
.prose p + p { margin-top: 16px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-low); }
.sand-card { background: var(--canvas); border-radius: var(--radius-lg); padding: 32px; }

.steps { list-style: none; padding: 0; margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps .card { padding: 24px 22px 28px; display: flex; flex-direction: column; gap: 12px; border-top: 4px solid var(--ink); }
.steps .num { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent); }
.steps p { font-size: 16px; color: var(--text-2); line-height: 1.5; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.feature.reverse .feature-copy { order: 2; }
.feature-copy .heading { margin-bottom: 20px; }
.ticks { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 12px; font-size: 16px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 13px; height: 7px;
  border-left: 2.5px solid var(--go); border-bottom: 2.5px solid var(--go); transform: rotate(-45deg);
}

.evidence-card { display: grid; gap: 14px; }
.ev-row { display: grid; gap: 4px; background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-low); }
.ev-label { font-size: 13px; color: var(--text-2); }
.ev-value { font-size: 20px; font-weight: 700; color: var(--ink); }
.ev-source { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-low); }
.ev-file { font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.ev-source p { font-size: 15px; line-height: 1.5; }
.ev-conflict { font-size: 14px; line-height: 1.5; color: var(--warning-fg); padding: 14px 18px; background: var(--warning-bg); border-radius: var(--radius); }
.ev-conflict strong { font-weight: 700; margin-right: 6px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.doc { padding: 22px 22px 28px; display: flex; flex-direction: column; gap: 12px; }
.doc p { font-size: 16px; color: var(--text-2); line-height: 1.5; }
.doc-thumb {
  height: 170px; border-radius: var(--radius); background: var(--canvas-2); border: 1px solid var(--line);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px;
}
.doc-thumb i, .doc-thumb b { display: block; height: 8px; border-radius: 4px; background: var(--btn-2); }
.thumb-schedule i { height: 14px; background: linear-gradient(90deg, var(--btn-2) 0 18%, transparent 18% 22%, var(--btn-2) 22% 70%, transparent 70% 82%, var(--order-bg) 82%); }
.thumb-scope i:nth-child(1) { width: 40%; height: 12px; background: var(--text-2); opacity: .5; }
.thumb-scope i:nth-child(2) { width: 92%; }
.thumb-scope i:nth-child(3) { width: 78%; }
.thumb-scope b { width: 34%; margin-top: auto; height: 2px; background: var(--ink); border-radius: 0; }
.thumb-packet { flex-direction: row; gap: 10px; }
.thumb-packet i { flex: 1; height: auto; border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow-low); border-top: 4px solid var(--btn-2); }
.thumb-packet i:nth-child(2) { border-top-color: var(--packet); }

.phone {
  justify-self: center; width: min(320px, 100%); aspect-ratio: 9 / 15.5; padding: 10px;
  background: var(--ink); border-radius: 40px; box-shadow: var(--shadow-card);
}
.phone-screen {
  height: 100%; background: var(--canvas-2); border-radius: 31px; padding: 26px 18px;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.ph-brand { font-size: 13px; font-weight: 700; color: var(--ink); padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ph-label { font-size: 12px; color: var(--text-2); }
.ph-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.02; color: var(--ink); }
.ph-due { font-size: 13px; color: var(--text-2); }
.ph-opts { display: grid; gap: 8px; margin-top: 6px; }
.opt { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 10px; border-radius: var(--radius); background: var(--card); border: 2px solid transparent; box-shadow: var(--shadow-low); }
.opt.sel { border-color: var(--ink); }
.sw { width: 34px; height: 34px; border-radius: 6px; flex: none; }
.sw1 { background: repeating-linear-gradient(0deg, #e9e6df 0 10px, #dcd8cf 10px 11px), #e9e6df; }
.sw2 { background: repeating-linear-gradient(90deg, #f2efe6 0 8px, #e2dccd 8px 9px), #f2efe6; }
.ph-btn { margin-top: auto; text-align: center; font-size: 15px; font-weight: 700; color: #fff; background: var(--go); border-radius: var(--radius); padding: 13px; }
.ph-update { display: grid; gap: 4px; font-size: 14px; line-height: 1.35; padding: 10px 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-low); }
.ph-progress { height: 6px; border-radius: 3px; background: var(--btn-2); margin: 4px 0 6px; }
.ph-progress i { display: block; height: 100%; border-radius: 3px; background: var(--go); }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 32px; border-top: 2px solid var(--ink); }
.timeline span { font-size: 13px; color: var(--text-2); padding-top: 14px; position: relative; line-height: 1.4; }
.timeline span::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline strong { font-weight: 700; font-size: 17px; color: var(--ink); }

.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.phase { background: var(--canvas); border-radius: var(--radius); padding: 20px 22px; border-top: 4px solid var(--ink); }
.phase-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--ink); margin-bottom: 4px; }
.phase p { font-size: 15px; color: var(--text-2); line-height: 1.5; }

.asks { list-style: none; padding: 0; display: grid; gap: 10px; margin-bottom: 24px; }
.asks li {
  justify-self: start; font-size: 17px; font-weight: 600; color: var(--ink); padding: 10px 16px;
  border-radius: var(--radius); background: var(--canvas);
}
.fine { font-size: 14px; color: var(--on-dark-2); margin-top: 20px; }

.fit { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); }
.fit-list { display: grid; gap: 0; }
.fit-list > div { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 22px 0; border-top: 2px solid var(--ink); }
.fit-list > div:last-child { border-bottom: 2px solid var(--ink); }
.fit-list p { color: var(--text-2); font-size: 17px; }

/* Demo (dark) */
.demo { background: var(--rail); color: var(--on-dark-2); }
.demo .heading-lg { color: var(--on-dark); }
.demo .eyebrow { color: var(--accent-on-dark); }
.demo .body-lg { color: var(--on-dark-2); }
.demo-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.demo-copy .heading-lg { margin-bottom: 20px; }
.demo-form { padding: clamp(22px, 3vw, 32px); display: grid; gap: 16px; background: var(--card); border-radius: var(--radius-lg); color: var(--text); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demo-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.opt-label { font-weight: 400; color: var(--text-2); }
.demo-form input, .demo-form select, .demo-form textarea {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--text); width: 100%; min-height: 48px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.demo-form textarea { resize: vertical; }
.demo-form input[aria-invalid="true"] { border-color: #b0123a; }
.demo-form .btn { justify-self: start; margin-top: 4px; }
.demo-form .btn[disabled] { opacity: .6; cursor: progress; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 15px; min-height: 1.4em; color: var(--text-2); }
.form-status.ok { color: var(--success-fg); }
.form-status.err { color: #b0123a; }

.footer { padding: 36px 0 48px; background: var(--rail); color: var(--on-dark-2); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-inner { display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; font-size: 14px; }
.footer .wordmark { color: var(--on-dark); font-size: 22px; }

/* Responsive */
@media (max-width: 1020px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { grid-template-columns: 1fr; }
  .arrow { transform: rotate(90deg); }
  .src-card:nth-child(n) { margin-left: 0; }
}
@media (max-width: 820px) {
  .nav nav { display: none; }
  .hero-sub, .split, .feature, .grid-3, .phases, .demo-inner, .fit { grid-template-columns: 1fr; }
  .feature.reverse .feature-copy { order: 0; }
  .fit-list > div { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-actions { gap: 12px; }
  .wordmark { font-size: 22px; }
  .steps, .field-row { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: 24px; border-top: 0; }
  .timeline span { border-top: 2px solid var(--ink); }
  .sand-card { padding: 18px; }
  .schedule { padding: 16px; }
  .sched-row { flex-direction: column; gap: 6px; }
  .order { text-align: left; }
  .order br { display: none; }
  .order.open { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
