/* ============================================================
   IDEA NEXUS VENTURES · CHART PLATE STYLESHEET
   Aesthetic: occult-astronomical cartography
   Every token here is law. See styleguide.html.
   ============================================================ */

:root {
  /* — Palette · The Five Inks — */
  --void:       #0B0814;   /* deep violet-black field */
  --void-2:     #120D1F;   /* raised plate surface */
  --void-3:     #1A1230;   /* hover / active surface */
  --gold:       #C9A24A;   /* antique gold — linework, labels */
  --gold-bright:#E8C878;   /* star cores, hover text */
  --gold-dim:   rgba(201,162,74,.32); /* hairlines, orbital rings */
  --ember:      #E8542E;   /* the focal fire — one per view */
  --plum:       #6E4E9E;   /* illustration, secondary glow */
  --parchment:  #EAE3D2;   /* primary text */
  --faint:      #9C93AC;   /* secondary text */

  /* — Type — */
  --display: 'Cinzel', serif;          /* engraved capitals */
  --body:    'Spectral', serif;        /* expedition log */
  --mono:    'Space Mono', monospace;  /* instrument readouts */

  /* — Rhythm — */
  --frame: 22px;         /* map-plate margin */
  --plate-pad: clamp(24px, 4vw, 48px);
  --section-gap: clamp(80px, 12vh, 140px);
  --measure: 62ch;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--parchment);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--void); }

/* ============================================================
   THE MAP PLATE FRAME
   A hairline gold border with tick marks — the whole site
   sits inside a chart plate.
   ============================================================ */
.plate-frame {
  position: fixed;
  inset: var(--frame);
  border: 1px solid var(--gold-dim);
  pointer-events: none;
  z-index: 50;
}
.plate-frame::before,
.plate-frame::after {
  content: '';
  position: absolute;
  background:
    repeating-linear-gradient(to right,
      var(--gold-dim) 0 1px, transparent 1px 40px);
  height: 7px; left: 40px; right: 40px;
}
.plate-frame::before { top: -4px; }
.plate-frame::after  { bottom: -4px; }

.plate-corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--gold);
  opacity: .75;
  white-space: nowrap;
}
.plate-corner.tl { top: -1px; left: -1px; transform: translateY(-100%); padding-bottom: 4px; }
.plate-corner.tr { top: -1px; right: -1px; transform: translateY(-100%); padding-bottom: 4px; }
.plate-corner.bl { bottom: -1px; left: -1px; transform: translateY(100%); padding-top: 4px; }
.plate-corner.br { bottom: -1px; right: -1px; transform: translateY(100%); padding-top: 4px; }

/* ============================================================
   BACKGROUND CONSTELLATION — The Shape of Trust
   Fixed, faint, behind everything.
   ============================================================ */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.sky svg { width: 100%; height: 100%; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: calc(var(--frame) + 26px) calc(var(--frame) + 34px) 26px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .3em;
  color: var(--parchment);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark .dot { color: var(--ember); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--faint);
  text-decoration: none;
  transition: color .25s;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--gold-bright); }
.nav-links a[aria-current="page"] {
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 3px;
}

/* ============================================================
   TYPOGRAPHY ROLES
   ============================================================ */
.readout {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}
.readout .sep { color: var(--ember); padding: 0 .35em; }

h1, .h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 6.4vw, 74px);
  line-height: 1.08;
  letter-spacing: .015em;
  color: var(--parchment);
}
h2, .h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.15;
  color: var(--parchment);
}
h3, .h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--gold-bright);
}
.lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--faint);
  max-width: var(--measure);
}
.lede em { color: var(--parchment); font-style: italic; }
p { max-width: var(--measure); color: var(--faint); }
p strong { color: var(--parchment); font-weight: 600; }
a.inline {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  transition: border-color .25s;
}
a.inline:hover { border-color: var(--gold-bright); }

/* ============================================================
   LAYOUT SHELLS
   ============================================================ */
main { position: relative; z-index: 5; }
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 calc(var(--frame) + 34px);
}
section { padding: calc(var(--section-gap) / 2) 0; }

.section-head { margin-bottom: 44px; }
.section-head .readout { display: block; margin-bottom: 16px; }
.section-head h2 { margin-bottom: 14px; }

