/* ==========================================================================
   Alabaster Commons — Global Styles (Build Brief v1)
   Palette and typography are fixed by the approved brand system.
   ========================================================================== */

:root {
  --deep-blue: #02182C;
  --heaven-blue: #0A2941;
  --ocean-slate: #294E65;
  --alabaster: #E7D9BF;
  --ivory: #F4EAD9;
  --antique-gold: #C7A76B;
  --alabaster-glow: #FCE9BC;
  --soft-white: #FAF8F3;
  --charcoal: #1C2428;

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1120px;
  --max-prose: 46em;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--soft-white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ocean-slate); text-decoration-color: var(--antique-gold); text-underline-offset: 3px; }
a:hover { color: var(--deep-blue); }

/* ---------- Typography ---------- */

h1, h2, h3, .serif {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--deep-blue);
  line-height: 1.15;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.7rem); font-weight: 600; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--antique-gold);
  display: block;
  margin-bottom: 1.1rem;
}

.lead { font-size: 1.2rem; line-height: 1.75; }

.brand-line {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  color: var(--ocean-slate);
}

.pull-quote {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.35;
  color: var(--deep-blue);
  max-width: 24em;
  margin: 2.5rem auto;
  padding: 0 1rem;
  text-align: center;
  position: relative;
}
.pull-quote::before,
.pull-quote::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--antique-gold);
  margin: 1.4rem auto;
}

/* ---------- Layout ---------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.section-ivory { background: var(--ivory); }
.section-alabaster { background: linear-gradient(180deg, var(--soft-white), var(--ivory)); }
.section-dark { background: var(--deep-blue); color: var(--ivory); }
.section-dark h2, .section-dark h3 { color: var(--alabaster-glow); }
.section-dark p { color: var(--ivory); }
.section-dark .eyebrow { color: var(--antique-gold); }

.center { text-align: center; }

.prose { max-width: var(--max-prose); }
.prose p + p { margin-top: 1.15rem; }
.center .prose, .prose.centered { margin-left: auto; margin-right: auto; }

.stack-sm > * + * { margin-top: 1rem; }

.divider {
  width: 64px; height: 1px;
  background: var(--antique-gold);
  border: 0;
  margin: 2.25rem auto;
}
.divider.left { margin-left: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--alabaster);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem clamp(1.25rem, 5vw, 2.5rem);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}
.brand img { height: 36px; width: auto; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-blue);
  line-height: 1.2;
}

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--deep-blue); }
.site-nav a[aria-current="page"] {
  color: var(--deep-blue);
  border-bottom-color: var(--antique-gold);
}
.site-nav a.btn { border-bottom: 1px solid var(--deep-blue); padding: 0.6rem 1.3rem; font-size: 0.88rem; }
.site-nav a.btn-primary { color: var(--soft-white); }
.site-nav a.btn-primary:hover { color: var(--soft-white); }

.lang-switch {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ocean-slate);
  white-space: nowrap;
}
.lang-switch a { text-decoration: none; color: var(--ocean-slate); padding: 0.2rem 0.15rem; border-bottom: 0; }
.lang-switch a:hover, .lang-switch .active { color: var(--deep-blue); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--deep-blue);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  padding: 0.85rem 1.9rem;
  border-radius: 2px;
  border: 1px solid var(--deep-blue);
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--deep-blue);
  color: var(--soft-white);
}
.btn-primary:hover { background: var(--heaven-blue); color: var(--soft-white); }

.btn-secondary {
  background: transparent;
  color: var(--deep-blue);
}
.btn-secondary:hover { background: rgba(2, 24, 44, 0.06); color: var(--deep-blue); }

.section-dark .btn-primary, .hero-dark .btn-primary {
  background: var(--alabaster-glow);
  border-color: var(--alabaster-glow);
  color: var(--deep-blue);
}
.section-dark .btn-primary:hover, .hero-dark .btn-primary:hover { background: var(--ivory); border-color: var(--ivory); color: var(--deep-blue); }
.section-dark .btn-secondary, .hero-dark .btn-secondary {
  border-color: var(--ivory);
  color: var(--ivory);
}
.section-dark .btn-secondary:hover, .hero-dark .btn-secondary:hover { background: rgba(244, 234, 217, 0.12); color: var(--ivory); }

.btn-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}
.center .btn-row, .btn-row.centered { justify-content: center; }

.btn-sm { padding: 0.6rem 1.3rem; font-size: 0.88rem; }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4.5rem, 10vw, 8rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-jar { height: 108px; width: auto; margin: 0 auto 2.25rem; }

.hero .tagline {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.9vw, 1.9rem);
  line-height: 1.4;
  color: var(--ocean-slate);
  max-width: 26em;
  margin: 1.75rem auto 0;
}

.hero .brand-line { display: block; margin: 1.6rem auto 0; }

.hero .intro {
  max-width: 38em;
  margin: 2rem auto 0;
  color: var(--charcoal);
}

/* Dark hero (Heaven's Sound) — water / atmospheric light */
.hero-dark {
  background:
    radial-gradient(ellipse 85% 60% at 50% -12%, rgba(252, 233, 188, 0.16), transparent 60%),
    radial-gradient(ellipse 120% 70% at 50% 112%, rgba(41, 78, 101, 0.55), transparent 65%),
    linear-gradient(180deg, var(--deep-blue) 0%, var(--heaven-blue) 100%);
  color: var(--ivory);
}
.hero-dark h1 { color: var(--alabaster-glow); }
.hero-dark .subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  color: var(--ivory);
  margin-top: 0.9rem;
}
.hero-dark .byline {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--alabaster);
  margin-top: 1.5rem;
}
.hero-dark .intro { color: var(--ivory); }
.hero-dark .tagline { color: var(--alabaster); }

