/* ============================================================================
   site.css — the Deckwright marketing surface, "The Drafting Table After Dark".
   A master builder's workshop bench at night: a dark warm ground, parchment ink,
   one hot brass accent (the drafting-lamp glow). The example visuals are worked
   specimens laid out as numbered plates; the workflow reads as a real sequence;
   the spec-sheet mono voice labels everything. Consumes tokens.css only — every
   colour references a --dw-* custom property.
   ============================================================================ */

* { box-sizing: border-box; }

:root {
  --dw-measure: 66ch;
  --dw-gutter: clamp(1.25rem, 4vw, 2.5rem);
  --dw-maxw: 1160px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--dw-bg);
  color: var(--dw-ink);
  font-family: var(--dw-font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--dw-accent); }

/* Selection reads as brass ink on the bench. */
::selection { background: var(--dw-accent); color: var(--dw-accent-ink); }

/* Visible brass focus ring on the dark ground (design rule 6). */
:focus-visible {
  outline: 2px solid var(--dw-accent);
  outline-offset: 3px;
  border-radius: var(--dw-radius-sm);
}

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

/* — Type scale (from DESIGN-DECKWRIGHT) — */
h1, h2, h3 {
  font-family: var(--dw-font-display);
  color: var(--dw-ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

/* The spec-sheet voice: eyebrows, plate labels, meta. */
.eyebrow {
  font-family: var(--dw-font-mono);
  font-weight: 500;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dw-ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
/* Brass tick that precedes an eyebrow — the lamp mark. */
.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 1px;
  background: var(--dw-accent);
  flex: none;
}

/* ============================================================================
   Header — a thin machined rail. The wordmark carries a brass corner tick.
   ============================================================================ */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--dw-line);
  background: color-mix(in srgb, var(--dw-bg) 86%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
}

header.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.wordmark {
  font-family: var(--dw-font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--dw-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
}
/* The wright's mark: a single brass square, the worked-metal tick. */
.wordmark::after {
  content: "";
  width: 0.42em;
  height: 0.42em;
  background: var(--dw-accent);
  border-radius: 1px;
  transform: translateY(-0.02em);
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

nav.site-nav a {
  color: var(--dw-ink-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 120ms ease;
}
nav.site-nav a:hover { color: var(--dw-ink); }

/* Header CTA gets a compact brass outline treatment. */
nav.site-nav .nav-cta {
  color: var(--dw-ink);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--dw-line);
  border-radius: var(--dw-radius);
  transition: border-color 120ms ease, color 120ms ease;
}
nav.site-nav .nav-cta:hover {
  color: var(--dw-accent);
  border-color: var(--dw-accent);
}

main { display: block; }

/* ============================================================================
   Buttons — the brass CTA is the single boldest thing on the page.
   ============================================================================ */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: var(--dw-accent);
  color: var(--dw-accent-ink);
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--dw-accent);
  border-radius: var(--dw-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  transition: background 130ms ease, transform 130ms ease, box-shadow 130ms ease;
  box-shadow: 0 6px 20px -10px color-mix(in srgb, var(--dw-accent) 70%, transparent);
}
.cta:hover {
  background: var(--dw-accent-dim);
  border-color: var(--dw-accent-dim);
  transform: translateY(-1px);
}
.cta:active { transform: translateY(0); }
/* Arrow that leans in on hover. */
.cta::after {
  content: "\2192";
  font-weight: 500;
  transition: transform 130ms ease;
}
.cta:hover::after { transform: translateX(2px); }

/* Quiet secondary link with a mono, spec-sheet feel. */
.link-quiet {
  color: var(--dw-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--dw-line);
  padding-bottom: 2px;
  transition: color 120ms ease, border-color 120ms ease;
}
.link-quiet:hover { color: var(--dw-accent); border-color: var(--dw-accent); }

/* ============================================================================
   Section rhythm — each region gets a spec-sheet header (label + heading).
   ============================================================================ */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--dw-line); }

.section-head {
  max-width: 44ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head .eyebrow { margin-bottom: 1.1rem; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}
.section-head p {
  color: var(--dw-ink-muted);
  font-size: 1.05rem;
  margin: 0.9rem 0 0;
}

/* ============================================================================
   HERO — the thesis. Headline + CTA on the left; a lit specimen plate on the
   right (the flowchart, the most characteristic artifact). A faint lamp glow
   behind it all: a single warm light in the dark workshop.
   ============================================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}
/* The drafting-lamp glow — one soft warm pool, not a SaaS gradient wash. */
.hero::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -6%;
  width: 62%;
  height: 130%;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--dw-accent) 20%, transparent),
    transparent 72%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 1.5rem; }

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
/* One brass word: the payoff verb of the headline gets the accent. */
.hero h1 .lit { color: var(--dw-accent); }

.hero-lede {
  color: var(--dw-ink-muted);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  max-width: 46ch;
  margin: 1.5rem 0 0;
}

