/* ==========================================================================
   ANCIENT MYSTERIES — design system
   Museum-after-dark: warm near-black, aged gold, carved serif display.
   ========================================================================== */

:root {
  --ink: #0d0b08;
  --ink-2: #14110c;
  --ink-3: #1c1712;
  --gold: #c9a24b;
  --gold-bright: #e9cd85;
  --gold-dim: #8a6f33;
  --bone: #ece3cf;
  --bone-dim: #b3a78c;
  --ember: #d07733;
  --line: rgba(201, 162, 75, 0.22);
  --line-soft: rgba(201, 162, 75, 0.12);
  --display: "Cinzel", "Times New Roman", serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --measure: 42rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fine film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

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

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

a { color: var(--gold-bright); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--bone);
  line-height: 1.16;
  letter-spacing: 0.015em;
  text-wrap: balance;
}

.wrap {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

/* ---- shared bits ------------------------------------------------------ */

.gold-text {
  background: linear-gradient(105deg, #a8842f 0%, #e9cd85 38%, #f8ecc2 50%, #c9a24b 64%, #8a6f33 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
}

.eyebrow::before {
  content: "";
  width: 2.2em;
  height: 1px;
  background: var(--gold-dim);
}

.divider {
  text-align: center;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 1.1em;
  padding-left: 1.1em; /* optically recenter */
  margin: 3.4rem 0;
  opacity: 0.85;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.05em 2.1em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn-gold {
  background: linear-gradient(110deg, #b08a34, #e2c274 50%, #b08a34);
  color: #1c1406;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(201, 162, 75, 0.35);
}

.btn-ghost {
  border-color: var(--gold-dim);
  color: var(--gold-bright);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(201, 162, 75, 0.1);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* Greek key band */
.meander {
  height: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='26' viewBox='0 0 36 26'%3E%3Cpath d='M2 21 V6 H30 V13 H12 V21 H36' fill='none' stroke='%23c9a24b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.38;
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- header ------------------------------------------------------------ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease),
    border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  padding: 0.8rem 0;
  background: rgba(13, 11, 8, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
}

.brand svg { width: 30px; height: 30px; flex: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  position: relative;
  padding: 0.4em 0;
  transition: color 0.3s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.site-nav a:hover { color: var(--gold-bright); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ---- home hero ---------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(52vw 52vw at 50% 40%, rgba(201, 162, 75, 0.08), transparent 62%),
    radial-gradient(90vw 60vh at 50% 110%, rgba(208, 119, 51, 0.09), transparent 60%),
    var(--ink);
}

.hero-relic {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
}

.hero-relic svg {
  width: min(78vh, 92vw);
  height: min(78vh, 92vw);
  opacity: 0.9;
}

#dust {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 8rem 1.5rem 6rem;
  max-width: 62rem;
}

.hero-inner h1,
.hero-sub,
.hero-kicker {
  text-shadow: 0 2px 26px rgba(13, 11, 8, 0.9), 0 0 8px rgba(13, 11, 8, 0.6);
}

.hero-logo {
  width: min(400px, 76vw);
  height: auto;
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 36px rgba(201, 162, 75, 0.22));
}

.hero-kicker {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.2rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  font-weight: 600;
  margin-bottom: 1.8rem;
}

.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}

.hero-sub {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--bone-dim);
  max-width: 36em;
  margin: 0 auto 3rem;
}

.hero-cta {
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 1px;
  height: 64px;
  background: linear-gradient(var(--gold), transparent);
  overflow: hidden;
}

.scroll-cue::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--gold-bright);
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  to { top: 110%; }
}

.ring-rotor {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 160s linear infinite;
}

.ring-rotor-rev {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 220s linear infinite reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- section scaffolding ------------------------------------------------ */

.section {
  padding: 7.5rem 0;
  position: relative;
}

.section-head {
  margin-bottom: 4.2rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  margin-top: 1.1rem;
}

.section-head p {
  color: var(--bone-dim);
  max-width: 44em;
  margin-top: 1rem;
}

/* ---- featured story ------------------------------------------------------ */

.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  position: relative;
}

.featured::before,
.featured::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid var(--gold);
  pointer-events: none;
}

.featured::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.featured::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.featured-art {
  overflow: hidden;
  min-height: 420px;
  position: relative;
}

.featured-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 1.4s var(--ease);
}

.featured:hover .featured-art svg { transform: scale(1.035); }

.featured-body {
  padding: clamp(2.2rem, 4.5vw, 4.2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
}

.featured-body h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.featured-body .hook {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--bone-dim);
}

.read-link {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  margin-top: 0.6rem;
  transition: gap 0.35s var(--ease);
}

.read-link .arrow { transition: transform 0.35s var(--ease); }
.read-link:hover { gap: 1.2em; }
.read-link:hover .arrow { transform: translateX(4px); }

/* ---- story grid ---------------------------------------------------------- */

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  background: var(--ink-2);
  color: var(--bone);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 162, 75, 0.12),
    0 10px 46px rgba(201, 162, 75, 0.07);
}

.card-art {
  aspect-ratio: 16 / 9.6;
  overflow: hidden;
  position: relative;
}

.card-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 1.3s var(--ease);
}

.card:hover .card-art svg { transform: scale(1.05); }

.card-body {
  padding: 1.9rem 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 1em;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-meta .era { color: var(--bone-dim); }
.card-meta .dot { width: 3px; height: 3px; background: var(--gold-dim); border-radius: 50%; }

.card h3 { font-size: 1.45rem; }

.card .hook {
  font-size: 1.18rem;
  font-style: italic;
  color: var(--bone-dim);
  flex: 1;
}

/* ---- timeline ------------------------------------------------------------ */

.timeline-band {
  border-block: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--ink), var(--ink-2) 50%, var(--ink));
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  margin-top: 4.6rem;
  padding-top: 2.6rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2%;
  right: 2%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim) 12%, var(--gold-dim) 88%, transparent);
}

