/* ===========================================================
   Wherein Do You Speak: site styles
   Palette derived from the book cover (color-theory: navy blue
   paired with its near-complement, warm gold/amber)
   =========================================================== */

:root {
  --navy-900: #14274D;
  --navy-800: #1B3B6F;
  --navy-700: #21548F;
  --navy-050: #EEF2F8;

  --gold-600: #C9871F;
  --gold-500: #E7A233;
  --gold-400: #F0A93E;
  --gold-100: #FBEBD1;

  --cream: #FBF9F4;
  --ink: #17203A;
  --ink-soft: #4B5670;
  --white: #FFFFFF;

  --shadow-sm: 0 2px 8px rgba(20, 39, 77, 0.08);
  --shadow-md: 0 10px 30px rgba(20, 39, 77, 0.14);
  --shadow-lg: 0 24px 60px rgba(20, 39, 77, 0.20);

  --radius: 14px;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-900);
  color: var(--white);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy-900);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 700;
}

p { margin: 0 0 1em; }

a { color: inherit; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-600);
  margin: 0 0 0.75em;
}
.eyebrow.center { text-align: center; }

.center { text-align: center; }

.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-title.center { max-width: 760px; margin-left: auto; margin-right: auto; }

.section-lede {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 720px;
}
.section-lede.center { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

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

.btn-lg { padding: 15px 30px; font-size: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 244, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(20, 39, 77, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-900);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  margin-right: auto;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-400);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.brand-mark.large {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 2.6rem;
}

.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { border-color: var(--gold-500); color: var(--navy-900); }

.nav-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(240, 169, 62, 0.16), transparent 55%),
    linear-gradient(180deg, var(--navy-050), var(--cream) 65%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(45deg, rgba(27, 59, 111, 0.05) 25%, transparent 25%, transparent 75%, rgba(27, 59, 111, 0.05) 75%),
    linear-gradient(45deg, rgba(27, 59, 111, 0.05) 25%, transparent 25%, transparent 75%, rgba(27, 59, 111, 0.05) 75%);
  background-size: 46px 46px;
  background-position: 0 0, 23px 23px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, black, transparent 75%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.35em;
}
.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 22px;
}
.hero-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.stars { color: var(--gold-500); letter-spacing: 2px; font-size: 1.1rem; }

.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-art img {
  width: min(360px, 100%);
  height: auto;
  aspect-ratio: 1000 / 1499;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.2deg);
}

/* Sections */
.section { padding: 84px 0; }
.section-author { background: var(--navy-900); color: var(--white); }
.section-author h2, .section-author .author-note { color: var(--white); }
.section-author .eyebrow { color: var(--gold-400); }
.section-author .author-bio { color: rgba(255,255,255,0.86); }
.section-author .author-note { color: rgba(255,255,255,0.6); font-size: 0.95rem; font-style: italic; }

.section-buy { background: var(--navy-050); }

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0 56px;
}
.pillar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold-500);
}
.pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 16px;
}
.pillar-card h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
.pillar-card p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

/* Book meta */
.book-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 32px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-600);
}

/* Author */
.author-inner {
  display: grid;
  grid-template-columns: 0.6fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.author-portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 280px;
  margin: 0 auto;
}
.portrait-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--navy-700), var(--navy-900));
  border: 4px solid var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-copy h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.author-bio { font-size: 1.05rem; max-width: 60ch; }

/* Formats / buy grid */
.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.format-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.format-card-featured {
  border: 2px solid var(--gold-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
}
.format-badge {
  position: absolute;
  top: -14px;
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.format-card h3 { margin-bottom: 0.2em; }
.format-price {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 0.2em;
}
.format-desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.4em; }

/* Footer */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.75);
  padding: 40px 0;
  position: relative;
  background-image:
    linear-gradient(45deg, rgba(240, 169, 62, 0.05) 25%, transparent 25%, transparent 75%, rgba(240, 169, 62, 0.05) 75%),
    linear-gradient(45deg, rgba(240, 169, 62, 0.05) 25%, transparent 25%, transparent 75%, rgba(240, 169, 62, 0.05) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { color: var(--white); margin-right: 0; }
.footer-copy { margin: 0; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .author-inner { grid-template-columns: 1fr; text-align: center; }
  .author-bio, .author-note { margin-left: auto; margin-right: auto; }
  .pillars { grid-template-columns: 1fr; }
  .format-grid { grid-template-columns: 1fr; }
  .format-card-featured { transform: none; order: -1; }
  .book-meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(20,39,77,0.08);
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .book-meta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .book-meta { grid-template-columns: 1fr; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
