/* EdEx International — quietly academic redesign */

:root {
  /* Color */
  --paper: #FAFAF7;
  --paper-warm: #F4EFE3;
  --paper-deep: #ECE6D5;
  --ink: #111111;
  --ink-soft: #2A2A28;
  --ink-mute: #5A5A55;
  --ink-fade: #8B8A82;
  --rule: #E1DCCE;
  --rule-strong: #C9C2AE;
  --sage: #1d3a72;       /* mid navy — primary dark surface */
  --sage-deep: #050a30;  /* deepest navy — highest contrast / accents */
  --sage-soft: #3E589C;
  --navy: #2f68d3;       /* bright royal blue — accent + stat color */
  --terracotta: #C9462C;
  --terracotta-deep: #9C3621;

  /* Type */
  --display: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --body: "Source Sans 3", "Source Sans Pro", -apple-system, sans-serif;
  --mono: "DM Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1280px;
  --container-wide: 1440px;
  --gutter: 32px;
  --section-y: 120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "kern";
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }

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

/* Type scale */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--terracotta);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.display-xl {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(48px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.display-l {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.028em;
}

.display-m {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.022em;
}

.body-l {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.body-m {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-mute);
}

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

/* Containers */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; }
.section-tight { padding: 80px 0; }

.hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: 999px;
  transition: all 220ms cubic-bezier(.4,.2,.2,1);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--sage-deep);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--navy);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-ghost {
  padding: 10px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
}
.btn-ghost:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }

.btn .arrow {
  display: inline-block;
  transition: transform 220ms;
}
.btn:hover .arrow { transform: translateX(4px); }

/* Link styling */
a.link-blue {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
a.link-blue:hover { color: var(--sage-deep); }

/* Tag / chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--paper);
}

/* Striped photo placeholder */
.photo-slot {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      var(--paper-warm) 0,
      var(--paper-warm) 14px,
      var(--paper-deep) 14px,
      var(--paper-deep) 15px);
  border: 1px solid var(--rule-strong);
  overflow: hidden;
}

.photo-slot::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--rule-strong);
  pointer-events: none;
}

.photo-slot.has-image { background: var(--ink); }
.photo-slot.has-image::before { display: none; }
.photo-slot img.photo-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.photo-slot .photo-label {
  position: absolute;
  left: 22px;
  bottom: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 6px 10px;
  border-radius: 2px;
  z-index: 2;
}

.photo-slot .photo-corner {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  z-index: 2;
}

.photo-slot.has-image .photo-corner {
  background: var(--paper);
  padding: 4px 8px;
  border: 1px solid var(--rule-strong);
}

/* Subtle motion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.reveal { animation: fadeUp 700ms cubic-bezier(.2,.6,.2,1) both; }
.reveal-delay-1 { animation-delay: 80ms; }
.reveal-delay-2 { animation-delay: 160ms; }
.reveal-delay-3 { animation-delay: 240ms; }
.reveal-delay-4 { animation-delay: 320ms; }

/* Grid helpers */
.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  :root { --section-y: 80px; --gutter: 20px; }
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Header — CSS-only scroll elevation
   Uses scroll-driven animations (Chrome 115+, Edge 115+, Safari 18+, FF behind flag).
   Unsupported browsers see the resting (transparent) state — acceptable degradation. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@supports (animation-timeline: scroll()) {
  .site-header {
    animation: nav-elevate linear both;
    animation-timeline: scroll(root);
    animation-range: 0 64px;
  }
}

@keyframes nav-elevate {
  from {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom-color: transparent;
  }
  to {
    background: rgba(250, 250, 247, 0.92);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom-color: var(--rule);
  }
}

/* ============================================================
   Interactive dual-path hero
   ============================================================ */
.hero-x {
  position: relative;
  --hx-dur: 440ms;
  --hx-ease: cubic-bezier(.4, .2, .2, 1);
  --hx-pop: 1.035;
}
.hero-x[data-motion="snappy"]    { --hx-dur: 210ms; --hx-ease: cubic-bezier(.2, .8, .2, 1); --hx-pop: 1.055; }
.hero-x[data-motion="cinematic"] { --hx-dur: 680ms; --hx-ease: cubic-bezier(.16, .7, .2, 1); --hx-pop: 1.07; }

/* Stage: left panel · graphic · right panel */
.hero-stage {
  display: grid;
  grid-template-columns: 1fr minmax(420px, 600px) 1fr;
  align-items: center;
  gap: 8px;
  transition: grid-template-columns var(--hx-dur) var(--hx-ease);
}
/* "Commit" interaction — stage leans toward the chosen side */
.hero-x[data-interaction="commit"][data-active="diploma"]   .hero-stage { grid-template-columns: 1.55fr minmax(420px, 560px) .72fr; }
.hero-x[data-interaction="commit"][data-active="workforce"] .hero-stage { grid-template-columns: .72fr minmax(420px, 560px) 1.55fr; }

.hero-graphic-wrap { position: relative; aspect-ratio: 1 / 1; width: 100%; }
.hero-graphic {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: filter var(--hx-dur) var(--hx-ease), transform var(--hx-dur) var(--hx-ease);
}
/* whole-graphic mood when a side is engaged (spotlight mode darkens stage) */
.hero-x[data-interaction="spotlight"][data-active]:not([data-active=""]) .hero-graphic { filter: saturate(1.04); }

