/* ==========================================================================
   Taming the Machine — tamingthemachine.com
   Faithful rebuild of the 2024 plus380.studio design, gently modernized.
   Light, airy, illustration-forward. Curved section dividers, wave motifs.
   Palette: navy #000131 · ice #F6FAFC · mist #E1EDF5 · sky #A9CAE1
            teal #76CED8 · orange #FE5D26 · peach #FFBC7D
   Type: Roboto Slab (headings) · Roboto (body)
   ========================================================================== */

:root {
  --navy: #000131;
  --ice: #f6fafc;
  --mist: #e1edf5;
  --mist-deep: #d9e7f2;
  --sky: #a9cae1;
  --teal: #76ced8;
  --orange: #fe5d26;
  --orange-dark: #e04a15;
  --peach: #ffbc7d;
  --text: #23244a;
  --text-muted: #565975;
  --white: #ffffff;

  --font-display: "Roboto Slab", Georgia, serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;

  --radius: 8px;
  --radius-card: 14px;
  --shadow-sm: 0 2px 10px rgba(0, 1, 49, 0.07);
  --shadow-md: 0 10px 34px rgba(0, 1, 49, 0.12);
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--navy);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; color: var(--white); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }

p { margin: 0 0 1.1em; }

a { color: var(--orange-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: clamp(48px, 7vw, 96px) 0; position: relative; }
/* Decorative pseudo-elements may poke past the viewport; never let them scroll the page */
body { overflow-x: clip; }
.section--mist { background: var(--mist); }
.section--ice { background: var(--ice); }

/* Curved section dividers, as on the original */
.swoosh { display: block; width: 100%; height: 70px; margin: -1px 0; }
.swoosh--sm { height: 44px; }

/* Animated squiggle divider — the cover's tangle-into-calm-wave motif.
   Draws itself when scrolled into view. */
.squiggle {
  display: block;
  width: min(720px, 88%);
  height: 64px;
  margin: 0 auto;
  overflow: visible;
}
.squiggle path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 3200;
  stroke-dashoffset: 3200;
}
.squiggle.visible path {
  animation: draw 4.5s var(--ease) 0.2s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .squiggle path { stroke-dashoffset: 0; }
  .squiggle.visible path { animation: none; }
}

/* Wave squiggle decoration (original waves motif) */
.waves-deco::before,
.waves-deco--right::after {
  content: "";
  position: absolute;
  width: min(360px, 28vw);
  height: 130px;
  background: url("/assets/img/waves.webp") center / contain no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.waves-deco::before { left: -60px; top: 42%; }
.waves-deco--right::after { right: -60px; top: 12%; left: auto; }
@media (max-width: 900px) {
  .waves-deco::before, .waves-deco--right::after { display: none; }
}

/* --------------------------------------------------------------------------
   Announcement bar
   -------------------------------------------------------------------------- */
.announce {
  background: var(--mist);
  text-align: center;
  font-size: 0.85rem;
  color: var(--navy);
  padding: 8px 16px;
}
.announce a { color: var(--orange-dark); text-decoration: underline; }
.announce .sep { margin: 0 14px; color: var(--sky); }
/* On small screens the two accolades take turns instead of stacking */
@media (max-width: 640px) {
  .announce { position: relative; min-height: 3em; display: flex; align-items: center; }
  .announce .sep { display: none; }
  .announce__item {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 16px;
    opacity: 0;
    animation: announce-swap 9s infinite;
  }
  .announce__item + .sep + .announce__item,
  .announce__item:last-child { animation-delay: -4.5s; }
  @keyframes announce-swap {
    0%, 42% { opacity: 1; }
    50%, 92% { opacity: 0; }
    100% { opacity: 1; }
  }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .announce { display: block; min-height: 0; }
  .announce__item { position: static; transform: none; opacity: 1; animation: none; display: block; }
}

/* --------------------------------------------------------------------------
   Header / Nav — white, like the original
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Solid background: backdrop-filter on a sticky element causes scroll jank */
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 1, 49, 0.07);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
}

.nav__logo img { height: 42px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--orange-dark); }

