/* ============================================================
   DUX DIGITAL: 5 Numbers tool page
   Copies duxdigital.media Direction A "Magazine cover" tokens
   (dux-website/assets/styles.css + DESIGN.md, 2026-10-09).
   Bodoni Moda (display) + Jost (text, caps). Parchment, ink, blush.
   Standalone file on purpose: the main site is owned by another
   project, this page never links its stylesheet.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #F7F3EA;
  --bg-alt: #F1EADC;
  --surface: #FBF8F1;
  --champagne: #EBDAB0;
  --ink: #2B2B2B;
  --ink-2: #5F554D;
  --taupe: #A39384;
  --taupe-light: #D9D0C1;
  --accent: #B76E79;
  --accent-text: #8E4E5A;
  --accent-btn: #874A55;
  --accent-btn-hover: #733E48;
  --error: #9B2C2C;
  --line: rgba(43, 43, 43, 0.14);
  --line-strong: rgba(43, 43, 43, 0.26);
  --field-border: #8A7F75;
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Jost', 'Futura', -apple-system, BlinkMacSystemFont, sans-serif;
  --wrap: 1280px;
  --pad: 40px;
  --transition: 0.2s ease;
}
@media (max-width: 900px) { :root { --pad: 20px; } }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  font-family: var(--sans); font-size: 18px; line-height: 1.6;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 18px; font-weight: 500; z-index: 10; }
.skip-link:focus { top: 12px; }

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

/* ---------- masthead ---------- */
.mast { padding-top: 24px; }
.nameplate {
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 500;
  font-size: clamp(48px, 10.5vw, 148px); line-height: 0.86; letter-spacing: -0.02em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  display: flex; justify-content: space-between; align-items: center;
}
.nameplate .crown { color: var(--accent); font-size: 0.42em; font-weight: 400; }
.dateline {
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink);
  margin-top: 18px; padding: 10px 0;
  font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
}

/* ---------- cover ---------- */
.cover {
  display: grid; grid-template-columns: 7fr 5fr; column-gap: 56px; row-gap: 0;
  grid-template-areas: "copy form" "lines form"; grid-template-rows: auto 1fr;
  padding-top: 48px; padding-bottom: 80px; align-items: start;
}
.cover-copy { grid-area: copy; }
.cover .coverlines { grid-area: lines; }
.cover .form-card { grid-area: form; }
.kicker { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-text); font-weight: 500; margin-bottom: 18px; }
h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(38px, 4.6vw, 66px); line-height: 1.02; letter-spacing: -0.01em;
  color: var(--ink); text-wrap: balance;
}
.gold { font-style: italic; font-weight: 400; color: var(--accent-text); }
h1 .gold { display: block; margin-top: 10px; }
.hero-sub { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 26px 0 0; max-width: 560px; text-wrap: pretty; }
.coverlines { margin-top: 40px; border-top: 1px solid var(--line-strong); list-style: none; max-width: 560px; }
.coverlines li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line-strong); font-size: 17px; }
.coverlines .n { font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 23px; color: var(--accent-text); line-height: 1; }
.coverlines a { text-decoration: none; }
.coverlines a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- form card ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line-strong); border-top: 2px solid var(--ink); padding: 32px 32px 30px; }
.card-title { font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.1; margin-bottom: 10px; text-wrap: balance; }
.card-lead { font-size: 16.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label, .calc-row label { font-size: 12.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.field input, .calc-row input {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 17px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--field-border); border-radius: 2px;
  transition: border-color var(--transition), box-shadow var(--transition); -webkit-appearance: none; appearance: none;
}
.field input:focus, .calc-row input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.35); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border-radius: 2px; padding: 19px 32px; line-height: 1.2;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn-primary { background: var(--accent-btn); color: var(--bg); border: 1px solid var(--accent-btn); }
.btn-primary:hover { background: var(--accent-btn-hover); border-color: var(--accent-btn-hover); }
.btn[disabled] { opacity: 0.7; cursor: wait; }
.form-submit { width: 100%; margin-top: 4px; }
.form-note { font-size: 13.5px; color: var(--ink-2); margin-top: 12px; line-height: 1.5; }
.form-note a { color: var(--accent-text); }
.form-status { margin-top: 14px; font-size: 15.5px; font-weight: 500; color: var(--ink); line-height: 1.5; }
.form-status:empty { display: none; }
.form-status.err { color: var(--error); }
.done .done-title { color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.15; margin-bottom: 10px; }
.done p { font-size: 16.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 18px; }
.done .btn { width: 100%; }

