/* D.A. Fillingham Author Website — Static Version
   Design: Atmospheric Dark Literary
   Typography: Cormorant Garamond (display) + Source Serif 4 (body)
*/

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  color: #e8dcc8;
  background: #111010;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.01em;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
input { font-family: inherit; }

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

/* Font utilities */
.font-display { font-family: 'Cormorant Garamond', Georgia, serif; }
.font-body { font-family: 'Source Serif 4', Georgia, serif; }

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: all 0.5s ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(17, 16, 16, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(50, 45, 40, 0.4);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand { display: flex; flex-direction: column; }
.brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
}
.brand-page {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}
.nav-icons { display: flex; align-items: center; gap: 1.5rem; }
.nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}
.nav-icon:hover { transform: scale(1.15); }
.nav-icon svg { width: 24px; height: 24px; }

/* Order bar */
.order-bar {
  width: 100%;
  padding: 0.5rem 1rem;
  text-align: center;
  cursor: pointer;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-icons { gap: 0.75rem; }
  .nav-icon { width: 1.5rem; height: 1.5rem; font-size: 1.125rem; }
  .nav-icon svg { width: 18px; height: 18px; }
  .brand-name { font-size: 1.125rem; }
}

/* ── SECTIONS ── */
section { position: relative; }
.section-py { padding: 5rem 0; }
.section-py-lg { padding: 6rem 0; }
@media (min-width: 768px) {
  .section-py { padding: 7rem 0; }
  .section-py-lg { padding: 8rem 0; }
}

/* Hero overlays */
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%);
}
.hero-content { position: relative; z-index: 10; }

/* Background image sections */
.bg-cover-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── THEME BOXES ── */
.theme-box {
  padding: 2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
}
.theme-box:hover { transform: translateY(-4px); }
.theme-box-icon { margin-bottom: 1rem; }
.theme-box-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
}
.theme-box-desc {
  font-size: 0.95rem;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ── BOOK COVER ── */
.book-cover {
  max-width: 320px;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.book-cover:hover { transform: scale(1.02); }

/* ── SIGNED BADGE ── */
.signed-badge {
  width: 12rem; height: 12rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.3);
}

/* ── FORMS ── */
.form-input {
  width: 100%;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s ease;
}
.form-input:focus { border-color: #fff !important; }
.form-input::placeholder { color: rgba(255,255,255,0.4); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  width: 100%;
  transition: all 0.3s ease;
  border-radius: 4px;
}

/* ── MODALS ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  animation: fadeIn 0.3s ease;
}
.modal-backdrop.active { display: block; }
.modal-dialog {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  width: 100%;
  max-width: 28rem;
  display: none;
  animation: slideUp 0.3s ease;
}
.modal-dialog.active { display: block; }
.modal-content {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  padding: 2rem;
  position: relative;
  text-align: center;
}
.modal-content.dark {
  background: #1a1a2e;
  color: #f5e6d3;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  font-size: 1.5rem;
  color: #666;
  line-height: 1;
}
.modal-close:hover { color: #333; }
.modal-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111;
}
.modal-text { color: #666; margin-bottom: 1.5rem; font-size: 0.95rem; }
.modal-btn {
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  border-radius: 4px;
  color: #fff;
  transition: opacity 0.3s ease;
}
.modal-btn:hover { opacity: 0.9; }

/* ── NEWSLETTER ── */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .newsletter-form { flex-direction: row; }
}
.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: #fff;
  color: #111;
  font-size: 0.95rem;
  border: none;
  outline: none;
}
.newsletter-input::placeholder { color: #888; }
.newsletter-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #fbbf24;
  color: #1a1a1a;
  transition: background 0.3s ease;
}
.newsletter-btn:hover { background: #fcd34d; }

/* ── FOOTER ── */
footer {
  padding: 2.5rem 0;
  background: #1a1a1a;
  border-top: 1px solid;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; }
}

/* ── ABOUT PAGE ── */
.about-page { background: #fff; color: #0f0f0f; }
.about-page .hero-overlay {
  background: linear-gradient(135deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.35) 100%);
}

/* ── KEYFRAMES ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ── UTILITY ── */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.leading-relaxed { line-height: 1.75; }
.tracking-wide { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.hidden { display: none; }
@media (min-width: 768px) { .md-show { display: block; } .md-flex { display: flex; } }