.nav__cta {
  background: var(--orange);
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.nav__cta:hover { background: var(--orange-dark); transform: translateY(-1px); }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }
  .nav__links.open { max-height: 420px; }
  .nav__links li { width: 100%; text-align: center; }
  .nav__links a { display: block; padding: 15px; }
  .nav__links .nav__cta { margin: 10px auto 18px; display: inline-block; padding: 10px 30px; }
  body.nav-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav__toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --------------------------------------------------------------------------
   Hero — the illustration IS the hero, as on the original
   -------------------------------------------------------------------------- */
.hero-illustration {
  position: relative;
  overflow: hidden;
  min-height: min(64vh, 640px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-illustration > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-illustration::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,1,49,0) 45%, rgba(20, 12, 5, 0.55) 82%);
}
.hero-illustration__text {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 24px clamp(36px, 6vw, 64px);
  max-width: 60em;
}
.hero-illustration__text h1 {
  color: var(--white);
  font-size: clamp(1.7rem, 3.8vw, 2.7rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  margin-bottom: 0.4em;
}
.hero-illustration__text p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
  margin: 0;
}
@media (max-width: 700px) {
  /* Let lines wrap naturally on small screens */
  .hero-illustration__text h1 br,
  .hero-illustration__text p br { display: none; }
  .hero-illustration__text h1 { font-size: 1.5rem; }
}

/* Hero trailer play button — a glass pill so the label reads over busy art */
.hero-play {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(0, 1, 49, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 9px 26px 9px 10px;
  cursor: pointer;
  color: var(--white);
  font: 600 0.98rem var(--font-body);
  letter-spacing: 0.01em;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 20px;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.hero-play:hover { background: rgba(0, 1, 49, 0.75); border-color: rgba(255, 255, 255, 0.5); transform: translateY(-1px); }
.hero-play .ring {
  position: relative;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease), background 0.2s;
}
.hero-play .ring::before {
  content: "";
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
.hero-play .ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  animation: pulse 2.4s ease-out infinite;
}
.hero-play:hover .ring { transform: scale(1.08); background: var(--orange-dark); }
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-play .ring::after { animation: none; opacity: 0; }
}
.hero-illustration iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 5;
}

/* Chip / pill badges (Safer Agentic AI style) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.chip--orange { background: var(--orange); border-color: var(--orange); color: var(--white); }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* --------------------------------------------------------------------------
   Page hero (interior pages) — light blue, like the original
   -------------------------------------------------------------------------- */
.page-hero {
  background: var(--mist);
  position: relative;
  overflow: hidden;
}
.page-hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.page-hero--plain .container { grid-template-columns: 1fr; }
.page-hero h1 { margin-bottom: 0.4em; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 40em; margin-bottom: 0; }
.page-hero__img { display: flex; justify-content: center; }
.page-hero__img img { max-height: 420px; width: auto; }
@media (max-width: 820px) {
  .page-hero .container { grid-template-columns: 1fr; text-align: center; }
  .page-hero p { margin-inline: auto; }
  .page-hero__img { order: -1; }
  .page-hero__img img { max-height: 260px; }
}

/* --------------------------------------------------------------------------
   Buttons — orange rounded rectangles, as on the original
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.98rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: 0;
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn--primary { background: var(--orange); color: var(--white); }
.btn--primary:hover { background: var(--orange-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(254, 93, 38, 0.35); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: #1a1b55; color: var(--white); transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   Scroll reveal (kept subtle)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   Split layouts
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.split--center { align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--rev > :first-child { order: 0; }
}

.book-figure { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.book-figure img {
  width: min(300px, 78%);
  filter: drop-shadow(0 18px 30px rgba(0, 1, 49, 0.25));
  transition: transform 0.5s var(--ease);
}
.book-figure:hover img { transform: translateY(-6px); }

/* Text link that jumps up to the hero trailer */
.trailer-link a { font-weight: 700; }

/* --------------------------------------------------------------------------
   Retailer cards — small white squares, as on the original
   -------------------------------------------------------------------------- */
