/* ==========================================================================
   DaltCo homepage prototype: shared styles
   Brand idea: "Show the work." Platinum datum lines, plan-style grid letters,
   door-number placards, and field-note labels. Used only where they help reading.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL; see assets/fonts/LICENSES.txt) ---------- */
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; } /* retained for reference; no longer the display face */
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 100 700; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

/* ---------- Typography study candidates (DRAFT, not applied to live pages; see brand-guide.html#typography-studies) ---------- */
@font-face { font-family: "Source Serif 4 Study"; src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab Study"; src: url("../fonts/zilla-slab-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab Study"; src: url("../fonts/zilla-slab-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab Study"; src: url("../fonts/zilla-slab-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab Study"; src: url("../fonts/zilla-slab-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* Brand (approved) */
  --blue: #123D91;        /* Kentucky-inspired blue */
  --platinum: #BBC2CC;    /* flat platinum: lines and text on blue only (1.8:1 on white) */
  --white: #FFFFFF;

  /* Metallic platinum study: REJECTED 2026-11-28 — Dalton compared the flat platinum
     against this gradient (assets/brand-guide.html#metal-study) and chose to keep the
     flat, lighter #BBC2CC. Tokens removed; see that section for the rejected swatch. */

  /* Supporting (derived; contrast-checked) */
  --blue-ink: #0B2A66;    /* hover / pressed: 13.7:1 with white */
  --slate: #56667B;       /* "Co" slate from the light lockup: 5.9:1 on white */
  --ink: #18212E;         /* body text: 16.2:1 on white */
  --mist: #F3F5F8;        /* quiet field */
  --on-blue-soft: #D6DBE2;/* secondary text on blue: 7.2:1 */

  /* Review labels: deliberately off-brand so nobody mistakes them for design */
  --flag-bg: #FFF1CC;
  --flag-ink: #7A4A00;    /* 6.7:1 on flag-bg */
  --flag-line: #C98A00;

  /* Type */
  --font-display: "Public Sans", "Futura", "Century Gothic", system-ui, sans-serif; /* chosen 2026-11-28 over Jost; see brand-guide.html#type-studies */
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  /* Layout */
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(72px, 9vw, 136px);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-ink); text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
[id] { scroll-margin-top: 24px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Focus: always visible for keyboard users ---------- */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.on-blue :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

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

/* ---------- Review bar + flags (prototype only: remove before launch) ---------- */
.review-bar {
  background: var(--ink); color: #E8EBF0;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.review-bar .wrap { display: flex; gap: 8px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-block: 7px; }
.review-bar a { color: #FFFFFF; display: inline-block; padding-block: 4px; }
.review-bar strong { color: #FFD873; font-weight: 500; }
@media (max-width: 560px) { .review-bar .rb-extra { display: none; } .review-bar .wrap { padding-block: 6px; } }

.flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; line-height: 1.3;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--flag-ink); background: var(--flag-bg);
  border: 1px dashed var(--flag-line); border-radius: 2px;
  padding: 3px 7px; vertical-align: middle; white-space: normal;
}
.flag::before { content: ""; width: 6px; height: 6px; background: var(--flag-line); transform: rotate(45deg); flex: none; }
.flag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.slot { /* bracketed copy waiting on Dalton */
  color: var(--slate); font-style: italic;
  background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(187,194,204,.22) 6px 7px);
  padding: 0 2px;
}

/* ---------- Header ---------- */
.site-header { background: var(--white); position: relative; z-index: 20; }
.site-header::after { /* full-width platinum separator, borrowed from the card */
  content: ""; display: block; height: 4px; background: var(--platinum);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 88px; }
.brand { flex: none; display: block; margin-left: -6px; }
.brand img { width: 168px; height: auto; }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; gap: 4px 26px; align-items: center; }
.primary-nav a {
  display: inline-flex; align-items: baseline; gap: 7px; padding: 8px 0;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
}
.primary-nav a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--platinum); }
.nav-letter { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--slate); }
.header-cta { flex: none; }

.menu-toggle {
  display: none; margin-left: auto; align-items: center; gap: 10px;
  background: transparent; border: 1.5px solid var(--blue); color: var(--blue);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 14px; min-height: 44px; border-radius: 2px; cursor: pointer;
}
.menu-toggle .bars { width: 16px; height: 10px; position: relative; border-block: 1.5px solid currentColor; }
.menu-toggle[aria-expanded="true"] .bars { border-color: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before, .menu-toggle[aria-expanded="true"] .bars::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor;
}
.menu-toggle[aria-expanded="true"] .bars::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: rotate(-45deg); }