/* ---------- Cards & feature blocks ---------- */

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 3rem;
}

.card {
  background: var(--soft-white);
  border: 1px solid var(--alabaster);
  border-radius: 3px;
  padding: 2.25rem 2rem;
}
.card h3 { margin-bottom: 0.8rem; }
.card .eyebrow { margin-bottom: 0.7rem; }

.section-ivory .card { background: var(--soft-white); }
.section-dark .card {
  background: rgba(244, 234, 217, 0.06);
  border-color: rgba(231, 217, 191, 0.25);
}
.section-dark .card h3 { color: var(--alabaster-glow); }

.step-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--antique-gold);
  display: block;
  margin-bottom: 0.9rem;
}

/* Featured work split */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.book-cover-frame {
  background: linear-gradient(160deg, var(--heaven-blue), var(--deep-blue));
  border-radius: 4px;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 60px -24px rgba(2, 24, 44, 0.45);
}
.book-cover-frame img.jar { height: 72px; width: auto; margin-bottom: 1.6rem; opacity: 0.95; }
.book-cover-frame .bc-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--alabaster-glow);
  line-height: 1.2;
}
.book-cover-frame .bc-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ivory);
  margin-top: 0.6rem;
}
.book-cover-frame .bc-author {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--alabaster);
  margin-top: 1.5rem;
}

/* ---------- Placeholders (per handoff rule: clearly labeled) ---------- */

.placeholder-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocean-slate);
  background: var(--ivory);
  border: 1px dashed var(--antique-gold);
  border-radius: 2px;
  padding: 0.25rem 0.6rem;
  vertical-align: middle;
}
.section-dark .placeholder-chip, .hero-dark .placeholder-chip {
  color: var(--alabaster);
  background: rgba(244, 234, 217, 0.08);
}

.audio-placeholder {
  border: 1px dashed var(--antique-gold);
  border-radius: 3px;
  background: rgba(231, 217, 191, 0.18);
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}
.section-dark .audio-placeholder { background: rgba(244, 234, 217, 0.06); }
.audio-placeholder .play-dot {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--antique-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--antique-gold);
  font-size: 0.85rem;
}
.audio-placeholder .ap-meta { font-size: 0.92rem; line-height: 1.45; }
.audio-placeholder .ap-meta strong { font-weight: 600; display: block; }
.audio-placeholder .ap-meta span { color: var(--ocean-slate); font-size: 0.8rem; }
.section-dark .audio-placeholder .ap-meta span { color: var(--alabaster); }

/* ---------- Audio playlist ---------- */

.playlist audio {
  width: 100%;
  margin-bottom: 1rem;
}

.playlist .now-playing {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ocean-slate);
  margin-bottom: 0.5rem;
  min-height: 1.3em;
}
.section-dark .playlist .now-playing { color: var(--alabaster); }

.track-list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
  border-top: 1px solid var(--alabaster);
}
.section-dark .track-list { border-top-color: rgba(231, 217, 191, 0.25); }

.track-list li { border-bottom: 1px solid var(--alabaster); }
.section-dark .track-list li { border-bottom-color: rgba(231, 217, 191, 0.18); }

.track-list button {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--charcoal);
  padding: 0.6rem 0.5rem;
}
.track-list button:hover { background: rgba(231, 217, 191, 0.25); }
.section-dark .track-list button { color: var(--ivory); }
.section-dark .track-list button:hover { background: rgba(244, 234, 217, 0.08); }

