:root {
  --bg: #fdf8f2;
  --bg-card: #ffffff;
  --border: #e4d9cc;
  --text: #3a2a1e;
  --text-muted: #8c7564;
  --accent: #b8722a;
  --accent-light: #f5e8d4;
  --shadow: 0 2px 12px rgba(80, 50, 20, 0.08);
  --radius: 10px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ── Header ─────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; color: var(--accent); }

.site-nav { display: flex; gap: 24px; }

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  text-decoration: none;
}

/* ── Main layout ─────────────────────────────────── */

main {
  flex: 1;
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── Hero tagline ────────────────────────────────── */

.hero {
  text-align: center;
  padding: 28px 0 4px;
}
.hero-tagline {
  color: var(--text-muted);
  font-size: 16px;
}

/* ── Scene filter pills ──────────────────────────── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0 16px;
  justify-content: center;
}

.scene-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.scene-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.scene-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Video grid ──────────────────────────────────── */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}

.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(80, 50, 20, 0.14);
}

.video-thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background-color: #e8d9c8;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-thumb.thumb-missing {
  background: linear-gradient(135deg, #ede8e0 0%, #e0d8cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-thumb.thumb-missing::after {
  content: '▶';
  font-size: 32px;
  color: rgba(184, 114, 42, 0.4);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  color: rgba(255, 255, 255, 0);
  transition: background 0.2s, color 0.2s;
}
.video-card:hover .play-overlay {
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.95);
}
.play-overlay svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.video-info {
  padding: 12px 14px 14px;
}

.scene-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.video-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* ── Modal ───────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 18, 8, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-inner {
  background: #1a1008;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.15s;
}
.modal-close:hover { color: #fff; }

.modal-title {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  padding: 10px 48px 0 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-top: 8px;
}
.modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── About page ──────────────────────────────────── */

.about-main {
  flex: 1;
  padding: 48px 32px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.about-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.about-body p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 20px;
}

.about-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.about-meta {
  color: var(--text-muted) !important;
  font-size: 14px !important;
  margin-bottom: 0 !important;
}
.about-meta a { color: var(--text-muted); }
.about-meta a:hover { color: var(--accent); }

/* ── Footer ──────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); text-decoration: none; }

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  main { padding: 20px 16px; }
  .about-main { padding: 32px 16px; }
  .site-header { padding: 14px 16px; }
  .video-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 12px; }
  .hero-tagline { font-size: 15px; }
}
