/* ============================================================
   StudyDiscovery — tactical HUD design system
   Black / white / gold. Cut corners. Dot grids. Plus markers.
   Fonts: Beyond 2025 (display) · Brickers (gold accents) ·
          Courier Prime (technical body voice)
   ============================================================ */

@font-face {
  font-family: "Beyond 2025";
  src: url("./assets/fonts/Beyond 2025.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Brickers";
  src: url("./assets/fonts/Brickers.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("./assets/fonts/CourierPrime-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("./assets/fonts/CourierPrime-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("./assets/fonts/CourierPrime-Italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fffefc;
  --ink: #0a0a0a;
  --ink-soft: #2b2b2b;
  --muted: #6f6a5c;
  --gold: #8a7440;
  --gold-deep: #77643b;
  --gold-soft: rgba(138, 116, 64, 0.16);
  --line-gold: rgba(138, 116, 64, 0.9);
  --line-ink: rgba(10, 10, 10, 0.85);
  --danger: #9b3b30;
  --ok: #16704e;
  --warning: #9f761e;

  --display: "Beyond 2025", "Courier Prime", monospace;
  --accent: "Brickers", "Beyond 2025", monospace;
  --body: "Courier Prime", "Courier New", monospace;

  /* bound the whole layout so the % column widths compute against a fixed,
     narrower window rather than sprawling across the full viewport */
  --maxw: 1120px;
  --gutter: clamp(1.2rem, 4vw, 3rem);

  /* the HUD corner-cut sizes */
  --cut: 26px;
  --cut-lg: 44px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

/* one padded container: sections cap at --maxw and centre; the gutter here keeps
   framed panels off the screen edge on narrow viewports */
main { padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 99;
}
.skip-link:focus { left: 0; }

/* ---------- load / scroll reveals ---------- */
.reveal {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.reveal:nth-of-type(2) { animation-delay: 0.08s; }
.reveal:nth-of-type(3) { animation-delay: 0.16s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-on-scroll.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-on-scroll { animation: none; opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Header + side nav
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 3vw, 2rem) clamp(1.2rem, 5vw, 4rem);
}
.brand-mark img { width: clamp(44px, 5vw, 60px); height: auto; }

.menu-toggle {
  display: grid;
  gap: 6px;
  padding: 10px 6px;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 44px;
  height: 5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(300px, 82vw);
  background: var(--paper);
  border-left: 3px solid var(--ink);
  transform: translateX(105%);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 50;
  padding: 6rem 0 2rem;
}
.side-nav.is-open { transform: none; box-shadow: -18px 0 40px rgba(10,10,10,0.18); }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-nav a {
  display: block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--paper);
  background: var(--gold);
  padding: 0.85rem 1.4rem;
  margin-right: 2.4rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background 0.2s ease, transform 0.2s ease;
}
.side-nav a:hover { background: var(--ink); transform: translateX(-6px); }
.side-nav a.is-active { background: var(--ink); }

/* ============================================================
   Hero wordmark
   ============================================================ */
.hero {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(0.5rem, 2vw, 1.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.hero-kicker {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  letter-spacing: 0.55em;
  text-transform: uppercase;
  margin: 0 0 0.2rem 0.35rem;
}
.hero-wordmark {
  font-family: var(--display);
  font-size: clamp(3rem, 11.5vw, 8.75rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}
.hero-tagline {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: clamp(0.62rem, 1.55vw, 1.05rem);
  margin: 0.9rem 0 0;
  text-align: right;
  padding-right: clamp(0.2rem, 2vw, 1.4rem);
}

/* ============================================================
   HUD panel primitives
   ============================================================ */
.hud-panel {
  position: relative;
  border: 2.5px solid var(--line-gold);
  background: var(--paper);
  clip-path: polygon(
    var(--cut-lg) 0, 100% 0,
    100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%,
    0 100%, 0 var(--cut-lg)
  );
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
}

/* the solid gold edge-notch from the mockups */
.hud-notch {
  position: absolute;
  left: -2px;
  top: 18%;
  width: 14px;
  height: 120px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 12%, 100% 88%, 0 100%);
}
.hud-notch--top {
  left: 38%;
  top: -2px;
  width: 160px;
  height: 14px;
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
}

/* dot-matrix ornament */
.dot-grid {
  position: absolute;
  width: 92px;
  height: 66px;
  background-image: radial-gradient(var(--gold) 1.6px, transparent 1.8px);
  background-size: 13px 13px;
  opacity: 0.9;
  animation: dotpulse 5s ease-in-out infinite;
}
.dot-grid--tr { top: 18px; right: 22px; }
.dot-grid--br { bottom: 18px; right: 22px; }
@keyframes dotpulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.45; }
}

.panel-kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  margin: 0 0 1rem;
}

/* ============================================================
   WHAT IS panel — uses the designed panel-frame-large.svg
   ============================================================ */
.what-panel {
  max-width: var(--maxw);
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  /* the frame art (border, corner cuts, notch, dot cluster) is the SVG */
  border: 0;
  clip-path: none;
  background:
    url("./assets/brand/StudyDiscoverypack_panel-frame-large.svg") center / 100% 100% no-repeat;
  padding: clamp(2rem, 5vw, 3.4rem) clamp(2rem, 5vw, 3.6rem);
}
/* the frame supplies these — hide the CSS stand-ins on framed panels */
.what-panel > .dot-grid,
.what-panel > .hud-notch,
.intake-console > .dot-grid,
.intake-console > .hud-notch { display: none; }
.what-lead {
  max-width: 52ch;
  margin: 0 0 1.8rem;
  color: var(--ink-soft);
}
.blackbox-stage video,
.blackbox-stage img {
  width: min(340px, 100%);
  margin-inline: auto;
  filter: drop-shadow(0 26px 22px rgba(10, 10, 10, 0.28));
}

.gold-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  border-bottom: 3px solid var(--gold);
  padding: 0.4rem 3.5rem 0.7rem 0.2rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 34px) 100%, 0 100%);
  transition: background 0.2s ease;
}
.gold-cta:hover { background: var(--gold-soft); }
.plus-run {
  color: var(--gold);
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.05;
}
.gold-cta-label {
  font-family: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--ink);
}
.gold-cta-label em { font-style: normal; }

