/* =========================================================
   ANTAHEEN — CORE DESIGN SYSTEM
   Dark, cinematic, editorial. Restrained accent, no gradients-as-decor.
   ========================================================= */

:root {
  /* --- Color system --- */
  --near-black: #0a0a0a;
  --black-elevated: #121212;
  --off-white: #f2efe9;
  --muted-gray: #8a8680;
  --line: rgba(242, 239, 233, 0.12);
  --accent: #b3402a;        /* muted rust/ember — single restrained accent */
  --accent-soft: rgba(179, 64, 42, 0.35);

  /* --- Type scale --- */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-hero: clamp(2.6rem, 9vw, 7.5rem);
  --fs-chapter: clamp(1.8rem, 5vw, 3.4rem);
  --fs-year: clamp(3.2rem, 12vw, 9rem);
  --fs-title: clamp(1.4rem, 3vw, 2rem);
  --fs-body: 1.05rem;
  --fs-caption: 0.8rem;

  --space-section: clamp(4rem, 12vh, 9rem);
  --max-content: 1160px;

  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-slow: 900ms;
  --dur-med: 500ms;
  --dur-fast: 220ms;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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;
  }
}

body, h1, h2, h3, h4, p, figure { margin: 0; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

body {
  background: var(--near-black);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Visible, accessible focus state everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--off-white);
  color: var(--near-black);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --- Layout helpers --- */
.container {
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding-block: var(--space-section);
  border-bottom: 1px solid var(--line);
}

/* --- Typography --- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.hero-title {
  font-size: var(--fs-hero);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.chapter-title {
  font-size: var(--fs-chapter);
}

.year-number {
  font-family: var(--font-display);
  font-size: var(--fs-year);
  font-weight: 500;
  color: var(--off-white);
  line-height: 0.95;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-gray);
}

.body-copy {
  max-width: 62ch;
  color: rgba(242, 239, 233, 0.85);
}

.accent { color: var(--accent); }

/* --- Header / nav --- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 5vw, 3rem);
  background: linear-gradient(to bottom, rgba(10,10,10,0.85), transparent);
  backdrop-filter: blur(2px);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--off-white);
  padding: 0.5rem 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--near-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur-med) var(--ease-cinematic),
              transform var(--dur-med) var(--ease-cinematic),
              visibility 0s linear var(--dur-med);
}
.nav-fullscreen.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.nav-fullscreen a {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  text-transform: uppercase;
}
.nav-fullscreen a:hover,
.nav-fullscreen a:focus-visible { color: var(--accent); }

/* No-JS fallback: nav is a normal inline list so navigation always works */
.no-js .nav-fullscreen {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  flex-direction: row;
  flex-wrap: wrap;
  background: none;
  padding: 1rem 0;
}
.no-js .nav-toggle { display: none; }

/* --- Hero / opening screen --- */
.hero-screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--muted-gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.5vw, 2.4rem);
  text-transform: uppercase;
  max-width: 20ch;
}

.hero-meta {
  font-size: var(--fs-caption);
  color: var(--muted-gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-caption);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-gray);
}
.scroll-cue .line {
  width: 1px;
  height: 34px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0; right: 0;
  height: 100%;
  background: var(--accent);
  animation: scrollDrop 2.2s var(--ease-cinematic) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue .line::after { animation: none; top: 0; }
}
@keyframes scrollDrop {
  0%   { top: -100%; }
  60%  { top: 100%; }
  100% { top: 100%; }
}

/* --- Chapter / story sections --- */
.chapter {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-section);
}

.chapter-grid {
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 860px) {
  .chapter-grid.with-media { grid-template-columns: 1.1fr 0.9fr; }
}

.chapter-media {
  aspect-ratio: 4 / 5;
  background: var(--black-elevated);
  overflow: hidden;
  border: 1px solid var(--line);
}
.chapter-media img, .chapter-media video {
  width: 100%; height: 100%; object-fit: cover;
}

.year-marker {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

/* --- Reveal-on-scroll (progressive enhancement) --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-cinematic),
              transform var(--dur-slow) var(--ease-cinematic);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* No-JS / reduced-motion fallback: content is always visible */
.no-js .reveal,
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Buttons / links --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--off-white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.btn:hover, .btn:focus-visible {
  background: var(--off-white);
  color: var(--near-black);
}
.btn-accent {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--off-white);
}
.btn-accent:hover, .btn-accent:focus-visible {
  background: transparent;
  color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  padding-block: 3.5rem 2rem;
  color: var(--muted-gray);
  font-size: 0.85rem;
}
.site-footer a:hover { color: var(--accent); }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 2rem;
}
.footer-social { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Utility --- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
