/* ==========================================================
   Chronos — Delphi preview
   Palette derives from Delphi itself: warm marble cream on
   deep basalt, Greek polychromy accents (terracotta, gold,
   deep Aegean blue). Editorial cinematic feel.
   ========================================================== */

:root {
  /* Core surfaces */
  --bg: #0e0b08;
  --bg-2: #14100c;
  --bg-3: #1a1611;
  --surface: #1e1913;
  --border: #2b241c;
  --border-strong: #3a2f24;

  /* Text */
  --text: #efe6d4;
  --text-muted: #b6a888;
  --text-faint: #7a6a52;

  /* Accents — Greek polychromy */
  --gold: #c8a86a;
  --gold-bright: #e0c184;
  --terracotta: #b8624d;
  --aegean: #4a6b7c;
  --marble: #efe6d4;

  /* Type */
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --sans: 'General Sans', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Rhythm */
  --unit: 8px;
  --radius: 4px;
  --radius-lg: 8px;
  --max-w: 1240px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

button { font-family: inherit; cursor: pointer; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 16px;
}

/* =========================================================
   LANDING / HERO
   ========================================================= */
.landing { min-height: 100vh; }

.landing-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100vh;
}
@media (min-width: 900px) {
  .landing-hero {
    grid-template-columns: 1.35fr 1fr;
    align-items: stretch;
  }
}

.hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-2);
  user-select: none;
  touch-action: none;
}
@media (min-width: 900px) {
  .hero-frame { aspect-ratio: auto; height: 100vh; }
}

.hero-slider { position: absolute; inset: 0; }

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.hero-then {
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0.15s var(--ease);
  will-change: clip-path;
}

.hero-drag {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 3;
}
.hero-drag-line {
  position: absolute;
  inset: 0;
  background: var(--marble);
  opacity: 0.9;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}
.hero-drag-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--marble);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.hero-labels {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}
.hero-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--marble);
  background: rgba(14, 11, 8, 0.55);
  backdrop-filter: blur(4px);
  padding: 6px 10px;
  border-radius: 2px;
  border: 1px solid rgba(239, 230, 212, 0.15);
}

.hero-copy {
  padding: clamp(32px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  border-left: 1px solid var(--border);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  margin-bottom: 40px;
}
.brand-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--gold);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--marble);
  margin-bottom: 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 500;
}

.hero-lede {
  font-family: var(--serif);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 40ch;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--marble);
  color: var(--bg);
  padding: 14px 24px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid var(--marble);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* =========================================================
   PROSE / ABOUT
   ========================================================= */
.prose-section {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 6vw, 64px);
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.prose-inner {
  max-width: 780px;
  margin: 0 auto;
}
.prose-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--marble);
  margin-bottom: 32px;
}
.prose-body p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 400;
}
.prose-body p:last-child { color: var(--text-muted); }

/* =========================================================
   TOUR — header
   ========================================================= */
.tour {
  background: var(--bg);
  border-top: 1px solid var(--border);
  min-height: 100vh;
}
.tour-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 11, 8, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.tour-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.tour-back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
}
.tour-back:hover { color: var(--gold-bright); }

.tour-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  max-width: 400px;
}
#tourProgressText {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.tour-progress-bar {
  flex: 1;
  height: 2px;
  background: var(--border);
  overflow: hidden;
}
#tourProgressFill {
  height: 100%;
  background: var(--gold);
  width: 12.5%;
  transition: width 0.4s var(--ease);
}

/* =========================================================
   TOUR — body layout
   ========================================================= */
.tour-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 32px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1000px) {
  .tour-body {
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
  }
}

/* Map / waypoint list */
.tour-map {
  position: static;
}
@media (min-width: 1000px) {
  .tour-map {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 8px;
  }
}
.map-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  color: var(--marble);
  margin-bottom: 8px;
}
.map-hint {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.map-svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  margin-bottom: 20px;
}

.map-point {
  cursor: pointer;
  transition: transform 0.2s var(--ease);
  transform-origin: center;
  transform-box: fill-box;
}
.map-point:hover { transform: scale(1.2); }
.map-point .dot { fill: var(--bg-3); stroke: var(--gold); stroke-width: 1.4; }
.map-point.active .dot { fill: var(--gold); stroke: var(--gold-bright); }
.map-point .label {
  font-family: var(--mono);
  font-size: 8px;
  fill: var(--text-muted);
  letter-spacing: 0.1em;
}
.map-point.active .label { fill: var(--gold-bright); }

