/* Colouring Legends coming-soon page. Palette and type match the book covers. */

:root {
  --cream: #f6f1e4;
  --cream-deep: #efe8d6;
  --paper: #fffcf6;
  --ink: #173a54;
  --body: #2c2a26;
  --muted: #5e5952;
  --rule: rgba(23, 58, 84, 0.22);
  --rule-strong: rgba(23, 58, 84, 0.4);
  --shadow: 0 14px 40px rgba(44, 36, 22, 0.12);
  --max: 68rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

@font-face {
  font-family: "Cormorant SC";
  src: url("fonts/CormorantSC-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant SC";
  src: url("fonts/CormorantSC-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant SC";
  src: url("fonts/CormorantSC-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("fonts/Lora-Roman.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lora";
  src: url("fonts/Lora-Italic.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--body);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--body);
}

a:focus-visible,
button:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.8rem;
  top: -4rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip:focus {
  top: 0.8rem;
}

.wrap {
  width: min(var(--max), calc(100% - 2 * var(--pad)));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 241, 228, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.6rem;
}

.wordmark {
  font-family: "Cormorant SC", "Palatino Linotype", Palatino, serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
}

.nav a:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  padding: clamp(3.2rem, 9vw, 6.5rem) 0 clamp(2.8rem, 7vw, 5rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 1.1rem;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--ink);
}

.hero h1 {
  margin: 0;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-transform: uppercase;
}

.rule {
  width: 4.5rem;
  height: 1px;
  background: var(--rule-strong);
  margin: 1.4rem auto 1.5rem;
  border: 0;
}

.pitch {
  margin: 0 auto;
  max-width: 34rem;
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.45;
  color: var(--body);
}

.byline {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Sections */
.section {
  padding: clamp(2.2rem, 6vw, 4.2rem) 0;
}

.section-head {
  text-align: center;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.section-head h2 {
  margin: 0;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  color: var(--ink);
}

.section-head p {
  margin: 0.8rem auto 0;
  max-width: 38rem;
  color: var(--muted);
}

.band {
  background: var(--cream-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Books */
.books {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: stretch;
}

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.book figure {
  margin: 0;
  width: 100%;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.book img {
  width: 100%;
}

.book h3 {
  margin: 1.15rem 0 0.35rem;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1.15rem;
  color: var(--ink);
}

.book .subtitle {
  margin: 0 0 1.1rem;
  font-style: italic;
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 18rem;
}

/* CTA: coming-soon is a non-link; JS upgrades it to a Buy button when a URL is set */
.cta {
  display: inline-block;
  margin-top: auto;
  padding: 0.62rem 1.15rem 0.58rem;
  border: 1px solid var(--ink);
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  line-height: 1.2;
}

.cta.is-soon {
  cursor: default;
  opacity: 0.9;
}

a.cta.is-buy:hover {
  background: var(--ink);
  color: var(--cream);
}

/* How it works */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.8rem);
}

.trio figure {
  margin: 0;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 0.55rem 0.55rem 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.trio .frame {
  background: #fff;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.trio img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.trio figcaption {
  padding: 0.9rem 0.4rem 0.15rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--body);
}

.trio .step {
  display: block;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.example-note {
  text-align: center;
  margin: 1.6rem 0 0;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  padding: 2.6rem 0 3rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.3rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.social a {
  text-decoration: none;
}

.social a:hover {
  text-decoration: underline;
}

.credits {
  margin: 0 auto 1.3rem;
  max-width: 46rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: left;
}

.credits h2 {
  margin: 0 0 0.55rem;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink);
  text-align: center;
}

.credits p {
  margin: 0 0 0.55rem;
}

.legal {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Mobile */
@media (max-width: 800px) {
  .section-head h2 {
    letter-spacing: 0.1em;
    font-size: 1.22rem;
  }

  .books,
  .trio {
    grid-template-columns: 1fr;
    max-width: 22rem;
    margin-inline: auto;
  }

  .trio .frame {
    aspect-ratio: auto;
  }

  .book {
    margin-bottom: 0.4rem;
  }

  .nav {
    gap: 0.85rem;
    font-size: 0.88rem;
  }

  .credits {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: center;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    min-height: 0;
  }

  .hero {
    padding-top: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
