:root {
  --bg: #040706;
  --bg-soft: #09110f;
  --bg-panel: rgba(8, 16, 14, 0.78);
  --bg-panel-strong: rgba(5, 10, 10, 0.92);
  --ink: #edf2eb;
  --muted: #afbeb4;
  --line: rgba(115, 213, 177, 0.12);
  --line-strong: rgba(123, 232, 195, 0.24);
  --gold: #87dffd;
  --gold-deep: #397d95;
  --azure: #74defe;
  --emerald: #4d8f43;
  --crimson: #163327;
  --forest-glow: rgba(77, 143, 67, 0.22);
  --azure-glow: rgba(116, 222, 254, 0.18);
  --mist: #d7f7ff;
  --shadow: rgba(0, 0, 0, 0.58);
  --radius: 26px;
  --radius-small: 18px;
  --content: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(52, 111, 58, 0.34), transparent 22%),
    radial-gradient(circle at 78% 9%, rgba(116, 222, 254, 0.16), transparent 20%),
    radial-gradient(circle at 50% 120%, rgba(30, 66, 35, 0.34), transparent 38%),
    linear-gradient(180deg, #030505 0%, #08110f 34%, #06090a 70%, #040505 100%);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "URW Palladio L", serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 24%, rgba(77, 143, 67, 0.14), transparent 18%),
    radial-gradient(circle at 88% 16%, rgba(116, 222, 254, 0.11), transparent 20%),
    linear-gradient(180deg, rgba(6, 15, 15, 0), rgba(2, 4, 5, 0.32));
}

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

a {
  color: inherit;
  text-decoration: none;
}

p,
blockquote {
  margin: 0;
}

.page-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-progress, 0));
  background: linear-gradient(90deg, rgba(116, 222, 254, 0), rgba(116, 222, 254, 0.92) 38%, rgba(94, 168, 91, 1));
  z-index: 30;
  pointer-events: none;
}

.noise,
.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.05;
  z-index: 1;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(211, 247, 255, 0.28) 25%, transparent 26%, transparent 74%, rgba(211, 247, 255, 0.28) 75%, transparent 76%),
    linear-gradient(90deg, transparent 24%, rgba(211, 247, 255, 0.28) 25%, transparent 26%, transparent 74%, rgba(211, 247, 255, 0.28) 75%, transparent 76%);
  background-size: 3px 3px;
}

