:root {
  color-scheme: light dark;
  --bg: #f7f5f2;
  --bg-elevated: #ffffff;
  --fg: #1c1a17;
  --muted: #6b6560;
  --border: #e6e1da;
  --accent: #c1502e;
  --accent-fg: #ffffff;
  --shadow: 0 1px 2px rgba(20, 15, 5, 0.06), 0 8px 24px rgba(20, 15, 5, 0.06);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16151a;
    --bg-elevated: #201f26;
    --fg: #f1efec;
    --muted: #a6a19b;
    --border: #35333b;
    --accent: #e07a53;
    --accent-fg: #1c1a17;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; }

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

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--border);
}

.site-header .logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-header img.logo {
  height: 48px;
  width: auto;
  border-radius: 10px;
}

.site-header .site-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-header .tagline {
  color: var(--muted);
  font-size: 0.85rem;
}

.back-link {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.back-link:hover { color: var(--fg); }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

/* Home: season cards */
.seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.season-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--fg);
  display: block;
  transition: transform 0.15s ease;
}
.season-card:hover { transform: translateY(-3px); }

.season-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season-card .season-card-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.1rem 1.1rem 0.9rem;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0));
  color: #fff;
}

.season-card .season-card-label .num {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.season-card .season-card-label .title {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Season page */
.season-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}

.intro-block {
  margin-bottom: 2.5rem;
}

.intro-block video {
  width: 100%;
  max-width: 900px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #000;
}

.group-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.9rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.group-heading:first-of-type {
  border-top: none;
  padding-top: 0;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.9rem;
}

.thumb {
  position: relative;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--bg-elevated);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  text-align: left;
  font: inherit;
  color: inherit;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb .play-icon svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

.thumb .thumb-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
  background: linear-gradient(to top, rgba(0,0,0,0.68), rgba(0,0,0,0));
  color: #fff;
  min-height: 1.4em;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}
.modal-overlay[hidden] { display: none; }

.modal-content {
  width: 80vw;
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.modal-content .media-frame {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-content video,
.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-caption {
  color: #f1efec;
  font-size: 0.9rem;
  text-align: center;
  max-width: 80vw;
}

.modal-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: rgba(255,255,255,0.22); }

.empty-state {
  color: var(--muted);
  padding: 2rem 0;
}

footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 2rem 1rem 3rem;
}
