/* Spritlotse landing page.
   Every value here comes from design_handoff/README.md § "Design tokens".
   A value that is not in that table does not belong in this file. */

:root {
  --paper: #F7F1E6;
  --ink: #12232B;
  --muted: #52646C;
  --line: rgba(18, 35, 43, .14);
  --petrol: #0B5A57;
  --petrol-ink: #FFFFFF;
  --cheap: #12A150;
  --dearer: #E4572E;
  --amber: #F5B544;
  --action: #F5B544;

  --r-card: 22px;
  --r-phone: 38px;
  --r-ctl: 14px;
  --shadow: 0 18px 40px rgba(22, 24, 29, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 52px; line-height: 1.05; }
h2 { font-size: 30px; line-height: 1.15; }
h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0 0 16px; }
a { color: inherit; }

.shell { width: min(1080px, 100% - 48px); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar { padding: 16px 0; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 18px; letter-spacing: -.02em; text-decoration: none;
}

/* ---------- buttons: --action and nothing else ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--action); color: var(--ink); border: 0; border-radius: var(--r-ctl);
  font: 600 16px/1 'Instrument Sans', system-ui, sans-serif;
  padding: 14px 20px; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn--sm { padding: 10px 14px; font-size: 14px; }
.btn--lg { padding: 16px 24px; font-size: 17px; }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); font-weight: 600;
}

/* ---------- the dashed road marking ---------- */
.marking {
  height: 4px; border: 0; margin: 72px 0;
  background: repeating-linear-gradient(90deg,
    rgba(11, 90, 87, .35) 0 28px, transparent 28px 52px);
}

/* ---------- hero ---------- */
/* The product shot sits in the hero, not in a band further down: it is the
   argument, and an argument that needs scrolling is not made. Tilted 4 degrees
   so the page does not read as a stack of rectangles — the only rotated thing
   on the page. */
.hero { padding: 40px 0 8px; }
.hero__inner { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.hero__shot { display: flex; justify-content: center; }
.hero__shot .phone { transform: rotate(-4deg); }
@media (prefers-reduced-motion: reduce) { .hero__shot .phone { transform: none; } }
.hero__lead { font-size: 20px; max-width: 54ch; color: var(--muted); margin-top: 16px; }
.hero__lead strong { color: var(--ink); font-weight: 600; }

.cta { margin-top: 32px; max-width: 560px; }
.cta__form { display: flex; gap: 8px; flex-wrap: wrap; }
.cta__form input {
  flex: 1 1 240px; min-width: 0;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: #fff; color: var(--ink);
  font: 16px/1 'Instrument Sans', system-ui, sans-serif;
}
.cta__form input:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.cta__note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.reveal {
  margin-top: 16px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: #fff;
}
.reveal__head { font-weight: 600; margin-bottom: 8px; }
.reveal p { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.callout {
  display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(18, 161, 80, .12); color: var(--cheap);
  font-size: 13px; font-weight: 600;
}
.standing {
  display: block; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 32px; font-variant-numeric: tabular-nums; margin-bottom: 8px;
}
.linkrow { display: flex; gap: 8px; }
.linkrow input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: var(--paper); font-size: 14px;
}
.alert {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--r-ctl);
  background: rgba(228, 87, 46, .10); color: var(--dearer); font-size: 15px;
}

/* ---------- steps ---------- */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); margin-top: 32px; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow);
}
.step__no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--petrol); color: #FFFFFF;
  font-weight: 700; font-size: 15px; margin-bottom: 12px;
}
.step p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }

