﻿:root {
  --bg: #120b09;
  --bg-soft: rgba(35, 21, 16, 0.92);
  --card: rgba(255, 244, 228, 0.08);
  --border: rgba(255, 214, 153, 0.18);
  --text: #fff9f2;
  --muted: #ddcbb9;
  --accent: #ffb347;
  --accent-strong: #ff7a18;
  --accent-soft: #67d5b5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.18), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(103, 213, 181, 0.14), transparent 22%),
    radial-gradient(circle at bottom left, rgba(255, 143, 107, 0.14), transparent 20%),
    linear-gradient(135deg, #1a110d 0%, #22130f 42%, #4a2316 100%);
}

button {
  font: inherit;
}

h1,
h2,
h3,
p,
dl {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Baloo 2", cursive;
  line-height: 0.95;
}

.page-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr minmax(320px, 400px);
  gap: 22px;
  align-items: end;
  margin-bottom: 24px;
}

.eyebrow,
.info-kicker,
.panel-kicker {
  margin-bottom: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.95rem, 2.7vw, 2.7rem);
}

h3 {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.hero-copy,
.info-description,
.period-summary {
  margin-top: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.period-panel,
.map-card,
.info-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.period-panel,
.info-card {
  padding: 20px;
}

.period-buttons,
.region-buttons,
.dinosaur-list {
  display: grid;
  gap: 12px;
}

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

.period-button,
.region-button,
.dino-button,
.map-hotspot {
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.period-button:hover,
.region-button:hover,
.dino-button:hover,
.map-hotspot:hover {
  transform: translateY(-1px);
}

.period-button {
  padding: 14px 12px;
  border-radius: 18px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.period-button strong,
.period-button span {
  display: block;
}

.period-button span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.period-button.active {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.92), rgba(255, 179, 71, 0.92));
  color: #2b1206;
}

.period-button.active span {
  color: rgba(43, 18, 6, 0.75);
}

.content-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
  align-items: start;
}

.map-card {
  overflow: hidden;
  padding: 20px;
}

.map-stage-wrap {
  perspective: 1400px;
}

.map-stage {
  position: relative;
  min-height: 680px;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 20%),
    linear-gradient(180deg, rgba(251, 197, 135, 0.16), transparent 30%),
    linear-gradient(180deg, #3b2016 0%, #24120d 100%);
  transform: rotateX(8deg);
  transform-style: preserve-3d;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.period-map,
.map-hotspots {
  position: absolute;
  inset: 0;
}

.period-map svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-hotspot {
  position: absolute;
  min-width: 108px;
  padding: 12px 14px;
  border-radius: 18px;
  color: #fff8ef;
  background: rgba(20, 10, 7, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
  text-align: left;
}

.map-hotspot small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.map-hotspot.active {
  border-color: rgba(255, 179, 71, 0.58);
  box-shadow: 0 0 0 6px rgba(255, 179, 71, 0.12);
}

.globe-overlay {
  margin-top: 18px;
}

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

.region-button,
.dino-button {
  width: 100%;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.region-button {
  padding: 14px 16px;
  border-radius: 18px;
}

.region-button small,
.dino-button small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.region-button.active {
  border-color: rgba(255, 179, 71, 0.55);
  background: rgba(255, 179, 71, 0.16);
}

.info-stack {
  display: grid;
  gap: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.stats-grid div {
  padding: 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

dd {
  margin: 0;
  line-height: 1.5;
}

.dinosaur-list {
  margin-top: 18px;
}

.dino-button {
  padding: 16px;
  border-radius: 20px;
}

.dino-button.active {
  border-color: rgba(103, 213, 181, 0.55);
  background: rgba(103, 213, 181, 0.16);
}

.dino-button .dino-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.dino-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 179, 71, 0.14);
  color: var(--accent);
  font-size: 0.78rem;
}

.detail-card {
  background: linear-gradient(180deg, rgba(103, 213, 181, 0.08), transparent 45%), var(--bg-soft);
}

.dino-visual {
  margin: 14px 0 16px;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 214, 153, 0.18), rgba(34, 18, 13, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dino-visual img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.empty-state {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    min-height: 560px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1320px);
    padding-top: 18px;
  }

  .period-buttons,
  .region-buttons,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .map-stage {
    min-height: 430px;
    transform: none;
  }

  .map-hotspot {
    min-width: 92px;
    padding: 10px 12px;
  }
}
.map-stage {
  background: linear-gradient(180deg, #24120d 0%, #120908 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 35px 70px rgba(0,0,0,0.4);
  transition: transform 220ms ease;
}

.map-stage::before {
  content: "";
  position: absolute;
  inset: auto 30px -38px 30px;
  height: 42px;
  filter: blur(18px);
  background: rgba(0, 0, 0, 0.42);
  transform: translateZ(-40px);
}

.period-map {
  transform: translateZ(24px);
}

.map-hotspots {
  pointer-events: none;
  transform: translateZ(70px);
}

.map-hotspots .map-hotspot {
  pointer-events: auto;
}

.map-surface,
.map-image {
  width: 100%;
  height: 100%;
}

.map-surface {
  position: relative;
}

.map-image {
  display: block;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.08) brightness(0.92);
}

.map-image-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, transparent 0%, rgba(0,0,0,0.08) 42%, rgba(0,0,0,0.26) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.1), transparent 20%, rgba(0,0,0,0.18) 100%);
}

.map-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(16, 9, 7, 0.74);
  color: #fff7eb;
  font-size: 0.84rem;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}

.map-hotspot {
  background: rgba(24, 12, 8, 0.84);
  border-color: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}

.map-hotspot.active {
  border-color: rgba(255, 214, 153, 0.85);
  box-shadow: 0 0 0 8px var(--hotspot-glow), 0 18px 34px rgba(0, 0, 0, 0.34);
}

.map-hotspot:hover {
  transform: translate(-50%, -50%) translateZ(86px) scale(1.02);
}

.dino-visual {
  background: radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 28%), linear-gradient(180deg, rgba(255, 214, 153, 0.12), rgba(15, 9, 8, 0.96));
}

.dino-visual img {
  background: linear-gradient(180deg, #ead7b2, #4b2f22);
}
.audio-panel {
  margin: 16px 0 4px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.audio-panel button {
  padding: 14px 16px;
  border-radius: 16px;
  border: 0;
  font-weight: 700;
  color: #2b1206;
  background: linear-gradient(135deg, var(--accent-strong), #ffca74);
}

.audio-panel .secondary-button {
  background: linear-gradient(135deg, #ffd7b8, #ff9d7c);
}

.audio-status {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}
