/* Ava Blackwood: personalized love-story novellas. One stylesheet, no framework. */

@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/ebgaramond-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/ebgaramond-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/ebgaramond-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fbf6ef;
  --paper: #fffdf9;
  --blush: #f5e8e3;
  --ink: #2a1f23;
  --ink-soft: #4a3b40;
  --muted: #6e5d62;
  --rose: #8c2f45;
  --rose-dark: #6b2134;
  --gold: #a98249;
  --line: #e7d9d0;
  --ok: #2f6b45;
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.1875rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
}

a { color: var(--rose); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--rose-dark); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 400; margin: 0; }
h1, h2 { text-wrap: balance; }
p { margin: 0 0 1rem; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: 1rem; }
.skip-link:focus { left: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

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

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; }
.wordmark { font-style: italic; font-size: 1.6rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.wordmark span { color: var(--rose); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.nav a:hover { color: var(--rose); }
.nav a.button { color: #fff; }
@media (max-width: 820px) { .nav a:not(.button) { display: none; } }

/* Buttons and forms ------------------------------------------------------- */

.button {
  display: inline-block; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--rose); color: #fff; text-decoration: none;
  font: inherit; font-size: 1.05rem; letter-spacing: 0.02em;
  padding: 0.72rem 1.45rem; transition: background-color 0.2s ease;
}
.button:hover, .button:focus-visible { background: var(--rose-dark); color: #fff; }
.button[disabled] { opacity: 0.7; cursor: progress; }

.waitlist { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 31rem; }
.waitlist input[type="email"] {
  flex: 1 1 15rem; min-width: 0; padding: 0.72rem 1.15rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font: inherit; font-size: 1.05rem; color: var(--ink);
}
.waitlist input[type="email"]::placeholder { color: #9b8b90; }
.form-status { flex-basis: 100%; min-height: 1.6em; margin: 0.2rem 0 0; font-size: 1rem; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--rose-dark); }
.form-note { font-size: 0.98rem; color: var(--muted); margin: 0.2rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

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

.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; padding: 3.2rem 0 5.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.82rem; color: var(--rose); margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.7rem, 5.8vw, 4.6rem); line-height: 1.04; letter-spacing: -0.012em; margin-bottom: 1.4rem; }
.hero h1 em { color: var(--rose); }
.lede { font-size: 1.32rem; line-height: 1.55; color: var(--ink-soft); max-width: 35rem; margin-bottom: 2rem; }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 1.6rem; padding-top: 0.5rem; }
  .book-stage { order: -1; }
  .hero .book { width: min(13rem, 52vw); }
  .hero .cover { padding: 1.6rem 1.1rem 1.2rem; }
  .hero .cover-title { font-size: 1.4rem; }
  .hero .cover-for { font-size: 0.85rem; }
}

/* The hardcover, drawn in CSS */
.book-stage { display: flex; justify-content: center; perspective: 1800px; padding: 1rem 0; }
.book {
  position: relative; width: min(18.5rem, 66vw); aspect-ratio: 2 / 3;
  transform: rotateY(-17deg) rotateX(3deg); transform-style: preserve-3d;
  transition: transform 0.7s ease;
}
.book:hover { transform: rotateY(-7deg) rotateX(1deg); }
@media (prefers-reduced-motion: reduce) { .book, .book:hover { transition: none; } }
.cover {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 2.4rem 1.6rem 1.7rem; text-align: center; color: #f6e8d6;
  border-radius: 3px 10px 10px 3px;
  background: radial-gradient(130% 85% at 72% 18%, #a43a55 0%, #7b2439 46%, #4a1322 100%);
  box-shadow: 0 34px 60px -22px rgba(60, 18, 30, 0.6), 0 16px 30px -16px rgba(0, 0, 0, 0.35);
}
.cover::before {
  content: ""; position: absolute; inset: 0.75rem; pointer-events: none;
  border: 1px solid rgba(214, 180, 120, 0.6); border-radius: 2px 7px 7px 2px;
}
.cover::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 16px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.1) 55%, rgba(0, 0, 0, 0));
}
.cover svg { width: 4.4rem; height: auto; color: #d8b77c; }
.cover-title { font-style: italic; font-size: 1.9rem; line-height: 1.13; margin: 0; }
.cover-for { font-size: 0.98rem; letter-spacing: 0.05em; color: #ecd5bb; margin: 0.9rem 0 0; text-wrap: balance; }
.cover-author { text-transform: uppercase; letter-spacing: 0.32em; font-size: 0.78rem; color: #d8b77c; }
.pages {
  position: absolute; top: 5px; bottom: 5px; right: -11px; width: 12px;
  border-radius: 0 4px 4px 0;
  background: repeating-linear-gradient(to bottom, #fbf3e6 0, #fbf3e6 2px, #eadcc6 3px);
  box-shadow: inset 2px 0 3px rgba(0, 0, 0, 0.12);
}

/* Sections ---------------------------------------------------------------- */

.section { padding: 5rem 0; }
.band { background: var(--blush); }
.section-head { max-width: 42rem; margin-bottom: 2.6rem; }
.section-head h2, .join h2 { font-size: clamp(2.05rem, 3.7vw, 2.9rem); line-height: 1.1; margin-bottom: 0.9rem; }
.section-head p:last-child { color: var(--ink-soft); }
h3 { font-weight: 600; font-size: 1.32rem; line-height: 1.25; margin-bottom: 0.55rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 24rem)); }
@media (max-width: 880px) { .cards, .cards.two { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem; margin: 0; }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; gap: 1.6rem; } }
.steps .num { display: block; font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--gold); margin-bottom: 0.7rem; }

