/* ============================================================
   NDERF AI Phase-Lock Study — v3
   - Two-logo lockup header on a unified white pill
   - Stylized About link only — nothing else up top
   - Hero remains bold, headline two-tone
   - Method section bleeds out of the dark hero seamlessly
   - Single font system: Fraunces (display) + Inter (UI/body)
   ============================================================ */

:root {
  /* Tweakable */
  --tone-a: #e8eef5;
  --tone-b: #f4b740;
  --hero-bg-1: #050d1c;
  --hero-bg-2: #0b2547;
  --accent: #46b7ca;

  --ink: #0d1d2f;
  --ink-2: #24394c;
  --muted: #617282;
  --line: #d6e3e9;
  --paper: #f6f9fa;
  --white: #ffffff;
  --teal: #087f91;
  --teal-dark: #075a69;
  --cyan: #46b7ca;
  --gold: #e5a41f;
  --navy: #071b34;
  --navy-2: #0c2f54;

  /* Dark-canvas tokens for sections that sit on the hero gradient continuation */
  --dark-ink: #e8eef5;
  --dark-ink-2: #b9c8d6;
  --dark-muted: rgba(232, 240, 248, 0.55);
  --dark-line: rgba(255, 255, 255, 0.10);
  --dark-card: rgba(255, 255, 255, 0.04);
  --dark-card-strong: rgba(255, 255, 255, 0.06);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--hero-bg-2);   /* match hero bottom so the seam never flashes */
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
p { line-height: 1.6; font-family: var(--sans); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ============================================================
   DARK CANVAS — the gradient extends across hero AND method
   sections so they read as one continuous environment
   ============================================================ */
.dark-canvas {
  position: relative;
  color: var(--dark-ink);
  background:
    radial-gradient(1200px 700px at 88% 4%, rgba(70, 183, 202, 0.16), transparent 60%),
    radial-gradient(900px 600px at 0% 60%, rgba(229, 164, 31, 0.08), transparent 55%),
    linear-gradient(180deg, var(--hero-bg-1) 0%, var(--hero-bg-2) 60%, var(--hero-bg-2) 100%);
  overflow-x: hidden;
  overflow-y: visible;
}
.dark-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   HEADER — minimal: two logos in a lockup + About
   ============================================================ */
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0;
}

.lockup {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 10px;
  transition: transform 200ms ease, filter 200ms ease;
}
.lockup:hover { transform: translateY(-1px); filter: brightness(1.08); }

.lockup-logo {
  display: block;
  height: 64px;
  width: auto;
  border-radius: 8px;
}

/* About link — stylized, single piece of nav */
.top-nav { display: flex; align-items: center; gap: 0; }

.about-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
}
.about-link:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.about-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 4;
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(50px, 9vh, 110px) 0 clamp(70px, 11vh, 130px);
}

.hero-title {
  margin: 0 0 28px;
  max-width: 18ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.4rem, 9vw, 8.5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}
.hero-title .clause-a { display: block; color: var(--tone-a); }
.hero-title .clause-b {
  display: block;
  font-weight: 400;
  font-style: italic;
  background: linear-gradient(100deg, var(--tone-a) 0%, var(--tone-a) 12%, var(--tone-b) 52%, var(--tone-b) 100%);
  background-size: 180% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--tone-b);
  animation: clause-shimmer 9s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
/* Gold bloom on the entire second clause — gradually rises then settles.
   Loops every 7s. */
