/* ═══════════════════════════════════════════════════════════════
   BRIGHTFIELD — "UNDER THE LIGHT"
   An optical-precision research dossier system.
   Concept: brightfield microscopy — luminous specimens observed
   against a dark field. Dark mastheads, bone reading surfaces,
   copper accent, aperture motifs. Newsreader (serif display + read)
   · Space Grotesk (technical chrome) · IBM Plex Mono (metadata).
═══════════════════════════════════════════════════════════════ */

:root {
  /* — Field & paper — */
  --field:      #14110b;   /* near-black warm — the dark field */
  --field-2:    #1d1810;   /* raised dark panel */
  --field-3:    #2a2318;   /* hairline on dark */
  --paper:      #f1ece0;   /* bone reading surface */
  --paper-2:    #e9e2d2;   /* recessed paper */
  --paper-3:    #e0d7c3;   /* deeper recess */
  --surface:    #faf6ec;   /* raised card on paper */

  /* — Ink — */
  --ink:        #16120b;
  --ink-2:      #3a3327;
  --muted:      #6b6353;
  --faint:      #968d79;
  --on-dark:    #e7dfce;
  --on-dark-mut:#a89e87;
  --on-dark-fnt:#6f6857;

  /* — Lines — */
  --line:       #ddd4c0;
  --line-2:     #cfc4ab;
  --line-strong:#b9ac8d;

  /* — Copper accent (primary) — */
  --copper:       #b5531f;
  --copper-deep:  #8f3f15;
  --copper-bright:#d98b3a;  /* luminous, for on-dark */
  --copper-soft:  #ecd9bf;
  --copper-tint:  #f3e6d2;
  --copper-ink:   #6e3211;

  /* — Data palette (scholarly, varied hue) — */
  --d-copper:  #b5531f;
  --d-petrol:  #1f4a48;
  --d-gold:    #c0902f;
  --d-slate:   #57636b;
  --d-oxblood: #7a3326;

  /* — Fit scale (sequential copper) — */
  --fit-strong-bg:  #9a4417;
  --fit-strong-fg:  #fbf3e6;
  --fit-partial-bg: #e3c389;
  --fit-partial-fg: #5a3e15;
  --fit-limited-bg: #e6ddca;
  --fit-limited-fg: #8a7f67;

  /* — Type — */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --grot:  "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* — Metrics — */
  --wrap: 1240px;
  --read: 680px;
  --shadow-sm: 0 1px 2px rgba(30,20,8,0.06), 0 3px 10px rgba(30,20,8,0.05);
  --shadow-md: 0 6px 22px rgba(30,20,8,0.09), 0 2px 6px rgba(30,20,8,0.05);
  --shadow-lg: 0 26px 70px rgba(20,14,6,0.18), 0 6px 18px rgba(20,14,6,0.10);
}

* { 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(--paper);
  color: var(--ink);
  font-family: var(--grot);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.08; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--field); color: #fff; padding: 10px 16px; font-family: var(--mono); font-size: 13px; }
.skip-link:focus { left: 8px; top: 8px; }

/* ── Reading progress ── */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--copper-deep), var(--copper-bright)); z-index: 300; transition: width .1s linear; }

/* ── Atoms ── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

.serif { font-family: var(--serif); }

.eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--copper);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--copper); opacity: .6; }
.eyebrow.no-rule::before { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--grot);
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em; padding: 13px 24px;
  border-radius: 2px; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}
.btn:active { transform: translateY(1px); }
.btn .arr { transition: transform .16s; }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--field); color: var(--paper); }
.btn-primary:hover { background: var(--copper-deep); }
.btn-copper { background: var(--copper); color: #fff; }
.btn-copper:hover { background: var(--copper-deep); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-ghost-light { background: transparent; color: var(--on-dark); border-color: rgba(231,223,206,0.28); }
.btn-ghost-light:hover { border-color: var(--copper-bright); color: #fff; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* aperture mark */
.aperture { width: 32px; height: 32px; border-radius: 6px; flex: none; background: var(--field); position: relative; display: grid; place-items: center; }
.aperture::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--copper-bright); }
.aperture::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--copper-bright); }
.aperture.lg { width: 46px; height: 46px; border-radius: 9px; }
.aperture.lg::before { width: 22px; height: 22px; border-width: 2.5px; }

/* ════ UTILITY BAR ════ */
.utility-bar { background: var(--field); color: var(--on-dark-mut); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; border-bottom: 1px solid var(--field-3); }
.utility-bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 36px; gap: 16px; }
.utility-bar a { color: var(--on-dark-mut); }
.utility-bar a:hover { color: #fff; }
.utility-left { display: flex; align-items: center; gap: 12px; white-space: nowrap; overflow: hidden; }
.utility-left .sep { opacity: .35; }
.utility-left .addr { color: var(--on-dark-fnt); }
.utility-tag { display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark-mut); white-space: nowrap; }
.utility-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--copper-bright); box-shadow: 0 0 8px rgba(217,139,58,0.6); }