/* Samples */
.sample { display: flex; flex-direction: column; }
.sample-kind { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--rose); margin-bottom: 0.7rem; }
.sample-title { font-style: italic; font-size: 1.45rem; line-height: 1.2; margin-bottom: 0.25rem; }
.sample-for { color: var(--muted); font-size: 1rem; margin-bottom: 1.2rem; }
.sample blockquote { margin: 0 0 1.2rem; padding-left: 1rem; border-left: 2px solid var(--line); font-size: 1.06rem; line-height: 1.6; color: var(--ink-soft); }
.sample blockquote p { margin: 0 0 0.6rem; }
.sample .more { margin-top: auto; }

/* Promises */
.promises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.2rem 3rem; max-width: 60rem; }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }
.promises h3 { color: var(--rose-dark); }

/* Pricing */
.price .amount { font-size: 2.6rem; line-height: 1; margin: 0.3rem 0 1rem; }
.price ul { margin: 0; padding-left: 1.15rem; }
.price li { margin-bottom: 0.35rem; }
.price.featured { border-color: var(--rose); box-shadow: 0 18px 40px -28px rgba(140, 47, 69, 0.6); }
.pricing-note { margin-top: 1.6rem; color: var(--muted); }

/* FAQ */
.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.15rem 0; }
.faq summary { cursor: pointer; list-style: none; font-size: 1.24rem; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--rose); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0.8rem 0 0; color: var(--ink-soft); }