.retailers {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}
.retailers a {
  background: var(--white);
  border-radius: var(--radius);
  width: 72px;
  height: 72px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.retailers a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.retailers img { max-height: 44px; max-width: 52px; width: auto; }

.order-line { text-align: center; font-weight: 500; color: var(--navy); margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   Carousel (What's inside slides)
   -------------------------------------------------------------------------- */
.carousel { position: relative; }

.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 24px;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__slide {
  flex: 0 0 min(820px, 94%);
  scroll-snap-align: center;
  margin-inline: auto;
}
.carousel__slide img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}

/* Inside-the-book slides: real text over full-bleed animation stills,
   dimmed by a translucent navy wash (like the original slides) */
.islide {
  position: relative;
  display: block;
  background: var(--navy) center / cover no-repeat;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  color: var(--white);
  min-height: 480px;
}
.islide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(10, 11, 40, 0.94) 0%,
    rgba(10, 11, 40, 0.88) 48%,
    rgba(10, 11, 40, 0.35) 100%);
}
.islide__kw {
  position: absolute;
  top: 22px; right: 30px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  z-index: 2;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
.islide__text {
  position: relative;
  padding: clamp(24px, 3.5vw, 44px);
  /* Top padding clears the absolutely-positioned category keyword */
  padding-top: clamp(60px, 9vw, 96px);
  max-width: 66%;
  z-index: 2;
}
.islide__text h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 2px;
}
.islide__text p {
  color: var(--sky);
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0 0 14px;
}
.islide__text p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .islide__text { max-width: none; }
  .islide::before { background: rgba(10, 11, 40, 0.9); }
  .islide__kw { top: 14px; right: 18px; }
}

.carousel__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.carousel__btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--sky);
  background: var(--white);
  color: var(--navy);
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.carousel__btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.carousel__dots { display: flex; gap: 8px; }
.carousel__dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--sky);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.carousel__dots button[aria-current="true"] { background: var(--orange); transform: scale(1.25); }

/* --------------------------------------------------------------------------
   Testimonials — white card, illustrated portrait, orange ring
   -------------------------------------------------------------------------- */
.praise-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  margin-bottom: 34px;
  font-size: 0.95rem;
  color: var(--navy);
}
.praise-badges strong { color: var(--navy); }

.t-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 5vw, 56px);
  /* Stable height so the card doesn't jump between short and long quotes */
  min-height: 330px;
  display: grid;
  align-items: center;
  touch-action: pan-y;
}
.t-slide {
  display: none;
  grid-template-columns: 170px 1fr;
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
}
.t-slide.active { display: grid; }
/* Portraits carry their own dashed orange ring from the original artwork */
.t-slide__portrait {
  width: 195px; height: 195px;
  justify-self: center;
}
.t-slide__portrait img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 0.35s var(--ease);
}
.t-slide__portrait:hover img { transform: scale(1.12); }
.t-slide blockquote {
  margin: 0 0 14px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text);
}
.t-slide cite { font-style: normal; font-weight: 700; color: var(--navy); display: block; }
.t-slide cite span { display: block; color: var(--orange-dark); font-style: italic; font-weight: 400; font-size: 0.92rem; }
@media (max-width: 640px) {
  .t-slide { grid-template-columns: 1fr; text-align: center; }
  .t-slide cite span { margin-inline: auto; }
}

/* --------------------------------------------------------------------------
   Press wall
   -------------------------------------------------------------------------- */
.press-label { font-weight: 500; color: var(--navy); margin-bottom: 16px; }
.press-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 4 neat rows of 6, as on the original */
  gap: 14px;
}
@media (max-width: 900px) { .press-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .press-grid { grid-template-columns: repeat(2, 1fr); } }
.press-grid a {
  background: var(--white);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.press-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.press-grid img { border-radius: 5px; width: 100%; object-fit: contain; }

/* --------------------------------------------------------------------------
   Video playlist — main player + title list, as on the original
   -------------------------------------------------------------------------- */
.playlist {
  display: grid;
  grid-template-columns: 1.75fr 1fr;
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.playlist__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  max-height: 480px;
  border-left: 1px solid var(--mist);
}
.playlist__list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--mist);
  padding: 14px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.playlist__list button:hover { background: var(--ice); }
.playlist__list button[aria-current="true"] { background: var(--orange); color: var(--white); }
@media (max-width: 820px) {
  .playlist { grid-template-columns: 1fr; }
  .playlist__list { max-height: 260px; border-left: 0; border-top: 1px solid var(--mist); }
}

/* Lite YouTube embed */
.lite-yt {
  position: relative;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  background: #000 center / cover no-repeat;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
}
.lite-yt--rounded { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-md); }
.lite-yt .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 62px; height: 62px;
  background: rgba(254, 93, 38, 0.92);
  border-radius: 50%;
  z-index: 2;
  transition: transform 0.25s var(--ease), background 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.lite-yt:hover .play { transform: translate(-50%, -50%) scale(1.1); background: var(--orange); }
