/* ==========================================================================
   Kali A. Larsson — style system
   ========================================================================== */

/* Kali's cover typeface — the same font used on her book covers, so her name
   on the site matches her name on the books.
   font-display: swap means the page never waits on it to render text. */
@font-face {
  font-family: 'Rusilla Serif';
  src: url('../assets/fonts/Rusillaserif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Base tones — warm near-black shifted toward violet, so the whole page
     sits in Kali's purple rather than neutral grey. */
  --ink:        #0c0a12;
  --deep:       #16101f;
  --card:       #1e172b;

  --border:     rgba(200, 170, 120, 0.15);

  /* Accents */
  --gold:       #c8aa78;
  --gold-dim:   rgba(200, 170, 120, 0.5);
  --rose:       #c47a7a;

  /* Purple — the atmosphere colour, used for large soft washes.
     --violet is for anything with an edge; the glow tokens are for
     background blooms only and are deliberately low-opacity. */
  --violet:      #a37fc4;
  --violet-dim:  rgba(163, 127, 196, 0.45);
  --violet-glow: rgba(132, 88, 176, 0.22);
  --violet-soft: rgba(132, 88, 176, 0.12);

  --text:       #e8e0d4;
  --muted:      rgba(232, 224, 212, 0.55);

  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'Raleway', sans-serif;
  /* reserved for her name only — the wordmark, not body headings */
  --brand:      'Rusilla Serif', 'Cormorant Garamond', Georgia, serif;

  --nav-height: 84px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fine film grain over everything. Stops the big purple gradients from
   banding on cheap screens, and gives the page a printed feel. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ==========================================================================
   Ambient purple
   Large, very soft blooms behind the content. These are the "dimmed purple
   lighter areas" from Kali's sketch. Kept low-opacity on purpose — they should
   read as light in the room, not as a coloured panel.
   ========================================================================== */

.section {
  position: relative;
  isolation: isolate;
}

/* darker alternating sections get the strongest wash */
#books,
#reviews,
#newsletter {
  background:
    radial-gradient(ellipse 90% 55% at 12% -5%,  var(--violet-glow), transparent 62%),
    radial-gradient(ellipse 75% 50% at 92% 105%, var(--violet-soft), transparent 64%),
    var(--deep);
}

/* the lighter sections get a gentler one, so the page never reads as stripes */
#about,
#events,
#contact {
  background:
    radial-gradient(ellipse 85% 50% at 88% 0%,  var(--violet-soft), transparent 60%),
    radial-gradient(ellipse 70% 45% at 8% 100%, rgba(196, 122, 122, 0.06), transparent 62%),
    var(--ink);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.site-header.scrolled {
  background: rgba(18, 13, 26, 0.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--brand);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--gold);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.25s ease;
}

.lang-btn.active {
  color: var(--gold);
}

.lang-btn:hover {
  color: var(--gold);
}

.lang-divider {
  color: var(--gold-dim);
}

/* ==========================================================================
   Main
   ========================================================================== */

main {
  min-height: 100vh;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 34px;
  border: 1px solid var(--gold-dim);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.btn-primary:hover {
  background: transparent;
  color: var(--gold);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 0 80px;
}

/* Warm gold light behind the books… */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 12%;
  width: 640px;
  height: 640px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(200, 170, 120, 0.10) 0%, transparent 65%);
  pointer-events: none;
}

/* …and a larger, cooler purple bloom washing in from the left behind the
   title. The two overlap in the middle, which is what stops the hero
   looking flat. */
.hero::after {
  content: '';
  position: absolute;
  top: 38%;
  left: -8%;
  width: 900px;
  height: 780px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse,
              rgba(132, 88, 176, 0.26) 0%,
              rgba(132, 88, 176, 0.10) 38%,
              transparent 68%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 64px;
  align-items: center;
}

/* --- hero copy --- */

.hero-label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.6rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-bottom: 26px;
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.55;
  color: var(--muted);
  max-width: 30ch;
  margin-bottom: 44px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- hero books --- */

.hero-books {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}

/* The mockups are transparent PNG/WebP with their own depth already rendered,
   so no card background or border-radius here — just a soft cast shadow. */
/* Fixed aspect box + object-fit: contain, so a mockup that's a few pixels
   off the others never squashes or shifts the layout when languages swap. */
.book-wrap {
  position: relative;
  width: 290px;
  aspect-ratio: 1023 / 1537;
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.6));
}

/* Book One leads on the left, in front. Book Two tucks behind on the right.
   The two shift toward each other so they overlap in the middle. */
.book-wrap--front {
  z-index: 2;
  transform: translateX(34px);
}

.book-wrap--back {
  z-index: 1;
  transform: translateX(-46px) scale(0.86);
  opacity: 0.9;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* --- scroll cue --- */

.hero-scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
}

