/* Vegas Dining Companion — Chapter Page Styles */

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

:root {
  --gold: #d4a853;
  --gold-light: #e8c97a;
  --gold-dark: #b8892f;
  --bg-deep: #0a0a0f;
  --text-primary: #f0ebe3;
  --text-muted: #8a8278;
  --border-subtle: rgba(212, 168, 83, 0.12);
  --border-medium: rgba(212, 168, 83, 0.2);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', 'Georgia', serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 300;
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212, 168, 83, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(196, 69, 54, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(212, 168, 83, 0.02) 0%, transparent 50%);
  animation: ambientDrift 25s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes ambientDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-20px, 15px) rotate(1deg); }
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

.page {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Top accent line */
.top-accent {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  z-index: 10;
}

/* Dividers */
.divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 2.5rem auto;
  position: relative;
}

.divider::before {
  content: '\2726';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-deep);
  padding: 0 0.8rem;
  color: var(--gold);
  font-size: 0.7rem;
}

/* ─── Navigation ─── */

.chapter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  font-size: 0.8rem;
}

.chapter-nav a {
  color: var(--gold-dark);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 400;
}

.chapter-nav a:hover {
  color: var(--gold);
}

.chapter-nav .nav-toc {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chapter-nav .nav-toc:hover {
  color: var(--gold);
}

.chapter-nav-bottom {
  margin-top: 3rem;
  margin-bottom: 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

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

.chapter-header {
  text-align: center;
  margin-bottom: 2rem;
}

.course-name {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.chapter-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
  color: var(--text-primary);
}

/* ─── Restaurant Info Block (dining guide style) ─── */

.chapter-content h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  margin: 2.5rem 0 0.4rem;
  text-align: center;
  letter-spacing: 0.05em;
}

.restaurant-detail {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.15rem;
  font-weight: 300;
}

/* Cluster of restaurant details gets a subtle card treatment */
.restaurant-info-block {
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  padding: 1.2rem 1.5rem 1rem;
  margin: 0.5rem 0 2rem;
  background: rgba(212, 168, 83, 0.02);
}

.restaurant-info-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.restaurant-info-block .restaurant-detail {
  margin-bottom: 0.1rem;
}

.restaurant-info-block .restaurant-detail:last-child {
  margin-bottom: 0;
}

/* ─── Chapter Content ─── */

.chapter-content {
  margin-top: 1rem;
}

.chapter-content p {
  margin-bottom: 1.2em;
  color: var(--text-primary);
}

.chapter-content em {
  font-style: italic;
}

.chapter-content strong {
  font-weight: 600;
}

.chapter-content del {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Blockquotes — pull quotes / asides */
.chapter-content blockquote {
  border-left: 2px solid var(--gold-dark);
  padding: 0.8rem 0 0.8rem 1.3rem;
  margin: 2rem 0;
}

.chapter-content blockquote p {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* ─── Footer ─── */

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}

footer .copyright {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--gold-dark);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

footer .no-tracking {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

/* ─── Print ─── */

@media print {
  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
    line-height: 1.5;
  }

  body::before,
  body::after,
  .top-accent {
    display: none;
  }

  .page {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .chapter-nav {
    display: none;
  }

  .chapter-nav-bottom {
    display: none;
  }

  .chapter-header h1 {
    color: #111;
    font-size: 20pt;
  }

  .course-name {
    color: #666;
  }

  .chapter-content h3 {
    color: #111;
  }

  .restaurant-detail {
    color: #444;
  }

  .restaurant-info-block {
    border-color: #ccc;
    background: #fafafa;
  }

  .chapter-content p {
    color: #111;
  }

  .chapter-content blockquote {
    border-left-color: #999;
  }

  .chapter-content blockquote p {
    color: #444;
  }

  .divider {
    background: #999;
    margin: 1.2rem auto;
  }

  .divider::before {
    background: #fff;
    color: #999;
  }

  footer {
    border-top-color: #ccc;
    color: #666;
  }

  footer .copyright {
    color: #444;
  }

  footer .no-tracking {
    color: #888;
  }
}

/* ─── Responsive ─── */

@media (max-width: 480px) {
  .page {
    padding: 3rem 1.5rem;
  }

  .chapter-header h1 {
    font-size: 1.6rem;
  }

  .chapter-nav {
    font-size: 0.75rem;
  }

  .restaurant-info-block {
    padding: 1rem;
  }
}