/* ---------- section heads ---------- */
.section-head { border-top: 2px solid var(--ink); padding-top: 22px; margin-bottom: 20px; }
.section-title { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
.section-title .gold { display: block; }
.section-lead { font-size: 19px; color: var(--ink-2); line-height: 1.6; margin-top: 22px; max-width: 600px; text-wrap: pretty; }

/* ---------- the five numbers ---------- */
.numbers { background: var(--bg); padding: 24px 0 72px; }
.nums { list-style: none; }
.num {
  display: grid; grid-template-columns: 90px 1.25fr 1fr; gap: 36px; align-items: start;
  padding: 40px 0; border-bottom: 1px solid var(--line-strong);
}
.num:first-child { border-top: 1px solid var(--line-strong); }
.num > .n { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 60px; line-height: 0.85; color: var(--accent); }
.num h3 { font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.1; margin-bottom: 12px; text-wrap: balance; }
.num-copy p { font-size: 17.5px; color: var(--ink-2); line-height: 1.65; margin-bottom: 14px; text-wrap: pretty; }
.num-copy p strong { color: var(--ink); font-weight: 500; }
.num-copy .what { font-size: 19px; color: var(--ink); }
.num-copy .context { font-style: italic; }
.formula { background: var(--bg-alt); border-left: 2px solid var(--accent); padding: 12px 16px; color: var(--ink) !important; font-size: 17px !important; }
.flabel { display: block; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-text); font-weight: 500; margin-bottom: 4px; font-style: normal; }

.calc { background: var(--surface); border: 1px solid var(--line-strong); border-top: 2px solid var(--ink); padding: 22px 22px 18px; }
.calc-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.calc-row label { font-size: 12px; }
.calc-row input { padding: 11px 14px; font-size: 17px; }
.hint { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.calc-out { border-top: 1px solid var(--ink); padding-top: 12px; margin-top: 4px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.out-label { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; color: var(--ink-2); }
.out { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1; color: var(--ink); }
.out-note { flex-basis: 100%; font-size: 14px; color: var(--ink-2); }

/* ---------- Tuesday + second form ---------- */
.tuesday { background: var(--bg-alt); padding: 80px 0; }
.tuesday-inner { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
.tuesday .section-title { border-top: 2px solid var(--ink); padding-top: 22px; }
.about { color: var(--ink) !important; font-family: var(--serif); font-style: italic; font-size: 22px !important; line-height: 1.4 !important; }

.source { font-size: 13.5px; color: var(--ink-2); padding-top: 22px; padding-bottom: 22px; }

/* ---------- footer ---------- */
footer.site-footer { background: var(--ink); color: var(--taupe-light); padding: 56px var(--pad) 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-nameplate {
  font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 9vw, 120px); line-height: 0.86; letter-spacing: -0.02em;
  text-transform: uppercase; color: var(--bg); display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px;
}
.footer-nameplate .crown { color: var(--accent); font-size: 0.42em; font-weight: 400; }
.footer-bottom { border-top: 1px solid rgba(247, 243, 234, 0.2); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-bottom .small { font-size: 13px; }
.legal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.legal-links a { font-size: 14px; color: var(--bg); text-underline-offset: 4px; }
footer.site-footer :focus-visible { outline-color: var(--champagne); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .cover { grid-template-columns: 1fr; grid-template-areas: "copy" "form" "lines"; grid-template-rows: auto; }
  .cover .form-card { margin-top: 32px; }
  .tuesday-inner { grid-template-columns: 1fr; gap: 40px; }
  .num { grid-template-columns: 64px 1fr; gap: 12px 18px; }
  .num > .n { font-size: 44px; grid-row: span 2; }
  .num .calc { grid-column: 2; }
}
@media (max-width: 560px) {
  .dateline { font-size: 11px; letter-spacing: 0.14em; }
  .dateline span:last-child { display: none; }
  .form-card { padding: 26px 18px 24px; }
  .num { grid-template-columns: 1fr; padding: 32px 0; }
  .num > .n { grid-row: auto; }
  .num .calc { grid-column: 1; }
  .num h3 { font-size: 27px; }
  .tuesday { padding: 56px 0; }
}
