/* ============================================================
   מתנה לכל החיים — Landing page styles
   Palette derived from the book cover: sunset orange, golden
   sun, cream paper, deep ember red.
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Theme tokens ---------- */
:root {
  /* default = warm cream (book paper) */
  --bg: #F2EAD7;
  --bg-alt: #EADFC5;
  --paper: #F8F1DE;
  --ink: #1B1411;
  --ink-soft: #4A3A2E;
  --ink-muted: #806B54;
  --line: rgba(27, 20, 17, 0.14);
  --line-soft: rgba(27, 20, 17, 0.07);
  --accent: #C84A1F;        /* sunset orange-red from cover */
  --accent-deep: #8E2E10;   /* deep ember */
  --accent-warm: #E6A436;   /* golden sun */
  --accent-soft: rgba(200, 74, 31, 0.10);

  --font-display: "Rubik", "Heebo", system-ui, -apple-system, sans-serif;
  --font-body: "Rubik", "Heebo", system-ui, -apple-system, sans-serif;

  --maxw: 1180px;
  --maxw-narrow: 760px;
  --radius: 4px;
}

[data-palette="ember"] {
  /* dark, dramatic — like the book cover itself */
  --bg: #1A0F0A;
  --bg-alt: #241510;
  --paper: #2A1A12;
  --ink: #F4E9D2;
  --ink-soft: #D4BFA0;
  --ink-muted: #8E7860;
  --line: rgba(244, 233, 210, 0.14);
  --line-soft: rgba(244, 233, 210, 0.07);
  --accent: #E6A436;
  --accent-deep: #C77D1E;
  --accent-warm: #F5C842;
  --accent-soft: rgba(230, 164, 54, 0.12);
}

[data-palette="dawn"] {
  /* soft, hopeful — pale pink-cream and golden */
  --bg: #F7EFE3;
  --bg-alt: #F0E4D0;
  --paper: #FCF7EC;
  --ink: #2B1F18;
  --ink-soft: #5A4538;
  --ink-muted: #927B65;
  --line: rgba(43, 31, 24, 0.12);
  --line-soft: rgba(43, 31, 24, 0.06);
  --accent: #B85A2E;
  --accent-deep: #803516;
  --accent-warm: #D89642;
  --accent-soft: rgba(184, 90, 46, 0.10);
}

[data-palette="ink"] {
  /* quiet, classical — black ink on cream */
  --bg: #F4EFE4;
  --bg-alt: #EBE5D6;
  --paper: #FAF5EA;
  --ink: #161210;
  --ink-soft: #3A332D;
  --ink-muted: #7A7066;
  --line: rgba(22, 18, 16, 0.14);
  --line-soft: rgba(22, 18, 16, 0.07);
  --accent: #1A1410;
  --accent-deep: #000000;
  --accent-warm: #C84A1F;
  --accent-soft: rgba(26, 20, 16, 0.08);
}

[data-typography="modern"] {
  --font-display: "Rubik", "Heebo", system-ui, sans-serif;
  --font-body: "Rubik", "Heebo", system-ui, sans-serif;
}

[data-typography="serif"] {
  --font-display: "Frank Ruhl Libre", "David Libre", Georgia, serif;
  --font-body: "Heebo", system-ui, sans-serif;
}

[data-typography="editorial"] {
  --font-display: "Suez One", "Frank Ruhl Libre", serif;
  --font-body: "Heebo", system-ui, sans-serif;
}

