/* Serket Works: tokens from the "SMB Automation" design system (light theme).
   Fonts per the DS README: Newsreader (headings), Instrument Sans (body). */
:root {
  --surface: #faf8f5;
  --surface-raised: #ffffff;
  --border: #e4ded6;
  --border-strong: #8c8278;
  --ink: #1f1b17;
  --muted: #6b6259;
  /* Primary fill is soft gold. Hover and tint are that gold, darker and lighter.
     Labels on the fill use ink. Text on the light page uses a darker gold. */
  --accent: #c4a46a;
  --accent-hover: #b78f47;
  --accent-text: #7e6332;
  --accent-text-hover: #6a532a;
  --on-accent: #1f1b17;
  --accent-tint: #f4eee4;
  --amber: #e8a33d;

  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --wrap: 1160px;
  --section-y: clamp(56px, 7vw, 88px);
  --gap-split: clamp(40px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
}
h1, h2, h3, p, ol, ul { margin: 0; }
strong { font-weight: 600; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-text-hover); }
a:focus-visible, input:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
[id] { scroll-margin-top: var(--header-offset, 96px); }

.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 16px; background: var(--surface-raised); z-index: 30; }
.skip:focus { left: 8px; }

/* Layout */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.band { background: var(--surface-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: var(--gap-split); }
.split-24 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.stack-8, .stack-12, .stack-16, .stack-20, .stack-24, .stack-40 { display: flex; flex-direction: column; }
.stack-8 { gap: 8px; } .stack-12 { gap: 12px; } .stack-16 { gap: 16px; }
.stack-20 { gap: 20px; align-items: flex-start; } .stack-24 { gap: 24px; } .stack-40 { gap: 40px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.intro { display: flex; flex-direction: column; gap: 12px; max-width: 42rem; }
.measure { max-width: 36rem; }

/* Type */
.eyebrow { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.eyebrow.ink { color: var(--ink); }
.display { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 7vw, 56px); line-height: 1.08; letter-spacing: -0.01em; }
.h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 5vw, 36px); line-height: 1.17; }
.h2-lg { font-size: clamp(32px, 6vw, 44px); line-height: 1.14; max-width: 40rem; }
.h3, .card-title { font-size: 18px; line-height: 26px; font-weight: 600; }
.lede { font-size: 20px; line-height: 30px; color: var(--muted); max-width: 32rem; }
.small { font-size: 14px; line-height: 20px; }
.muted { color: var(--muted); }
.brand { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 30px; color: var(--ink); text-decoration: none; }

/* Nav. Sticky so the bar stays at the top of the viewport. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav { padding-top: 16px; padding-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.nav .brand:hover { color: var(--ink); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--accent-text); }
.nav-links a[aria-current="page"] { color: var(--accent-text); }

/* Header wordmark only. Plain system sans, not Newsreader and not body type.
   Dropped letters collapse width on scroll; kept letters close up into SRKT. */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: system-ui, sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: 0;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }
.wm-ch {
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
  min-width: 0;
  white-space: pre;
}
.wordmark.is-mark .wm-ch { text-transform: uppercase; }

/* Writing index and essays */
.piece-list { list-style: none; padding: 0; border-top: 1px solid var(--border); }
.piece {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.piece-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.piece-meta time { font-size: 14px; line-height: 20px; color: var(--muted); }
.piece-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;
  color: var(--ink);
  max-width: 40rem;
}
.piece:hover .piece-title { color: var(--accent-text); }
.piece-summary { max-width: 40rem; color: var(--muted); }
.essay { max-width: 40rem; padding-bottom: var(--section-y); }
.prose { font-size: 18px; line-height: 1.65; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
  margin-top: 2em;
}
.prose h2 + * { margin-top: 0.55em; }
.prose .rules { padding-left: 1.15em; display: flex; flex-direction: column; gap: 0.7em; }
.prose .rules li { padding-left: 0.25em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius-md); text-decoration: none; font-weight: 600; }
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.nav-links .btn-outline { padding: 0 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); font-weight: 600; }
.link-strong { font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 8px; }

/* Hero */
.hero { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(56px, 7vw, 88px); align-items: center; }
.card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; }
.task-map { list-style: none; padding: 0; border-top: 1px solid var(--border); }
.task-map li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--accent-tint); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.chip-keep { background: transparent; border: 1px solid var(--border); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--amber); }

/* Tiles and steps */
.tile { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
/* How it works is the mark: S R over K T, Newsreader, one square. */
.method {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--accent-tint);
  border: 1px solid var(--accent);
}
.method li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: clamp(20px, 3vw, 40px);
}
.method li:nth-child(-n + 2) { border-bottom: 1px solid var(--accent); }
.method li:nth-child(odd) { border-right: 1px solid var(--accent); }
.method-letter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 0.85;
  color: var(--accent-text);
}
.fix-order { list-style: none; padding: 0; border-top: 1px solid var(--border); }
.fix-order li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.fix-order .num { font-family: var(--serif); font-size: 20px; width: 24px; flex-shrink: 0; }

/* Pricing */
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.formula > div { display: flex; flex-direction: column; }
.formula-val { font-family: var(--serif); font-size: 24px; line-height: 30px; }
.op { font-size: 24px; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; }
.field-grid label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.field-grid input { min-height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); background: var(--surface-raised); width: 100%; }

/* Intake form */
.measure-wide { max-width: 40rem; }
.intake-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.field {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface-raised);
  width: 100%;
}
.field-area { min-height: 8rem; padding: 12px; resize: vertical; }
.voice-box {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}
.btn-outline-action {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-outline-action:hover { border-color: var(--accent-text); color: var(--accent-text); }
button.btn {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.intake-error { color: #8b2e0e; }
#voice-preview { width: 100%; margin-top: 8px; }

.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.results > div { display: flex; flex-direction: column; gap: 4px; }
.big, .price { font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 38px; }
.per { font-family: var(--sans); font-size: 16px; color: var(--muted); }
.example { padding: 24px; border-radius: var(--radius-md); background: var(--accent-tint); }
.ledger { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ledger li { display: flex; justify-content: space-between; gap: 16px; }

/* Trust */
.trust { display: flex; gap: 16px; }
.trust > div { display: flex; flex-direction: column; gap: 4px; }
.trust svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* About */
.about { max-width: 40rem; }

/* CTA + footer */
.cta-band { background: var(--accent-tint); }
.footer { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-end; }
.footer-meta { display: flex; flex-direction: column; gap: 4px; }