/* Hover/focus zones over each student */
.hero-zone {
  position: absolute;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: transform var(--hx-dur) var(--hx-ease);
  -webkit-tap-highlight-color: transparent;
}
.hero-zone.zone-man   { left: 7.5%;  top: 32%;  width: 48%;  height: 48%; border-radius: 50%; z-index: 3; }
.hero-zone.zone-woman { left: 44.5%; top: 3.5%; width: 51%;  height: 73%; border-radius: 4px; z-index: 2; }
/* Enlarged hit area — extends the clickable/hover region well past the visible
   shape without growing the ring/dim children (which stay sized to the photo). */
.hero-zone::before {
  content: "";
  position: absolute;
  inset: -42px;
  border-radius: inherit;
}
.hero-zone.is-active { transform: scale(var(--hx-pop)); z-index: 5; }

/* Desaturating wash over the NON-chosen student */
.zone-dim {
  position: absolute; inset: -2%;
  border-radius: inherit;
  opacity: 0;
  background: rgba(244, 239, 227, 0.34);
  -webkit-backdrop-filter: grayscale(0) brightness(1);
  backdrop-filter: grayscale(0) brightness(1);
  transition: opacity var(--hx-dur) var(--hx-ease), backdrop-filter var(--hx-dur) var(--hx-ease);
  pointer-events: none;
}
.zone-dim.is-dim {
  opacity: 1;
  -webkit-backdrop-filter: grayscale(.92) brightness(1.05);
  backdrop-filter: grayscale(.92) brightness(1.05);
}

/* Accent color-wash ring around the chosen face */
.zone-ring {
  position: absolute; inset: -3.5%;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--hx-dur) var(--hx-ease), box-shadow var(--hx-dur) var(--hx-ease);
  pointer-events: none;
}
.zone-ring::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(closest-side, transparent 64%, color-mix(in srgb, var(--accent) 26%, transparent) 86%, transparent 100%);
}
.hero-zone.is-active .zone-ring {
  opacity: 1;
  box-shadow:
    0 0 0 4px var(--paper),
    0 0 0 8px var(--accent),
    0 22px 60px -12px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Side detail panels */
.hero-panel { position: relative; transition: opacity var(--hx-dur) var(--hx-ease); }
.hero-panel-left  { padding-right: 30px; text-align: right; }
.hero-panel-right { padding-left: 30px;  text-align: left; }
.hero-x[data-active="diploma"]   .hero-panel-right,
.hero-x[data-active="workforce"] .hero-panel-left { opacity: .32; }

.panel-eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 9px;
}
.hero-panel-left .panel-eyebrow { justify-content: flex-end; }
.panel-eyebrow .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.panel-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1.0;
  letter-spacing: -.015em;
  color: var(--accent);
  margin: 14px 0 0;
}

/* rest hint vs revealed detail */
.panel-detail {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: max-height var(--hx-dur) var(--hx-ease), opacity var(--hx-dur) var(--hx-ease), transform var(--hx-dur) var(--hx-ease);
}
.hero-panel.is-open .panel-detail { max-height: 460px; opacity: 1; transform: none; }
.panel-rest {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 16px;
  transition: opacity var(--hx-dur) var(--hx-ease);
}
.hero-panel.is-open .panel-rest { opacity: 0; height: 0; margin: 0; overflow: hidden; }

.panel-desc { font-size: 16px; line-height: 1.55; color: var(--ink-soft); margin: 16px 0 20px; }
.hero-panel-left .panel-desc { margin-left: auto; }
.panel-desc, .panel-facts, .panel-cta-row { max-width: 360px; }
.hero-panel-left .panel-desc, .hero-panel-left .panel-facts, .hero-panel-left .panel-cta-row { margin-left: auto; }

.panel-facts { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 11px; }
.panel-facts li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.panel-facts .fk { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.panel-facts .fv { font-family: var(--display); font-size: 14.5px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }

.panel-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  background: var(--accent); color: var(--paper);
  font-family: var(--display); font-weight: 600; font-size: 14px;
  transition: filter 200ms, transform 200ms;
}
.panel-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.panel-cta .arrow { transition: transform 200ms; }
.panel-cta:hover .arrow { transform: translateX(4px); }

/* Spotlight interaction — dim the whole stage, the active panel + face stay lit */
.hero-scrim {
  position: absolute; inset: -4% -2%;
  background: var(--sage-deep);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity var(--hx-dur) var(--hx-ease);
  border-radius: 12px;
}
.hero-x[data-interaction="spotlight"][data-active="diploma"]   .hero-scrim,
.hero-x[data-interaction="spotlight"][data-active="workforce"] .hero-scrim { opacity: .14; }
.hero-x[data-interaction="spotlight"] .hero-graphic-wrap,
.hero-x[data-interaction="spotlight"] .hero-panel { z-index: 2; }

/* rest prompt floating under graphic */
.hero-prompt {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 10px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: opacity var(--hx-dur) var(--hx-ease);
}
.hero-x[data-active]:not([data-active=""]) .hero-prompt { opacity: 0; }
.hero-prompt .swing { display: inline-block; animation: promptSwing 2.4s ease-in-out infinite; }
@keyframes promptSwing { 0%,100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .hero-prompt .swing { animation: none; } }

@media (max-width: 1080px) {
  .hero-stage { grid-template-columns: 1fr; gap: 0; }
  .hero-x[data-interaction="commit"][data-active] .hero-stage { grid-template-columns: 1fr; }
  .hero-panel-left, .hero-panel-right { text-align: left; padding: 0; }
  .hero-panel-left .panel-eyebrow { justify-content: flex-start; }
  .hero-panel-left .panel-desc, .hero-panel-left .panel-facts, .hero-panel-left .panel-cta-row { margin-left: 0; }
  .hero-graphic-wrap { max-width: 520px; margin: 0 auto; }
}
