/* =========================================================================
   Paradise Publishing — static site styles
   Design tokens live here; nothing else hardcodes color/type values.
   ========================================================================= */

:root {
  --navy: #1b1464;          /* primary text, buttons, footer */
  --navy-ink: #f5f5f5;      /* text on navy */
  --band: #ece6dd;          /* warm hero-band wash */
  --page: #ffffff;
  --rule: rgba(27, 20, 100, 0.14);

  /* stacked wordmark gradient, light -> navy */
  --word-1: #cbc6d6;
  --word-2: #b49fc4;
  --word-3: #7b6faf;
  --word-4: var(--navy);

  --serif: "Prata", Georgia, "Times New Roman", serif;

  --measure: 34rem;         /* readable text column */
  --pad: clamp(1.25rem, 5vw, 4rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.7;
  font-size: 17px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* ---- Header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  background: var(--navy);
  color: var(--navy-ink);
  box-shadow: 0 2px 12px -6px rgba(0, 0, 0, 0.55);
}
.site-header a { color: var(--navy-ink); }

/* Hamburger — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 26px;
  height: 2px;
  margin: 0 auto;
  background: var(--navy-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-header.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1.1;
  font-size: clamp(1.3rem, 3.2vw, 1.7rem);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  height: clamp(1.7rem, 4.6vw, 2.1rem);
  width: auto;
  flex: none;
}
.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}
.nav a { text-decoration: none; opacity: 0.88; }
.nav a:hover,
.nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* ---- Hero band with stacked wordmark ----------------------------------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(320px, 46vw, 560px);
  padding: 3rem var(--pad);
  background: var(--band) center / cover no-repeat;
  overflow: hidden;
}
/* warm wash so the photo reads as a faint backdrop */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(236, 230, 221, 0.68);
}
.wordmark {
  position: relative;
  margin: 0;
  text-align: center;
  line-height: 0.82;
  font-weight: 400;
  letter-spacing: 0.005em;
  font-size: clamp(3.2rem, 13vw, 8.5rem);
  text-transform: uppercase;
}
.wordmark span { display: block; }
.wordmark span:nth-child(1) { color: var(--word-1); }
.wordmark span:nth-child(2) { color: var(--word-2); }
.wordmark span:nth-child(3) { color: var(--word-3); }
.wordmark span:nth-child(4) { color: var(--word-4); }

/* ---- Main layout ------------------------------------------------------- */
main { display: block; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad); }

.page-title {
  max-width: 22ch;
  margin: 0 auto;
  text-align: center;
  font-weight: 400;
  line-height: 1.15;
  font-size: clamp(1.9rem, 5.2vw, 3.1rem);
}

.section-heading {
  font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  margin: 0 0 1.2rem;
}

/* Two-column overview (book + text) */
.overview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  max-width: 68rem;
  margin: 0 auto;
}
.overview p { margin: 0 0 1.2rem; }

/* single readable column (about / sample text) */
.prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.prose p { margin: 0 0 1.4rem; }
.prose .portrait {
  margin: 2rem auto;
  width: min(320px, 70%);
  border-radius: 4px;
}
.text-center { text-align: center; }

/* ---- Book cover carousel ---------------------------------------------- */
.cover {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}
.cover img {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 18px 40px -20px rgba(27, 20, 100, 0.55);
  cursor: zoom-in;
}
.cover img[hidden] { display: none; }
.cover-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy);
  font: 400 1.2rem/1 var(--serif);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.cover-btn:hover { background: #fff; }
.cover-prev { left: -8px; }
.cover-next { right: -8px; }
.cover-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.9rem;
}
.cover-dots button {
  width: 22px; height: 6px;
  padding: 0;
  border: 0; border-radius: 3px;
  background: var(--rule);
  cursor: pointer;
}
.cover-dots button[aria-current="true"] { background: var(--navy); }

/* ---- Cover lightbox ---------------------------------------------------- */
body.no-scroll { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vmin;
  background: rgba(15, 12, 40, 0.85);
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: min(92vw, 860px);
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  transition: background 0.15s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-close {
  top: 3vmin;
  right: 3vmin;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.7rem;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.9rem;
  line-height: 1;
}
.lightbox-prev { left: 3vmin; }
.lightbox-next { right: 3vmin; }

/* ---- Retail buttons ---------------------------------------------------- */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin: 2rem 0 0;
}
.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--navy-ink);
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  border-radius: 10px;
  font-size: 1.05rem;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.86; }

/* ---- Decorative flower ------------------------------------------------- */
.flower {
  width: clamp(160px, 26vw, 240px);
  margin: clamp(2.5rem, 6vw, 4rem) auto clamp(1.5rem, 4vw, 2.5rem);
}

/* ---- Sample PDF viewer ------------------------------------------------- */
.pdf-frame {
  width: 100%;
  max-width: 60rem;
  height: min(80vh, 900px);
  margin: 2.5rem auto 1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #faf9f7;
}
.pdf-fallback {
  max-width: 60rem;
  margin: 2.5rem auto;
  padding: 2.5rem;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  text-align: center;
}
.pdf-link { text-align: center; margin: 0.5rem 0 0; }
.pdf-link a { text-underline-offset: 3px; }

/* ---- Contact ----------------------------------------------------------- */
.contact-section { padding-top: clamp(2rem, 5vw, 3.5rem); }

.contact-card {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.9rem, 5vw, 3.25rem);
  background: #faf8f4;
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 26px 60px -36px rgba(27, 20, 100, 0.45);
  text-align: center;
}
.contact-mark { width: 74px; margin: 0 auto 1rem; }
.contact-card .section-heading {
  margin: 0;
  text-align: center;
  font-size: clamp(1.8rem, 4.2vw, 2.5rem);
}
.contact-intro {
  max-width: 34ch;
  margin: 0.75rem auto 0;
  opacity: 0.85;
}

.contact-form {
  margin: 2rem 0 0;
  display: grid;
  gap: 1.1rem;
  text-align: left;
}
.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.field input,
.field textarea {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(27, 20, 100, 0.4); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 20, 100, 0.14);
}
/* honeypot — hidden from humans, tempting to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-form .btn {
  border: 0;
  cursor: pointer;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--serif);
  font-size: 1.1rem;
}
.contact-form .btn:disabled { opacity: 0.55; cursor: default; }

.form-status {
  margin: 1.1rem auto 0;
  text-align: center;
  min-height: 1.4em;
}
.form-status[data-state="ok"] { color: #1c6b3c; }
.form-status[data-state="error"] { color: #a12b2b; }

/* ---- Footer ------------------------------------------------------------ */
.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding: 0 var(--pad) 2.5rem;
  font-size: 1.1rem;
}
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-footer {
  background: var(--navy);
  color: var(--navy-ink);
  padding: 1.5rem var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--navy-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  align-items: center;
}
.footer-meta .sep { opacity: 0.5; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .overview { grid-template-columns: 1fr; }
  .cover { max-width: 300px; margin-bottom: 2.5rem; }
  .section-heading { text-align: center; }
  .site-footer { justify-content: center; text-align: center; }

  /* Collapse the nav behind a hamburger */
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.25rem var(--pad) 1rem;
    background: var(--navy);
    border-top: 1px solid rgba(245, 245, 245, 0.14);
    box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.55);
    font-size: 1.2rem;
  }
  .site-header.nav-open .nav { display: flex; }
  .nav a {
    padding: 0.75rem 0;
    opacity: 1;
    border-bottom: 1px solid rgba(245, 245, 245, 0.1);
  }
  .nav a:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