@keyframes clause-shimmer {
  0%, 18%  {
    background-position: 0% 50%;
    text-shadow: 0 0 0 rgba(244, 183, 64, 0);
    filter: brightness(1);
  }
  36% {
    background-position: 78% 50%;
    text-shadow:
      0 0 12px rgba(244, 183, 64, 0.18),
      0 0 4px rgba(244, 183, 64, 0.12);
    filter: brightness(1.04) drop-shadow(0 0 2px rgba(244, 183, 64, 0.10));
  }
  52% {
    background-position: 100% 50%;
    text-shadow:
      0 0 8px rgba(244, 183, 64, 0.12),
      0 0 3px rgba(244, 183, 64, 0.08);
    filter: brightness(1.02);
  }
  68%, 100%  {
    background-position: 100% 50%;
    text-shadow: 0 0 0 rgba(244, 183, 64, 0);
    filter: brightness(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title .clause-b { animation: none; }
}

.hero-subhead {
  max-width: 56ch;
  margin: 0 0 44px;
  color: rgba(232, 240, 248, 0.78);
  font-size: clamp(1.05rem, 1.3vw, 1.22rem);
  line-height: 1.55;
  font-weight: 400;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 60px; }

.button {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 22px; border-radius: 999px;
  font-family: var(--sans); font-weight: 500; font-size: 0.96rem;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.button.primary { color: #0a1626; background: var(--tone-b); }
.button.primary:hover { transform: translateY(-1px); }
.button.secondary { color: var(--white); border: 1px solid rgba(255, 255, 255, 0.22); }
.button.secondary:hover { border-color: rgba(255, 255, 255, 0.45); }
.button .arrow { transition: transform 200ms ease; }
.button:hover .arrow { transform: translateX(3px); }

.hero-counters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: 920px;
  padding: 26px 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hero-counters > div { padding: 4px 24px 4px 0; border-right: 1px solid rgba(255, 255, 255, 0.10); }
.hero-counters > div + div { padding-left: 24px; }
.hero-counters > div:last-child { border-right: 0; padding-right: 0; }
.hero-counters strong {
  display: block; margin-bottom: 8px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  color: var(--tone-b); letter-spacing: -0.02em; white-space: nowrap;
}
.hero-counters span {
  display: block; color: rgba(232, 240, 248, 0.65);
  font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--sans);
}

.hero-cue { display: none; }
.hero-cue-legacy {
  position: relative;
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0 auto;
  padding: 4px 0 36px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-family: var(--sans);
}
.hero-cue .line {
  width: 1px; height: 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0));
  animation: cueDrop 2.4s ease-in-out infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(-6px); opacity: 0.2; }
  50% { opacity: 0.8; }
  100% { transform: translateY(6px); opacity: 0.2; }
}

/* ============================================================
   METHOD SECTION — sits ON the dark canvas, integrated
   ============================================================ */
.method-shell {
  position: relative;
  z-index: 3;
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(36px, 5vh, 64px) 0 clamp(80px, 12vh, 140px);
}

.section-heading { max-width: 760px; margin-bottom: 48px; }
.section-heading .eyebrow { color: var(--accent); }
.section-heading h2 {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  margin-bottom: 18px;
  color: var(--dark-ink);
  font-family: var(--serif);
  font-weight: 300;
}
.section-heading p { color: var(--dark-ink-2); font-size: 1.05rem; max-width: 60ch; }

.interactive-method {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 720px) minmax(300px, 1fr);
  gap: 40px;
  align-items: start;
}