.tl-item {
  position: relative;
  padding: 0 1.2rem;
  text-align: center;
  color: var(--bone);
}

.tl-item::before {
  content: "";
  position: absolute;
  top: -2.6rem;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(201, 162, 75, 0.14), 0 0 18px rgba(201, 162, 75, 0.55);
  transition: box-shadow 0.4s;
}

a.tl-item:hover::before {
  box-shadow: 0 0 0 8px rgba(201, 162, 75, 0.2), 0 0 26px rgba(201, 162, 75, 0.85);
}

.tl-year {
  font-family: var(--display);
  font-size: 1.32rem;
  color: var(--gold-bright);
  display: block;
  margin-bottom: 0.5rem;
}

.tl-label {
  font-size: 1.08rem;
  color: var(--bone-dim);
  font-style: italic;
}

/* ---- follow / about band -------------------------------------------------- */

.follow {
  text-align: center;
}

.follow-glyph {
  width: 64px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.follow h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin-bottom: 1.4rem;
}

.follow p {
  color: var(--bone-dim);
  max-width: 38em;
  margin: 0 auto 2.8rem;
}

/* ---- footer ---------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 3rem 0 3.4rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
}

.site-footer .verified {
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
}

/* ==========================================================================
   STORY PAGES
   ========================================================================== */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  background: transparent;
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.story-hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.story-hero .art {
  position: absolute;
  inset: -6% 0;
  z-index: -2;
}

.story-hero .art svg {
  width: 100%;
  height: 100%;
}

.story-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(13, 11, 8, 0.42) 0%, rgba(13, 11, 8, 0.05) 34%, rgba(13, 11, 8, 0.55) 68%, var(--ink) 96%);
}

.story-hero-inner {
  padding: 10rem 0 4.6rem;
}

.story-hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.3rem);
  max-width: 15em;
  margin: 1.3rem 0 1.6rem;
}

.story-hero .hook {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-style: italic;
  color: var(--bone-dim);
  max-width: 32em;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1em;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.story-meta .dot { width: 3px; height: 3px; background: var(--gold-dim); border-radius: 50%; }
.story-meta .muted { color: var(--bone-dim); }

/* article body */

.article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4.8rem 1.5rem 2rem;
}

.article p { margin-bottom: 1.55rem; }

.article > p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 700;
  font-size: 4.4em;
  float: left;
  line-height: 0.78;
  padding: 0.08em 0.14em 0 0;
  color: var(--gold-bright);
}

.article .loop {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--gold-bright);
  text-align: center;
  margin: 3rem auto;
  max-width: 24em;
}

.article blockquote {
  border-left: 2px solid var(--gold);
  margin: 3.2rem 0;
  padding: 0.4rem 0 0.4rem 2rem;
  font-size: 1.65rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--bone);
}

.article blockquote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.reframe {
  text-align: center;
  padding: 3.4rem 0 1rem;
}

.reframe::before {
  content: "✦";
  display: block;
  color: var(--gold);
  margin-bottom: 2.2rem;
  font-size: 1rem;
}

.reframe p {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--bone);
  max-width: 22em;
  margin: 0 auto;
}

.reframe p + p { margin-top: 1.4rem; }

.reframe .gold-text { font-weight: 600; }

/* facts panel */

.facts {
  max-width: var(--measure);
  margin: 4.2rem auto 0;
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 2.4rem 2.6rem;
  position: relative;
}

.facts::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 2.6rem;
  right: 2.6rem;
  height: 1px;
  background: var(--gold);
}

.facts h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-bottom: 1.5rem;
}

.facts ul { list-style: none; }

.facts li {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--bone-dim);
  padding-left: 1.4em;
  position: relative;
  margin-bottom: 0.85em;
}

.facts li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.1em;
  color: var(--gold-dim);
  font-size: 0.7em;
}

.facts a {
  color: var(--gold-bright);
  border-bottom: 1px solid rgba(233, 205, 133, 0.35);
}

.facts a:hover { border-bottom-color: var(--gold-bright); }

/* share row */

.share-row {
  max-width: var(--measure);
  margin: 3rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 0 1.5rem;
}

.share-row span {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

/* next story */

.story-nav {
  margin-top: 6rem;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.story-nav a {
  padding: 3.2rem clamp(1.5rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  color: var(--bone);
  transition: background 0.45s var(--ease);
}

.story-nav a:hover { background: var(--ink-2); }

.story-nav a + a {
  border-left: 1px solid var(--line-soft);
  text-align: right;
  align-items: flex-end;
}

.story-nav .dir {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.story-nav .title {
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.3;
}

/* ---- responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
  body { font-size: 1.2rem; }

  .site-nav { display: none; }

  .featured { grid-template-columns: 1fr; }
  .featured-art { min-height: 300px; }

  .story-grid { grid-template-columns: 1fr; }

  .timeline {
    grid-template-columns: 1fr;
    gap: 2.6rem;
    padding-top: 0;
    padding-left: 2rem;
    margin-top: 3rem;
  }

  .timeline::before {
    top: 0.4rem;
    bottom: 0.4rem;
    left: 0;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, transparent, var(--gold-dim) 10%, var(--gold-dim) 90%, transparent);
  }

  .tl-item { text-align: left; padding: 0; }

  .tl-item::before {
    top: 0.55em;
    left: -2rem;
    transform: translate(-50%, 0);
  }

  .story-nav { grid-template-columns: 1fr; }
  .story-nav a + a {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    text-align: left;
    align-items: flex-start;
  }

  .section { padding: 5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .ring-rotor, .ring-rotor-rev, .scroll-cue::after { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
