/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root, [data-theme="light"] {
  --color-bg: #f8f6f1;
  --color-surface: #ffffff;
  --color-surface-2: #fdfcfa;
  --color-surface-offset: #f2ede6;
  --color-border: #e0d9d0;
  --color-divider: #e8e3db;
  --color-text: #251e14;
  --color-text-muted: #6b6459;
  --color-text-faint: #b0a99e;
  --color-text-inverse: #f8f6f1;

  /* Accent per theme */
  --color-pokemon: #2a7de1;
  --color-pokemon-light: #deeafb;
  --color-pokemon-dark: #1a5cb5;
  --color-buecher: #7a3b1e;
  --color-buecher-light: #f5e8df;
  --color-buecher-dark: #5c2a12;
  --color-restaurants: #2d6a4f;
  --color-restaurants-light: #d8ede4;
  --color-restaurants-dark: #1e4d38;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.5rem, 1rem + 5vw, 5.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(37,30,20,0.06);
  --shadow-md: 0 4px 16px rgba(37,30,20,0.09);
  --shadow-lg: 0 12px 40px rgba(37,30,20,0.13);

  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1180px;
}

[data-theme="dark"] {
  --color-bg: #141210;
  --color-surface: #1a1814;
  --color-surface-2: #1e1c18;
  --color-surface-offset: #1c1a16;
  --color-border: #2e2b26;
  --color-divider: #252320;
  --color-text: #cec9c2;
  --color-text-muted: #7a756e;
  --color-text-faint: #4a4740;
  --color-text-inverse: #141210;

  --color-pokemon: #5a9fe8;
  --color-pokemon-light: #1e2e40;
  --color-pokemon-dark: #7dbaf0;
  --color-buecher: #c4855a;
  --color-buecher-light: #2e1e14;
  --color-buecher-dark: #e0a07a;
  --color-restaurants: #5aaa84;
  --color-restaurants-light: #142a20;
  --color-restaurants-dark: #7dc4a2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #141210;
    --color-surface: #1a1814;
    --color-surface-2: #1e1c18;
    --color-surface-offset: #1c1a16;
    --color-border: #2e2b26;
    --color-divider: #252320;
    --color-text: #cec9c2;
    --color-text-muted: #7a756e;
    --color-text-faint: #4a4740;
    --color-text-inverse: #141210;
    --color-pokemon: #5a9fe8;
    --color-pokemon-light: #1e2e40;
    --color-buecher: #c4855a;
    --color-buecher-light: #2e1e14;
    --color-restaurants: #5aaa84;
    --color-restaurants-light: #142a20;
  }
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}
img, video { display: block; max-width: 100%; height: auto; }
h1,h2,h3,h4 { font-family: var(--font-display); text-wrap: balance; line-height: 1.2; }
p, li { text-wrap: pretty; max-width: 68ch; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
ul { list-style: none; }
::selection { background: color-mix(in oklab, var(--color-pokemon) 20%, transparent); }
:focus-visible { outline: 2px solid var(--color-pokemon); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.site-header.hidden { transform: translateY(-110%); }
.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.logo:hover { color: var(--color-pokemon); }
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--color-surface-offset); color: var(--color-text); }
.nav-pokemon:hover { background: var(--color-pokemon-light); color: var(--color-pokemon); }
.nav-buecher:hover { background: var(--color-buecher-light); color: var(--color-buecher); }
.nav-restaurants:hover { background: var(--color-restaurants-light); color: var(--color-restaurants); }
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--color-surface-offset); color: var(--color-text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-image-wrap {
  position: absolute;
  inset: 0;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(20,14,6,0.72) 0%,
    rgba(20,14,6,0.4) 60%,
    rgba(20,14,6,0.65) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  max-width: 760px;
}
.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-4);
}
.hero-title {
  font-size: var(--text-hero);
  font-family: var(--font-display);
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  font-weight: 700;
}
.hero-title em {
  font-style: italic;
  color: #ffd97d;
}
.hero-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-10);
  max-width: 52ch;
  margin-inline: auto;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: #ffd97d;
  color: #251e14;
  box-shadow: 0 4px 16px rgba(255,200,60,0.35);
}
.btn-primary:hover { background: #ffe89e; box-shadow: 0 8px 24px rgba(255,200,60,0.45); }
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #ffffff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }
.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-dot {
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/* ============================================================
   SECTION STRIP
   ============================================================ */
.section-strip {
  display: flex;
  border-bottom: 1px solid var(--color-divider);
}
.strip-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  border-right: 1px solid var(--color-divider);
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.02em;
}
.strip-item:last-child { border-right: none; }
.strip-icon { font-size: 1.25rem; }
.strip-pokemon:hover { background: var(--color-pokemon-light); color: var(--color-pokemon); }
.strip-buecher:hover { background: var(--color-buecher-light); color: var(--color-buecher); }
.strip-restaurants:hover { background: var(--color-restaurants-light); color: var(--color-restaurants); }

/* ============================================================
   TOPIC SECTIONS
   ============================================================ */
.topic-section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
}
.section-pokemon { background: var(--color-bg); }
.section-buecher { background: var(--color-surface-offset, var(--color-surface)); }
.section-restaurants { background: var(--color-bg); }