[data-typography="clean"] {
  --font-display: "Assistant", "Heebo", system-ui, sans-serif;
  --font-body: "Assistant", "Heebo", system-ui, sans-serif;
}

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.wrap-narrow {
  width: 100%;
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

section { position: relative; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
p { margin: 0; text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.nav-brand .name { font-size: 20px; }
.nav-brand .by {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.18em;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-size: 16px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  font-size: 15px;
  font-weight: 500;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  font-family: var(--font-body);
}
[data-palette="ink"] .nav-cta { background: var(--ink); }
.nav-cta:hover { background: var(--accent-deep); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* soft warm sun glow behind the title side */
  content: "";
  position: absolute;
  top: -200px;
  inset-inline-start: -150px;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-warm) 28%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-grid[data-layout="centered"] {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 64px;
}
.hero-grid[data-layout="centered"] .hero-eyebrow,
.hero-grid[data-layout="centered"] .hero-ctas,
.hero-grid[data-layout="centered"] .hero-meta {
  justify-content: center;
}
.hero-grid[data-layout="centered"] .hero-cover-wrap { justify-self: center; }
.hero-grid[data-layout="centered"] .hero-sub { margin-inline: auto; }
.hero-grid[data-layout="centered"] .hero-text { order: 1; }
.hero-grid[data-layout="centered"] .hero-cover-wrap { order: 2; }

.hero-eyebrow { display: inline-flex; }

.hero-title {
  font-size: clamp(56px, 8.5vw, 124px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 26px 0 28px;
}
.hero-title .ln { display: block; }
.hero-title .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 560px;
  font-weight: 400;
}

.hero-meta {
  margin-top: 36px;
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-muted); }

.hero-ctas {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--accent);
}
[data-palette="ink"] .btn-primary { background: var(--ink); box-shadow: 0 8px 24px -10px rgba(0,0,0,0.4); }
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px var(--accent-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn .arrow {
  font-size: 17px;
  line-height: 1;
  transition: transform .2s;
}
.btn:hover .arrow { transform: translateX(-4px); }

/* ---------- Book cover (using real image) ---------- */
.hero-cover-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1600px;
}
.book-img {
  display: block;
  max-width: 100%;
  width: 440px;
  height: auto;
  filter: drop-shadow(0 40px 50px rgba(80, 30, 10, 0.30))
          drop-shadow(0 14px 20px rgba(80, 30, 10, 0.20));
  transform: rotate(-3deg) rotateY(-6deg);
  transform-origin: center center;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .5s;
  will-change: transform;
}
.hero-cover-wrap:hover .book-img {
  transform: rotate(0deg) rotateY(2deg) translateY(-8px) scale(1.03);
  filter: drop-shadow(0 50px 60px rgba(80, 30, 10, 0.35))
          drop-shadow(0 18px 24px rgba(80, 30, 10, 0.25));
}
.book-mark {
  position: absolute;
  top: 24px;
  inset-inline-end: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  border-radius: 2px;
  transform: rotate(3deg);
  z-index: 2;
  box-shadow: 0 6px 16px -8px rgba(80, 30, 10, 0.25);
}

/* ---------- Section base ---------- */
.section {
  padding: 110px 0;
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 56px;
}
.section-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.22em;
}
.section-title {
  font-size: clamp(36px, 4.8vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.section-title .accent { color: var(--accent); }
.section-title em { font-style: normal; font-weight: 500; color: var(--ink-soft); }

/* ---------- Opening dialog / quote ---------- */
.opening-quote {
  background: var(--bg-alt);
  padding: 90px 0;
  position: relative;
  border-top: 1px solid var(--line-soft);
}
.opening-quote .dialog {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-display);
}
.opening-quote .line {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
  text-wrap: pretty;
}
.opening-quote .line.q { color: var(--accent); font-weight: 500; }
.opening-quote .line em { color: var(--accent); font-style: normal; font-weight: 500; }
.opening-quote .line.a { padding-inline-start: 32px; }
.opening-quote .source {
  margin-top: 32px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
}

/* ---------- About the book ---------- */
.book-section .lead {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 32px;
  text-wrap: balance;
}
.book-section .body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.book-section .body p { margin-bottom: 1.4em; }
.book-section .body p:last-child { margin-bottom: 0; }
.book-section .body strong { color: var(--ink); font-weight: 600; }

.book-aside {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
  position: sticky;
  top: 100px;
}
.book-aside h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 18px;
}
.book-aside dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 20px;
  font-size: 14px;
}
.book-aside dt {
  color: var(--ink-muted);
  font-weight: 400;
}
.book-aside dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}
.book-aside .buy {
  margin-top: 24px;
  width: 100%;
  justify-content: center;
}
.book-aside .buy-note {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.02em;
}

.book-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  align-items: start;
}