/* ==========================================================================
   Shared section furniture
   ========================================================================== */

.section {
  padding: 120px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 90px;
  text-align: center;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-intro {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
}

/* ==========================================================================
   Books
   ========================================================================== */

/* background set with the ambient purple washes near the top of this file */

.book-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 70px 0;
  border-top: 1px solid var(--border);
}

.book-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

/* every other book mirrors, so the page doesn't march down one side */
.book-row--flip .book-row-art {
  order: 2;
}

.book-row-art {
  display: flex;
  justify-content: center;
}

.book-row-img {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.55));
  transition: transform 0.5s ease;
}

.book-row:hover .book-row-img {
  transform: translateY(-6px);
}

.book-meta {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.book-meta .dot {
  margin: 0 10px;
  color: var(--gold-dim);
}

.book-name {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-weight: 300;
  line-height: 1.12;
  margin-bottom: 24px;
}

.book-blurb p {
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 54ch;
}

.book-blurb .book-hook {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

/* visibly marks text that is still waiting on real copy */
.book-blurb.is-placeholder p {
  border-left: 2px dashed var(--gold-dim);
  padding-left: 16px;
  font-style: italic;
  opacity: 0.75;
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.book-note {
  margin-top: 28px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

/* Not out yet — announces the date without pretending you can buy it */
.badge-soon {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 30px;
  padding: 11px 20px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  background: var(--card);
}

.badge-soon-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.badge-soon-date {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
}

.badge-soon[hidden] {
  display: none;
}

/* the live day count, set apart by a hairline so it reads as a separate fact */
.badge-soon-count {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  padding-left: 14px;
  margin-left: 2px;
  border-left: 1px solid var(--border);
}

.badge-soon-count:empty {
  display: none;
}

/* Engineering Walter — sold at events only, so it reads as an aside */
.book-row--aside .book-row-img {
  max-width: 250px;
  opacity: 0.95;
}

.badge-events {
  display: inline-block;
  margin: 26px 0 26px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--rose);
  background: var(--card);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.book-row--aside .btn {
  display: block;
  width: fit-content;
}

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-portrait {
  position: relative;
  align-self: start;
}

/* The portrait is a cut-out with no background, so it sits straight on the
   page. A soft glow behind stops her floating in nothing, and a drop shadow
   under the figure gives it some weight. */
.portrait-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.55));
}

.portrait-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 118%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
              rgba(132, 88, 176, 0.30) 0%,
              rgba(163, 127, 196, 0.14) 40%,
              rgba(200, 170, 120, 0.06) 58%,
              transparent 72%);
  z-index: 0;
  pointer-events: none;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 58ch;
}

.about-text .about-close {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--text);
  margin-top: 26px;
}

.social-row {
  display: flex;
  gap: 22px;
  margin-top: 40px;
}

.social-row a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.social-row a:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.social-row img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

/* ==========================================================================
   Reviews carousel
   ========================================================================== */

/* background set with the ambient purple washes near the top of this file */

.carousel {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  min-height: 260px;
}

.review {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s;
}

.review.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.review-text {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text);
  max-width: 34ch;
  position: relative;
}

/* opening quote mark, set behind the text */
.review-text::before {
  content: '\201C';
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5rem;
  line-height: 1;
  color: var(--violet);
  opacity: 0.32;
}

.review.is-placeholder .review-text {
  font-style: italic;
  color: var(--muted);
  border: 1px dashed var(--gold-dim);
  padding: 22px 26px;
  font-size: 1.05rem;
  max-width: 46ch;
}

.review-by {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.review-author {
  color: var(--gold);
}

.review-source {
  color: var(--muted);
}

/* only shown for reviewers outside Canada */
.review-loc {
  color: var(--muted);
  position: relative;
  padding-left: 12px;
}

.review-loc::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gold-dim);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 42px;
}

