/* DraughtDesk — site styles (v3)
   No inline styles anywhere, so the Content-Security-Policy in _headers can
   stay strict (style-src 'self'). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"),
       url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --paper: #F4F5F3;
  --white: #FFFFFF;
  --ink: #16191D;
  --ink-2: #3A4046;
  --sub: #50575E;
  --muted: #8A9196;
  --rule: #D3D7D9;
  --rule-soft: #E6E9E9;
  --accent: #B9481A;
  --accent-dark: #943914;
  --accent-bright: #E8743F;
  --highlight: #FCEBD9;

  --dark: #15181B;
  --dark-2: #1D2125;
  --dark-rule: #353A3F;
  --dark-text: #E8E9E7;
  --dark-sub: #A3A9AE;

  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad: clamp(64px, 8vw, 112px);
}

*, *::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(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; background: var(--ink); color: var(--white);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
section[id] { scroll-margin-top: 72px; }

/* ── Type ──────────────────────────────────────────────────────── */
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
}
.h2 {
  font-size: clamp(30px, 3.4vw, 48px); line-height: 1.08;
  letter-spacing: -0.02em; font-weight: 620; max-width: 22em;
}
.lede { color: var(--ink-2); max-width: 38em; font-size: 18px; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer; border-radius: 0; white-space: nowrap;
}
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Header ────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-row { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; font-stretch: 108%; }
.brand-mark-fill { fill: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 15px; }
.nav-links a { text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-menu { display: none; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; min-height: 44px; min-width: 44px;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--ink);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { background: var(--ink); color: var(--paper); }
.nav-menu-panel {
  position: absolute; right: 0; top: calc(100% + 13px);
  width: min(320px, calc(100vw - 2 * var(--gutter)));
  background: var(--white); border: 1px solid var(--ink);
  display: flex; flex-direction: column; padding: 8px 0;
}
.nav-menu-panel a { padding: 12px 20px; text-decoration: none; font-size: 16px; }
.nav-menu-panel a.menu-cta { margin: 8px 20px 4px; padding: 0 20px; }
@media (max-width: 920px) { .nav-links { display: none; } .nav-menu { display: block; } }
@media (max-width: 480px) { .header-actions > .btn-sm { display: none; } }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero { position: relative; border-bottom: 1px solid var(--rule); isolation: isolate; }
.hero::before {
  /* Drafting-paper grid, fading out behind the screenshot */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 25, 29, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 25, 29, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 30%, transparent 75%);
          mask-image: linear-gradient(to bottom, #000 0, #000 30%, transparent 75%);
}
.hero-head {
  display: flex; flex-direction: column; gap: 24px;
  padding-block: clamp(56px, 7vw, 104px) clamp(40px, 5vw, 64px);
}
.hero-head .label { color: var(--sub); }
.hero h1 { font-size: clamp(42px, 6.2vw, 88px); line-height: 1.0; letter-spacing: -0.03em; font-weight: 650; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 64px; padding-top: 8px; }
.hero-lede { flex: 1 1 480px; max-width: 36em; font-size: 19px; color: var(--ink-2); }
.shot-hero { padding-bottom: clamp(56px, 7vw, 96px); }
@media (max-width: 720px) { .br-wide { display: none; } }
@media (max-width: 600px) { .hero-row .cta-row .btn { flex: 1 1 220px; } }

/* ── Screenshot in a window frame ──────────────────────────────── */
.shot { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.window {
  background: #1B1C1E; border: 1px solid #0E0F10; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(22, 25, 29, 0.08), 0 24px 60px -28px rgba(22, 25, 29, 0.55);
}
.win-bar {
  height: 34px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between;
  color: #C5C9CE; font-size: 12.5px; letter-spacing: 0.01em; background: #18191B; border-bottom: 1px solid #0A0B0C;
}
.win-title { display: flex; align-items: center; gap: 8px; }
.win-icon { width: 14px; height: 14px; fill: none; stroke: #8FA4BC; stroke-width: 1.3; }
.win-icon-fill { fill: #8FA4BC; stroke: none; }
.win-ctrls { width: 100px; height: 11px; fill: none; stroke: #9AA0A6; stroke-width: 1; }
.win-img { display: block; cursor: zoom-in; }
.win-img img { width: 100%; }
.shot figcaption { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--sub); max-width: 70em; }
@media (max-width: 600px) {
  .window { border-radius: 6px; }
  .win-bar { height: 24px; padding: 0 9px; font-size: 10.5px; }
  .win-icon { width: 11px; height: 11px; }
  .win-ctrls { width: 66px; height: 8px; }
}

/* ── Sections ──────────────────────────────────────────────────── */
.section { border-bottom: 1px solid var(--rule); }
.section-white { background: var(--white); }
.section-inner { padding-block: var(--section-pad); display: flex; flex-direction: column; gap: clamp(40px, 5vw, 64px); }
.section-head { display: flex; flex-direction: column; gap: 16px; }

/* Hub: the eight stages */
.stages-block { display: flex; flex-direction: column; gap: 20px; }
.stages-intro { color: var(--ink-2); max-width: 40em; }
.stages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0 14px; }
.stages li { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 2px solid var(--ink); }
.stage-num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.stage-name { font-weight: 620; font-size: 15.5px; line-height: 1.3; }
.stage-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--sub); }
@media (max-width: 1000px) { .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 14px; } }
@media (max-width: 520px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Hub: the tour */
.chapter { display: flex; flex-direction: column; gap: 28px; padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--rule); }
.chapter-text { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 56px; align-items: start; }
.chapter-title { display: flex; flex-direction: column; gap: 10px; }
.chapter-num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.chapter h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 630; max-width: 14em; }
.chapter-body { display: flex; flex-direction: column; gap: 14px; color: var(--ink-2); }
.points { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.points li { position: relative; padding-left: 22px; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 10px; height: 2px; background: var(--accent); }
@media (max-width: 860px) { .chapter-text { grid-template-columns: minmax(0, 1fr); } }

/* ── Tools: the ribbon ─────────────────────────────────────────── */
.ribbon {
  --rb-bg: #2B2F35; --rb-tabs: #1E2125; --rb-line: #3D424A; --rb-name: #24282D;
  background: var(--rb-bg); color: #E6E8EB; border-radius: 8px; overflow: hidden;
  box-shadow: 0 24px 60px -32px rgba(22, 25, 29, 0.6);
}
.ribbon-tabs { display: flex; gap: 2px; padding: 7px 10px 0; background: var(--rb-tabs); font-size: 12.5px; overflow: hidden; }
.ribbon-tabs span { padding: 6px 13px 7px; color: #8E959D; white-space: nowrap; }
.ribbon-tabs .is-active { background: var(--rb-bg); color: #FFFFFF; border-radius: 4px 4px 0 0; box-shadow: inset 0 2px 0 var(--accent-bright); }
.ribbon-panels { display: flex; flex-wrap: wrap; }
.rpanel { flex-grow: 1; display: flex; flex-direction: column; border-right: 1px solid var(--rb-line); border-bottom: 1px solid var(--rb-line); margin-bottom: -1px; }
.rbtns { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 10px 4px 8px; }
.rbtn {
  width: 61px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 8px 2px 6px; border: 1px solid transparent; border-radius: 3px;
  color: #E6E8EB; text-decoration: none; font-size: 11.5px; font-stretch: 92%; line-height: 1.22; text-align: center;
}
.rbtn:hover, .rbtn:focus-visible { background: #373C43; border-color: #4C525B; color: #FFFFFF; }
.rbtn:focus-visible { outline-color: var(--accent-bright); outline-offset: 1px; }
.rbtn svg { width: 30px; height: 30px; fill: none; stroke: #DCE0E5; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rbtn svg .a { stroke: var(--accent-bright); }
.rbtn svg .af { fill: var(--accent-bright); stroke: none; }
.rpanel-name { padding: 4px 10px 5px; background: var(--rb-name); color: #A9B0B8; font-size: 11.5px; text-align: center; white-space: nowrap; }
@media (max-width: 760px) {
  .ribbon-tabs span:not(.is-active) { display: none; }
  .rbtn { width: 64px; }
}

/* Tools: what each one does */
.toollist { columns: 3 280px; column-gap: 48px; }
.tgroup { break-inside: avoid; display: flex; flex-direction: column; margin-bottom: 36px; }
.tgroup h3 {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); padding-bottom: 10px; border-bottom: 2px solid var(--ink);
}
.tgroup dl > div { padding: 13px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 3px; scroll-margin-top: 96px; }
.tgroup dt { font-weight: 640; }
.tgroup dd { font-size: 15.5px; color: var(--ink-2); }
.tgroup dl > div:target { background: var(--highlight); box-shadow: -10px 0 0 var(--highlight), 10px 0 0 var(--highlight); }

/* Tools: custom tools */
.custom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px;
  padding: clamp(24px, 3.5vw, 40px); border: 1px solid var(--ink); border-left: 4px solid var(--accent); background: var(--paper);
}
.custom > div { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; }
.custom h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 630; }
.custom p:not(.label) { color: var(--ink-2); max-width: 36em; }

/* ── Standards (dark) ──────────────────────────────────────────── */
.dark { background: var(--dark); color: var(--dark-text); border-bottom: 0; }
.dark .label { color: var(--dark-sub); display: flex; align-items: center; gap: 12px; }
.dark .label::before { content: ""; width: 10px; height: 10px; background: var(--accent); flex-shrink: 0; }
.dark .lede { color: var(--dark-sub); }
.dark :focus-visible { outline-color: var(--dark-text); }

/* A name, dimensioned like a drawing */
.anatomy { display: flex; flex-direction: column; gap: 36px; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--dark-rule); background: var(--dark-2); }
.anat { display: flex; flex-direction: column; gap: 14px; }
.anat-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-sub); }
.anat-row { display: flex; flex-wrap: wrap; align-items: flex-start; row-gap: 22px; font-family: var(--mono); font-size: clamp(20px, 3.1vw, 40px); line-height: 1.1; }
/* Each field gets a dimension line under it, with its name centred below */
.part { position: relative; padding-bottom: 30px; }
.part b { display: block; position: relative; padding-bottom: 10px; border-bottom: 1px solid #6E757C; font-weight: 500; color: var(--white); white-space: nowrap; }
.part b::before, .part b::after { content: ""; position: absolute; bottom: -5px; width: 1px; height: 9px; background: #6E757C; }
.part b::before { left: 0; }
.part b::after { right: 0; }
.part i {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  font-style: normal; font-size: 11px; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dark-sub); white-space: nowrap;
}
.sep { color: var(--accent-bright); padding-inline: 0.3em; }
.sep-space { width: 0.7em; padding: 0; }
.lbl-short { display: none; }
@media (max-width: 600px) {
  .part i { font-size: 9.5px; letter-spacing: 0.03em; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
}
.anatomy figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--dark-sub); padding-top: 18px; border-top: 1px solid var(--dark-rule); }