/* Infographic — no white frame, just the image floating with a soft glow */
.infographic-stage {
  position: relative;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
.infographic-stage img { width: 100%; height: auto; }

.hotspot {
  position: absolute; left: 0; width: 100%;
  padding: 0; cursor: pointer; background: transparent; border: 0;
}
.hotspot::after {
  content: ""; position: absolute; inset: 7px;
  border: 3px solid transparent; border-radius: 10px;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.hotspot:hover::after,
.hotspot:focus-visible::after,
.hotspot.active::after {
  border-color: rgba(244, 183, 64, 0.9);
  background: rgba(244, 183, 64, 0.12);
  outline: none;
}

/* Side panel — glass card on the dark canvas */
.panel-detail {
  position: absolute;
  top: var(--panel-top, 0px);
  left: var(--panel-left, calc(720px + 40px));
  width: var(--panel-width, 100%);
  min-width: 0;
  min-height: 430px;
  padding: 32px;
  border: 1px solid var(--dark-line);
  border-radius: 14px;
  background: var(--dark-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--dark-ink);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}
.panel-detail.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}
.panel-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.panel-detail h3 {
  margin-bottom: 18px;
  color: var(--dark-ink);
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.panel-detail > p:not(.panel-kicker) {
  color: var(--dark-ink-2);
  font-family: var(--sans);
  font-size: 0.98rem;
}
.detail-list { display: grid; gap: 0; margin: 28px 0 0; }
.detail-list div { padding: 16px 0; border-top: 1px solid var(--dark-line); }
.detail-list dt {
  margin-bottom: 6px;
  color: var(--dark-muted);
  font-family: var(--sans);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.detail-list dd { margin: 0; color: var(--dark-ink); font-family: var(--sans); }

/* ============================================================
   SOFT TRANSITION — dark canvas → light below
   ============================================================ */
.canvas-fade {
  height: 120px;
  background: linear-gradient(180deg, var(--hero-bg-2) 0%, var(--paper) 100%);
}

/* ============================================================
   FIVE STEPS / CASE OUTPUT / STANDARDS — light side
   ============================================================ */
main { background: var(--paper); }

.five-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.five-steps article {
  min-height: 240px;
  padding: 38px 28px;
  border-right: 1px solid var(--line);
}
.five-steps article:last-child { border-right: 0; }
.five-steps span {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 22px;
  border-radius: 50%; color: var(--white); background: var(--teal);
  font-family: var(--serif); font-weight: 500;
}
.five-steps h2 {
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 400;
}
.five-steps p {
  color: var(--muted);
  font-size: 0.95rem;
  font-family: var(--sans);
}

.case-output {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(320px, 520px);
  gap: 60px; align-items: center;
  width: min(1060px, calc(100% - 36px));
  margin: 0 auto;
  padding: 96px 0;
}
.case-copy h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 14px; }
.case-copy p:last-child { color: var(--muted); }

.scorecard {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(20, 48, 70, 0.10);
}
.scorecard-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}
.scorecard-header strong { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.scorecard-header span { color: var(--muted); font-size: 0.88rem; }
blockquote {
  margin: 22px 0;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.45;
  font-style: italic;
  font-weight: 400;
}
.checks {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.checks span {
  display: inline-flex; align-items: center;
  min-height: 32px; padding: 0 12px;
  border-radius: 999px;
  color: var(--teal-dark); background: #e7f6f8;
  font-family: var(--sans); font-weight: 600; font-size: 0.85rem;
}
.score { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-top: 22px; }
.score span {
  color: var(--muted);
  font-family: var(--sans); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 0.78rem;
}
.score strong {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2.4rem; font-weight: 400;
}

.standards {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 96px 0;
}
.standards h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: 16px; font-weight: 300; }
.standards > p:not(.eyebrow) {
  max-width: 840px;
  color: var(--ink-2);
  font-size: 1.05rem;
  font-family: var(--sans);
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 38px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.principles div { padding: 28px; background: var(--white); }
.principles h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  font-family: var(--serif);
  font-weight: 500;
}
.principles p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--sans);
}

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 12px; padding: 28px 32px;
  color: rgba(255,255,255,0.7);
  background: var(--navy);
  font-family: var(--sans);
  font-size: 0.88rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .site-header { padding: 18px 0; gap: 14px; }
  .lockup-logo { height: 52px; }
  .about-link { padding: 10px 16px; font-size: 0.82rem; }
  .hero-counters { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .hero-counters > div { border-right: 0; padding: 12px 0 !important; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .interactive-method, .case-output, .principles { grid-template-columns: minmax(0, 1fr); }
  .panel-detail {
    position: relative;
    inset: auto;
    width: auto;
    min-height: auto;
  }
  .five-steps { grid-template-columns: 1fr; }
  .five-steps article { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .five-steps article:last-child { border-bottom: 0; }
}

@media (max-width: 620px) {
  .site-header { width: calc(100% - 32px); flex-wrap: wrap; }
  .lockup-logo { height: 40px; }
  .hero, .method-shell, .case-output, .standards { width: calc(100% - 32px); }
  .hero-actions .button { width: 100%; justify-content: center; }
  .case-output, .standards { padding: 64px 0; }
  .interactive-method { gap: 24px; }
}