/* ============================================================
   Console: tier stack + intake form
   ============================================================ */
.console {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 2fr;   /* tiers 1/3 · form 2/3 */
  gap: clamp(1.2rem, 2.6vw, 2.2rem);
  align-items: start;
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.tier-stack {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.7rem);
  min-width: 0;   /* let the 1fr console track set the width, not the cards */
}

/* Tier cards ride the designed tier-N frames (dots, SD icon, TIER label baked
   in). We only overlay the dynamic name / description / price in the open zone. */
.tier-card {
  position: relative;
  min-width: 0;                     /* width comes from the 1fr track */
  /* content defines the height; the frame art fills it. min-width:0 stops the
     grid track from ballooning to the frame's wide intrinsic ratio */
  background: var(--tier-frame) center / 100% 100% no-repeat;
  border: 0;
  padding: clamp(0.9rem, 2.4vw, 1.5rem) clamp(1.1rem, 2.6vw, 1.8rem);
  padding-right: 24%;               /* keep clear of the baked-in icon + dots */
  padding-bottom: 3rem;             /* keep clear of the baked-in TIER label + price */
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tier-card:hover { transform: translateY(-4px); }
.tier-card h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(0.85rem, 1.9vw, 1.05rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}
.tier-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.74rem, 1.5vw, 0.9rem);
  line-height: 1.4;
  max-width: 40ch;
}
/* price sits in the lower-right open corner of the frame */
.tier-card .tier-price {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(0.9rem, 3vw, 1.6rem);
  font-family: var(--accent);
  color: var(--gold);
  font-size: clamp(0.85rem, 1.9vw, 1.15rem);
  letter-spacing: 0.04em;
}

/* ---------- intake console — uses the designed intake-form-frame.svg ---------- */
.intake-console {
  display: grid;
  gap: 1.25rem;
  border: 0;
  clip-path: none;
  background:
    url("./assets/brand/StudyDiscoverypack_intake-forn-frame.svg") center / 100% 100% no-repeat;
  padding: clamp(2.2rem, 4vw, 3.2rem) clamp(2rem, 3.5vw, 3rem) clamp(3rem, 5vw, 4rem);
}

.selector-block {
  border: 0;
  margin: 0;
  padding: 0;
}
.field-label {
  display: block;
  font-family: var(--body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.gold-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0;
  align-items: baseline;
}
.gold-toggle {
  font-family: var(--accent);
  font-size: 1.22rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 0;
  padding: 0.1rem 0.55rem;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}
.gold-toggle + .gold-toggle::before,
.gold-toggle + .gold-toggle--file::before,
.gold-toggle--file + .gold-toggle::before {
  content: "|";
  position: absolute;
  left: -4px;
  color: var(--ink);
  font-family: var(--body);
  font-weight: 700;
}
.gold-toggle:hover { color: var(--ink); }
.gold-toggle.is-selected {
  color: var(--ink);
  background: var(--gold-soft);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.gold-toggle--file { display: inline-block; }

.upload-note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--ok);
  font-weight: 700;
}

