/* DUNDAL — "The Registry" design system v1.0 (LOCKED — see /DESIGN.md).
   Reference render: docs/design/homepage-reference.html. Tokens are law. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fraunces-roman.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
}

:root {
  --night: #0f1523;
  --night-2: #141b2c;
  --night-3: #1a2338;
  --paper: #f0e7d3;
  --paper-2: #e6dbc0;
  --ink-paper: #1d2333;
  --text: #e9e4d6;
  --text-2: #a8adbb;
  --text-3: #6f7688;
  --clay: #cf5f35;
  --gold: #c9a24b;
  --live: #4cc98a;
  --line: #232c42;
  --line-2: #2d3854;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 21, 35, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top);
}
.nav { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  color: var(--paper); text-decoration: none; letter-spacing: -.01em;
  display: inline-flex; align-items: center;
}
.logo .dot { color: var(--clay); }
.logo img { height: 40px; width: auto; display: block; }
@media (min-width: 900px) { .logo img { height: 46px; } }
.links { display: none; align-items: center; gap: 4px; margin-left: auto; }
.links a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2); text-decoration: none;
}
.links a svg { width: 15px; height: 15px; stroke: var(--gold); opacity: .85; }
.links a:hover, .links a[aria-current="page"] { color: var(--text); background: var(--night-2); }
.cta {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  background: var(--clay); color: #fff; text-decoration: none;
  font-size: 13.5px; font-weight: 600; padding: 11px 18px; border-radius: 999px; white-space: nowrap;
}
.links ~ .cta { margin-left: 8px; }
.burger {
  margin-left: auto; display: inline-flex; flex-direction: column; gap: 4px;
  background: none; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 12px 11px; cursor: pointer; min-width: 42px; min-height: 42px; justify-content: center;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--text); }
.drawer { display: none; border-top: 1px solid var(--line); padding: 10px 0 16px; }
.drawer.open { display: block; }
.drawer a {
  display: flex; align-items: center; gap: 12px; padding: 13px 6px; font-size: 15.5px;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line);
}
.drawer a svg { width: 17px; height: 17px; stroke: var(--gold); }
@media (min-width: 900px) {
  .links { display: flex; }
  .burger, .drawer { display: none !important; }
  .cta { margin-left: 8px; }
}

/* ---------- heroes ---------- */
.hero { padding: 72px 0 46px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(201, 162, 75, .07), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(207, 95, 53, .06), transparent 60%);
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(44px, 9vw, 96px); line-height: 1.02;
  letter-spacing: -.025em; font-weight: 560; color: var(--paper); margin: 18px 0 0; max-width: 12ch;
}
.hero h1 em { font-style: italic; color: var(--clay); font-weight: 520; }
.hero .sub { font-size: 17.5px; color: var(--text-2); max-width: 58ch; margin: 26px 0 0; }
.hero .sub b { color: var(--text); font-weight: 600; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.verified { margin-top: 30px; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.verified b { color: var(--live); font-weight: 500; }

/* subpage hero */
.page-head { padding: 56px 0 34px; border-bottom: 1px solid var(--line); }
.page-head h1 {
  font-family: var(--serif); font-size: clamp(34px, 6vw, 60px); line-height: 1.04;
  letter-spacing: -.02em; font-weight: 560; color: var(--paper); margin: 12px 0 0;
}
.page-head h1 em { font-style: italic; color: var(--clay); font-weight: 520; }
.page-head .sub { font-size: 16.5px; color: var(--text-2); max-width: 64ch; margin: 18px 0 0; }

.btn {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-weight: 600; font-size: 14.5px; padding: 14px 22px; border-radius: 999px; min-height: 44px;
}
.btn.primary { background: var(--clay); color: #fff; }
.btn.ghost { border: 1px solid var(--line-2); color: var(--text); }

/* ---------- proof strip ---------- */
.proof { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--night-2); }
.proof .wrap { display: grid; grid-template-columns: 1fr; gap: 0; }
.proof .p { padding: 20px 4px; border-top: 1px solid var(--line); }
.proof .p:first-child { border-top: none; }
.proof .k {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
}
.proof .v { font-family: var(--serif); font-size: 26px; color: var(--paper); margin-top: 2px; }
.proof .v small { font-family: var(--sans); font-size: 13px; color: var(--text-2); }
@media (min-width: 720px) {
  .proof .wrap { grid-template-columns: repeat(4, 1fr); }
  .proof .p { border-top: none; border-left: 1px solid var(--line); padding: 26px 22px; }
  .proof .p:first-child { border-left: none; }
}

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 8px;
}
.sec-head h2, .sec-title {
  font-family: var(--serif); font-size: clamp(28px, 4.5vw, 40px); font-weight: 560;
  letter-spacing: -.02em; color: var(--paper); margin: 6px 0 0;
}
.sec-head .more {
  font-family: var(--mono); font-size: 12.5px; color: var(--gold);
  text-decoration: none; white-space: nowrap;
}
.sec-sub { color: var(--text-2); max-width: 62ch; margin: 0 0 26px; }

/* ---------- the register ---------- */
.register { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--night-2); }
.row {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 18px 16px;
  border-top: 1px solid var(--line); text-decoration: none; position: relative;
}
.row:first-child { border-top: none; }
.row:hover { background: var(--night-3); }
.row .no { font-family: var(--mono); font-size: 12px; color: var(--text-3); padding-top: 5px; }
.row .name {
  font-family: var(--serif); font-size: 20px; font-weight: 560;
  color: var(--paper); letter-spacing: -.01em;
}
.row .what { grid-column: 2; font-size: 13.5px; color: var(--text-2); }
.row .meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.row .open { font-family: var(--mono); font-size: 12px; color: var(--gold); margin-left: auto; white-space: nowrap; }
@media (min-width: 820px) {
  .row { grid-template-columns: 64px 2.2fr 3fr auto; align-items: center; padding: 18px 22px; }
  .row .what { grid-column: auto; }
  .row .meta { grid-column: auto; margin-top: 0; justify-content: flex-end; }
}
.reg-foot {
  padding: 14px 22px; font-family: var(--mono); font-size: 11.5px;
  color: var(--text-3); border-top: 1px solid var(--line);
}