/* ---------- Author section ---------- */
.author-section {
  background: var(--bg-alt);
}
.author-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  align-items: start;
}
.author-portrait {
  position: sticky;
  top: 100px;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 20px 40px -24px rgba(80, 30, 10, 0.25);
}
.author-portrait .portrait-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 30%;
  display: block;
}
.author-portrait .caption {
  position: absolute;
  bottom: 14px;
  inset-inline-end: 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  z-index: 2;
  padding: 6px 12px;
  background: rgba(20, 12, 8, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.author-body {
  font-size: 18px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.author-body p { margin-bottom: 1.4em; }
.author-body p:last-child { margin-bottom: 0; }
.author-body p:first-of-type:first-letter {
  font-family: var(--font-display);
  font-size: 4.4em;
  float: right;
  line-height: 0.88;
  margin-inline-start: 12px;
  margin-block-start: 8px;
  color: var(--accent);
  font-weight: 700;
}
.author-body strong { color: var(--ink); font-weight: 600; }

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.3;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 36px 40px;
  margin: 48px 0;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  text-wrap: balance;
  letter-spacing: -0.015em;
}
.pull-quote em { color: var(--accent); font-style: normal; font-weight: 600; }

.author-credentials {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cred {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
}

/* ---------- Lecture section ---------- */
.lecture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.lecture-desc {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.lecture-desc .lead {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 28px;
  text-wrap: balance;
}
.lecture-themes {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.theme-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.theme-num {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.theme-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.theme-text span {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.audience-block {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.audience-block h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 18px;
}
.audience-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.audience-list span {
  font-size: 13px;
  padding: 7px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* Lecture CTA banner */
.lecture-cta {
  margin-top: 56px;
  padding: 36px 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: 0 20px 40px -28px rgba(80, 30, 10, 0.25);
}
.lecture-cta-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
}
.lecture-cta-text strong {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.lecture-cta-text span {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.lecture-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ---------- Endorsements ---------- */
.endorsements {
  background: var(--bg-alt);
}
.endorsements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 880px;
  margin: 0 auto;
}
.endorsement {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px 28px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.endorsement .mark {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.6;
  color: var(--accent);
  margin-bottom: 8px;
}
.endorsement blockquote {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
  text-wrap: pretty;
}
.endorsement cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: block;
}
.endorsement cite span {
  display: block;
  font-weight: 400;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Mobile peek carousel — hidden on desktop */
.endorsements-carousel { display: none; }
.carousel-viewport {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  touch-action: pan-y;
}
.carousel-slide {
  grid-column: 1;
  grid-row: 1;
  width: 78%;
  max-width: 340px;
  box-sizing: border-box;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s;
  cursor: pointer;
  transform-origin: center center;
}
.carousel-slide.is-active { cursor: default; }
.carousel-slide .endorsement {
  height: auto;
  box-shadow: 0 16px 36px -22px rgba(80, 30, 10, 0.3);
}
.carousel-slide:not(.is-active) .endorsement {
  box-shadow: none;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: var(--line);
  cursor: pointer;
  padding: 0;
  transition: all .25s;
}
.carousel-dot.is-active {
  background: var(--accent);
  width: 24px;
}

/* ---------- Contact section ---------- */
.contact-section {
  padding: 140px 0 120px;
  text-align: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.contact-section::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent-warm) 22%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.contact-section > .wrap { position: relative; z-index: 1; }
.contact-section .pre {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 26px);
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 400;
}
.contact-section .title {
  font-size: clamp(48px, 6.5vw, 92px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.94;
}
.contact-section .title .accent { color: var(--accent); }
.contact-card {
  margin: 64px auto 0;
  max-width: 620px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 44px;
  border-radius: var(--radius);
  text-align: start;
  box-shadow: 0 30px 60px -30px rgba(80, 30, 10, 0.25);
}
.contact-name {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.contact-role {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.contact-row .lbl {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  font-weight: 600;
  min-width: 72px;
}
.contact-row a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.01em;
  transition: color .2s;
}
.contact-row a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  padding: 22px 0 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-credit {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.footer .marks {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  font-weight: 600;
}
.footer-copy {
  display: inline;
  margin: 0;
}
.footer-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
}
.footer-link {
  background: none;
  border: none;
  padding: 2px 0;
  font: inherit;
  color: var(--ink-muted);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color .15s ease;
}
.footer-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-sep { color: var(--ink-muted); opacity: 0.4; }
@media (max-width: 520px) {
  .footer { padding: 18px 0 16px; }
  .footer .marks { font-size: 14px; margin-bottom: 4px; }
  .footer-row { font-size: 11.5px; gap: 6px; }
  .footer-wrap { justify-content: center; gap: 8px; text-align: center; }
  .footer-credit { font-size: 11.5px; }
}

/* ---------- Checkout Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, var(--ink) 60%, transparent);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-fade .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-card {
  background: var(--paper);
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 48px);
  border-radius: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.4),
              0 12px 30px -10px rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  animation: modal-pop .35s cubic-bezier(.2,.9,.3,1);
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-muted) transparent;
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}
.modal-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 4px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---------- Purchase choice modal ---------- */
.choice-card {
  max-width: 540px;
}
.choice-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.choice-opt {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: right;
  padding: 20px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color .2s, background .2s, transform .2s;
}
.choice-opt:hover {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, var(--paper));
  transform: translateY(-1px);
}
.choice-opt-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--accent);
}
.choice-opt:hover .choice-opt-icon {
  border-color: var(--accent);
}
.choice-opt-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.choice-opt-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.choice-opt-desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.choice-opt-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.choice-opt-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.choice-opt-arrow {
  font-size: 20px;
  color: var(--accent);
  transition: transform .2s;
}
.choice-opt:hover .choice-opt-arrow {
  transform: translateX(-4px);
}
@media (max-width: 600px) {
  .choice-opt { padding: 16px 16px; gap: 13px; }
  .choice-opt-icon { width: 46px; height: 46px; }
  .choice-opt-title { font-size: 16px; }
  .choice-opt-desc { font-size: 12px; }
}

.modal-body {
  padding: 24px 28px 28px;
}

/* Two-column checkout layout */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 36px;
  align-items: start;
}
.checkout-form-col { min-width: 0; }
.checkout-summary-col {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  position: sticky;
  top: 88px;
}
.order-summary-card {
  margin-bottom: 18px !important;
  background: var(--paper) !important;
  grid-template-columns: 60px 1fr !important;
  padding: 12px !important;
  gap: 12px !important;
}
.order-summary-card .order-thumb { width: 60px; }
.order-summary-card .order-info strong { font-size: 15px; margin-bottom: 2px; }
.order-summary-card .order-info > span { font-size: 11px; margin-bottom: 0; }

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

.checkout-summary-col .total-block { margin-bottom: 16px; }
.checkout-summary-col .total-row {
  font-size: 13px;
  padding: 5px 4px;
}
.checkout-summary-col .total-row.grand {
  font-size: 20px;
  padding-top: 10px;
}

/* Compact payment options for horizontal row */
.pay-options-row {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pay-option-compact {
  grid-template-columns: 1fr !important;
  text-align: center;
  padding: 14px 10px !important;
  gap: 8px !important;
  justify-items: center;
}
.pay-option-compact .pay-glyph { margin: 0 auto; }
.pay-option-compact .pay-text strong {
  font-size: 13px;
  margin-bottom: 0;
}
.pay-desc {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Order summary */
.order-summary {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 28px;
  align-items: center;
}
.order-thumb {
  width: 72px;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(80,30,10,0.2));
}
.order-info strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.order-info > span {
  font-size: 12px;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 12px;
}
.order-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.order-price-row .price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.order-price-row .price small {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted);
}

/* Quantity stepper */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
}
.qty-stepper button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s;
}
.qty-stepper button:hover { background: var(--bg-alt); }
.qty-stepper .qty-val {
  min-width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
}

/* Form section */
.form-section { margin-bottom: 24px; }
.form-section-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin: 0 0 14px;
}

/* Form fields */
.form-row { margin-bottom: 12px; }
.form-row:last-child { margin-bottom: 0; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-field { display: block; }
.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.form-error {
  color: var(--accent);
  font-weight: 600;
  margin-inline-start: 4px;
  letter-spacing: 0.02em;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  transition: all .15s;
  font-feature-settings: "tnum" 1;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input.has-error {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 5%, var(--paper));
}
.form-textarea {
  resize: vertical;
  min-height: 60px;
}

/* Payment options */
.pay-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pay-option {
  display: grid;
  grid-template-columns: 32px 1fr 20px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
}
.pay-option:hover {
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line));
  background: var(--paper);
}
.pay-option.active {
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.pay-option input { display: none; }
.pay-glyph {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
.pay-option.active .pay-glyph {
  background: var(--accent);
  color: #fff;
}
.pay-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.pay-text span {
  font-size: 12px;
  color: var(--ink-muted);
  display: block;
}
.pay-check {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  transition: all .2s;
}
.pay-option.active .pay-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Footer */
.modal-footer {
  padding: 20px 28px 24px;
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-alt) 60%, var(--paper));
}
.total-block { margin-bottom: 16px; }
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 6px 0;
}
.total-row .free { color: var(--accent); font-weight: 600; }
.total-row.grand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}
.btn-block {
  width: 100%;
  justify-content: center;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
}
.modal-disclaimer {
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.5;
  text-align: center;
}
.modal-disclaimer a { color: var(--accent); text-decoration: none; }
.modal-disclaimer a:hover { text-decoration: underline; }

.spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.success-state {
  padding: 48px 28px 32px;
  text-align: center;
}
.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop-in .5s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 16px;
}
.success-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.success-text strong { color: var(--ink); font-weight: 600; }
.success-card {
  text-align: start;
  padding: 20px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 24px;
}
.success-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.success-row:last-child { border-bottom: 0; }
.success-row .lbl {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--ink-muted);
}
.success-row strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
}

@media (max-width: 760px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .checkout-summary-col {
    position: static;
    order: 2;
  }
  .checkout-form-col { order: 1; }
  .modal-card { max-width: 560px; }
}

@media (max-width: 600px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card {
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
  }
  .modal-head { padding: 20px 22px; }
  .modal-body { padding: 20px 22px 4px; }
  .modal-footer { padding: 18px 22px 22px; }
  .form-row-2 { grid-template-columns: 1fr; gap: 12px; }
  .success-state { padding: 40px 22px 24px; }
  .order-summary { grid-template-columns: 60px 1fr; padding: 14px; }
  .order-thumb { width: 60px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .endorsements-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .hero { padding: 56px 0 80px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .hero-grid:not([data-layout="centered"]) .hero-text { order: 1; }
  .hero-grid:not([data-layout="centered"]) .hero-cover-wrap { order: 2; }
  .book-img { width: 280px; }
  .section { padding: 80px 0; }
  .section-head {
    gap: 10px;
    margin-bottom: 40px;
  }
  .book-grid { grid-template-columns: 1fr; gap: 48px; }
  .book-aside { position: relative; top: auto; }
  .author-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .author-portrait {
    position: relative;
    top: auto;
    max-width: 320px;
  }
  .lecture-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .endorsements-grid { display: none; }
  .endorsements-carousel {
    display: block;
    overflow: hidden;
    margin: 0 -20px;
    padding: 0 10px;
  }
  .nav-links { display: none; }
  .opening-quote .line.a { padding-inline-start: 16px; }
}

@media (max-width: 600px) {
  .wrap, .wrap-narrow, .nav-inner { padding: 0 20px; }
  .nav-brand .by { display: none; }
  .nav-brand .name { font-size: 16px; }
  .nav-cta { padding: 8px 14px; font-size: 12px; }
  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 28px;
  }
  .hero-grid[data-layout="centered"] .hero-meta { align-items: center; }
  .hero-meta .dot { display: none; }
  .hero-meta .credit + .dot + .credit::before,
  .hero-meta .credit ~ .credit::before { content: none; }
  .hero-meta .credit:not(:first-child)::before {
    content: "· ";
    color: var(--accent);
  }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .lecture-cta { padding: 28px 24px; }
  .lecture-cta-actions { width: 100%; }
  .lecture-cta-actions .btn { flex: 1; justify-content: center; }
  .contact-card { padding: 28px 22px; }
  .contact-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 0;
  }
  .contact-row .lbl {
    min-width: 0;
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
  .contact-row a {
    font-size: 17px;
    word-break: break-all;
    overflow-wrap: anywhere;
  }
  .author-body p:first-of-type:first-letter { font-size: 3.2em; }
  .pull-quote { padding: 28px 20px; }
}


/* ---------- Cookie bar (full-width bottom bar) ---------- */
.cookie-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 80;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transform: translateY(110%);
  opacity: 0;
  transition: transform .42s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
  pointer-events: none;
  box-shadow: 0 -12px 40px -20px rgba(0,0,0,0.5);
}
.cookie-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.cookie-bar-main {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  min-height: 50px;
  padding: 6px 0;
}
.cookie-bar-text {
  flex: 1 1 360px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
  letter-spacing: 0;
}
.cookie-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 6px 16px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.cookie-btn-primary {
  background: #2a2a2e;
  color: #ffffff;
}
.cookie-btn-primary:hover {
  background: #0F0F11;
}
.cookie-btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.28);
}
.cookie-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