[data-theme="dark"] .section-buecher { background: var(--color-surface); }

.section-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}
.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}
.tag-pokemon { background: var(--color-pokemon-light); color: var(--color-pokemon); }
.tag-buecher { background: var(--color-buecher-light); color: var(--color-buecher); }
.tag-restaurants { background: var(--color-restaurants-light); color: var(--color-restaurants); }

.section-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
  color: var(--color-text);
}
.section-intro {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-inline: auto;
  line-height: 1.8;
}

/* Layout grid */
.section-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: start;
}
.section-layout-reverse { direction: rtl; }
.section-layout-reverse > * { direction: ltr; }

/* Image */
.section-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}
.section-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-image-wrap:hover .section-img { transform: scale(1.04); }
.image-badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}
.badge-pokemon { background: rgba(42,125,225,0.85); color: #fff; }
.badge-buecher { background: rgba(122,59,30,0.85); color: #fff; }
.badge-restaurants { background: rgba(45,106,79,0.85); color: #fff; }

/* Content cards */
.section-content { display: flex; flex-direction: column; gap: var(--space-6); }
.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.content-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  color: var(--color-text);
}
.card-pokemon { border-top: 3px solid var(--color-pokemon); }
.card-buecher { border-top: 3px solid var(--color-buecher); }
.card-restaurants { border-top: 3px solid var(--color-restaurants); }

/* Feature list (Pokémon) */
.feature-list { display: flex; flex-direction: column; gap: var(--space-5); }
.feature-list li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.feature-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.4;
}
.feature-list strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.feature-list p { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.stat-item {
  background: var(--color-pokemon-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-pokemon);
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Book list */
.book-list { display: flex; flex-direction: column; gap: var(--space-4); }
.book-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.book-item:hover { background: var(--color-surface-offset); }
.book-spine {
  width: 6px;
  min-height: 64px;
  border-radius: 3px;
  flex-shrink: 0;
  align-self: stretch;
  opacity: 0.85;
}
.book-info { flex: 1; }
.book-info strong { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--color-text); }
.book-info span { display: block; font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-1); }
.book-info p { font-size: var(--text-xs); color: var(--color-text-muted); }
.book-rating { font-size: var(--text-sm); flex-shrink: 0; color: #d4a017; }

/* Reading quote */
.reading-quote {
  background: var(--color-buecher-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  border-left: 3px solid var(--color-buecher);
}
.reading-quote blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-buecher);
  line-height: 1.7;
}
.reading-quote cite {
  display: block;
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  letter-spacing: 0.05em;
}

/* Restaurant list */
.restaurant-list { display: flex; flex-direction: column; gap: var(--space-4); }
.restaurant-item {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.restaurant-item:hover {
  border-color: var(--color-restaurants);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.restaurant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.restaurant-header strong { font-size: var(--text-sm); font-weight: 600; }
.cuisine-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-restaurants-light);
  color: var(--color-restaurants);
  white-space: nowrap;
}
.restaurant-item > p { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.restaurant-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.restaurant-rating { color: #d4a017; font-size: var(--text-sm); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-12) var(--space-6);
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.footer-nav {
  display: flex;
  gap: var(--space-6);
}
.footer-nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--color-text); }
.footer-copy {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .logo-text { font-size: var(--text-base); }

  .section-layout, .section-layout-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .section-layout-reverse > * { direction: ltr; }

  .stats-row { grid-template-columns: 1fr 1fr; }
  .stats-row .stat-item:last-child { grid-column: 1 / -1; }

  .section-strip { flex-direction: column; }
  .strip-item { border-right: none; border-bottom: 1px solid var(--color-divider); }
  .strip-item:last-child { border-bottom: none; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .footer-copy { margin-left: 0; }

  .hero-title { font-size: clamp(2rem, 8vw, 3.5rem); }
}

@media (max-width: 480px) {
  .content-card { padding: var(--space-6); }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; max-width: 280px; }
}