/* ---------- the petrol band with the product shot ---------- */
.band { background: var(--petrol); color: var(--petrol-ink); padding: 72px 0; margin-top: 72px; }
.band h2 { color: var(--petrol-ink); }
.band__sub { color: #CDEAE6; max-width: 54ch; margin-top: 12px; font-size: 19px; }

/* The mock is the real thing: a screenshot rendered from the UI concept
   (app-screen.html -> app-screen.png, 780x1688 at scale 2). Three hand-built
   imitations came before it and each one read as a drawing of an app rather
   than an app. A rendered screen cannot drift from the design, because it IS
   the design (design_handoff/README.md § "Screens"). */
.phone {
  width: 300px; max-width: 100%;
  background: #0E1116; border-radius: var(--r-phone); padding: 10px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}
.phone__shot {
  display: block; width: 100%; height: auto;
  border-radius: calc(var(--r-phone) - 10px);
}

/* ---------- faq ---------- */
.faq { margin-top: 32px; display: grid; gap: 16px; }
.faq h3 { margin-bottom: 6px; }
.faq p { color: var(--muted); margin: 0; }

/* ---------- closer + footer ---------- */
.closer { padding: 72px 0 0; }
.closer__sub { color: var(--muted); margin-top: 12px; max-width: 56ch; }

.foot { margin-top: 72px; padding: 32px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot__inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.foot a { color: var(--muted); }

/* ---------- legal pages ---------- */
.doc { padding: 32px 0 0; }
.head__sub { color: var(--muted); max-width: 62ch; margin-top: 12px; }
.doc__body { margin-top: 32px; max-width: 70ch; }
.doc__body h3 { margin-top: 32px; }
.doc__body p { color: var(--muted); }

/* ---------- supporting pages ---------- */
/* `.guide` and `.calc` are page types of their own: an article that answers
   one search question, and the calculator it is built around
   (docs/adr/0023-supporting-pages-answer-one-search-question.md). Not `.step`
   cards and not `.doc`. Amber stays the call to action's; the result uses
   --cheap and --dearer the way the app screen does — cheaper and dearer. */
.guide { padding: 32px 0 0; }
.guide__crumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.guide__lead { font-size: 20px; max-width: 58ch; color: var(--muted); margin-top: 16px; }
.guide__lead strong { color: var(--ink); font-weight: 600; }
.guide__body { max-width: 70ch; margin-top: 56px; }
.guide__body h2 { margin: 48px 0 16px; }
.guide__body h2:first-child { margin-top: 0; }
.guide__body p { color: var(--muted); }
.guide__body strong { color: var(--ink); }
.guide__aside {
  margin-top: 48px; padding: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
}
.guide__aside h2 { margin-top: 0; font-size: 22px; }
.guide__aside p:last-child { margin-bottom: 0; }

.calc {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px;
  margin-top: 40px; align-items: start;
}
.calc__fields { display: grid; gap: 16px; }
.calc__group {
  margin: 0; padding: 20px 24px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
}
.calc__group legend { padding: 0 6px; margin-left: -6px; font-weight: 700; }
.calc__group legend small, .calc__field small { font-weight: 400; color: var(--muted); font-size: 14px; }
.calc__field {
  display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 12px;
  align-items: center; padding: 10px 0; border-top: 1px solid var(--line);
}
.calc__field:first-of-type { border-top: 0; }
.calc__field span { font-size: 16px; }
.calc__field small { display: block; }
.calc__field input {
  width: 100%; padding: 10px 12px; text-align: right;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--paper); color: var(--ink);
  font: 16px/1 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums;
}
.calc__field input:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }

.calc__result {
  position: sticky; top: 16px;
  padding: 24px; border-radius: var(--r-card);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.calc__result[data-state="yes"] { border-top: 6px solid var(--cheap); }
.calc__result[data-state="no"] { border-top: 6px solid var(--dearer); }
.calc__verdict { font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 16px; }
.calc__result[data-state="yes"] .calc__verdict { color: var(--cheap); }
.calc__result[data-state="no"] .calc__verdict { color: var(--dearer); }
.calc__rows { margin: 0; }
.calc__rows > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-top: 1px solid var(--line); font-size: 16px;
}
/* The class above sets `display`, which beats the UA's `[hidden]` rule. */
.calc__rows > div[hidden] { display: none; }
.calc__rows dt { color: var(--muted); }
.calc__rows dd { margin: 0; white-space: nowrap; }
.calc__net { font-weight: 700; }
.calc__net dt { color: var(--ink); }

@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
}

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  h1 { font-size: 40px; }
  h2 { font-size: 26px; }
  .shell { width: min(1080px, 100% - 32px); }
  .marking, .band, .closer, .foot { margin-top: 48px; }
  .band { padding: 48px 0; }
}