/* expandable policy area */
.cookie-bar-policy {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .42s cubic-bezier(.22,.61,.36,1);
}
.cookie-bar.is-expanded .cookie-bar-policy {
  grid-template-rows: 1fr;
}
.cookie-bar-policy > * {
  min-height: 0;
  overflow: hidden;
}
.cookie-bar-policy-inner {
  padding: 16px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  max-height: min(46vh, 380px);
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}
.cookie-bar-policy-inner::-webkit-scrollbar { width: 6px; }
.cookie-bar-policy-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }
.cookie-policy-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
}
.cookie-bar-policy-inner p {
  margin: 0 0 10px;
  max-width: 760px;
}
.cookie-bar-policy-inner p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .cookie-bar-inner { padding: 0 18px; }
  .cookie-bar-main { padding: 12px 0; gap: 12px; }
  .cookie-bar-text { font-size: 13px; flex-basis: 100%; }
  .cookie-bar-actions { width: 100%; }
  .cookie-btn { flex: 1; padding: 10px 14px; text-align: center; }
  .cookie-bar-policy-inner { font-size: 13px; max-height: 40vh; }
}

/* ---------- Cookie bar — inline policy link ---------- */
.cookie-policy-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #949494;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color .15s ease;
}
.cookie-policy-link:hover { color: #ffffff; }

/* ---------- Legal Modal (Terms / Privacy) ---------- */
.legal-overlay { z-index: 250; } /* above checkout */

.legal-card {
  max-width: 760px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.legal-head {
  position: relative;
  padding-bottom: 0;
}
.legal-tabs {
  display: flex;
  gap: 4px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 1;
}
.legal-tab {
  background: none;
  border: none;
  padding: 14px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  position: relative;
  letter-spacing: 0.02em;
  transition: color .15s ease;
}
.legal-tab:hover { color: var(--ink); }
.legal-tab.is-active { color: var(--ink); font-weight: 600; }
.legal-tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--accent, #C84A1F);
  border-radius: 2px;
}

.legal-body {
  overflow-y: auto;
  padding: 26px 32px 32px;
  flex: 1 1 auto;
}
.legal-body::-webkit-scrollbar { width: 8px; }
.legal-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.legal-prose {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink);
  max-width: 64ch;
  margin: 0 auto;
}
.legal-prose .legal-lead {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink);
  padding: 16px 18px;
  background: var(--bg-alt);
  border-inline-start: 3px solid var(--accent, #C84A1F);
  border-radius: 4px;
  margin: 0 0 24px;
}
.legal-prose h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 26px 0 10px;
  letter-spacing: -0.01em;
}
.legal-prose h4:first-of-type { margin-top: 8px; }
.legal-prose p {
  margin: 0 0 10px;
}
.legal-prose ul {
  margin: 0 0 14px;
  padding-inline-start: 22px;
}
.legal-prose ul li { margin-bottom: 6px; }
.legal-prose a {
  color: var(--accent, #C84A1F);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal-prose a:hover { opacity: 0.8; }
.legal-prose strong { font-weight: 700; color: var(--ink); }

.legal-updated {
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .legal-tabs { padding: 0 18px; }
  .legal-tab { padding: 12px 12px; font-size: 13px; }
  .legal-body { padding: 20px 20px 28px; }
  .legal-prose { font-size: 14px; }
  .legal-prose .legal-lead { padding: 14px; font-size: 14.5px; }
  .legal-prose h4 { font-size: 16px; }
}

/* ---------- Consent checkbox (checkout) ---------- */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.consent-row:hover { border-color: var(--ink-muted); }
.consent-row.has-error {
  border-color: #c84a1f;
  background: color-mix(in oklab, #c84a1f 6%, var(--bg-alt));
}
.consent-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent, #C84A1F);
  cursor: pointer;
}
.consent-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}
.consent-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent, #C84A1F);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  font-weight: 500;
}
.consent-link:hover { opacity: 0.8; }
.consent-error {
  margin: 8px 4px 0;
  font-size: 12px;
  color: #c84a1f;
  font-weight: 500;
}

/* ---------- Purchase Toast ---------- */
.purchase-toast {
  position: fixed;
  bottom: 32px;
  right: 50%;
  transform: translateX(50%);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--ink);
  color: var(--bg);
  padding: 18px 20px 18px 24px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  max-width: 420px;
  width: calc(100vw - 32px);
  animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(50%) translateY(0); }
}
.purchase-toast-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  margin-top: 1px;
}
.purchase-toast-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.purchase-toast-text strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--bg);
}
.purchase-toast-text span {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.purchase-toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-top: -2px;
}
.purchase-toast-close:hover { color: #fff; }

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  inset-inline-start: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  z-index: 10001;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 0;
  white-space: nowrap;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent-warm);
  outline-offset: 2px;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
