/* Library Card — librarycardapp.com
   Navy + gold, matched to the iOS app (#141827 / #E8B86C). */
:root {
  --navy: #141827;
  --navy-2: #1a2033;
  --navy-3: #232a42;
  --gold: #e8b86c;
  --gold-2: #f0c98a;
  --gold-dim: #c49c60;
  --cream: #f4efe4;
  --cream-dim: #c9c3b6;
  --muted: #8b8698;
  --line: rgba(232, 184, 108, 0.22);
  --danger: #e8b86c;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --serif: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1120px;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--navy);
  color: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, audio:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(20, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--cream); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-name { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.02em; font-weight: 600; }
.brand-name span { color: var(--gold); font-weight: 500; }
nav.main { display: flex; align-items: center; gap: 22px; }
nav.main a { color: var(--cream-dim); font-size: 0.95rem; font-weight: 500; text-decoration: none; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--gold); }
nav.main a.btn-gold, nav.main a.btn-gold:hover { color: #1a140a; font-weight: 600; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--cream); border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer;
}

/* Hero */
.hero { padding: 56px 0 36px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.kicker { color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; font-weight: 650; margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--cream); }
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 14px; }
h3 { font-size: 1.2rem; margin: 0 0 8px; }
.lede { font-size: 1.15rem; color: var(--cream-dim); max-width: 40rem; margin: 0 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.note { color: var(--muted); font-size: 0.95rem; margin: 0; }
.hero-phones { display: flex; justify-content: center; gap: 16px; }
.phone {
  width: min(220px, 42vw);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #0b0e16;
}
.phone img { width: 100%; height: auto; }
.phone.tilt { transform: rotate(3deg) translateY(18px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 650; font-size: 0.98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn-gold { background: var(--gold); color: #1a140a; }
.btn-gold:hover { background: var(--gold-2); color: #1a140a; }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(232, 184, 108, 0.1); color: var(--gold-2); }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.apple-icon { width: 16px; height: 16px; display: inline-block; }

/* Sections */
section { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { color: var(--gold-2); }
.card p { margin: 0; color: var(--cream-dim); }

/* Book grids */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px 14px;
}
.book-tile { color: inherit; text-decoration: none; display: block; }
.book-tile:hover { text-decoration: none; color: inherit; }
.book-tile .cover {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--navy-3);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
}
.book-tile .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-tile:hover .cover { border-color: var(--gold); }
.book-tile h3 { font-size: 0.98rem; margin: 10px 0 2px; font-family: var(--serif); }
.book-tile .by { color: var(--muted); font-size: 0.85rem; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--cream-dim); border-radius: 999px;
  padding: 2px 8px; font-weight: 650;
}
.badge-free { color: var(--gold); border-color: rgba(232,184,108,.45); }
.badge-plus { color: #d9d6ee; border-color: rgba(180,176,210,.35); }

/* Filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.toolbar input[type="search"], .toolbar select {
  background: var(--navy-2); color: var(--cream); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font: inherit; min-width: 180px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: transparent; color: var(--cream-dim); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.88rem; cursor: pointer;
}
.chip[aria-pressed="true"], .chip:hover { border-color: var(--gold); color: var(--gold); }
.count { color: var(--muted); font-size: 0.9rem; margin-left: auto; }

/* Book page */
.book-hero { display: grid; grid-template-columns: 260px 1fr; gap: 36px; padding: 40px 0 24px; align-items: start; }
.cover-lg {
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--navy-3);
}
.cover-lg img { width: 100%; height: auto; }
.meta { color: var(--cream-dim); margin: 0 0 14px; }
.genres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.genres a {
  color: var(--gold); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; font-size: 0.8rem; text-decoration: none;
}
.advisory {
  background: rgba(232, 184, 108, 0.08);
  border-left: 3px solid var(--gold);
  padding: 12px 14px; margin: 0 0 18px; color: var(--cream-dim); font-size: 0.95rem;
}
.sample { margin: 20px 0; }
.sample label { display: block; color: var(--gold); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; font-weight: 650; }
audio { width: 100%; max-width: 480px; height: 40px; }
.prose { max-width: 42rem; padding: 8px 0 40px; }
.prose p { font-size: 1.08rem; color: var(--cream); margin: 0 0 1em; }
.related { padding-bottom: 56px; }

/* Teachers / static */
.prose-page { padding: 40px 0 64px; max-width: 44rem; }
.prose-page p, .prose-page li { color: var(--cream); font-size: 1.05rem; }
.prose-page h2 { margin-top: 1.8em; }
.prose-page ul, .prose-page ol { padding-left: 1.2em; }
.price-box {
  background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin: 24px 0;
}
.price-box .amount { font-family: var(--serif); font-size: 2.2rem; color: var(--gold); margin: 0; }
.price-box .amount span { font-size: 1rem; color: var(--cream-dim); }

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line); padding: 14px 0;
}
.faq summary { cursor: pointer; font-weight: 650; color: var(--cream); }
.faq details p { color: var(--cream-dim); margin: 10px 0 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 20px; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: var(--cream-dim); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

@media (max-width: 800px) {
  .hero-grid, .book-hero, .features { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero-phones { order: -1; margin-bottom: 8px; }
  .phone { width: 150px; }
  .phone.tilt { transform: rotate(2deg) translateY(8px); }
  nav.main {
    display: none; position: absolute; right: 20px; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-2); border: 1px solid var(--line); border-radius: 12px;
    min-width: 200px; padding: 8px; box-shadow: var(--shadow);
  }
  nav.main.open { display: flex; }
  nav.main a { padding: 10px 12px; }
  .menu-toggle { display: inline-block; }
  .book-hero { padding-top: 24px; }
  .cover-lg { max-width: 240px; }
  .section-head { flex-direction: column; }
}
