/* ============================================================
   HCGF — Human Capital & Governance Framework | Templars
   Light theme · sharp edges
   ============================================================ */

:root {
  --bg: #f7f4ec;        /* warm paper */
  --bg-2: #efeadd;      /* deeper paper band */
  --bg-3: #ffffff;      /* card surface */
  --ink: #14161c;       /* primary text */
  --ink-dim: rgba(20, 22, 28, 0.66);
  --ink-faint: rgba(20, 22, 28, 0.40);
  --gold: #a87b1e;      /* deep gold — legible on light */
  --gold-bright: #c9991f;
  --gold-fill: #d4a843; /* fills / buttons */
  --line: rgba(20, 22, 28, 0.14);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* White logo art (Templars) needs inverting on a light page */
.invert-logo { filter: invert(1) brightness(0.2); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.preloader__inner { text-align: center; width: min(320px, 70vw); }
.preloader__mark {
  font-family: var(--serif); font-weight: 600; font-size: 2rem;
  letter-spacing: 0.35em; margin-bottom: 1.5rem; color: var(--gold);
}
.preloader__bar {
  height: 2px; background: var(--line); position: relative; overflow: hidden;
}
.preloader__bar span {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: var(--gold);
}
.preloader__count {
  margin-top: 0.9rem; font-size: 0.7rem; letter-spacing: 0.3em;
  color: var(--ink-dim); font-variant-numeric: tabular-nums;
}

/* ---------- Cursor ---------- */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 150;
  border-radius: 50%; transform: translate(-50%, -50%);
}
.cursor { width: 6px; height: 6px; background: var(--gold); }
.cursor-ring {
  width: 34px; height: 34px; border: 1px solid rgba(168, 123, 30, 0.55);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              border-color 0.25s, background 0.25s;
}
.cursor-ring.is-hover {
  width: 58px; height: 58px;
  background: rgba(168, 123, 30, 0.08);
  border-color: rgba(168, 123, 30, 0.9);
}
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none; }
}

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--gold); transform-origin: 0 50%; transform: scaleX(0);
  z-index: 120;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, box-shadow 0.4s;
}
.nav.is-scrolled {
  background: rgba(247, 244, 236, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 0.7rem; padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 1.1rem; text-decoration: none; }
.nav__mark {
  font-family: var(--serif); font-weight: 600; letter-spacing: 0.22em;
  font-size: 1.5rem; color: var(--gold); line-height: 1;
}
.nav__divider { width: 1px; height: 30px; background: var(--line); }
.nav__templars { height: 32px; width: auto; }
.nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }
.nav__links a {
  text-decoration: none; font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim); position: relative;
  padding: 0.3rem 0; transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 1rem 1.8rem; border-radius: 0;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s,
              border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.btn--primary {
  background: var(--ink); color: var(--bg);
}
.btn--primary:hover {
  background: var(--gold);
  box-shadow: 0 14px 36px -10px rgba(168, 123, 30, 0.5);
}
.btn--primary:hover .btn__arrow { transform: translateX(4px); }
.btn__arrow { transition: transform 0.3s var(--ease-out); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: rgba(20, 22, 28, 0.35);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--small { padding: 0.65rem 1.3rem; font-size: 0.72rem; background: transparent; color: var(--ink); border-color: rgba(20,22,28,0.35); }
.btn--small:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--xl { padding: 1.3rem 2.6rem; font-size: 0.95rem; }
.btn--full { width: 100%; justify-content: center; }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-head {
  max-width: 880px;
  padding: 0 clamp(1.2rem, 5vw, 4rem);
  margin: 0 auto 4rem;
  text-align: center;
}
.section-kicker {
  font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem; font-weight: 600;
}
.section-title {
  font-family: var(--serif); font-weight: 450;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.15; letter-spacing: -0.01em;
}
.split .word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.split .word > span { display: inline-block; transform: translateY(110%); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(6rem, 12vh, 9rem) clamp(1.2rem, 6vw, 5rem) 4rem;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 30% 45%, rgba(247,244,236,0.30), rgba(247,244,236,0.82) 80%),
    linear-gradient(180deg, rgba(247,244,236,0.55), rgba(247,244,236,0) 30%, rgba(247,244,236,0.9) 95%);
  pointer-events: none;
}
.hero__content { position: relative; max-width: 880px; z-index: 2; }
.hero__eyebrow {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 2rem; font-weight: 500;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 12px var(--gold-bright); flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
}
.hero__title {
  font-family: var(--serif); font-weight: 420;
  font-size: clamp(2.5rem, 6.2vw, 5rem);
  line-height: 1.06; letter-spacing: -0.015em;
  margin-bottom: 1.8rem;
}
.hero__title em { font-style: italic; color: var(--gold); }
.hero__title .word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .word > span { display: inline-block; transform: translateY(115%); }
.hero__sub {
  max-width: 600px; color: var(--ink-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.08rem); margin-bottom: 2.6rem; font-weight: 400;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__hint {
  position: absolute; bottom: 2rem; right: clamp(1.2rem, 6vw, 5rem);
  display: flex; align-items: center; gap: 1rem; z-index: 2;
}
.hero__hint-label {
  font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
}
.hero__hint-line {
  width: 1px; height: 56px; background: var(--line); position: relative; overflow: hidden;
}
.hero__hint-line::after {
  content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%;
  background: var(--gold); animation: hintDrop 2.2s var(--ease-out) infinite;
}
@keyframes hintDrop { 0% { top: -100%; } 60%, 100% { top: 100%; } }
.reveal-line { opacity: 0; }

/* ---------- Pillars ---------- */
.pillars { padding: clamp(6rem, 14vh, 10rem) clamp(1.2rem, 5vw, 4rem); }
.pillars__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem); max-width: 1200px; margin: 0 auto;
}
@media (max-width: 860px) { .pillars__grid { grid-template-columns: 1fr; } }
.pillar {
  position: relative; padding: 2.6rem 2.2rem 3rem;
  background: var(--bg-3);
  border: 1px solid var(--line); border-radius: 0;
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
  transform-style: preserve-3d; will-change: transform;
}
.pillar:hover {
  border-color: rgba(168, 123, 30, 0.55);
  box-shadow: 0 24px 60px -28px rgba(20, 22, 28, 0.25);
}
.pillar__num {
  font-family: var(--serif); font-size: 0.85rem; color: var(--gold);
  letter-spacing: 0.2em;
}
.pillar__icon {
  width: 56px; height: 56px; margin: 1.6rem 0 1.4rem; color: var(--gold);
}
.pillar__icon svg { width: 100%; height: 100%; }
.pillar h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.35rem;
  line-height: 1.25; margin-bottom: 0.8rem;
}
.pillar p { color: var(--ink-dim); font-size: 0.95rem; font-weight: 400; }
.pillar__line {
  position: absolute; left: 2.2rem; right: 2.2rem; bottom: 1.6rem; height: 2px;
  background: var(--line); overflow: hidden;
}
.pillar__line::after {
  content: ""; position: absolute; inset: 0; background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.6s var(--ease-out);
}
.pillar:hover .pillar__line::after { transform: scaleX(1); }
/* icon micro-animations on hover */
.p-anim { transition: transform 0.6s var(--ease-out), opacity 0.6s; transform-origin: center; }
.pillar:hover .p-dash { animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pillar:hover .p-pulse { animation: pulse 1.6s ease-in-out infinite; }
.p-rise1, .p-rise2, .p-rise3 { transform-origin: bottom; }
.pillar:hover .p-rise1 { animation: rise 0.7s var(--ease-out); }
.pillar:hover .p-rise2 { animation: rise 0.7s var(--ease-out) 0.1s backwards; }
.pillar:hover .p-rise3 { animation: rise 0.7s var(--ease-out) 0.2s backwards; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.pillar:hover .p-orbit { animation: spin 7s linear infinite reverse; transform-origin: 24px 24px; }

/* ---------- Programme ---------- */
.programme { background: var(--bg-2); }
.programme__pin {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(5rem, 10vh, 7rem) 0 3rem; overflow: hidden;
}
.programme__head {
  padding: 0 clamp(1.2rem, 5vw, 4rem); max-width: 1200px; margin: 0 auto 3rem; width: 100%;
}
.programme__intro { max-width: 560px; color: var(--ink-dim); margin-top: 1.2rem; font-weight: 400; }
.programme__track {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  max-width: 360px; margin-top: 2.4rem; height: 34px;
}
.programme__track::before {
  content: ""; position: absolute; left: 17px; right: 17px; top: 50%; height: 1px;
  background: var(--line);
}
.programme__track-fill {
  position: absolute; left: 17px; top: 50%; height: 2px; width: 0;
  max-width: calc(100% - 34px); background: var(--gold); z-index: 1;
  transform: translateY(-0.5px);
}
.programme__stop {
  position: relative; z-index: 2; width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  font-family: var(--serif); font-size: 0.8rem; color: var(--ink-dim);
  transition: border-color 0.4s, color 0.4s, background 0.4s, box-shadow 0.4s;
}
.programme__stop.is-active {
  border-color: var(--gold); color: var(--bg); background: var(--gold);
  box-shadow: 0 0 18px rgba(168, 123, 30, 0.4);
}
.programme__rail {
  display: flex; gap: clamp(1.2rem, 3vw, 2.5rem);
  padding: 0 clamp(1.2rem, 5vw, 4rem);
  will-change: transform; width: max-content;
}
.level {
  width: min(78vw, 920px); flex: none;
  display: grid; grid-template-columns: 220px 1fr; gap: 2rem;
  background: var(--bg-3);
  border: 1px solid var(--line); border-radius: 0;
  padding: clamp(1.6rem, 3vw, 2.8rem);
  box-shadow: 0 18px 50px -30px rgba(20, 22, 28, 0.18);
}
.level__media {
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--line); padding-right: 1.6rem;
}
.level__roman {
  font-family: var(--serif); font-size: clamp(4rem, 8vw, 7rem); line-height: 0.9;
  color: transparent; -webkit-text-stroke: 1.5px var(--gold);
}
.level__phase {
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); font-weight: 600;
}
.level__body h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2; margin-bottom: 1.4rem;
}
.level__block { margin-bottom: 1.2rem; }
.level__block h4 {
  font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.45rem; font-weight: 600;
}
.level__block p { color: var(--ink-dim); font-size: 0.95rem; max-width: 56ch; font-weight: 400; }
@media (max-width: 760px) {
  .level { grid-template-columns: 1fr; width: 86vw; }
  .level__media { flex-direction: row; align-items: center; border-right: 0; padding-right: 0;
    border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
}

/* ---------- Storyline ---------- */
.storyline {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(6rem, 14vh, 10rem) clamp(1.2rem, 5vw, 4rem);
  max-width: 1300px; margin: 0 auto;
}
@media (max-width: 900px) { .storyline { grid-template-columns: 1fr; } }
.storyline__media {
  border-radius: 0; overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 4 / 4.4; position: relative;
}
@media (max-width: 900px) { .storyline__media { aspect-ratio: 16 / 10; } }
.storyline__media img {
  width: 100%; height: 120%; object-fit: cover; will-change: transform;
}
.storyline__copy .section-title { text-align: left; margin-bottom: 1.2rem; }
.storyline__copy > p { color: var(--ink-dim); max-width: 50ch; font-weight: 400; }
.missions { margin: 2.2rem 0; }
.missions__row { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.mission {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid rgba(20, 22, 28, 0.3); font-size: 0.8rem; color: var(--ink-dim);
  font-family: var(--serif); position: relative; cursor: default;
  transition: transform 0.3s var(--ease-out), border-color 0.3s, color 0.3s, background 0.3s;
  opacity: 0;
}
.mission--cap { border-style: dashed; font-size: 0.68rem; letter-spacing: 0.05em; }
.mission:hover {
  transform: translateY(-6px); border-color: var(--gold);
  color: var(--bg); background: var(--gold);
}
.mission::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--ink); border: 1px solid var(--ink); color: var(--bg);
  font-family: var(--sans); font-size: 0.65rem; letter-spacing: 0.08em;
  padding: 0.3rem 0.6rem; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease-out);
}
.mission:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.missions__caption { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.9rem; font-weight: 400; }
.stats {
  display: grid; grid-template-columns: repeat(4, auto); gap: clamp(1.2rem, 3vw, 2.6rem);
  border-top: 1px solid var(--line); padding-top: 1.8rem; width: fit-content;
}
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, auto); } }
.stat__num {
  display: block; font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
}