.waypoint-list {
  list-style: none;
  border-top: 1px solid var(--border);
}
.waypoint-list li {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: baseline;
  cursor: pointer;
  transition: background 0.15s var(--ease), padding-left 0.2s var(--ease);
}
.waypoint-list li:hover { padding-left: 8px; background: var(--bg-2); }
.waypoint-list li.active { padding-left: 8px; }
.waypoint-list li.active .wp-title { color: var(--gold); }
.waypoint-list li.active .wp-num { color: var(--gold-bright); }

.wp-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  width: 20px;
}
.wp-title {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--text);
  line-height: 1.3;
  font-weight: 500;
}
.wp-duration {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  margin-left: auto;
  flex-shrink: 0;
}

/* =========================================================
   TOUR — stage
   ========================================================= */
.tour-stage { min-width: 0; }

.stage-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.stage-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stage-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.stage-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--marble);
}
.stage-coords {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

/* Then/Now slider */
.reveal {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-3);
  user-select: none;
  touch-action: none;
}
.reveal img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.reveal .then {
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0.15s var(--ease);
  will-change: clip-path;
}
.reveal-drag {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 3;
}
.reveal-drag-line {
  position: absolute;
  inset: 0;
  background: var(--marble);
  opacity: 0.9;
}
.reveal-drag-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--marble);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.reveal-labels {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}
.reveal-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--marble);
  background: rgba(14, 11, 8, 0.6);
  padding: 5px 9px;
  border-radius: 2px;
}

/* Audio player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.play-btn:hover { background: var(--gold-bright); transform: scale(1.05); }
.play-btn .icon-play { display: block; margin-left: 2px; }
.play-btn .icon-pause { display: none; }
.play-btn.playing .icon-play { display: none; }
.play-btn.playing .icon-pause { display: block; }

.audio-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.audio-track-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.audio-title { color: var(--text); text-transform: none; letter-spacing: 0; font-family: var(--serif); font-size: 14px; }
.audio-time { color: var(--text-faint); white-space: nowrap; }

.audio-scrubber {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}
.audio-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--gold);
  transition: width 0.1s linear;
}

/* Waypoint prose */
.stage-prose {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  max-width: 68ch;
}
.stage-prose p { margin-bottom: 20px; }
.stage-prose p em { font-style: italic; color: var(--gold-bright); }

.stage-notes {
  padding: 20px 24px;
  background: var(--bg-2);
  border-left: 3px solid var(--gold);
  border-radius: 2px;
}
.stage-notes-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.stage-notes-body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Nav */
.stage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.nav-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.nav-btn-primary {
  background: var(--marble);
  color: var(--bg);
  border-color: var(--marble);
}
.nav-btn-primary:hover:not(:disabled) {
  background: var(--gold-bright);
  color: var(--bg);
  border-color: var(--gold-bright);
}

.nav-dots {
  display: flex;
  gap: 6px;
}
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  border: none;
  padding: 0;
}
.nav-dot:hover { background: var(--text-faint); }
.nav-dot.active { background: var(--gold); transform: scale(1.4); }

/* =========================================================
   CLOSING
   ========================================================= */
.closing {
  background: var(--bg-2);
  padding: clamp(80px, 12vw, 160px) clamp(24px, 6vw, 64px) 40px;
  border-top: 1px solid var(--border);
}
.closing-inner { max-width: var(--max-w); margin: 0 auto; }

.closing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 80px;
}
@media (min-width: 800px) {
  .closing-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}
.closing-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
  color: var(--marble);
  margin-bottom: 20px;
}
.closing-body {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}
.closing-list { list-style: none; }
.closing-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--serif);
  font-size: 17px;
  color: var(--text);
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.closing-list span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.closing-cta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: end;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
@media (min-width: 800px) {
  .closing-cta { grid-template-columns: 1fr auto; gap: 48px; }
}
.closing-cta-lede {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  color: var(--marble);
  margin-bottom: 8px;
  line-height: 1.2;
}
.closing-cta-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 60ch;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-note {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
  max-width: 800px;
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