.lite-yt .play::before {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
.lite-yt .vtitle {
  position: absolute;
  left: 14px; right: 14px; bottom: 10px;
  z-index: 2;
  color: var(--white);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: left;
  font-family: var(--font-body);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.lite-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

/* --------------------------------------------------------------------------
   About Nell strip
   -------------------------------------------------------------------------- */
.author-figure img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  width: min(340px, 100%);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Order section — book stack with arc text, as on the original
   -------------------------------------------------------------------------- */
.order-stack { position: relative; padding-top: 40px; }
.order-stack .arc {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(430px, 100%);
  overflow: visible;
}
.order-stack .arc text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 19px;
  fill: var(--orange);
}
.order-stack img {
  width: min(330px, 82%);
  margin-inline: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 1, 49, 0.3));
}

/* --------------------------------------------------------------------------
   Forms (subscribe / contact)
   -------------------------------------------------------------------------- */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field {
  flex: 1 1 220px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--sky);
  background: var(--white);
  font: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(118, 206, 216, 0.3); }
textarea.field { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; }

/* Subscribe band — light blue, split layout like the original */
.subscribe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.subscribe h2 { margin: 0; }
@media (max-width: 720px) { .subscribe { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Social buttons
   -------------------------------------------------------------------------- */
.socials { display: flex; gap: 14px; flex-wrap: wrap; }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.socials a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--orange-dark); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }

/* --------------------------------------------------------------------------
   Resource lists
   -------------------------------------------------------------------------- */
.resource-list { list-style: none; padding: 0; margin: 0; }
.resource-list li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.resource-list .ric {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--mist);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Long-form chapter
   -------------------------------------------------------------------------- */
.chapter-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.chapter-rail {
  position: sticky;
  top: 96px;
  text-align: center;
}
.chapter-rail img {
  width: min(240px, 100%);
  margin: 0 auto 18px;
  filter: drop-shadow(0 14px 24px rgba(0, 1, 49, 0.25));
}
@media (max-width: 900px) {
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-rail { position: static; order: -1; }
  .chapter-rail img { width: min(180px, 60%); }
}

.prose { max-width: 720px; }
.prose > h2 { text-align: center; }
.epigraph {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  max-width: 34em;
  margin: 0 auto 1.6em;
}
.prose h3 { margin-top: 2em; font-size: 1.05rem; font-weight: 700; }
.prose img { border-radius: var(--radius-card); box-shadow: var(--shadow-sm); margin: 1.6em 0; }
.prose ul li { margin-bottom: 0.7em; }

.callout {
  background: var(--mist);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin: 2em 0;
}
.callout h3 { margin-top: 0; }

.refs { font-size: 0.85rem; color: var(--text-muted); }
.refs p { margin-bottom: 0.7em; overflow-wrap: break-word; }

/* --------------------------------------------------------------------------
   Footer — navy with curved top, compact like the original
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: var(--sky);
  padding: 40px 0 26px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 36px;
  padding-bottom: 26px;
}
.footer-row .flogo img { height: 40px; width: auto; }
.footer-row ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.site-footer a { color: var(--sky); }
.site-footer a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(169, 202, 225, 0.2);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--sky);
}
.footer-bottom a { color: var(--sky); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Also by Nell Watson (cross-promo)
   -------------------------------------------------------------------------- */
.also-by {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  max-width: 900px;
  margin-inline: auto;
}
.also-by img {
  width: 190px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease);
}
.also-by:hover img { transform: translateY(-6px) rotate(-1.5deg); }
.also-by .kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .also-by { grid-template-columns: 1fr; text-align: center; }
  .also-by img { margin-inline: auto; }
}

/* Print: the free chapter reads like a book page */
@media print {
  .announce, .site-header, .site-footer, .swoosh, .squiggle,
  .chapter-rail, form, .section--mist, .waves-deco::before,
  .waves-deco--right::after, .page-hero__img { display: none !important; }
  body { background: #fff; }
  .page-hero { background: #fff; }
  .chapter-grid { grid-template-columns: 1fr; }
  a { color: inherit; text-decoration: none; }
}

/* Utility */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { margin-bottom: 0.3em; }