.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 3px 8px;
}
.seal {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 4px; padding: 3px 8px;
}
.seal.live { color: var(--live); border: 1px solid rgba(76, 201, 138, .35); background: rgba(76, 201, 138, .07); }
.seal.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 6px var(--live); }
.seal.wip { color: var(--gold); border: 1px solid rgba(201, 162, 75, .35); background: rgba(201, 162, 75, .07); }

/* ---------- paper case file + slip ---------- */
.case {
  background: var(--paper); color: var(--ink-paper); border-radius: 16px;
  overflow: hidden; position: relative;
}
.case .tab {
  position: absolute; top: 0; left: 26px; background: var(--clay); color: #fff;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 0 0 6px 6px;
}
.case-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.case .body { padding: 52px 26px 30px; }
.case h3, .case h2 {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 38px); font-weight: 600;
  letter-spacing: -.02em; margin: 0 0 12px;
}
.case p { margin: 0 0 14px; color: #3b4256; font-size: 15.5px; }
.case ul { list-style: none; margin: 18px 0 0; padding: 0; }
.case li { padding: 10px 0; border-top: 1px solid #d8cdb2; font-size: 14.5px; display: flex; gap: 10px; }
.case li b { font-weight: 650; }
.case li::before { content: "—"; color: var(--clay); flex: none; }
/* Narrow screens: stack the bold lead above its explanation instead of
   squeezing it into a flex column where short leads wrap mid-phrase. */
@media (max-width: 620px) {
  .case li { display: block; }
  .case li::before { display: none; }
  .case li b { display: block; margin-bottom: 2px; }
}
.facs { background: var(--paper-2); padding: 52px 26px 30px; border-top: 2px dashed #cabf9f; }
@media (min-width: 900px) {
  .case-grid { grid-template-columns: 1.2fr 1fr; }
  .facs { border-top: none; border-left: 2px dashed #cabf9f; }
}
.slip {
  background: #fbf6ea; border: 1px solid #d6caa8; border-radius: 8px; padding: 18px;
  max-width: 380px; margin: 0 auto; font-family: var(--mono); font-size: 12px; color: #333a4e;
  box-shadow: 0 12px 30px rgba(20, 25, 45, .18); transform: rotate(-1deg);
}
.slip .hd {
  display: flex; justify-content: space-between; border-bottom: 1px solid #d6caa8;
  padding-bottom: 8px; margin-bottom: 10px; font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: #7a7256;
}
.slip .ln { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.slip .ln b { font-weight: 600; text-align: right; }
.slip .stamp {
  margin-top: 12px; display: inline-block; border: 2px solid #2c7a52; color: #2c7a52;
  border-radius: 6px; padding: 4px 10px; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; transform: rotate(-4deg);
}

/* ---------- capability / generic cards ---------- */
.caps { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cap { border: 1px solid var(--line-2); border-radius: 14px; padding: 24px; background: var(--night-2); }
.cap .no { font-family: var(--mono); font-size: 11px; color: var(--gold); }
.cap h3 { font-family: var(--serif); font-size: 22px; font-weight: 560; color: var(--paper); margin: 8px 0 8px; }
.cap p { font-size: 14px; color: var(--text-2); margin: 0; }
.cap .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
@media (min-width: 820px) {
  .caps { grid-template-columns: repeat(3, 1fr); }
  .caps.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- brands strip ---------- */
.brands { border-top: 1px solid var(--line); background: var(--night-2); }
.brands .wrap { padding-top: 44px; padding-bottom: 48px; }
.brand-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; align-items: center; }
.brand { font-family: var(--serif); font-size: 17px; color: var(--text-2); white-space: nowrap; }
.brand i { font-style: normal; color: var(--live); margin-right: 6px; font-size: 11px; vertical-align: 2px; }

/* ---------- prose (blog, about) ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-family: var(--serif); font-weight: 560; letter-spacing: -.02em; color: var(--paper); font-size: 28px; margin: 34px 0 10px; }
.prose h3 { font-family: var(--serif); font-weight: 560; color: var(--paper); font-size: 21px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text-2); font-size: 16px; }
.prose a { color: var(--gold); }
.prose strong { color: var(--text); }
.prose blockquote { border-left: 2px solid var(--clay); margin: 18px 0; padding: 2px 0 2px 18px; font-style: italic; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--night-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 calc(28px + env(safe-area-inset-bottom));
  background: var(--night);
}
.site-footer .foot {
  display: flex; flex-wrap: wrap; gap: 16px 30px; justify-content: space-between;
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text-2); }

/* ---------- motion (R10) ----------
   Pure CSS, no JS. `.reveal` fades up as it is painted; the animation is the
   ONLY thing that ever sets opacity below 1, so content cannot be left
   invisible by a script that fails, races the DOM, or misses a client-side
   navigation. An earlier JS-gated version (hide by default, reveal via
   IntersectionObserver) shipped exactly that bug twice — see DESIGN.md R10. */
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.reveal { animation: reveal-in .6s ease both; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}