.dot-btn {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.dot-btn.is-active {
  background: var(--gold);
  transform: scale(1.25);
}

.dot-btn:hover {
  background: var(--gold-dim);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.review-form-wrap {
  max-width: 680px;
  margin: 96px auto 0;
  padding: 44px;
  background:
    radial-gradient(ellipse 100% 70% at 50% 0%, rgba(132, 88, 176, 0.14), transparent 70%),
    var(--card);
  border: 1px solid var(--border);
}

.form-title {
  font-size: 1.6rem;
  font-weight: 300;
  margin-bottom: 10px;
}

.form-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 300;
  padding: 13px 15px;
  transition: border-color 0.25s ease;
}

.form textarea {
  resize: vertical;
  line-height: 1.6;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form ::placeholder {
  color: rgba(232, 224, 212, 0.35);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}

.check input {
  margin-top: 3px;
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.form button {
  align-self: flex-start;
  cursor: pointer;
  font-family: var(--sans);
}

.form-status {
  font-size: 0.85rem;
  min-height: 1.2em;
}

.form-status.is-warn {
  color: var(--rose);
}

.form-status.is-ok {
  color: var(--gold);
}

.form-status.is-info {
  color: var(--muted);
}

/* ==========================================================================
   Events
   ========================================================================== */

.event-list {
  max-width: 820px;
  margin: 0 auto;
}

.event-note {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 40px 0;
}

.event {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 32px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.event:first-child {
  border-top: 1px solid var(--border);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4px;
  border-right: 1px solid var(--border);
}

.event-day {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
}

.event-month {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 6px;
}

.event-year {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 2px;
}

.event-title {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 8px;
}

.event-loc {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 12px;
}

.event-desc {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 56ch;
}

.event-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 3px;
}

.event-link:hover {
  border-color: var(--gold);
}

/* ==========================================================================
   Newsletter + sample (two cards side by side)
   ========================================================================== */

/* background set with the ambient purple washes near the top of this file */

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 1020px;
  margin: 0 auto;
}

.duo-card {
  background:
    radial-gradient(ellipse 110% 80% at 0% 0%, rgba(132, 88, 176, 0.15), transparent 68%),
    var(--card);
  border: 1px solid var(--border);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
}

.duo-title {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 14px;
}

.duo-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

/* the preview card has less in it — push its button to the bottom edge
   so the two cards line up */
.duo-card--sample {
  justify-content: flex-start;
}

.duo-card--sample .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* honeypot — hidden from people, visible to bots */
.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-card {
  max-width: 760px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(132, 88, 176, 0.13), transparent 70%),
    var(--card);
  border: 1px solid var(--border);
  padding: 48px;
}

/* ==========================================================================
   Thank-you popup
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 10, 0.78);
  backdrop-filter: blur(5px);
  animation: modal-fade 0.3s ease both;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 48px 44px 38px;
  text-align: center;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 110% 80% at 50% 0%, rgba(132, 88, 176, 0.22), transparent 70%),
    var(--card);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  animation: modal-rise 0.42s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.modal-box:focus {
  outline: none;
}

.modal-x {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.7rem;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.modal-x:hover {
  color: var(--gold);
}

.modal-tick {
  color: var(--gold);
  margin-bottom: 20px;
}

.modal-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 14px;
}

.modal-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 auto 30px;
  max-width: 40ch;
}

.modal-dismiss {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease;
}

.modal-dismiss:hover {
  color: var(--gold);
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-box {
    animation: none;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--border);
  padding: 70px 0 34px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 44px;
}

.footer-name {
  font-family: var(--brand);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.footer-tag {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-links a {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: border-color 0.25s ease;
}

.footer-social a:hover {
  border-color: var(--gold);
}

.footer-social img {
  width: 15px;
  height: 15px;
  opacity: 0.75;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.wmp {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.25s ease;
}

.wmp:hover {
  opacity: 0.75;
}

.wmp img {
  height: 22px;
  width: auto;
  opacity: 0.8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .section {
    padding: 84px 0;
  }

  .section-head {
    margin-bottom: 60px;
  }

  .book-row {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
    padding: 52px 0;
  }

  /* on one column the art always leads, flip order is meaningless */
  .book-row--flip .book-row-art {
    order: 0;
  }

  .book-row-img {
    max-width: 220px;
  }

  .book-blurb p {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .book-blurb.is-placeholder p {
    max-width: 46ch;
  }

  .buy-row {
    justify-content: center;
  }

  .book-row--aside .btn {
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-portrait {
    max-width: 320px;
    margin: 0 auto;
  }

  .about-body {
    text-align: center;
  }

  .about-text p {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .social-row {
    justify-content: center;
  }

  .badge-soon {
    justify-content: center;
  }

  .carousel {
    min-height: 330px;
  }

  .review-form-wrap {
    margin-top: 64px;
    padding: 28px 22px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .form button {
    align-self: stretch;
  }

  .event {
    grid-template-columns: 72px 1fr;
    gap: 22px;
    text-align: left;
  }

  .event-day {
    font-size: 1.9rem;
  }

  .duo {
    grid-template-columns: 1fr;
  }

  .duo-card {
    padding: 32px 24px;
    text-align: center;
  }

  .duo-card--sample .btn {
    align-self: center;
    margin-top: 0;
  }

  .contact-card {
    padding: 28px 22px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .footer-links {
    justify-content: center;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-books {
    min-height: 380px;
    order: -1;
  }

  .book-wrap {
    width: 210px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-scroll {
    display: none;
  }
}

/* Turnstile widget. Empty until a Site Key is configured, and :empty keeps it
   from leaving a gap in the form when it isn't in use. */
.turnstile-slot {
  margin: 4px 0 20px;
}

.turnstile-slot:empty {
  display: none;
}
