/* BookWalker — shared.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=Lato:wght@300;400;700&display=swap');

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

:root {
  --ink:        #0F0E0C;
  --ink-soft:   #2A2825;
  --ink-muted:  #6B6760;
  --parchment:  #FAF8F3;
  --warm:       #F3F0E8;
  --border:     #E5E0D5;
  --border-soft:#EEE9DF;
  --gold:       #B8892A;
  --gold-light: #D4A84B;
  --gold-pale:  #F5EDD4;
  --gold-dim:   rgba(184,137,42,0.15);
  --sidebar-w:  260px;
  --radius:     4px;
  --shadow-sm:  0 2px 12px rgba(15,14,12,0.07);
  --shadow-md:  0 8px 40px rgba(15,14,12,0.10);
  --shadow-lg:  0 20px 60px rgba(15,14,12,0.15);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Lato', system-ui, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); background: var(--parchment); color: var(--ink); line-height: 1.6; overflow-x: hidden; }

/* ── Lang switcher ─────────────────────────────────────────── */
.lang-switcher { display: flex; align-items: center; gap: 2px; }

.lang-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border: 1px solid transparent;
  border-radius: 20px; background: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; color: var(--ink-muted);
  transition: all 0.2s;
}
.lang-btn:hover { color: var(--ink); background: var(--warm); }
.lang-btn.active { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-pale); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border: none; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: all 0.22s; white-space: nowrap;
}
.btn-dark  { background: var(--ink); color: #fff; }
.btn-dark:hover  { background: var(--gold); transform: translateY(-1px); }
.btn-gold  { background: var(--gold); color: #fff; }
.btn-gold:hover  { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--ink); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ── Forms ─────────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 14px;
  background: var(--parchment); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 15px; font-weight: 300; color: var(--ink);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,42,0.12);
}
.field input::placeholder, .field textarea::placeholder { color: #C5BFB4; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; }
.alert-error   { background: #FEF2F2; border: 1px solid #FCA5A5; color: #B91C1C; }
.alert-success { background: #F0FDF4; border: 1px solid #86EFAC; color: #15803D; }

/* ── Cover placeholder ─────────────────────────────────────── */
.cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  background: linear-gradient(145deg, var(--ink-soft), var(--ink));
}

/* ── Modal overlay ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,14,12,0.72); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--parchment); border-radius: var(--radius);
  width: 100%; max-width: 480px;
  padding: 40px; position: relative;
  animation: modalIn 0.28s ease;
  max-height: 90vh; overflow-y: auto;
}
@keyframes modalIn { from { opacity:0; transform: translateY(18px) scale(0.97); } to { opacity:1; transform: translateY(0) scale(1); } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--warm); border: none; cursor: pointer;
  font-size: 16px; color: var(--ink-muted); display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--border); color: var(--ink); }

/* ── Eyebrow ───────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.eyebrow::before { content:''; width: 24px; height: 1px; background: var(--gold); }

/* ── Section titles ────────────────────────────────────────── */
.section-title { font-family: var(--font-serif); font-weight: 400; color: var(--ink); line-height: 1.15; }
.section-title em { font-style: italic; color: var(--gold); }

/* ── Book card ─────────────────────────────────────────────── */
.book-card {
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform 0.25s;
}
.book-card:hover { transform: translateY(-5px); }
.book-cover-wrap {
  aspect-ratio: 2/3; border-radius: 3px; overflow: hidden;
  position: relative; margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}
.book-cover-wrap img { width:100%; height:100%; object-fit: cover; display: block; }
.book-lock-badge {
  position: absolute; inset: 0;
  background: rgba(15,14,12,0.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.book-genre-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.book-title-tag { font-family: var(--font-serif); font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.25; margin-bottom: 4px; }
.book-author-tag { font-size: 12px; font-weight: 300; color: var(--ink-muted); margin-bottom: 10px; }
.book-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.book-actions .btn { padding: 7px 14px; font-size: 11px; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }

/* ── Responsive helpers ────────────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .modal-box { padding: 28px 20px; }
}
@media (min-width: 769px) {
  .show-mobile { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   BookWalker — Premium Design Upgrade
   ═══════════════════════════════════════════════════════════════ */

/* ── Enhanced typography ── */
h1, h2, h3 {
  font-optical-sizing: auto;
}

/* ── Smooth hover on book covers ── */
.book-cover-wrap {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
  will-change: transform;
}
.book-card:hover .book-cover-wrap {
  transform: translateY(-8px) rotate(0.8deg);
  box-shadow: 0 24px 56px rgba(15,14,12,0.22) !important;
}

/* ── Gold section divider ── */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  opacity: 0.25;
  margin: 0;
}

/* ── Enhanced buttons ── */
.btn-dark:hover {
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(184,137,42,0.28);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(184,137,42,0.35);
}

/* ── Enhanced modal ── */
.modal-box {
  border-top: 3px solid var(--gold);
}

/* ── Eyebrow line glow ── */
.eyebrow::before {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

/* ── Scrollbar gold on hover ── */
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ── Enhanced form focus ── */
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,137,42,0.15);
}

/* ── Page transition ── */
body {
  animation: pageIn 0.35s ease;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
