@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=Cormorant+SC:wght@400;500;600;700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --navy: #0D1E31;
  --navy-light: #1a2d42;
  --crimson: #8F2D30;
  --crimson-dark: #6d2224;
  --cream: #F7F5F0;
  --cream-dark: #E8E2D6;
  --gold: #C5A55A;
  --gold-light: #D4BA78;
  --gold-dark: #A68B42;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4540;
  --text-muted: #7a756d;
  --border-light: #d5cfc5;
  --border-dark: #b0a89a;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-sc: 'Cormorant SC', 'Georgia', serif;
  --font-body: 'Libre Baskerville', 'Georgia', serif;
  --section-padding: 5rem 2rem;
  --container-max: 1100px;
  --container-wide: 1300px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--cream);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: var(--crimson); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--crimson-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 2rem; }
.container--wide { max-width: var(--container-wide); }

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

.ornament {
  text-align: center;
  margin: 2.5rem 0;
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 0.5em;
  user-select: none;
}
.ornament::before { content: '\2726  \2726  \2726'; }

.ornament--line {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0;
}
.ornament--line::before,
.ornament--line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
}
.ornament--line span { color: var(--gold); font-size: 1rem; }

/* HEADER */
.site-header {
  background-color: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(13, 30, 49, 0.3);
}
.header-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.site-logo img { height: 48px; width: auto; }
.site-logo-text {
  font-family: var(--font-sc);
  font-size: 1.2rem;
  color: var(--cream);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.main-nav { display: flex; align-items: center; }
.main-nav a {
  font-family: var(--font-sc);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--cream-dark);
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  position: relative;
  transition: color 0.3s ease;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background-color: var(--gold);
  transition: width 0.3s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--gold-light); }
.main-nav a:hover::after, .main-nav a.active::after { width: 60%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background-color: var(--cream);
  margin: 6px 0;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.header-accent {
  height: 3px;
  background: linear-gradient(to right, var(--crimson), var(--crimson-dark), var(--crimson));
}

/* HERO */
.hero {
  background-color: var(--navy);
  color: var(--cream);
  text-align: center;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center top, rgba(197, 165, 90, 0.07) 0%, transparent 60%);
  pointer-events: none;
}
.hero-logo {
  max-width: 340px;
  margin: 0 auto 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--gold-light);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.2s forwards;
}
.hero-subtitle {
  font-family: var(--font-sc);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--cream-dark);
  opacity: 0;
  animation: fadeInUp 1s ease 0.4s forwards;
}

/* FEATURED BOOK */
.featured-section { padding: var(--section-padding); }
.section-label {
  font-family: var(--font-sc);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  color: var(--crimson);
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-title { text-align: center; margin-bottom: 1rem; }

.featured-book {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}
.book-cover-wrapper { position: relative; }
.book-cover {
  width: 100%;
  max-width: 400px;
  border-radius: 2px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 15px 40px rgba(0,0,0,0.15), -5px 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.book-cover:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 8px 12px rgba(0,0,0,0.12), 0 25px 50px rgba(0,0,0,0.2), -8px 8px 30px rgba(0,0,0,0.12);
}

.book-details h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.25rem; }
.book-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.book-author {
  font-family: var(--font-sc);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--crimson);
  margin-bottom: 1.5rem;
}
.book-description { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; }
.book-features {
  list-style: none;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: rgba(197, 165, 90, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
}
.book-features li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.3rem 0 0.3rem 1.2rem;
  position: relative;
}
.book-features li::before {
  content: '\2726';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.6rem;
  top: 0.55rem;
}
.book-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sc);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding: 0.85rem 2rem;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}
.btn--primary {
  background-color: var(--crimson);
  color: var(--cream);
  border-color: var(--crimson);
}
.btn--primary:hover {
  background-color: var(--crimson-dark);
  border-color: var(--crimson-dark);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(143, 45, 48, 0.3);
}
.btn--outline {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--outline:hover {
  background-color: var(--navy);
  color: var(--cream);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 30, 49, 0.3);
}

/* PAGE HEADER */
.page-header {
  background-color: var(--navy);
  color: var(--cream);
  text-align: center;
  padding: 3.5rem 2rem 3rem;
}
.page-header h1 { color: var(--cream); margin-bottom: 0.5rem; }
.page-header p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-light);
  font-size: 1.1rem;
}