/* ---------- About ---------- */
.about { padding: clamp(6rem, 14vh, 10rem) clamp(1.2rem, 5vw, 4rem); background: var(--bg-2); }
.about__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.4rem);
  max-width: 1100px; margin: 0 auto;
}
@media (max-width: 820px) { .about__grid { grid-template-columns: 1fr; } }
.org-card {
  background: var(--bg-3); color: var(--ink); border-radius: 0;
  border: 1px solid var(--line);
  padding: clamp(1.8rem, 3vw, 2.8rem);
  transform-style: preserve-3d; will-change: transform;
  transition: box-shadow 0.4s, border-color 0.4s;
}
.org-card:hover {
  border-color: rgba(168, 123, 30, 0.5);
  box-shadow: 0 30px 80px -35px rgba(20, 22, 28, 0.3);
}
.org-card__logo { height: 64px; display: flex; align-items: center; margin-bottom: 1.6rem; }
.org-card__logo img { max-height: 100%; width: auto; }
.org-card h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin-bottom: 0.9rem;
}
.org-card p { color: var(--ink-dim); font-size: 0.95rem; font-weight: 400; }
.org-card__link {
  display: inline-block; margin-top: 1.4rem; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  color: var(--gold); border-bottom: 2px solid currentColor; padding-bottom: 2px;
  transition: color 0.3s;
}
.org-card__link:hover { color: var(--ink); }