.track-list .track-num {
  flex: none;
  width: 2em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--antique-gold);
}

.track-list li.playing button {
  color: var(--deep-blue);
  font-weight: 600;
  background: rgba(231, 217, 191, 0.35);
}
.section-dark .track-list li.playing button {
  color: var(--alabaster-glow);
  background: rgba(244, 234, 217, 0.1);
}

/* Promo video */
.promo-video {
  display: block;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  border-radius: 4px;
  background: var(--deep-blue);
  box-shadow: 0 24px 60px -24px rgba(2, 24, 44, 0.45);
}

/* Real book cover image */
.book-cover-img {
  width: 100%;
  max-width: 340px;
  border-radius: 4px;
  box-shadow: 0 24px 60px -24px rgba(2, 24, 44, 0.45);
  margin: 0 auto;
}

/* ---------- License / notice block ---------- */

.notice-block {
  background: var(--ivory);
  border: 1px solid var(--alabaster);
  padding: 2.75rem clamp(1.5rem, 4vw, 3rem);
  border-radius: 3px;
  max-width: 54em;
  margin: 0 auto;
}
.notice-block::before {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--antique-gold);
  margin-bottom: 1.6rem;
}
.notice-block h3 {
  font-family: var(--font-serif);
  margin-bottom: 1.2rem;
}
.notice-block p + p { margin-top: 1rem; }
.notice-block .brand-line { font-size: 1.15rem; margin-top: 1.4rem; display: block; }

.attribution-model {
  background: var(--soft-white);
  border: 1px solid var(--alabaster);
  border-radius: 3px;
  padding: 1.6rem 1.8rem;
  font-size: 0.95rem;
  line-height: 1.8;
}
.attribution-model strong { display: block; font-weight: 600; color: var(--deep-blue); margin-bottom: 0.4rem; }

/* ---------- Form ---------- */

.follow-form {
  max-width: 560px;
  margin: 2.5rem auto 0;
  display: grid;
  gap: 1.1rem;
  text-align: left;
}
.follow-form label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.4rem;
}
.follow-form input, .follow-form select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--alabaster);
  border-radius: 2px;
  background: var(--soft-white);
  color: var(--charcoal);
}
.follow-form input:focus, .follow-form select:focus {
  outline: 2px solid var(--ocean-slate);
  outline-offset: 1px;
}
.follow-form .btn { width: 100%; margin-top: 0.4rem; }

.section-dark .follow-form input, .section-dark .follow-form select {
  background: rgba(250, 248, 243, 0.97);
}
.section-dark .follow-form label { color: var(--ivory); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--deep-blue);
  color: var(--ivory);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.5rem;
  text-align: center;
}
.site-footer .jar { height: 56px; width: auto; margin: 0 auto 1.4rem; }
.site-footer .footer-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--alabaster-glow);
}
.site-footer .brand-line {
  color: var(--alabaster);
  font-size: 1.05rem;
  margin-top: 0.9rem;
  display: block;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.8rem;
  margin: 2.2rem 0 2rem;
  list-style: none;
}
.footer-links a {
  color: var(--ivory);
  font-size: 0.88rem;
  text-decoration: none;
}
.footer-links a:hover { color: var(--alabaster-glow); }
.footer-fine {
  font-size: 0.78rem;
  color: rgba(231, 217, 191, 0.65);
  max-width: 44em;
  margin: 0 auto;
  line-height: 1.7;
}
.footer-fine a { color: inherit; }

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.resource-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.75rem;
}

.jar-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 0 auto;
  padding: 0;
}
.jar-divider::before, .jar-divider::after {
  content: "";
  height: 1px;
  width: min(120px, 20vw);
  background: var(--antique-gold);
}
.jar-divider img { height: 40px; width: auto; opacity: 0.85; }

/* ---------- Mobile ---------- */

@media (max-width: 1080px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--soft-white);
    border-bottom: 1px solid var(--alabaster);
    padding: 0.5rem clamp(1.25rem, 5vw, 2.5rem) 1.25rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 0; width: 100%; font-size: 1rem; }
  .site-nav a.btn { margin-top: 0.8rem; width: 100%; text-align: center; padding: 0.8rem 1.3rem; }
  .site-nav .lang-switch { padding: 0.7rem 0 0; }

  .split, .split.reverse { grid-template-columns: 1fr; }
  .split .book-cover-frame { max-width: 320px; margin: 0 auto; }

  .hero-jar { height: 84px; }
}

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