/* ============================================================
   Concept F — "The Spec"
   A drawing-office sheet: cool paper on a gray desk, indigo ink
   hairlines, one red stamp. Barlow Semi Condensed (titles) +
   Barlow (text) + Fragment Mono (drawing labels only).
   ============================================================ */

@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/barlow-semicond-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/barlow-semicond-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('/fonts/barlow-semicond-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/barlow-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/barlow-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Fragment Mono'; src: url('/fonts/fragment-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --desk: #DFE2EB;
  --paper: #F6F7FA;
  --card: #FFFFFF;
  --ink: #2B2C55;         /* text ink, 12:1 on paper */
  --ink-brand: #333366;   /* line ink */
  --gray: #4A4B66;        /* secondary text, 8:1 */
  --line: rgba(51, 51, 102, 0.32);
  --line-soft: rgba(51, 51, 102, 0.18);
  --stamp: #C4184A;       /* red ink, 5.6:1 on paper */
  --coral: #EA2C59;
  --coral-hot: #D01F4B;
  --hd: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --tx: 'Barlow', system-ui, sans-serif;
  --mo: 'Fragment Mono', ui-monospace, monospace;
  --wrap: 1180px;
  --gut: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--tx);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: var(--desk);
  padding: 14px;
  -webkit-font-smoothing: antialiased;
}