/* ---------- Network ---------- */
.network { padding: clamp(6rem, 14vh, 10rem) 0; overflow: hidden; }
.network .section-head { margin-bottom: 3rem; }
.network__sub { color: var(--ink-dim); margin-top: 1.4rem; font-size: 0.95rem; font-weight: 400; }
.marquee {
  background: var(--bg-3); padding: 2.2rem 0; display: grid; gap: 2rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__row { display: flex; gap: clamp(3rem, 6vw, 5.5rem); width: max-content; align-items: center; }
.marquee__row img {
  height: 52px; width: auto; flex: none;
  filter: grayscale(1) opacity(0.55);
  transition: filter 0.35s, transform 0.35s var(--ease-out);
}
.marquee__row img:hover { filter: grayscale(0) opacity(1); transform: scale(1.1); }

/* ---------- CTA ---------- */
.cta {
  min-height: 90vh; display: grid; place-items: center; text-align: center;
  padding: clamp(6rem, 14vh, 9rem) clamp(1.2rem, 5vw, 4rem); overflow: hidden;
  background: var(--bg-2);
}
.cta__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.cta__content { position: relative; z-index: 2; max-width: 820px; }
.section-kicker--center { text-align: center; }
.cta__title {
  font-family: var(--serif); font-weight: 450;
  font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.12; margin-bottom: 2.6rem;
}
.cta__note { margin-top: 1.6rem; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--ink-faint); font-weight: 500; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line); background: var(--bg);
  padding: 4rem clamp(1.2rem, 5vw, 4rem) 2.5rem;
}
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  max-width: 1100px; margin: 0 auto 3rem;
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__logo { height: 34px; width: auto; margin-bottom: 1.2rem; }
.footer__brand p { color: var(--ink-dim); font-size: 0.9rem; font-weight: 400; }
.footer__col h4 {
  font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem; font-weight: 600;
}
.footer__col a {
  display: block; text-decoration: none; color: var(--ink-dim);
  font-size: 0.92rem; padding: 0.25rem 0; transition: color 0.3s; font-weight: 400;
}
.footer__col a:hover { color: var(--gold); }
.footer__legal {
  max-width: 1100px; margin: 0 auto; border-top: 1px solid var(--line);
  padding-top: 1.6rem; font-size: 0.75rem; color: var(--ink-faint); font-weight: 400;
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(20, 22, 28, 0.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal__panel {
  position: relative; width: min(520px, calc(100vw - 2.4rem));
  max-height: calc(100vh - 3rem); overflow: auto;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 0; padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: 0 40px 120px -30px rgba(20, 22, 28, 0.45);
}
.modal__close {
  position: absolute; top: 1rem; right: 1.1rem; width: 38px; height: 38px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink); font-size: 1.2rem; cursor: pointer;
  transition: border-color 0.3s, transform 0.3s, color 0.3s;
}
.modal__close:hover { border-color: var(--gold); color: var(--gold); transform: rotate(90deg); }
.modal__panel h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.8rem; margin-bottom: 0.6rem;
}
.modal__sub { color: var(--ink-dim); font-size: 0.92rem; margin-bottom: 1.8rem; font-weight: 400; }
.modal__panel form { display: grid; gap: 1.1rem; }
.modal__panel label {
  display: grid; gap: 0.45rem; font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-dim); font-weight: 500;
}
.modal__panel input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 0;
  padding: 0.9rem 1rem; color: var(--ink); font-family: var(--sans);
  font-size: 0.95rem; transition: border-color 0.3s, box-shadow 0.3s;
}
.modal__panel input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 123, 30, 0.15);
}
.modal__panel input.is-invalid { border-color: #b03a32; }
.modal__fine { font-size: 0.72rem; color: var(--ink-faint); text-align: center; font-weight: 400; }
.modal__success { text-align: center; padding: 1rem 0; }
.modal__success h3 { margin: 1.4rem 0 0.7rem; }
.modal__success p { color: var(--ink-dim); font-size: 0.92rem; margin-bottom: 1.8rem; font-weight: 400; }
.modal__success-ring { width: 96px; margin: 0 auto; }
.modal__success-ring svg { width: 100%; }
.modal__success-ring .ring {
  fill: none; stroke: var(--gold); stroke-width: 2;
  stroke-dasharray: 277; stroke-dashoffset: 277;
  animation: draw 0.9s var(--ease-out) forwards;
  transform: rotate(-90deg); transform-origin: center;
}
.modal__success-ring .tick {
  fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: draw 0.5s var(--ease-out) 0.7s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-line, .mission { opacity: 1; }
  .hero__title .word > span, .split .word > span { transform: none; }
}