.hero .actions {
  margin-top: 2.25rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Trust line under the CTA — mono spec register. */
.hero-meta {
  margin-top: 1.75rem;
  font-family: var(--dw-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dw-ink-muted);
}
.hero-meta b { color: var(--dw-ink); font-weight: 500; }

/* The hero specimen plate — the product doing the talking. */
.hero-plate { position: relative; }

/* ============================================================================
   PLATE — the signature. Example visuals are framed like drafting plates:
   a hairline case, a brass corner tick, and a mono spec caption (number · type
   · aspect). This encodes that they are worked artifacts, not stock art.
   ============================================================================ */
.plate {
  position: relative;
  margin: 0;
  background: var(--dw-surface);
  border: 1px solid var(--dw-line);
  border-radius: var(--dw-radius);
  padding: 0.9rem;
  box-shadow: var(--dw-shadow);
  transition: border-color 160ms ease, transform 160ms ease;
}
.plate:hover { border-color: color-mix(in srgb, var(--dw-accent) 45%, var(--dw-line)); }
/* Brass corner tick — the lamp catching a machined edge. */
.plate::before, .plate::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--dw-accent);
  border-style: solid;
  border-width: 0;
  opacity: 0.85;
}
.plate::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.plate::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

.plate .frame {
  background: var(--dw-bg);
  border-radius: var(--dw-radius-sm);
  overflow: hidden;
  border: 1px solid var(--dw-line);
}
.plate img {
  display: block;
  width: 100%;
  height: auto;
}

.plate figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.85rem;
  padding: 0 0.15rem;
  font-family: var(--dw-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dw-ink-muted);
}
.plate figcaption .plate-no { color: var(--dw-accent); }
.plate figcaption .plate-name { color: var(--dw-ink); }

/* ============================================================================
   PROCESS — a real 3-step sequence, so numbered markers are earned. A single
   hairline rule threads through the steps like a workflow line on the bench.
   ============================================================================ */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.step { position: relative; padding-top: 2.75rem; }
/* The step index in the spec-sheet register. */
.step .idx {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--dw-font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--dw-accent);
}
/* The workflow rule that connects the steps. */
.step::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 2.4rem;
  right: -1.4rem;
  height: 1px;
  background: var(--dw-line);
}
.step:last-child::before { display: none; }
.step h3 {
  font-family: var(--dw-font-display);
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.step p { color: var(--dw-ink-muted); margin: 0; }

/* ============================================================================
   DIFF — "the export is the product." Set apart as a raised bench block with a
   brass edge, so the load-bearing claim carries the most weight after the hero.
   ============================================================================ */
.diff {
  position: relative;
  background: var(--dw-surface-raised);
  border: 1px solid var(--dw-line);
  border-left: 2px solid var(--dw-accent);
  border-radius: var(--dw-radius);
  padding: clamp(2rem, 4vw, 3.25rem);
  box-shadow: var(--dw-shadow);
}
.diff .eyebrow { margin-bottom: 1.25rem; }
.diff h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  line-height: 1.1;
  max-width: 20ch;
}
.diff p {
  color: var(--dw-ink-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 62ch;
  margin: 1.25rem 0 0;
}
.diff p b { color: var(--dw-ink); font-weight: 500; }

/* ============================================================================
   EXAMPLES — a rack of specimen plates. Their native aspect ratios are honored
   so they sit like real artifacts, not squeezed into equal boxes.
   ============================================================================ */
.examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: stretch;
}
/* Mount every specimen in a uniform landscape frame so the plates align as a
   rack; the SVG is centered and contained on the bench-dark ground (no crop). */
.examples .plate { display: flex; flex-direction: column; }
.examples .frame {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.examples .frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

/* ============================================================================
   FEATURES — a tight spec grid. Quiet cards; a mono index; brass reserved for
   nothing here (the CTA and plates already spend it). Hover lifts the hairline.
   ============================================================================ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--dw-line);
  border: 1px solid var(--dw-line);
  border-radius: var(--dw-radius);
  overflow: hidden;
}
.feature {
  background: var(--dw-surface);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: background 140ms ease;
}
.feature:hover { background: var(--dw-surface-raised); }
.feature h3 {
  font-family: var(--dw-font-display);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.feature p { color: var(--dw-ink-muted); margin: 0; font-size: 0.95rem; }

/* ============================================================================
   TEASER — the closing call. Centered, generous, one brass CTA.
   ============================================================================ */
.teaser { text-align: center; }
.teaser .eyebrow { justify-content: center; margin-bottom: 1.25rem; }
.teaser h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  max-width: 20ch;
  margin: 0 auto 1.5rem;
}
.teaser .actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================================
   PRICING — two plans, but not equal weight. Pro is the recommended bench block
   (raised surface, brass top-rule, a mono RECOMMENDED tick). Free is quieter.
   ============================================================================ */