/* Closing call to action */
.join { text-align: center; }
.join .waitlist { margin: 1.6rem auto 0; justify-content: center; }
.join .form-status { text-align: center; }
.join p { color: var(--ink-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.4rem 0 3rem; color: var(--muted); font-size: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.footer-inner p { margin: 0; }

/* Reading page (sample chapter, privacy) --------------------------------- */

.page { padding: 2rem 0 5rem; }
.reading { max-width: 35rem; margin: 0 auto; }
.back { display: inline-block; margin-bottom: 2rem; font-size: 1rem; }
.brief-panel { background: var(--blush); border-radius: var(--radius); padding: 1.7rem 1.9rem; margin: 0 auto 3.5rem; max-width: 42rem; }
.brief-panel h1 { font-size: 1.9rem; margin-bottom: 0.7rem; }
.brief-panel ul { margin: 0.4rem 0 1rem; padding-left: 1.2rem; }
.brief-panel li { margin-bottom: 0.45rem; font-style: italic; }
.chapter-label { text-align: center; text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.82rem; color: var(--muted); margin: 0; }
.chapter-title { text-align: center; font-style: italic; font-size: 2.1rem; margin: 0.4rem 0 2.4rem; }
.chapter p { margin: 0; text-indent: 1.5em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.chapter .chapter-label { text-align: center; text-indent: 0; }
.chapter p.first { text-indent: 0; }
.chapter .scene-break { text-align: center; text-indent: 0; color: var(--gold); letter-spacing: 0.6em; margin: 1.5rem 0; }
.chapter-end { text-align: center; margin-top: 3.5rem; }
.chapter-end .waitlist { margin: 1.2rem auto 0; justify-content: center; }
.prose h1 { font-size: 2.4rem; margin-bottom: 1.2rem; }
.prose h2 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 0.6rem; }
.prose ul { padding-left: 1.2rem; }

/* Calls to action ---------------------------------------------------------- */

.button.secondary { background: transparent; color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); }
.button.secondary:hover, .button.secondary:focus-visible { background: var(--rose); color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-bottom: 1.1rem; }
.join .cta-row { justify-content: center; margin-top: 1.6rem; }
.price .button { margin-top: 1.3rem; }

/* Order and questionnaire forms ---------------------------------------------- */

[hidden] { display: none !important; }
.form-page { max-width: 44rem; margin: 0 auto; }
.form-page h1 { font-size: clamp(2.3rem, 4.6vw, 3.1rem); line-height: 1.08; margin-bottom: 0.8rem; }
.form-intro { color: var(--ink-soft); font-size: 1.18rem; margin-bottom: 1.8rem; }
.notice { background: var(--blush); border-radius: var(--radius); padding: 1.15rem 1.4rem; margin: 0 0 1.6rem; }
.notice.err { background: #f6dede; color: var(--rose-dark); }
.notice p:last-child { margin-bottom: 0; }

fieldset.section {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  padding: 1.5rem 1.6rem 0.6rem; margin: 0 0 1.6rem; min-width: 0;
}
fieldset.section legend { font-size: 1.5rem; padding: 0 0.45rem; margin-left: -0.45rem; }
.section-note { color: var(--muted); font-size: 1rem; margin: 0 0 1.1rem; }
.field { margin-bottom: 1.2rem; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: 1.06rem; line-height: 1.35; margin-bottom: 0.35rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.96rem; margin-top: 0.1rem; }
.req { color: var(--rose); font-weight: 400; }
.field input[type="text"], .field input[type="date"], .field textarea {
  width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 1.05rem; line-height: 1.45; color: var(--ink);
}
.field textarea { min-height: 6.2rem; resize: vertical; }
.field textarea.short { min-height: 3.5rem; }
.field textarea.lines { min-height: 5.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.choices { display: grid; gap: 0.6rem; }
.choices.row { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .choices.row { grid-template-columns: 1fr; } }
.choice {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 400;
}
.choice input { margin-top: 0.38rem; accent-color: var(--rose); flex: none; }
.choice strong { display: block; font-weight: 600; }
.choice span { color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }
.choice:has(input:checked) { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }
.check { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 0.9rem; font-weight: 400; cursor: pointer; }
.check input { margin-top: 0.42rem; width: 1.05rem; height: 1.05rem; accent-color: var(--rose); flex: none; }

.field.invalid input[type="text"], .field.invalid input[type="date"], .field.invalid textarea, .field.invalid .choice {
  border-color: var(--rose-dark); box-shadow: 0 0 0 1px var(--rose-dark);
}
.field-error { color: var(--rose-dark); font-size: 0.96rem; margin: 0.35rem 0 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; margin-top: 1.4rem; }
.form-actions .form-status { flex-basis: 100%; }
.save-note { color: var(--muted); font-size: 0.96rem; margin: 0.4rem 0 0; }
.order-meta { color: var(--muted); font-size: 1rem; margin: -0.6rem 0 1.6rem; }

.chapter-end .cta-row { justify-content: center; margin-top: 1.2rem; }

/* Occasion pages and gift links ------------------------------------------ */
.occasions { margin: 1.8rem 0 0; color: var(--ink-soft); }
.occasion .lede { margin-bottom: 1.6rem; }
.occasion .form-note { margin-bottom: 0.6rem; }
.occasion .sample { margin: 1.4rem 0 2.4rem; }
.occasion .faq { margin-top: 0.4rem; }
.occasion > .cta-row:last-child { margin-top: 2.4rem; }
.prose ol { padding-left: 1.2rem; }
.prose ol li { margin-bottom: 0.7rem; }
.footer-gifts { flex-basis: 100%; }
.press-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.2rem 0 0.4rem; }
.press-images figure { margin: 0; }
.press-images img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.press-images figcaption { margin-top: 0.45rem; font-size: 0.92rem; color: var(--muted); }
.product-shot { display: block; width: 100%; max-width: 560px; height: auto; margin: 0.4rem auto 1.6rem; border-radius: 12px; border: 1px solid var(--line); }
.product-figure { margin: 0.6rem 0 1.4rem; }
.product-figure .product-shot { max-width: 100%; margin-bottom: 0.5rem; }
.product-figure figcaption { font-size: 0.92rem; color: var(--muted); text-align: center; }