/* ════ HEADER ════ */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(241,236,224,0.82); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); transition: box-shadow .2s, background .2s; }
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(241,236,224,0.94); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1; }
.brand-name .sub { display: block; white-space: nowrap; font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: 0.2em; color: var(--faint); text-transform: uppercase; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links > a { font-family: var(--grot); font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; padding: 9px 14px; border-radius: 2px; transition: color .14s, background .14s; }
.nav-links > a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links > a[aria-current="page"] { color: var(--copper-deep); }
.nav-cta { margin-left: 12px; background: var(--field); color: var(--paper) !important; padding: 11px 20px !important; font-weight: 600 !important; }
.nav-cta:hover { background: var(--copper-deep) !important; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 2px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 18px; height: 1.6px; background: var(--ink); }

/* Mobile menu */
.mobile-menu { position: fixed; inset: 0; z-index: 150; background: var(--field); color: var(--on-dark); padding: 22px 28px 40px; transform: translateY(-10px); opacity: 0; pointer-events: none; transition: opacity .24s, transform .24s; overflow-y: auto; display: flex; flex-direction: column; }
.mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.mobile-menu-top .brand-name { color: #fff; }
.mobile-menu-close { width: 44px; height: 44px; border: 1px solid var(--field-3); background: var(--field-2); border-radius: 2px; font-size: 22px; cursor: pointer; color: var(--on-dark); }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -0.01em; color: #fff; padding: 17px 0; border-bottom: 1px solid var(--field-3); display: flex; align-items: baseline; gap: 16px; }
.mobile-menu nav a:last-of-type { border-bottom: none; }
.mobile-menu nav a .idx { font-family: var(--mono); font-size: 12px; color: var(--copper-bright); font-weight: 400; }
.mobile-menu .btn { margin-top: 28px; justify-content: center; }
.mobile-menu-foot { margin-top: auto; padding-top: 30px; font-family: var(--mono); font-size: 12px; color: var(--on-dark-fnt); }

/* ════ SECTIONS ════ */
.section { padding: 96px 0; }
.section-sm { padding: 60px 0; }
.band-paper2 { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark { background: var(--field); color: var(--on-dark); }
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: #fff; }
.band-dark .eyebrow { color: var(--copper-bright); }
.band-dark .eyebrow::before { background: var(--copper-bright); }

.section-head { max-width: 780px; margin-bottom: 52px; }
.section-head .eyebrow { margin-bottom: 20px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.04; }
.section-head p { margin-top: 20px; font-size: 18px; line-height: 1.62; color: var(--muted); }
.band-dark .section-head p { color: var(--on-dark-mut); }

/* ════ FOOTER ════ */
.site-footer { background: var(--field); color: var(--on-dark-mut); padding: 76px 0 32px; border-top: 3px solid var(--copper); }
.footer-top { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 44px; }
.footer-brand strong { color: #fff; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 12px; }
.footer-brand p { margin-top: 18px; font-size: 14.5px; line-height: 1.62; max-width: 320px; color: var(--on-dark-fnt); }
.footer-brand .fc { margin-top: 18px; font-family: var(--mono); font-size: 12px; }
.footer-brand .fc a { color: var(--copper-bright); }
.footer-col h4 { color: #fff; font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; margin-bottom: 18px; }
.footer-col a { display: block; font-size: 14px; color: var(--on-dark-mut); padding: 6px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 60px; padding-top: 26px; border-top: 1px solid var(--field-3); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--mono); font-size: 12px; }
.footer-legal a { color: var(--on-dark-fnt); }
.footer-legal a:hover { color: #fff; }
.footer-copyright { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--on-dark-fnt); }
.footer-disclaimer { margin-top: 20px; font-size: 12.5px; line-height: 1.65; color: var(--on-dark-fnt); max-width: 920px; }

/* ════ REVEAL (transform-only; always visible) ════ */
[data-reveal] { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { transform: translateY(14px); transition: transform .7s cubic-bezier(.2,.7,.2,1); }
  [data-reveal].in { transform: none; }
}

/* ════ RESPONSIVE ════ */
@media (max-width: 1060px) { .nav-links { display: none; } .nav-toggle { display: flex; } }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 34px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .section { padding: 64px 0; }
  .utility-left .addr, .utility-left .sep { display: none; }
  .footer-top { grid-template-columns: 1fr; }
}