.rule {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim) 15%, var(--gold-dim) 85%, transparent);
  margin: 0 auto;
  max-width: 1180px;
}

/* ============================================================
   BUTTONS — instrument controls
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  background: transparent;
  cursor: pointer;
  transition: background .25s, color .25s, box-shadow .25s;
}
.btn:hover, .btn:focus-visible {
  background: var(--gold);
  color: var(--void);
  box-shadow: 0 0 24px rgba(201,162,74,.35);
}
.btn.solid {
  background: var(--gold);
  color: var(--void);
}
.btn.solid:hover { background: var(--gold-bright); box-shadow: 0 0 32px rgba(232,200,120,.45); }
.btn.ember {
  border-color: var(--ember);
  color: var(--ember);
}
.btn.ember:hover { background: var(--ember); color: var(--void); box-shadow: 0 0 24px rgba(232,84,46,.4); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

/* ============================================================
   CHART PLATES — cards
   ============================================================ */
.chart-plate {
  position: relative;
  background: linear-gradient(160deg, var(--void-2), var(--void));
  border: 1px solid var(--gold-dim);
  padding: var(--plate-pad);
  transition: border-color .3s, transform .3s;
}
.chart-plate:hover { border-color: var(--gold); }
.chart-plate .plate-id {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--gold-dim);
}
.chart-plate h3 { margin: 14px 0 10px; }
.chart-plate p { font-size: 15.5px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ============================================================
   FUSION GAUGE — spectral progress line
   ============================================================ */
.gauge {
  margin-top: 20px;
}
.gauge-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}
.gauge-label .val { color: var(--gold-bright); }
.gauge-track {
  height: 3px;
  background: rgba(201,162,74,.12);
  position: relative;
  overflow: visible;
}
.gauge-fill {
  height: 100%;
  background: linear-gradient(to right, var(--plum), var(--gold), var(--ember));
  position: relative;
}
.gauge-fill::after {
  content: '';
  position: absolute;
  right: -3px; top: 50%;
  width: 7px; height: 7px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-bright), 0 0 22px rgba(232,84,46,.6);
}

/* ============================================================
   STAGE BADGES — the nursery ladder
   ============================================================ */
.stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid;
}
.stage::before { content: '✦'; font-size: 9px; }
.stage.s1 { color: var(--plum);        border-color: rgba(110,78,158,.5); }
.stage.s2 { color: var(--gold);        border-color: var(--gold-dim); }
.stage.s3 { color: var(--gold-bright); border-color: rgba(232,200,120,.5); }
.stage.s4 { color: var(--ember);       border-color: rgba(232,84,46,.55); }

/* ============================================================
   LOG ENTRIES — growth timeline inside nursery cards
   ============================================================ */
.log { margin-top: 22px; border-top: 1px solid rgba(201,162,74,.15); }
.log-entry {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dotted rgba(201,162,74,.18);
  font-size: 14px;
}
.log-entry .when {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--gold);
  padding-top: 3px;
}
.log-entry .what { color: var(--faint); }
.log-entry.next .what { color: var(--parchment); font-style: italic; }
.log-entry.next .when { color: var(--ember); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  position: relative;
  z-index: 5;
  padding: 60px calc(var(--frame) + 34px) calc(var(--frame) + 44px);
  text-align: center;
}
footer .readout { opacity: .8; }
footer .foot-links {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
footer .foot-links a { color: var(--faint); text-decoration: none; transition: color .25s; }
footer .foot-links a:hover { color: var(--gold-bright); }

/* ============================================================
   MOTION — restrained, ambient
   ============================================================ */
@keyframes twinkle {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}
@keyframes drawline {
  to { stroke-dashoffset: 0; }
}
.star-pt { animation: twinkle 4s ease-in-out infinite; }
.star-pt:nth-child(2n) { animation-delay: 1.3s; }
.star-pt:nth-child(3n) { animation-delay: 2.6s; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .star-pt { animation: none; opacity: .8; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .nav-links { gap: 18px; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  :root { --frame: 12px; }
  .plate-corner { display: none; }
  .nav { padding-top: calc(var(--frame) + 18px); }
}