.sheet {
  background: var(--paper);
  border: 1.5px solid var(--ink-brand);
  min-height: calc(100vh - 28px);
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
section[id] { scroll-margin-top: 5rem; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink-brand); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

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

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3 { text-wrap: balance; }
.sec-h {
  font-family: var(--hd);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.005em;
}
.sec-lede { color: var(--gray); max-width: 34rem; margin-top: 0.9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  font-family: var(--hd);
  font-weight: 600;
  font-size: 1.1875rem; /* 19px bold: WCAG large text on coral */
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  padding: 1rem 1.7rem;
  transition: background 0.18s ease-out;
}
.btn:hover { background: var(--coral-hot); }
.btn:focus-visible { outline: 2px solid var(--ink-brand); outline-offset: 3px; }
.btn-lg { padding: 1.15rem 2.1rem; }
.btn-nav {
  background: transparent;
  border: 1.5px solid var(--ink-brand);
  color: var(--ink);
  font-size: 1rem;
  padding: 0.55rem 1.1rem;
}
.btn-nav:hover { background: var(--ink-brand); color: #fff; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 2rem; height: 4.25rem; }
.brand {
  font-family: var(--hd); font-weight: 700; font-size: 1.4rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  text-decoration: none;
}
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 0.95rem; color: var(--gray); transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-burger { display: none; }
.m-nav { display: none; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vh, 4.5rem) clamp(3rem, 7vh, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.hero-h {
  font-family: var(--hd);
  font-weight: 600;
  font-size: clamp(2.9rem, 6.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.hero-sub { margin-top: 1.3rem; max-width: 34rem; color: var(--gray); font-size: 1.1rem; }
.hero-cta { margin-top: 1.9rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.hero-proof { font-size: 0.95rem; color: var(--gray); }

/* title block */
.tblock {
  width: 100%;
  border-collapse: collapse;
  border: 1.25px solid var(--ink-brand);
  background: var(--card);
  font-size: 0.95rem;
}
.tblock th, .tblock td { border: 0.5px solid var(--line); padding: 0.55rem 0.8rem; text-align: left; }
.tblock th {
  font-family: var(--mo); font-weight: 400; font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gray); width: 6.5rem; vertical-align: middle;
}
.tblock td { font-family: var(--hd); font-weight: 500; font-size: 1rem; }
.tblock a { text-decoration: none; }
.tblock a:hover { text-decoration: underline; }

/* ---------- fig 1: the drawing ---------- */
.fig1 { margin-top: clamp(2.5rem, 6vh, 4rem); }
.fig1-frame { position: relative; padding-top: 0.5rem; }
.draw { display: block; width: 100%; height: auto; color: var(--ink-brand); }
.draw-v { display: none; max-width: 380px; }
.dr-line rect, .dr-line line, .dr-line circle { stroke: var(--ink-brand); stroke-width: 1.25; fill: none; }
.dr-line rect, .dr-line circle { fill: var(--card); }
.dr-title text {
  font-family: var(--hd); font-weight: 600; font-size: 15.5px;
  letter-spacing: 0.05em; fill: var(--ink);
}
.dr-mono text { font-family: var(--mo); font-size: 11.5px; fill: var(--gray); }
.dr-mono .dr-cap { font-family: var(--hd); font-weight: 600; font-size: 14px; fill: var(--ink); }
.dr-mono .dr-dim {
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 9px;
  stroke-linejoin: round;
}
.fig1 > figcaption {
  margin-top: 1.1rem;
  font-family: var(--mo); font-size: 0.85rem;
  letter-spacing: 0.02em; color: var(--ink);
  max-width: 78ch;
}

/* the stamp */
.stamp {
  position: absolute; right: 0; top: -78px;
  width: 138px; height: 138px;
  color: var(--stamp);
  transform: rotate(-8deg);
  opacity: 0.92;
  z-index: 1;
  pointer-events: none;
}
.stamp-arc { font-family: var(--mo); font-size: 9.5px; letter-spacing: 0.09em; fill: currentColor; }
.stamp-fig { font-family: var(--hd); font-weight: 700; font-size: 34px; fill: currentColor; }
.js .stamp.rv { opacity: 0; transform: rotate(-8deg) scale(1.35); transition: opacity 0.28s ease-out, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
.js .stamp.rv.in { opacity: 0.92; transform: rotate(-8deg) scale(1); }

/* plotter wipe on the drawing (enhancement) */
.js .draw.rv { clip-path: inset(0 100% 0 0); transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.js .draw.rv.in { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  .js .draw.rv, .js .stamp.rv { clip-path: none; opacity: 0.92; transform: rotate(-8deg); transition: none; }
  .js .draw.rv { opacity: 1; transform: none; }
}

/* ---------- specifications ---------- */
.spec { padding-block: clamp(3.5rem, 8vh, 6rem); }
.spec-table {
  width: 100%;
  margin-top: 2.2rem;
  border-collapse: collapse;
  border: 1.25px solid var(--ink-brand);
  background: var(--card);
}
.spec-table th, .spec-table td { border: 0.5px solid var(--line); padding: 1.1rem 1.3rem; text-align: left; vertical-align: baseline; }
.spec-table tbody th {
  font-family: var(--mo); font-weight: 400; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gray); width: 15rem;
}
.spec-table td:nth-child(2) {
  font-family: var(--hd); font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1;
  white-space: nowrap; width: 12rem;
  color: var(--coral);
}
.spec-table td:last-child { color: var(--gray); }

/* ---------- assemblies ---------- */
.assemblies { padding-block: clamp(3.5rem, 8vh, 6rem) 0; }
.asm {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  padding-block: 2.4rem;
  border-top: 1px solid var(--line);
  margin-top: 2.4rem;
}
.asm:first-of-type { margin-top: 2.6rem; }
.asm figure img { border: 1px solid var(--line); width: 100%; }
.asm figcaption {
  margin-top: 0.5rem;
  font-family: var(--mo); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--gray);
}
.asm h3 { font-family: var(--hd); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1; }
.asm-body > p { margin-top: 0.8rem; color: var(--gray); max-width: 56ch; }
.asm-body > p:first-of-type { color: var(--ink); }
.asm-roles { font-size: 0.93rem; }
.asm-fee { font-family: var(--hd); font-weight: 600; font-size: 1.05rem; color: var(--ink); }

/* ---------- detail A ---------- */
.detail { padding-block: clamp(3.5rem, 8vh, 6rem); }
.panel { background: var(--card); border: 1.25px solid var(--ink-brand); padding: clamp(1.8rem, 4vw, 3rem); }
.panel-tag {
  font-family: var(--mo); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gray);
}
.panel-head h2 { margin-top: 0.7rem; font-family: var(--hd); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1; }
.panel-sub { margin-top: 0.9rem; color: var(--gray); max-width: 48rem; }
.crit { list-style: none; margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.crit li {
  display: flex; align-items: flex-start; gap: 1.1rem;
  padding: 1.2rem 1.4rem 1.2rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.crit li:nth-child(odd) { border-right: 1px solid var(--line-soft); padding-right: 1.6rem; }
.crit li:nth-child(even) { padding-left: 1.6rem; padding-right: 0; }
.crit b {
  flex: 0 0 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  border: 1.25px solid var(--ink-brand);
  font-family: var(--hd); font-weight: 700; font-size: 1.3rem;
}
.crit strong { display: block; font-family: var(--hd); font-weight: 600; font-size: 1.1rem; }
.crit span { display: block; margin-top: 0.15rem; font-size: 0.95rem; color: var(--gray); }
.crit div { flex: 1; }
.crit .meter { display: flex; gap: 4px; flex: 0 0 auto; margin-left: 0.6rem; margin-top: 0.45rem; }
.crit .meter u { width: 11px; height: 11px; border: 1px solid var(--ink-brand); }
.crit .meter u.on { background: var(--ink-brand); }
.crit-note {
  margin-top: 1.3rem;
  font-family: var(--mo); font-size: 0.75rem;
  letter-spacing: 0.02em; color: var(--gray);
}

/* ---------- field report + guarantee ---------- */
.report { padding-bottom: clamp(3.5rem, 8vh, 6rem); }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: stretch; }
.fr-quote { margin-top: 1.4rem; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; text-wrap: pretty; }
.fr footer { margin-top: 1.4rem; }
.fr strong { display: block; font-family: var(--hd); font-weight: 600; }
.fr footer span { color: var(--gray); font-size: 0.95rem; }
.gt { position: relative; }
.gt-fig { font-family: var(--hd); font-weight: 700; font-size: clamp(3.6rem, 6vw, 5rem); line-height: 1; margin-block: 1rem 0.6rem; }
.gt > p:not(.panel-tag):not(.gt-fig):not(.gt-stamp) { color: var(--gray); font-size: 1rem; }
.gt-stamp {
  display: inline-block;
  margin-top: 1.6rem;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--hd); font-weight: 700; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem;
  transform: rotate(-3deg);
}

/* ---------- personnel ---------- */
.personnel { padding-bottom: clamp(3.5rem, 8vh, 6rem); }
.personnel-head { margin-bottom: 2.2rem; }
.pers-strip {
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gut);
  padding-inline: var(--gut);
  padding-bottom: 1rem;
}
.pers-strip figure { flex: 0 0 172px; scroll-snap-align: start; }
.pers-strip img { width: 172px; height: 172px; object-fit: cover; border: 1px solid var(--line); }
.pers-strip figcaption { padding-top: 0.6rem; font-family: var(--hd); font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.pers-strip figcaption span { display: block; font-family: var(--tx); font-weight: 400; font-size: 0.85rem; color: var(--gray); }
.pers-strip:focus-visible { outline: 2px solid var(--ink-brand); outline-offset: 2px; }
.clients-row { margin-top: 2.8rem; }
.clients-lede {
  font-family: var(--mo); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gray);
}
.logos { display: flex; flex-wrap: wrap; gap: 0.9rem 2.2rem; margin-top: 1.1rem; }
.client { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--hd); font-weight: 600; font-size: 0.98rem; }
.client img { width: 32px; height: 32px; object-fit: cover; border: 1px solid var(--line-soft); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); padding-block: clamp(3.5rem, 8vh, 6rem); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.faq-list { border-bottom: 1px solid var(--line); }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  padding-block: 1.15rem;
  font-family: var(--hd); font-weight: 600; font-size: 1.12rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--mo); font-size: 1.15rem; line-height: 1;
  color: var(--ink-brand);
  transition: transform 0.18s ease-out;
  flex-shrink: 0;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding-bottom: 1.3rem; color: var(--gray); max-width: 60ch; }