.page-head {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.page-head .eyebrow { margin-bottom: 1.25rem; }
.page-head h1 {
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.page-head p {
  color: var(--dw-ink-muted);
  font-size: 1.1rem;
  max-width: 48ch;
  margin: 1rem 0 0;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: start;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.plan {
  position: relative;
  background: var(--dw-surface);
  border: 1px solid var(--dw-line);
  border-radius: var(--dw-radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
}
.plan.is-featured {
  background: var(--dw-surface-raised);
  border-top: 2px solid var(--dw-accent);
  box-shadow: var(--dw-shadow);
}
.plan .tier {
  font-family: var(--dw-font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dw-ink-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}
.plan .tier .rec { color: var(--dw-accent); }
.plan h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.plan h2 .amt { letter-spacing: -0.02em; }
.plan h2 .per {
  font-family: var(--dw-font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--dw-ink-muted);
}
.plan .plan-sub {
  color: var(--dw-ink-muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  display: grid;
  gap: 0.7rem;
}
.plan li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--dw-ink);
  font-size: 0.98rem;
}
/* Brass check tick per line — the only accent inside a Free card is muted. */
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--dw-line);
}
.plan.is-featured li::before { background: var(--dw-accent); }
.plan .cta { margin-top: auto; align-self: flex-start; }
.plan .note {
  color: var(--dw-ink-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  border-left: 2px solid var(--dw-line);
  background: color-mix(in srgb, var(--dw-bg) 60%, transparent);
  border-radius: 0 var(--dw-radius-sm) var(--dw-radius-sm) 0;
}
.fine{font-size:12.5px;color:var(--dw-ink-muted);margin-top:10px}

.faq {
  padding-bottom: clamp(3rem, 6vw, 5rem);
  max-width: 60ch;
}
.faq .eyebrow { margin-bottom: 1.25rem; }
.faq h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 1.25rem; }
.faq p { color: var(--dw-ink-muted); font-size: 1rem; }
.faq p strong { color: var(--dw-ink); font-weight: 600; }

/* ============================================================================
   PROSE (terms / privacy) — a legal spec sheet. Numbered sections carry a mono
   marker in the margin; comfortable measure; a document header with metadata.
   ============================================================================ */
.doc {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6rem);
  max-width: 760px;
  margin: 0 auto;
}
.doc-head {
  padding-bottom: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--dw-line);
}
.doc-head .eyebrow { margin-bottom: 1.25rem; }
.doc-head h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.doc-meta {
  margin-top: 1.25rem;
  font-family: var(--dw-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dw-ink-muted);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.doc-meta b { color: var(--dw-ink); font-weight: 500; }

.prose { max-width: none; }
.prose p { max-width: var(--dw-measure); }
.prose section {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  padding-left: clamp(2.75rem, 5vw, 3.75rem);
  border-top: 1px solid var(--dw-line);
}
.prose section:first-of-type { border-top: 0; padding-top: 0; }
/* The section number as a spec marker in the margin. */
.prose section > .no {
  position: absolute;
  left: 0;
  top: clamp(1.5rem, 3vw, 2rem);
  font-family: var(--dw-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--dw-accent);
}
.prose section:first-of-type > .no { top: 0.15rem; }
.prose h2 {
  font-family: var(--dw-font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 26px);
  margin: 0 0 0.6rem;
  letter-spacing: -0.005em;
}
.prose p {
  color: var(--dw-ink-muted);
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}
.prose p + p { margin-top: 0.75rem; }
.prose a { color: var(--dw-accent); }

/* ============================================================================
   Footer — the maker's mark rail.
   ============================================================================ */
footer.site-footer {
  border-top: 1px solid var(--dw-line);
  background: var(--dw-surface);
  color: var(--dw-ink-muted);
  font-size: 0.88rem;
}
footer.site-footer .wrap {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
footer.site-footer a {
  color: var(--dw-ink-muted);
  text-decoration: none;
  transition: color 120ms ease;
}
footer.site-footer a:hover { color: var(--dw-ink); }
footer.site-footer .foot-mark {
  font-family: var(--dw-font-display);
  color: var(--dw-ink);
  font-weight: 600;
  margin-right: auto;
}
footer.site-footer .copy {
  font-family: var(--dw-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================================
   Mobile — a composed single column, not a squeezed desktop. The hero specimen
   moves below the pitch; the process rule goes vertical; features stack cleanly.
   ============================================================================ */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-plate { order: 2; max-width: 520px; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { padding-top: 1.25rem; padding-bottom: 1.5rem; padding-left: 2.4rem; }
  .step .idx { left: 0; top: 1.4rem; }
  /* Vertical workflow rule down the left margin. */
  .step::before {
    top: 2rem; left: 0.42rem; right: auto; bottom: -1rem;
    width: 1px; height: auto;
  }
  .step:last-child::before { display: block; bottom: auto; height: 0; }
  .examples { grid-template-columns: 1fr; max-width: 460px; }
  .features { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  /* Recommended plan leads on mobile. */
  .plan.is-featured { order: -1; }
}

@media (max-width: 560px) {
  header.site-header .wrap { flex-wrap: wrap; gap: 0.75rem; }
  nav.site-nav { gap: 1.1rem; }
  .hero h1 { font-size: clamp(34px, 10vw, 46px); }
  .hero .actions { gap: 1rem; }
  .doc-meta { gap: 0.9rem; }
  /* Pull the section number closer so the reading measure gets full width. */
  .prose section { padding-left: 2rem; }
  .prose section > .no { font-size: 11px; }
  footer.site-footer .wrap { gap: 1rem 1.25rem; }
}

/* Respect reduced motion — kill transitions/animations and smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
