/* ===== CSS VARIABLES ===== */
:root {
  --navy:        #1a1a2e;
  --navy-deep:   #0d0d1a;
  --navy-mid:    #16213e;
  --cream:       #f5f0e8;
  --cream-dark:  #ede7d8;
  --gold:        #c9a84c;
  --gold-light:  #e0c06b;
  --text:        #2d2d2d;
  --text-muted:  #6b6b6b;
  --white:       #ffffff;
  --border:      #e0d9cc;

  --nav-height:  70px;
  --max-w:       1100px;
  --radius:      4px;

  --transition:  0.25s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-family: 'Playfair Display', serif; line-height: 1.2; }
h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
p { max-width: 65ch; }

/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  margin-bottom: 12px;
  color: var(--navy);
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin: 16px auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  background: var(--gold);
  color: var(--navy-deep);
  border: 2px solid var(--gold);
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ===== SOCIAL ICONS ===== */
.social-icon-link,
.nav-social a,
.footer-social a {
  display: inline-flex;
  align-items: center;
  transition: color var(--transition), opacity var(--transition);
}
.nav-social a svg,
.footer-social a svg,
.mobile-social a svg { width: 20px; height: 20px; }

/* ===== NAVIGATION ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}
#site-header.scrolled {
  background: var(--navy);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
/* Header is always navy since it sits on the hero */
#site-header { background: var(--navy); }

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  gap: 24px;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  transition: color var(--transition);
}
.nav-brand:hover { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 32px;
  margin: 0 auto;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 0;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-social {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.nav-social a { color: rgba(255,255,255,0.6); }
.nav-social a:hover { color: var(--gold); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  background: var(--navy-deep);
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.mobile-menu.open {
  max-height: 400px;
  padding: 24px;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.mobile-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-social { display: flex; gap: 20px; }
.mobile-social a { color: rgba(255,255,255,0.6); }
.mobile-social a:hover { color: var(--gold); }

/* ===== BOOKS ===== */
#books {
  padding: 96px 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 168, 76, 0.05) 0%, transparent 45%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}

#books .section-title { color: var(--white); }

#books .book-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}
#books .book-card:hover { box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5); }

#books .book-info h3 { color: var(--white); }
#books .book-blurb { color: rgba(255, 255, 255, 0.65); }

#books .btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}
#books .btn-ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.books-grid {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 56px;
}

.book-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  transition: transform var(--transition), box-shadow var(--transition);
}
.book-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }

.book-cover {
  aspect-ratio: 2/3;
  overflow: hidden;
  flex-shrink: 0;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }

.book-info {
  padding: 40px 40px 40px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.book-genre {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  max-width: none;
}

.book-info h3 { color: var(--navy); margin: 0; }

.book-blurb { color: var(--text-muted); font-size: 1rem; line-height: 1.75; }

.book-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.btn-coming-soon {
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
  cursor: default;
  pointer-events: none;
  font-style: italic;
}

/* ===== ABOUT ===== */
#about {
  padding: 96px 0;
  background: var(--cream-dark);
}

.about-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 56px;
}

.about-photo {
  display: flex;
  justify-content: center;
}
.about-photo img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--white);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.about-text { display: flex; flex-direction: column; gap: 20px; }
.about-text p { color: var(--text); font-size: 1.05rem; line-height: 1.8; max-width: 60ch; }

/* Social links in About section */
.social-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color var(--transition);
}
.social-links a svg { width: 18px; height: 18px; }
.social-links a:hover { color: var(--gold); }

/* ===== CONTACT ===== */
#contact {
  padding: 96px 0;
  background: var(--cream);
}

#contact .container { max-width: 760px; }

#contact .section-subtitle { margin-bottom: 48px; }

#contact-form { display: flex; flex-direction: column; gap: 24px; }

.honeypot { display: none !important; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}
.form-group textarea { resize: vertical; min-height: 160px; }

.cf-turnstile { margin: 4px 0; }

.btn-submit {
  align-self: flex-start;
  padding: 14px 36px;
  font-size: 0.95rem;
  position: relative;
}
.btn-submit .btn-loading { display: none; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-loading { display: inline; }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

#form-feedback {
  padding: 0;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all var(--transition);
}
#form-feedback.success {
  padding: 16px 20px;
  background: #edf7ed;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
#form-feedback.error {
  padding: 16px 20px;
  background: #fdf3f3;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* ===== FOOTER ===== */
#site-footer {
  background: var(--navy-deep);
  padding: 48px 0;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}
.footer-social a {
  color: rgba(255,255,255,0.45);
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--gold); }

.footer-copy {
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
  max-width: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .book-card {
    grid-template-columns: 180px 1fr;
    gap: 32px;
  }
  .book-info { padding: 28px 28px 28px 0; }

  .about-inner {
    grid-template-columns: 220px 1fr;
    gap: 40px;
  }
  .about-photo img { width: 200px; height: 200px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-social { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  .mobile-menu { display: block; }

  .book-card {
    grid-template-columns: 1fr;
  }
  .book-cover { aspect-ratio: 3/2; max-height: 280px; }
  .book-cover img { width: 100%; height: 100%; object-fit: cover; }
  .book-info { padding: 28px; }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-photo { justify-content: center; }

  .form-row { grid-template-columns: 1fr; }

  .btn-submit { align-self: stretch; text-align: center; justify-content: center; }
}

@media (max-width: 480px) {
  #books, #about, #contact { padding: 72px 0; }

  .book-actions { flex-direction: column; }
  .book-actions .btn { text-align: center; justify-content: center; }

  .social-links { gap: 16px; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