/* ---------- CTA ---------- */
.cta { border-top: 1px solid var(--line); padding-block: clamp(4rem, 10vh, 7rem); }
.cta-h {
  font-family: var(--hd); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 0.98;
}
.cta-act { margin-top: 2.2rem; display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.cta-act p { color: var(--gray); font-size: 0.98rem; }
.cta-act p a { color: var(--ink); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--ink-brand); padding-block: 1.1rem; }
.foot-row {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--mo); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--gray);
}
.foot-row a { text-decoration: none; color: var(--ink); }

/* ---------- reveal (enhancement only) ---------- */
.js .rv:not(.draw):not(.stamp) { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease-out, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
.js .rv:not(.draw):not(.stamp).in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rv:not(.draw):not(.stamp) { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-row .btn-nav { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 6px; justify-content: center;
    margin-left: auto; background: none; border: 0; padding: 0.5rem; cursor: pointer;
  }
  .nav-burger span { width: 26px; height: 2px; background: var(--ink); transition: transform 0.2s; }
  .nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .m-nav.open { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.5rem var(--gut) 2rem; border-top: 1px solid var(--line); background: var(--paper); }
  .m-nav a { text-decoration: none; font-size: 1.1rem; }
  .m-nav .btn { align-self: flex-start; margin-top: 0.5rem; }

  .hero-grid { grid-template-columns: 1fr; }
  .tblock { max-width: 420px; }
  .report-grid, .faq-grid { grid-template-columns: 1fr; }
  .asm { grid-template-columns: 1fr; gap: 1.2rem; }
  .asm figure { max-width: 380px; }
  .crit { grid-template-columns: 1fr; }
  .crit li:nth-child(odd) { border-right: none; padding-right: 0; }
  .crit li:nth-child(even) { padding-left: 0; }
}

@media (max-width: 760px) {
  body { padding: 8px; }
  .sheet { min-height: calc(100vh - 16px); }
  .draw-h { display: none; }
  .draw-v { display: block; margin-inline: auto; }
  .stamp { width: 112px; height: 112px; top: auto; bottom: -10px; right: 0; }
  .spec-table td:nth-child(2) { width: auto; }
  .spec-table th, .spec-table td { padding: 0.8rem 0.8rem; }
  .spec-table tbody th { width: auto; }
  .spec-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; }
  .spec-table tbody th { grid-column: 1 / -1; border-bottom: none; padding-bottom: 0.2rem; }
  .spec-table tbody td { border-top: none; }
  .spec-table tbody td:last-child { grid-column: 1 / -1; padding-top: 0; border-top: none; }
  .cta-act { flex-direction: column; align-items: flex-start; }
}
