/* ═══════════════════════════════════════════════
   Clean Lantern Books — base.css
   Dark Forest / Lantern-light aesthetic
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Lora:ital,wght@0,400;0,500;1,400&family=Raleway:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --bg:          #080d09;
  --surface:     #0d1610;
  --card:        #101d13;
  --card-hover:  #152019;
  --border:      rgba(182, 140, 60, 0.15);
  --border-hi:   rgba(182, 140, 60, 0.35);
  --amber:       #c89a3c;
  --amber-light: #e8be6a;
  --amber-dim:   #7a5e22;
  --text:        #ddd3bc;
  --text-dim:    #8a9180;
  --text-muted:  #4a5545;
  --green-dim:   #1a2e1c;
  --radius:      10px;
  --shadow:      0 4px 32px rgba(0,0,0,.6);
  --glow:        0 0 40px rgba(200,154,60,.08);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  /* Subtle noise texture via SVG */
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(26,46,28,.8) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--amber-light);
  letter-spacing: .01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-style: italic; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--amber); text-decoration: none; transition: color .2s; }
a:hover { color: var(--amber-light); }

strong { font-weight: 600; color: var(--text); }
small  { font-size: .8em; }

/* ── Hello Bar ── */
.hello-bar {
  background: var(--green-dim);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 9px 16px;
  font-family: 'Raleway', sans-serif;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hello-bar a {
  color: var(--amber);
  font-weight: 600;
  margin-left: 8px;
  transition: color .2s, letter-spacing .2s;
}
.hello-bar a:hover { color: var(--amber-light); letter-spacing: .12em; }

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ── Header / Nav ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 12px;
}

.site-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--amber-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-brand::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23c89a3c' d='M12 2c-.6 2-1 4.5-.5 6.5C12 10 13 11 13 13c0 1.5-1 2.5-1 2.5S11 14.5 11 13c0-2 1-3 .5-4.5C11 6.5 10.4 4 10 2c-1.5 1-4 3.5-4 7 0 3.5 2.7 6.3 6 6.3s6-2.8 6-6.3c0-3.5-2.5-6-4-7zm0 18c-1.1 0-2-.4-2-1h4c0 .6-.9 1-2 1zm0 2c-1.1 0-2-.4-2-1h4c0 .6-.9 1-2 1z'/%3E%3C/svg%3E") center/contain no-repeat;
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
nav a {
  font-family: 'Raleway', sans-serif;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
nav a:hover,
nav a.active {
  color: var(--amber);
  border-color: var(--border);
  background: rgba(182,140,60,.06);
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow), var(--glow);
}

/* ── Grid ── */
.grid { display: grid; gap: 40px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Book Cover ── */
.cover {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 8px 48px rgba(0,0,0,.8), 0 0 0 1px rgba(182,140,60,.1);
  display: block;
  transition: transform .35s ease, box-shadow .35s ease;
}
.cover:hover {
  transform: translateY(-4px) rotate(.5deg);
  box-shadow: 0 16px 64px rgba(0,0,0,.9), 0 0 32px rgba(200,154,60,.15);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: 'Raleway', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: all .22s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: #080d09;
  box-shadow: 0 2px 16px rgba(200,154,60,.3);
}
.btn-primary:hover {
  background: var(--amber-light);
  color: #080d09;
  box-shadow: 0 4px 28px rgba(200,154,60,.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--border-hi);
}
.btn-ghost:hover {
  background: rgba(182,140,60,.08);
  border-color: var(--amber);
  color: var(--amber-light);
  transform: translateY(-1px);
}
.btn + .btn { margin-left: 10px; }

/* ── KU Badge ── */
.ku-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Raleway', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--amber-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  vertical-align: middle;
  margin-left: 6px;
}
.ku-badge svg { width: 13px; height: 13px; fill: var(--amber-dim); }

/* ── Trust Strip ── */
.trust-strip {
  font-family: 'Raleway', sans-serif;
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-top: 18px;
  padding: 10px 16px;
  background: rgba(182,140,60,.05);
  border-left: 2px solid var(--amber-dim);
  border-radius: 0 4px 4px 0;
}

/* ── Lead ── */
p.lead {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 1.3em;
  line-height: 1.6;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Gallery (World page) ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.gallery figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
}
.gallery figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 0 20px rgba(200,154,60,.08);
  border-color: var(--border-hi);
}
.gallery figure img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  padding: 14px 16px;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--text-dim);
}
.gallery figcaption strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--amber-light);
  margin-bottom: 3px;
}

/* ── Interactive Map Container ── */
.map-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #08100a;
  cursor: grab;
  user-select: none;
  aspect-ratio: 16/9;
}
.map-wrap:active { cursor: grabbing; }
.map-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: none;
  transform-origin: 0 0;
}
.map-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8,13,9,.8);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'Raleway', sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--text-dim);
  pointer-events: none;
  transition: opacity .4s;
}
.map-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}
.map-zoom button {
  width: 32px;
  height: 32px;
  background: rgba(8,13,9,.85);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-dim);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, color .2s;
}
.map-zoom button:hover {
  background: rgba(182,140,60,.15);
  border-color: var(--border-hi);
  color: var(--amber);
}

/* ── Press List ── */
.press-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}
.press-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  font-size: .85rem;
  letter-spacing: .04em;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.press-list li a:hover {
  background: rgba(182,140,60,.07);
  border-color: var(--border-hi);
  color: var(--amber-light);
  transform: translateX(4px);
}
.press-list li a::before {
  content: '↓';
  font-size: 1rem;
  color: var(--amber-dim);
  flex-shrink: 0;
}

/* ── Newsletter Card ── */
.newsletter-card {
  background: linear-gradient(135deg, var(--green-dim) 0%, var(--card) 100%);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 28px;
}
.newsletter-card h2 { margin-bottom: 6px; font-size: 1.5rem; }
.newsletter-card p.lead { margin-bottom: 16px; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,7,5,.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 0 80px rgba(0,0,0,.9), 0 0 1px rgba(182,140,60,.2);
  object-fit: contain;
}
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2rem;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
  transition: color .2s;
}
.lightbox .close:hover { color: var(--amber); }

/* ── Footer ── */
footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Hero Section (index) ── */
.hero-section {
  position: relative;
}
.hero-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--amber-dim);
}

/* ── Scroll-fade animation ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp .7s ease forwards;
}
.fade-up:nth-child(1) { animation-delay: .1s; }
.fade-up:nth-child(2) { animation-delay: .25s; }
.fade-up:nth-child(3) { animation-delay: .4s; }
.fade-up:nth-child(4) { animation-delay: .55s; }
.fade-up:nth-child(5) { animation-delay: .7s; }

/* Lantern flicker on brand icon */
@keyframes flicker {
  0%,100% { opacity:1; } 45% { opacity:.85; } 50% { opacity:1; } 70% { opacity:.92; }
}
.site-brand::before { animation: flicker 4s ease-in-out infinite; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .card { padding: 24px 18px; }
  header { padding: 16px 0 14px; margin-bottom: 24px; }
  h1 { font-size: 1.8rem; }
  .map-wrap { aspect-ratio: 4/3; }
  .btn + .btn { margin-left: 0; margin-top: 8px; }
}
