/* style.css — palette drawn from the book cover:
   lavender background, gold foil accent, deep plum text, cream highlight */
:root {
  --lavender:      #d9cce9;  /* cover background */
  --lavender-soft: #e7ddf2;  /* lighter wash */
  --cream:         #f7f2e9;  /* page edge */
  --gold:          #b8935a;  /* foil title */
  --gold-deep:     #9a7842;  /* foil shadow / hover */
  --plum:          #4a3b5c;  /* subtitle text */
  --plum-soft:     #6a5a7c;  /* body text */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.7;
  color: var(--plum);
  background: linear-gradient(165deg, var(--lavender-soft) 0%, var(--lavender) 55%, #cdbfe0 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.hero-inner {
  max-width: 960px;
  text-align: center;
}

.hero-logo {
  width: min(35vw, 300px);
  height: min(35vw, 300px);
  margin: 0 auto 2rem;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 14px 34px rgba(74, 59, 92, 0.16));
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.05;
  color: var(--gold);
  letter-spacing: 0.01em;
}

.tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  color: var(--plum);
  margin-top: 0.75rem;
}

.author {
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 1.25rem;
}

.lede {
  font-size: 1.05rem;
  text-align: justify;
  color: var(--plum-soft);
  max-width: 44rem;
  margin: 2.25rem auto 2.75rem;
}

/* Buy button — gold foil feel */
.buy-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--cream);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 1rem 2.75rem;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(154, 120, 66, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 2rem;
}

.buy-button:hover,
.buy-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(154, 120, 66, 0.4);
  outline: none;
}

/* Cover row — video + book side by side */
.cover-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 0 1.5rem;
}

.cover-row .cover {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.5rem 1.5rem;
}

.cover-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(74, 59, 92, 0.22);
}

/* Click-to-play video thumbnail */
.video-thumb {
  flex: 1;
  min-width: 0;
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 18px 40px rgba(74, 59, 92, 0.22);
}
.video-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.20);
  transition: background 0.2s;
  pointer-events: none;
}
.video-thumb:hover .play-overlay {
  background: rgba(0,0,0,0.35);
}
.video-thumb .play-overlay svg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
  transition: transform 0.2s;
}
.video-thumb:hover .play-overlay svg {
  transform: scale(1.1);
}
.video-thumb.playing {
  cursor: default;
}
.video-thumb.playing .play-overlay {
  display: none;
}

@media (max-width: 720px) {
  .cover-row {
    flex-direction: column;
  }
}

/* About the author */
.about {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.author-photo {
  width: min(35vw, 300px);
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 14px 30px rgba(74, 59, 92, 0.22));
}

.about-text h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--gold);
  margin-bottom: 1rem;
}

.name-flourish {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--gold-deep);
}

.about-text .bio {
  font-size: 1rem;
  text-align: justify;
  color: var(--plum-soft);
}

@media (max-width: 720px) {
  .about {
    flex-direction: column;
    text-align: center;
  }
  .about-text .bio {
    text-align: justify;
  }
  .cover-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--plum-soft);
}

/* Newsletter trigger button */
.newsletter-trigger {
  display: inline-block;
  background: transparent;
  color: var(--gold-deep);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1.5px solid var(--gold);
  padding: 0.85rem 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 0.75rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.newsletter-trigger:hover,
.newsletter-trigger:focus-visible {
  background: var(--gold);
  color: var(--cream);
  transform: translateY(-2px);
  outline: none;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(74, 59, 92, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  position: relative;
  background: var(--cream);
  max-width: 460px;
  width: 100%;
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  box-shadow: 0 24px 56px rgba(74, 59, 92, 0.28);
  animation: modal-in 0.3s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--plum-soft);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--plum);
  outline: none;
}

.modal h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--plum);
  margin-bottom: 1rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--plum-soft);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.modal-form input {
  width: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--plum);
  background: #fff;
  border: 1.5px solid var(--lavender);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  transition: border-color 0.2s ease;
}

.modal-form input::placeholder {
  color: #b5a5c8;
}

.modal-form input:focus {
  outline: none;
  border-color: var(--gold);
}

.modal-submit {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--cream);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  padding: 0.9rem 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(154, 120, 66, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 0.25rem;
}

.modal-submit:hover,
.modal-submit:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(154, 120, 66, 0.4);
  outline: none;
}

.modal-note {
  font-size: 0.8rem;
  color: #b5a5c8;
}

.modal-error {
  font-size: 0.9rem;
  color: #c44;
  margin-bottom: 0.5rem;
}

.modal-success {
  font-size: 0.95rem;
  color: var(--plum-soft);
  line-height: 1.6;
  padding: 0.5rem 0;
}

#countdown-text {
  font-size: 0.8rem;
  color: #b5a5c8;
}

@media (max-width: 500px) {
  .hero-logo { width: min(50vw); height: min(50vw);}
  .lede { font-size: 1rem; }
  .author-photo { width: min(50vw); }
}