.config { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 40px; border-top: 1px solid var(--dark-rule); }
.config div { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--dark-rule); }
.config dt { font-weight: 620; font-size: 17px; color: var(--dark-text); }
.config dd { font-size: 15.5px; color: var(--dark-sub); }

/* ── How we work ───────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 32px; border-top: 2px solid var(--ink); counter-reset: none; }
.step { padding: 22px 0 24px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--rule); }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.step h3 { font-size: 22px; font-weight: 640; letter-spacing: -0.01em; }
.step p { font-size: 16px; color: var(--ink-2); }
.terms { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding: 24px 28px; background: var(--white); border: 1px solid var(--rule); }
.terms p { color: var(--ink-2); }

/* ── Contact ───────────────────────────────────────────────────── */
#contact { border-bottom: 0; }
.contact-grid { padding-block: var(--section-pad); display: flex; flex-wrap: wrap; gap: 48px 72px; }
.contact-copy { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-copy > p { color: var(--ink-2); max-width: 32em; }
.contact-copy .cta-row { padding-top: 6px; }
.contact-copy .direct a { font-weight: 600; }
.contact-panel { flex: 1 1 400px; min-width: 0; align-self: flex-start; padding: clamp(24px, 3.5vw, 40px); background: var(--paper); border: 1px solid var(--ink); display: flex; flex-direction: column; gap: 14px; }
.contact-panel h3 { font-size: 18px; font-weight: 640; }
.contact-panel ul { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.contact-panel li { padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: 16px; }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: var(--dark-text); }
.footer-inner { padding-block: 48px 36px; display: flex; flex-direction: column; gap: 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 15px; }
.footer-nav a { color: var(--dark-text); text-decoration: none; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }
.footer-legal { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--dark-rule); font-size: 13px; color: var(--dark-sub); }
.site-footer :focus-visible { outline-color: var(--dark-text); }

/* ── Privacy / simple pages ────────────────────────────────────── */
.doc { padding-block: clamp(56px, 7vw, 96px); max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.doc h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 650; }
.doc h2 { margin-top: 28px; font-size: 22px; font-weight: 620; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc .updated { font-family: var(--mono); font-size: 13px; color: var(--sub); }
.doc .fill-in { background: var(--highlight); padding: 1px 4px; color: var(--ink); }