/* ABOUT */
.about-content { padding: var(--section-padding); }
.about-content .container { max-width: 780px; }
.about-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.6rem; }
.about-content h2:first-child { margin-top: 0; }
.about-content p { color: var(--text-secondary); font-size: 0.95rem; }
.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.about-value { padding: 1.5rem; border-top: 2px solid var(--gold); }
.about-value h4 {
  font-family: var(--font-sc);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.about-value p { font-size: 0.9rem; margin-bottom: 0; }

/* CONTACT */
.contact-content { padding: var(--section-padding); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 900px;
  margin: 0 auto;
}
.contact-info h3 { margin-bottom: 1rem; }
.contact-info p { color: var(--text-secondary); font-size: 0.95rem; }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sc);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--crimson);
  margin-top: 1rem;
}
.contact-email:hover { color: var(--crimson-dark); }
.contact-form h3 { margin-bottom: 1rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  background-color: #fff;
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* SEARCH */
.search-content { padding: var(--section-padding); min-height: 50vh; }
.search-bar-wrapper {
  max-width: 600px;
  margin: 0 auto 3rem;
  position: relative;
}
.search-bar {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 1rem 1.5rem 1rem 3rem;
  border: 2px solid var(--border-light);
  border-radius: 2px;
  background-color: #fff;
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}
.search-bar:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13, 30, 49, 0.08);
}
.search-bar::placeholder { color: var(--text-muted); font-style: italic; }
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-results { max-width: 800px; margin: 0 auto; }
.search-result-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}
.search-result-item img {
  width: 80px;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.search-result-item h3 { margin-bottom: 0.25rem; font-size: 1.2rem; }
.search-result-item h3 a { color: var(--navy); }
.search-result-item h3 a:hover { color: var(--crimson); }
.search-result-author {
  font-family: var(--font-sc);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--crimson);
  margin-bottom: 0.5rem;
}
.search-result-desc { font-size: 0.9rem; color: var(--text-secondary); }
.search-no-results {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* BOOK DETAIL */
.book-detail { padding: var(--section-padding); }
.book-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
.book-detail-covers { display: flex; flex-direction: column; gap: 1rem; }
.book-detail-covers > img {
  width: 100%;
  max-width: 420px;
  border-radius: 2px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.cover-thumbnails { display: flex; gap: 0.5rem; }
.cover-thumb {
  width: 64px;
  height: auto;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.cover-thumb:hover { opacity: 0.8; }
.cover-thumb.active { opacity: 1; border-color: var(--crimson); }
.book-detail-info h1 { margin-bottom: 0.25rem; }
.book-detail-long p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* FOOTER */
.site-footer { background-color: var(--navy); color: var(--cream-dark); margin-top: auto; }
.footer-accent {
  height: 3px;
  background: linear-gradient(to right, var(--crimson), var(--crimson-dark), var(--crimson));
}
.footer-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--cream-dark);
  opacity: 0.7;
  line-height: 1.6;
  margin-top: 1rem;
}
.footer-brand img { height: 40px; }
.footer-nav h4, .footer-contact h4 {
  font-family: var(--font-sc);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a {
  font-size: 0.85rem;
  color: var(--cream-dark);
  opacity: 0.7;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.footer-nav a:hover { opacity: 1; color: var(--gold-light); }
.footer-contact p { font-size: 0.85rem; opacity: 0.7; }
.footer-contact a { color: var(--cream-dark); }
.footer-contact a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(247, 245, 240, 0.1);
  padding: 1.5rem 2rem;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.75rem;
  color: var(--cream-dark);
  opacity: 0.5;
  font-family: var(--font-sc);
  letter-spacing: 0.1em;
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .featured-book { grid-template-columns: 1fr; gap: 2.5rem; }
  .book-cover-wrapper { text-align: center; }
  .book-cover { max-width: 320px; margin: 0 auto; }
  .book-detail-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 280px; height: 100vh;
    background-color: var(--navy);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
  }
  .main-nav.open { right: 0; }
  .main-nav a { font-size: 1rem; padding: 0.75rem 0; }
  .hero { padding: 3.5rem 1.5rem 3rem; }
  .hero-logo { max-width: 260px; }
  :root { --section-padding: 3.5rem 1.5rem; }
  .book-actions { flex-direction: column; }
  .btn { text-align: center; justify-content: center; }
}

@media (max-width: 480px) {
  .header-inner { height: 64px; }
  .site-logo img { height: 36px; }
  .site-logo-text { font-size: 0.95rem; }
  .book-detail-covers > img { max-width: 100%; }
}