.cursor-glow {
  z-index: 2;
  background:
    radial-gradient(circle 220px at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(116, 222, 254, 0.12), transparent 60%),
    radial-gradient(circle 280px at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(77, 143, 67, 0.12), transparent 70%);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(4, 10, 10, 0.92), rgba(4, 10, 10, 0.42));
  border-bottom: 1px solid rgba(116, 222, 254, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: "Baskerville", "Palatino Linotype", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.brand-mark {
  width: 0.9rem;
  height: 0.9rem;
  transform: rotate(45deg);
  border: 1px solid rgba(116, 222, 254, 0.82);
  box-shadow:
    0 0 18px rgba(116, 222, 254, 0.26),
    0 0 28px rgba(77, 143, 67, 0.18);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.topnav a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.94rem;
  transition:
    color 220ms var(--ease),
    border-color 220ms var(--ease),
    background-color 220ms var(--ease),
    transform 220ms var(--ease);
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a.is-active {
  color: var(--ink);
  border-color: rgba(116, 222, 254, 0.18);
  background: rgba(116, 222, 254, 0.06);
  transform: translateY(-1px);
}

main {
  position: relative;
  z-index: 3;
}

.panel {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 8rem) 0;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding-top: clamp(7rem, 10vw, 9rem);
  display: grid;
  align-items: center;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0 0 38px 38px;
  background:
    radial-gradient(circle at 16% 20%, rgba(77, 143, 67, 0.28), transparent 20%),
    radial-gradient(circle at 76% 10%, rgba(116, 222, 254, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(7, 17, 16, 0.82), rgba(5, 11, 11, 0.26) 32%, rgba(3, 6, 7, 0.78) 100%);
}

.hero-backdrop::before,
.hero-backdrop::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-backdrop::before {
  inset: 1.2rem 4% auto 4%;
  height: 34%;
  opacity: 0.56;
  background:
    radial-gradient(145% 62% at 12% 12%, transparent 60.8%, rgba(116, 222, 254, 0.86) 61.4%, transparent 62.1%),
    radial-gradient(145% 62% at 13% 23%, transparent 60.2%, rgba(116, 222, 254, 0.76) 60.8%, transparent 61.5%),
    radial-gradient(145% 62% at 15% 34%, transparent 59.6%, rgba(116, 222, 254, 0.58) 60.2%, transparent 60.9%);
  filter: drop-shadow(0 0 10px rgba(116, 222, 254, 0.14));
  transform: translateX(calc(var(--hero-shift-x, 0px) * 0.14));
}

.hero-backdrop::after {
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(116, 222, 254, 0.03) 30%, transparent 52%),
    radial-gradient(circle at 24% 100%, rgba(77, 143, 67, 0.18), transparent 26%);
}

.moon,
.fog,
.tree-line,
.motes {
  position: absolute;
}

.moon {
  top: 10%;
  right: 12%;
  width: clamp(10rem, 16vw, 15rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(231, 250, 255, 0.92), rgba(116, 222, 254, 0.34) 32%, rgba(77, 143, 67, 0.16) 48%, rgba(0, 0, 0, 0) 72%);
  filter: blur(1px);
  box-shadow: 0 0 50px rgba(116, 222, 254, 0.08);
  transform: translate(calc(var(--hero-shift-x, 0px) * 0.25), calc(var(--hero-shift-y, 0px) * 0.25));
  animation: pulseMoon 12s ease-in-out infinite;
}

.fog {
  inset: auto -10% -4rem -10%;
  height: 38%;
  background:
    radial-gradient(circle at 10% 50%, rgba(222, 248, 255, 0.07), transparent 28%),
    radial-gradient(circle at 35% 70%, rgba(77, 143, 67, 0.14), transparent 22%),
    radial-gradient(circle at 65% 55%, rgba(116, 222, 254, 0.11), transparent 18%),
    radial-gradient(circle at 85% 35%, rgba(220, 244, 252, 0.08), transparent 20%);
  filter: blur(30px);
}

.fog-one {
  animation: driftFog 18s ease-in-out infinite;
}

.fog-two {
  opacity: 0.72;
  animation: driftFog 25s ease-in-out infinite reverse;
}

.tree-line {
  inset: auto 0 0 0;
  height: 36%;
  opacity: 0.9;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8)),
    radial-gradient(circle at 5% 120%, #050608 0 16%, transparent 17%),
    radial-gradient(circle at 13% 115%, #050608 0 11%, transparent 12%),
    radial-gradient(circle at 22% 123%, #050608 0 18%, transparent 19%),
    radial-gradient(circle at 31% 118%, #050608 0 13%, transparent 14%),
    radial-gradient(circle at 40% 125%, #050608 0 20%, transparent 21%),
    radial-gradient(circle at 49% 120%, #050608 0 15%, transparent 16%),
    radial-gradient(circle at 58% 122%, #050608 0 19%, transparent 20%),
    radial-gradient(circle at 68% 119%, #050608 0 14%, transparent 15%),
    radial-gradient(circle at 77% 126%, #050608 0 22%, transparent 23%),
    radial-gradient(circle at 88% 120%, #050608 0 16%, transparent 17%);
  transform: translateY(calc(var(--hero-shift-y, 0px) * 0.18));
}

.motes {
  inset: 0;
}

.motes span {
  position: absolute;
  bottom: -12%;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 222, 254, 0.85), rgba(116, 222, 254, 0));
  opacity: 0;
  animation: riseMote var(--duration) linear infinite;
  animation-delay: var(--delay);
  filter: blur(0.4px);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-copy,
.crest-card,
.fact-card,
.psyche-card,
.timeline-card,
.hrp-card,
.split-callout,
.closing-panel {
  background:
    radial-gradient(circle at top left, rgba(77, 143, 67, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(116, 222, 254, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(7, 15, 16, 0.84), rgba(3, 6, 8, 0.8));
  border: 1px solid var(--line);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(231, 250, 255, 0.03);
  backdrop-filter: blur(16px);
}

.hero-copy {
  position: relative;
  padding: clamp(1.8rem, 3vw, 3rem);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-copy::before,
.crest-card::before,
.timeline-card::before,
.closing-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(116, 222, 254, 0.9), rgba(77, 143, 67, 0.45), rgba(77, 143, 67, 0));
}

.eyebrow,
.fact-label,
.timeline-kicker,
.crest-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.fact-card h3,
.psyche-card h3,
.timeline-card h3,
.hrp-card h3 {
  font-family: "Baskerville", "Palatino Linotype", serif;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.01em;
}

.hero-copy h1 {
  margin: 1rem 0 1.25rem;
  font-size: clamp(3rem, 8vw, 6rem);
  text-wrap: balance;
}

.hero-lead {
  max-width: 60ch;
  color: #d3e1d7;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-meta span,
.traits-strip span {
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(116, 222, 254, 0.14);
  background: rgba(8, 19, 18, 0.76);
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-quote {
  margin-top: 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(116, 222, 254, 0.55);
  color: var(--ink);
  font-size: 1.04rem;
  max-width: 42ch;
}

.crest-card {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  transition:
    transform 320ms var(--ease),
    border-color 260ms var(--ease),
    box-shadow 320ms var(--ease);
}

.crest-card-inner {
  padding: clamp(1.4rem, 3vw, 2rem);
  display: grid;
  gap: 1.2rem;
  place-items: center;
  text-align: center;
}

.crest-art {
  width: min(100%, 23rem);
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

.crest-image {
  padding: 0.75rem;
  border-radius: 24px;
  border: 1px solid rgba(116, 222, 254, 0.14);
  background:
    radial-gradient(circle at top, rgba(116, 222, 254, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(7, 12, 14, 0.82), rgba(4, 7, 8, 0.9));
  box-shadow:
    0 0 0 1px rgba(77, 143, 67, 0.12) inset,
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.crest-note {
  max-width: 30ch;
  color: var(--muted);
}

.scroll-hint {
  position: absolute;
  inset: auto auto 1.8rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.scroll-hint::before {
  content: "";
  width: 3.5rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(116, 222, 254, 0.9), rgba(116, 222, 254, 0));
}

.section-heading {
  max-width: 54rem;
}

.section-heading h2 {
  margin: 0.9rem 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  text-wrap: balance;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 1.03rem;
}

.facts-grid,
.psyche-grid,
.hrp-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.2rem;
}

.facts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.psyche-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hrp-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fact-card,
.psyche-card,
.hrp-card {
  position: relative;
  padding: 1.4rem 1.35rem 1.5rem;
  border-radius: var(--radius-small);
  transition:
    transform 260ms var(--ease),
    border-color 260ms var(--ease),
    background-color 260ms var(--ease),
    box-shadow 260ms var(--ease);
}

.fact-card:hover,
.psyche-card:hover,
.hrp-card:hover,
.crest-card:hover,
.timeline-card:hover,
.split-callout:hover,
.closing-panel:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.4),
    0 0 36px rgba(77, 143, 67, 0.08),
    inset 0 1px 0 rgba(231, 250, 255, 0.05);
}

.fact-card h3,
.psyche-card h3,
.timeline-card h3,
.hrp-card h3 {
  margin: 0.65rem 0 0.8rem;
  font-size: 1.45rem;
}

.fact-card p,
.psyche-card p,
.timeline-card p,
.hrp-card p,
.split-callout p,
.closing-line {
  color: var(--muted);
}

.split-callout {
  margin-top: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  transition:
    transform 260ms var(--ease),
    border-color 260ms var(--ease),
    box-shadow 260ms var(--ease);
}

.traits-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.6rem;
  margin-top: 2.6rem;
  padding: 0.4rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(116, 222, 254, 0.12), rgba(77, 143, 67, 0.28), rgba(116, 222, 254, 0.08));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 3rem 1fr;
  align-items: stretch;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 1;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 3;
}

.timeline-dot {
  grid-column: 2;
  align-self: center;
  justify-self: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  border: 1px solid rgba(116, 222, 254, 0.55);
  background: radial-gradient(circle, rgba(116, 222, 254, 0.92), rgba(77, 143, 67, 0.24));
  box-shadow:
    0 0 0 4px rgba(77, 143, 67, 0.08),
    0 0 24px rgba(116, 222, 254, 0.2);
}

.timeline-card {
  position: relative;
  padding: 1.45rem 1.4rem;
  border-radius: var(--radius);
  transition:
    transform 260ms var(--ease),
    border-color 260ms var(--ease),
    box-shadow 260ms var(--ease);
}

.closing-panel {
  position: relative;
  margin-top: 1rem;
  padding: 1.8rem;
  border-radius: var(--radius);
  transition:
    transform 260ms var(--ease),
    border-color 260ms var(--ease),
    box-shadow 260ms var(--ease);
}

.closing-line {
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  color: var(--ink);
  max-width: 48rem;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 700ms var(--ease),
    transform 900ms var(--ease);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulseMoon {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 1;
  }
}

@keyframes driftFog {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(2.5rem, -0.8rem, 0);
  }
}

@keyframes riseMote {
  0% {
    transform: translate3d(0, 0, 0) scale(0.4);
    opacity: 0;
  }
  15% {
    opacity: 0.85;
  }
  100% {
    transform: translate3d(var(--drift), -120vh, 0) scale(1.2);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .facts-grid,
  .psyche-grid,
  .hrp-grid,
  .split-callout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .timeline::before {
    left: 0.45rem;
    transform: none;
  }

  .timeline-item {
    grid-template-columns: 2rem 1fr;
  }

  .timeline-item .timeline-card,
  .timeline-item:nth-child(even) .timeline-card,
  .timeline-item:nth-child(odd) .timeline-card {
    grid-column: 2;
  }

  .timeline-dot {
    grid-column: 1;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel {
    width: min(calc(100% - 1.25rem), var(--content));
  }

  .hero-copy h1 {
    font-size: clamp(2.6rem, 16vw, 4.6rem);
  }

  .section-heading h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .scroll-hint {
    position: static;
    margin-top: 2rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