.mobile-nav { display: none; border-top: 1px solid var(--platinum); background: var(--white); }
.mobile-nav ul { list-style: none; padding-block: 8px 20px; }
.mobile-nav li + li { border-top: 1px solid #E4E8ED; }
.mobile-nav a { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 1.125rem; }
.mobile-nav .btn { margin-top: 12px; width: 100%; }

@media (max-width: 1080px) {
  .primary-nav { display: none; }
  .header-inner .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-nav.is-open { display: block; }
}
@media (max-width: 560px) {
  .header-inner { min-height: 72px; }
  .brand img { width: 128px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 2px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-ink); color: var(--white); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: var(--white); }
.btn-on-blue { background: var(--white); color: var(--blue); }
.btn-on-blue:hover { background: var(--mist); color: var(--blue-ink); }
.btn .arrow { font-family: var(--font-mono); font-weight: 400; }
.text-link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--platinum); text-decoration-thickness: 2px; }
.text-link:hover { text-decoration-color: var(--blue); }

/* ---------- Notation system ---------- */
.mono-label {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate);
}
/* Section head: grid bubble + label + datum line */
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(24px, 3vw, 40px); }
.grid-bubble {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--blue); color: var(--blue);
  display: inline-grid; place-items: center;
  font-family: var(--font-display); font-weight: 500; font-size: 1.0625rem; line-height: 1;
}
.sec-head .datum { flex: 1; height: 2px; background: var(--platinum); min-width: 24px; }
.on-blue .grid-bubble { border-color: var(--platinum); color: var(--white); }
.on-blue .mono-label { color: var(--on-blue-soft); }

/* Door-number placard */
.placard {
  display: inline-grid; place-items: center; flex: none;
  min-width: 52px; height: 40px; padding: 0 8px;
  border: 2px solid var(--blue); color: var(--blue);
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.02em; line-height: 1;
}

/* Photo placeholder (doubles as the photo brief) */
.photo-ph {
  position: relative; overflow: hidden; color: #E9EDF3;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #2A4A86 0%, #1B3468 55%, #142A55 100%);
}
.photo-ph .crop { position: absolute; width: 22px; height: 22px; border-color: rgba(255,255,255,.6); border-style: solid; }
.photo-ph .crop.tl { top: 14px; left: 14px; border-width: 1.5px 0 0 1.5px; }
.photo-ph .crop.tr { top: 14px; right: 14px; border-width: 1.5px 1.5px 0 0; }
.photo-ph .crop.bl { bottom: 14px; left: 14px; border-width: 0 0 1.5px 1.5px; }
.photo-ph .crop.br { bottom: 14px; right: 14px; border-width: 0 1.5px 1.5px 0; }
.photo-ph .ph-body { position: absolute; inset: auto 0 0 0; padding: clamp(18px, 3vw, 36px); max-width: 560px; }
.photo-ph .ph-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: #142A55; background: #FFD873; padding: 4px 8px; margin-bottom: 12px;
}
.photo-ph .ph-brief { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.55; color: #DCE2EA; margin: 0; }
.photo-ph .ph-brief b { color: var(--white); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue); color: var(--on-blue-soft); }
.site-footer::before { content: ""; display: block; height: 6px; background: var(--platinum); }
.footer-inner { display: grid; grid-template-columns: minmax(220px, 1.2fr) 2fr; gap: 32px var(--gap); padding-block: 48px 40px; }
.footer-brand img { width: 220px; margin-left: -9px; }
.footer-meta { font-size: 0.9375rem; margin-top: 10px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-cols h2 { font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--platinum); margin-bottom: 12px; }
.footer-cols ul { list-style: none; display: grid; gap: 8px; }
.footer-cols a { color: var(--white); text-decoration: none; display: inline-block; padding-block: 3px; }
.footer-cols a:hover { text-decoration: underline; color: var(--white); }
.footer-legal { border-top: 1px solid rgba(187,194,204,.45); padding-block: 18px 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.8125rem; align-items: center; }
.site-footer .flag { background: #FFF1CC; }
@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* Script-focused landing targets (in-page links) don't need a ring around the whole section */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