.field { display: grid; gap: 0.4rem; }
.field-input {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line-ink);
  padding: 0.7rem 0.85rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  resize: vertical;
}
.field-input:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.scope-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.9rem;
}

.check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.submit-rail {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.4rem;
}
.submit-slab {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.25rem;
  color: var(--paper);
  background: var(--gold);
  border: 0;
  padding: 1.05rem 1.4rem;
  cursor: pointer;
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
  transition: background 0.2s ease, transform 0.15s ease;
}
.submit-slab:hover { background: var(--ink); transform: translateY(-2px); }
.email-slab {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  text-align: center;
  text-decoration: none;
  color: var(--gold);
  border: 2px solid var(--line-gold);
  padding: 0.7rem 1rem;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: background 0.2s ease, color 0.2s ease;
}
.email-slab:hover { background: var(--gold); color: var(--paper); }

/* ---------- assessment output ---------- */
.assessment-panel {
  border: 2px dashed var(--line-gold);
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
}
.assessment-panel h3 {
  font-family: var(--body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0.9rem 0 0.3rem;
}
.assessment-panel ul { margin: 0.2rem 0 0; padding-left: 1.2rem; }
.status-line { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.7rem; }
.chip {
  font-family: var(--body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  padding: 0.28rem 0.6rem;
  border: 2px solid var(--line-ink);
}
.chip.good { border-color: var(--ok); color: var(--ok); }
.chip.warn { border-color: var(--warning); color: var(--warning); }
.chip.stop { border-color: var(--danger); color: var(--danger); }

/* ============================================================
   Deliverables
   ============================================================ */
.deliverables { max-width: var(--maxw); margin-inline: auto; padding: 0 0 clamp(2rem, 5vw, 3.5rem); }

.split-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem;
}
.section-index {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--gold);
  line-height: 1;
}
.split-head h2, .section-head h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.25;
  margin: 0 0 1rem;
}
.lead-copy { max-width: 68ch; color: var(--ink-soft); margin: 0; }

.principle-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
  background: var(--line-ink);
  border: 2px solid var(--line-ink);
  margin: 1.6rem 0 2.5rem;
}
.principle-band article { background: var(--paper); padding: 1.2rem 1.3rem; }
.principle-band span {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-size: 1rem;
}
.principle-band p { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }

.section-head { max-width: 72ch; padding-top: 0.8rem; }

.report-lattice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
  margin-top: 1.6rem;
}
.report-lattice article {
  border: 2px solid var(--line-gold);
  padding: 1.15rem 1.25rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  transition: transform 0.2s ease, background 0.2s ease;
}
.report-lattice article:hover { transform: translateY(-3px); background: var(--gold-soft); }
.report-lattice h3 {
  font-family: var(--body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}
.report-lattice p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

/* ============================================================
   Boundary + footer
   ============================================================ */
.boundary {
  max-width: var(--maxw);
  margin: clamp(2rem, 5vw, 3.5rem) auto;
  border: 2.5px solid var(--line-gold);
  clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
  padding: clamp(1.2rem, 3vw, 1.8rem) clamp(1.4rem, 4vw, 2.4rem);
}
.boundary p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 92ch;
}

.site-footer { background: var(--ink); color: var(--paper); }
.binary-strip {
  display: flex;
  overflow: hidden;
  background: var(--paper);
  padding: 0.5rem clamp(1.2rem, 5vw, 4rem) 0.8rem;
  gap: 2rem;
}
.binary-strip img { height: 22px; width: auto; opacity: 0.92; }
.footer-inner {
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1.2rem, 5vw, 4rem);
}
.footer-kicker {
  font-family: var(--display);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0;
}
.footer-wordmark {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1;
  margin: 0.1rem 0 0.4rem;
}
.footer-tagline {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.62rem;
  margin: 0;
  color: rgba(255, 254, 252, 0.75);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .what-panel { grid-template-columns: 1fr; }
  .blackbox-stage { order: -1; }
  .blackbox-stage video, .blackbox-stage img { width: min(240px, 70%); }
  .console { grid-template-columns: 1fr; }
  .intake-console { order: -1; }
}
@media (max-width: 560px) {
  :root { --cut: 18px; --cut-lg: 28px; }
  .hero-tagline { text-align: left; letter-spacing: 0.22em; }
  .split-head { grid-template-columns: 1fr; }
  .gold-toggle { font-size: 1.05rem; }
}
