/* =========================================================
   LaviniaBooks — stylesheet
   Palette sampled from the "Story of an Extraordinary Number"
   cover artwork.
   ========================================================= */

:root {
  --cream: #fbf1e4;
  --cream-soft: #fffdf9;
  --navy: #363554;
  --text: #4a4560;
  --teal: #6ec1b8;
  --teal-dark: #4fa89e;
  --pink: #e6a9c6;
  --pink-dark: #d987ac;
  --yellow: #f5c242;
  --border: #ecdfc9;
  --shadow: 0 10px 30px rgba(54, 53, 84, 0.08);
  --shadow-hover: 0 16px 36px rgba(54, 53, 84, 0.14);
  --radius: 20px;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

a { color: var(--teal-dark); }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 241, 228, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  text-decoration: none;
}

.brand span { color: var(--pink-dark); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover { border-bottom-color: var(--pink); }

.lang-toggle {
  display: inline-flex;
  border: 2px solid var(--teal);
  border-radius: 999px;
  overflow: hidden;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--teal-dark);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 14px;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  font-family: 'Baloo 2', sans-serif;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.btn.secondary {
  background: var(--cream-soft);
  color: var(--teal-dark) !important;
  border: 2px solid var(--teal);
}

.btn.secondary:hover { background: var(--teal); color: #fff !important; }

/* ---------- Sections ---------- */

section { padding: 56px 0; }

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 36px;
}

/* ---------- Book grid ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.book-card {
  background: var(--cream-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.book-cover {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.book-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.book-body h3 { font-size: 1.25rem; margin-bottom: 0; }

.book-blurb { font-size: 0.98rem; flex: 1; }

.badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 999px;
}

.badge.age { background: var(--pink); color: #fff; }
.badge.soon { background: var(--navy); color: var(--cream); }

.book-price {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 1.05rem;
}

.book-card.coming-soon {
  border: 2px dashed var(--pink);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.book-card.coming-soon .book-body { align-items: center; }

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.book-actions .btn { flex: 1; min-width: 140px; }

.coming-soon-icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
}

/* ---------- About ---------- */

.about {
  background: var(--cream-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.about .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Baloo 2', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto 16px;
}

/* ---------- Order form ---------- */

.order-panel {
  background: var(--cream-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  max-width: 640px;
  margin: 0 auto;
}

.order-intro { text-align: center; margin-bottom: 28px; }

.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }

.field label { font-weight: 800; color: var(--navy); font-size: 0.92rem; }

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 11px 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.field-row { display: flex; gap: 18px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }

.order-panel .btn { width: 100%; margin-top: 6px; }

.order-fallback {
  text-align: center;
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--text);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 30px 0 50px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text);
}

/* ---------- Status pages (order.php responses) ---------- */

.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding-block: 40px;
}

.status-card {
  background: var(--cream-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  margin: 0 20px;
}

.status-error .status-card { border: 2px solid var(--pink-dark); }

.status-card .btn { margin-top: 20px; }

@media (max-width: 480px) {
  .about, .order-panel, .status-card { padding: 26px; }
}

