/* Editora Elefante - Home
   Source: Figma "Home revisada" (desktop 1440, mobile 430).
   Every measure comes from the Figma frames, written in rem (1rem = 16px in the design). */

/* ---------- Fonts ----------
   The metric overrides pin each face to its hhea ascent/descent with no line gap, which is how
   Figma places text. Without them Windows uses the taller "win" metrics and every line of
   Louize sits about 0.14em lower than in the design. */
@font-face {
  font-family: "Louize";
  src: url("../fonts/louize-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  ascent-override: 73.2%;
  descent-override: 26.8%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Louize";
  src: url("../fonts/louize-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  ascent-override: 73.2%;
  descent-override: 26.8%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Aktiv Grotesk";
  src: url("../fonts/aktiv-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  ascent-override: 77.9%;
  descent-override: 22.1%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Aktiv Grotesk";
  src: url("../fonts/aktiv-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  ascent-override: 77.9%;
  descent-override: 22.1%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --c-black: #000;
  --c-white: #fff;
  --c-gray: #82848a;
  --c-red: #f00;
  --c-cyan: #0ff;
  --c-surface: #f5f5f5;
  --c-ink: #151e19;
  --c-neutral-950: #0a0a0a;
  --c-neutral-200: #e5e5e5;
  --c-neutral-300: #d4d4d4;
  --c-line: #e3e8e5;
  --c-footer: #010101;
  --c-event: #d1250d;

  --font-serif: "Louize", Georgia, "Times New Roman", serif;
  --font-sans: "Aktiv Grotesk", "Helvetica Neue", Arial, sans-serif;
  --tracking: -0.02em;
  --tracking-caps: 0.1em;

  --radius-xs: 0.125rem;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-full: 624.9375rem;

  --container: 81rem;
  --gutter: 1.5rem;
  --gutter-wide: 2rem;
  --section-y: 6rem;
  --indent: var(--gutter);

  --ease: 0.2s ease;
}

@media (min-width: 64em) {
  :root {
    --gutter: 2.5rem;
    --gutter-wide: 2.5rem;
    --section-y: 5rem;
    /* 170px at 1440 */
    --indent: clamp(var(--gutter), 11.8vw, 10.625rem);
  }
}

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

html {
  /* 16px up to 1440, then the whole layout scales with the viewport (capped at 22px). */
  font-size: clamp(100%, 1.1111vw, 137.5%);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-black);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: var(--tracking);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 0.125rem solid var(--c-red);
  outline-offset: 0.125rem;
}


.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Figma tracks text at -2% of its own size. A letter-spacing in em is inherited as a fixed
   length, so every text style that changes the font size has to state it again. */
.display,
.section-head__title,
.site-nav__link,
.book__title,
.book__price-now,
.book__price-old,
.about__title,
.about__text,
.thumb-card__label,
.media-card__title,
.media-card__text,
.event__title,
.event__meta li,
.newsletter__title,
.newsletter__note,
.site-footer__brand p,
.footer-nav__title,
.site-footer__legal {
  letter-spacing: var(--tracking);
}

/* Red 2px underline used by every hover and "current" state. */
.underline,
.underline-hover {
  text-decoration: underline 0.125rem transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--ease), color var(--ease);
}
.underline,
.underline-hover:hover {
  text-decoration-color: var(--c-red);
}

/* ---------- Icon ---------- */
.icon {
  display: inline-block;
  flex: none;
  width: var(--icon-size, 1rem);
  height: var(--icon-size, 1rem);
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon--arrow-right { --icon: url("../icons/arrow-right.svg"); }
.icon--arrow-left { --icon: url("../icons/arrow-left.svg"); }
.icon--plus { --icon: url("../icons/plus.svg"); }
.icon--close { --icon: url("../icons/close.svg"); }
.icon--menu { --icon: url("../icons/menu.svg"); }
.icon--bookmark { --icon: url("../icons/bookmark.svg"); }
.icon--play { --icon: url("../icons/play.svg"); }
.icon--play-small { --icon: url("../icons/play-small.svg"); }
.icon--map-pin { --icon: url("../icons/map-pin-fill.svg"); }
.icon--calendar { --icon: url("../icons/calendar-fill.svg"); }

/* ---------- Type ---------- */
.display {
  /* Reproduces the four lines the design breaks by hand (36px and 50px). */
  --display-measure: 8.7em;
  max-width: var(--display-measure);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: var(--display-lh, 1.111);
  text-wrap: pretty;
}
.lead {
  font-size: 1rem;
  line-height: 1.5rem;
}
.eyebrow {
  font-size: 0.65625rem;
  line-height: 1rem;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--c-gray);
}
@media (min-width: 64em) {
  .display {
    --display-lh: 1;
    font-size: 3.125rem;
  }
}

/* ---------- Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  /* The border is an inside stroke in Figma: it eats into the 4px / 8px padding. */
  padding: calc(0.25rem - 1px) calc(0.5rem - 1px);
  border: 1px solid var(--tag-border, var(--tag-bg, transparent));
  border-radius: var(--radius-xs);
  background: var(--tag-bg, var(--c-white));
  color: var(--tag-fg, var(--c-gray));
  font-size: 0.65625rem;
  line-height: 1rem;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--ease), background-color var(--ease), border-color var(--ease);
}
.tag--red { --tag-bg: var(--c-red); --tag-fg: var(--c-white); }
.tag--cyan { --tag-bg: var(--c-cyan); --tag-fg: var(--c-black); }
.tag--dark { --tag-bg: var(--c-ink); --tag-fg: var(--c-white); }
.tag--outline-red { --tag-border: var(--c-red); --tag-fg: var(--c-red); }
.tag--outline { --tag-border: var(--c-gray); }
a.tag--outline:hover,
button.tag--outline:hover { --tag-border: var(--c-red); --tag-fg: var(--c-red); }
.tag--outline.is-active { --tag-bg: var(--c-red); --tag-border: var(--c-red); --tag-fg: var(--c-white); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2.5rem;
  border-radius: var(--radius-full);
  background: var(--c-black);
  color: var(--c-white);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.25rem;
  letter-spacing: 0;
  transition: background-color var(--ease);
}
.btn:hover {
  background: var(--c-red);
}
/* Square corners, 44px tall. */
.btn--square {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xs);
}
/* "CTA / compacto". .btn--compact-d turns compact from the desktop breakpoint up. */
.btn--compact {
  padding: 0.25rem 1.125rem;
  border-radius: var(--radius-xs);
  background: var(--c-red);
  font-weight: 400;
  font-size: 0.65625rem;
  line-height: 1rem;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.btn--compact:hover {
  background: var(--c-black);
}
@media (min-width: 64em) {
  .btn--compact-d {
    padding: 0.25rem 1.125rem;
    border-radius: var(--radius-xs);
    background: var(--c-red);
    font-weight: 400;
    font-size: 0.65625rem;
    line-height: 1rem;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }
  .btn--compact-d:hover {
    background: var(--c-black);
  }
}

.icon-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: var(--icon-btn-border, 0 solid transparent);
  border-radius: var(--radius-full);
  background: var(--icon-btn-bg, transparent);
  color: var(--icon-btn-fg, var(--c-black));
  transition: border-color var(--ease), color var(--ease);
}
.icon-btn--outline {
  --icon-btn-border: 0.125rem solid var(--c-neutral-950);
  --icon-btn-bg: var(--c-white);
}
.icon-btn--outline:enabled:hover {
  border-color: var(--c-red);
}
.icon-btn--outline-red {
  width: 2.75rem;
  height: 2.75rem;
  --icon-btn-border: 0.125rem solid var(--c-red);
  --icon-btn-bg: var(--c-white);
  --icon-btn-fg: var(--c-red);
}
.icon-btn--thin {
  --icon-btn-border: 1px solid var(--c-black);
}
.icon-btn--thin:hover {
  border-color: var(--c-red);
  color: var(--c-red);
}
.icon-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

/* ---------- Link with arrow ---------- */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-gray);
  font-size: 0.9375rem;
  line-height: 1.375rem;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: underline 0.125rem transparent;
  text-underline-offset: 0.2em;
  transition: color var(--ease), text-decoration-color var(--ease);
}
.link:hover {
  color: var(--c-red);
  text-decoration-color: var(--c-red);
}
.link--serif {
  color: var(--c-black);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.75rem;
  letter-spacing: var(--tracking);
  text-decoration-color: var(--c-red);
}

/* ---------- Tabs ---------- */
/* Mobile: wraps by default (--tabs-gap sets row / column gap); .tabs--scroll keeps one
   scrolling row that bleeds to the screen edge. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tabs-gap, 0.75rem 1rem);
}
.tabs--scroll {
  flex-wrap: nowrap;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs--scroll::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: none;
  border-radius: var(--radius-xs);
  color: var(--c-gray);
  font-size: 0.9375rem;
  line-height: 1.375rem;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: underline 0.125rem transparent;
  text-underline-offset: 0.2em;
  transition: color var(--ease), text-decoration-color var(--ease);
}
.tab:hover {
  text-decoration-color: var(--c-red);
}
.tab.is-active {
  color: var(--c-black);
  font-weight: 500;
}
@media (min-width: 64em) {
  .tabs {
    flex-wrap: nowrap;
    gap: 0;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
  .tab {
    padding: 0.5rem 1rem;
    letter-spacing: var(--tracking);
  }
}

/* ---------- Section ---------- */
.section {
  padding-block: var(--section-y);
  overflow-x: clip;
}
.section--surface {
  background: var(--c-surface);
  --dot-idle: var(--c-neutral-300);
}
.section--divided {
  border-top: 1px solid var(--c-line);
}
@media (min-width: 64em) {
  /* Two sections sharing one band keep 160px on each side of the divider. */
  .section--divided {
    padding-top: 10rem;
  }
  .section:has(+ .section--divided) {
    padding-bottom: 10rem;
  }
}
.section__inner {
  display: grid;
  gap: var(--stack-m, 4rem);
}
.section__inner > * {
  min-width: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem 0.5rem;
}
.section-head__title {
  flex: 1 0 auto;
  max-width: 100%;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
}
.section-head .tabs {
  flex: 0 0 100%;
  order: 3;
  margin-top: 2rem;
}
.section-head .tabs--scroll {
  flex-basis: calc(100% + 2 * var(--gutter));
}
.section-head__controls {
  display: none;
}
@media (min-width: 64em) {
  .section__inner {
    gap: var(--stack-d, 5rem);
  }
  .section-head {
    flex-wrap: nowrap;
    gap: var(--head-gap, 0.5rem);
  }
  .section-head__title {
    flex: 1 1 0;
  }
  .section-head .tabs {
    flex: none;
    order: 0;
    margin-top: 0;
  }
  .section-head__controls {
    display: flex;
    align-self: center;
    gap: 0.5rem;
  }
}

/* ---------- Carousel ----------
   Options (set in the HTML): --slide-m / --slide-d column width, --gap-m / --gap-d column gap,
   --dots-m / --dots-d distance to the dots.
   Items may be grouped in .carousel__page: on mobile each page is one slide laid out as a grid
   (--page-cols-m columns, --row-gap-m between rows); on desktop the wrapper disappears and the
   items become the slides. */
.carousel {
  position: relative;
  display: grid;
  gap: var(--dots-m, 2rem);
}
.carousel__track {
  --edge: calc(50vw - 50%);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--slide-m, 100%);
  align-items: start;
  /* Defaults to the gutter so a full-width slide never shows its neighbour at the screen edge. */
  gap: 0 var(--gap-m, var(--gutter));
  margin-inline: calc(-1 * var(--edge));
  padding-inline: var(--edge);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Same distance as --edge, written against the scrollport (a percentage here resolves
     against the track itself, not the container). */
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar {
  display: none;
}
.carousel__track > *,
.carousel__page > * {
  min-width: 0;
  scroll-snap-align: start;
}
.carousel__page {
  display: grid;
  grid-template-columns: repeat(var(--page-cols-m, 1), minmax(0, 1fr));
  align-items: start;
  gap: var(--row-gap-m, 0) var(--page-gap-m, 0);
}
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.carousel__dots:empty {
  display: none;
}
.carousel__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--dot-idle, var(--c-neutral-200));
  transition: background-color var(--ease);
}
.carousel__dot.is-active {
  background: var(--c-neutral-950);
}
.carousel__arrow {
  display: none;
}
@media (min-width: 64em) {
  .carousel {
    gap: var(--dots-d, 5rem);
  }
  .carousel__track {
    grid-auto-columns: var(--slide-d, 100%);
    gap: 0 var(--gap-d, 0);
  }
  .carousel__page {
    display: contents;
  }
  /* Desktop: the active slide sits in the middle with its neighbours cut by the screen edges. */
  .carousel--center-d .carousel__track > * {
    scroll-snap-align: center;
  }
  .carousel__dot {
    width: 0.5rem;
    height: 0.5rem;
  }
  /* Same items as a static grid on desktop. */
  .carousel--grid-d .carousel__track {
    grid-auto-flow: row;
    grid-template-columns: repeat(var(--cols-d, 3), minmax(0, 1fr));
    gap: var(--row-gap-d, 5rem) var(--gap-d, 0);
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
  .carousel--grid-d .carousel__dots,
  .carousel--no-dots-d .carousel__dots {
    display: none;
  }
}
/* Desktop arrows: inside the container, over the first and last slide (client request; the
   design drew them 56px outside). Centred on the track, since the carousel box also holds the
   dots, unless --arrow-y says otherwise. */
@media (min-width: 64em) {
  .carousel__arrow {
    position: absolute;
    top: var(--arrow-y, calc((100% - var(--dots-d, 5rem) - 0.5rem) / 2));
    z-index: 2;
    display: inline-flex;
    translate: 0 -50%;
  }
  .carousel__arrow--prev { left: var(--arrow-inset, 1rem); }
  .carousel__arrow--next { right: var(--arrow-inset, 1rem); }
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols-m, 1), minmax(0, 1fr));
  gap: var(--grid-gap-m, 1rem);
}
/* Grid item that only exists from the desktop breakpoint up. */
.grid > .grid__item--desktop {
  display: none;
}
@media (min-width: 64em) {
  .grid {
    grid-template-columns: repeat(var(--cols-d, 4), minmax(0, 1fr));
    gap: var(--grid-gap-d, 1.5rem);
  }
  .grid > .grid__item--desktop {
    display: flex;
  }
}

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  color: var(--c-white);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.0625rem 1rem;
}
.site-header__logo img {
  width: 8.75rem;
}
.site-header__logo .logo--dark {
  display: none;
}
.site-header__toggle {
  --icon-btn-fg: currentColor;
}
/* Mobile: a panel that drops below the bar, over the hero. (No Figma frame for this state.) */
.site-nav {
  position: absolute;
  inset: 100% 0 auto;
  display: none;
  flex-direction: column;
  padding: 0.5rem 1rem 1.5rem;
  border-top: 1px solid var(--c-line);
  background: var(--c-white);
  color: var(--c-black);
}
.site-header.is-open {
  background: var(--c-white);
  color: var(--c-black);
}
.site-header.is-open .site-nav {
  display: flex;
}
.site-header.is-open .logo--light {
  display: none;
}
.site-header.is-open .logo--dark {
  display: block;
}
.site-nav__link {
  padding-block: 0.75rem;
  color: var(--c-gray);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.25rem;
  text-decoration: underline 0.125rem transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--ease);
}
.site-nav__link:hover {
  text-decoration-color: var(--c-red);
}
.site-nav__link[aria-current="page"] {
  color: var(--c-black);
}
@media (min-width: 64em) {
  .site-header {
    position: static;
    background: var(--c-white);
    color: var(--c-black);
  }
  .site-header__bar {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
    padding: 0.5625rem 0;
  }
  .site-header__logo .logo--light,
  .site-header__toggle {
    display: none;
  }
  .site-header__logo .logo--dark {
    display: block;
  }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 0;
    border-top: 0;
    background: none;
  }
  .site-nav__link {
    padding-block: 0;
    font-size: 0.8125rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 42.5rem;
  padding: 6rem var(--gutter) 3rem;
  color: var(--c-white);
  isolation: isolate;
}
.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(219.6deg, rgb(0 0 0 / 0) 43.729%, rgb(0 0 0 / 0.5) 109%);
}
.hero__content {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
}
.hero .display {
  --display-lh: 1.02;
}
@media (min-width: 64em) {
  .hero {
    justify-content: center;
    min-height: 48.625rem;
    /* The copy sits 25px above the middle of the photo. */
    padding: 0 var(--gutter) 3.125rem var(--indent);
  }
  .hero::after {
    background: linear-gradient(252.23deg, rgb(0 0 0 / 0) 22.329%, rgb(0 0 0 / 0.25) 62.396%);
  }
  .hero__content {
    max-width: 35rem;
    gap: 2rem;
  }
  .hero__text {
    display: grid;
    gap: 1rem;
  }
  .hero .display {
    --display-lh: 1;
  }
  .hero .lead {
    max-width: 30rem;
  }
}
@media (max-width: 63.99em) {
  .hero__text {
    display: grid;
    gap: 1.5rem;
  }
}

/* ---------- Benefits bar ---------- */
.benefits {
  border: 1px solid var(--c-surface);
  padding: 1rem;
  background: var(--c-white);
}
.benefits[hidden] {
  display: none;
}
.benefits__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--container);
  margin-inline: auto;
}
.benefits__list {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 2.5rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.benefits__list::-webkit-scrollbar {
  display: none;
}
.benefits__item {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.benefits__item img {
  width: 1.25rem;
  height: 1.25rem;
}
.benefits__item a {
  text-decoration: underline;
  text-underline-position: from-font;
}
@media (min-width: 64em) {
  .benefits__list {
    gap: 1rem;
    overflow: visible;
  }
  .benefits__item {
    flex: 1 1 0;
  }
}

/* ---------- Feature (text + 1:1 image) ---------- */
.feature {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 4rem var(--gutter-wide);
  background: var(--c-surface);
}
/* The editorial block is the one place the design sets type without the -2% tracking. */
.feature .display,
.feature .lead {
  letter-spacing: 0;
}
/* Reproduces the four lines the design breaks by hand, on both breakpoints. */
.feature .display {
  --display-measure: 9.2em;
}
.feature__content {
  display: grid;
  justify-items: start;
  gap: 2rem;
}
.feature__media {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
@media (min-width: 64em) {
  .feature {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
    padding: 3.75rem max(var(--gutter), calc((100% - var(--container)) / 2)) 3.75rem var(--indent);
  }
  .feature__content {
    flex: 0 1 31rem;
  }
  .feature__media {
    flex: 1 1 0;
    min-width: 0;
    max-width: 39.875rem;
    margin-left: auto;
  }
}

/* ---------- Book card ---------- */
.book {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.book__tags {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: flex-start;
  gap: 0.5rem;
  min-height: 1.5rem;
  margin-bottom: -1.25rem;
}
.book__cover {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 26.25rem;
  aspect-ratio: 1;
}
/* The shadow is drawn in CSS, not baked into the cover: four blurred silhouettes of the cover
   stacked under it. --shadow-x / --shadow-y give the direction they fall (1 1 = the resting
   diagonal of the design); home.js moves them away from the pointer, as if the mouse were a lamp.
   Each silhouette is painted once and only translated afterwards, so the lamp costs no repaint. */
.book {
  --shadow-x: 1;
  --shadow-y: 1;
  /* Black at this opacity reads as the design shadow, rgb(13 13 12 / 0.2), on the page white. */
  --shadow-opacity: 0.19;
  --shadow-blur-1: 0.25rem;
  --shadow-blur-2: 0.5rem;
  --shadow-blur-3: 1rem;
  --shadow-blur-4: 1.5rem;
}
.book__cover img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.book__image {
  position: relative;
}
/* blur() takes the standard deviation, half of the blur radius the design gives. */
.book__shadow {
  filter: brightness(0) blur(calc(var(--shadow-blur) / 2)) opacity(var(--shadow-opacity));
  translate: calc(var(--shadow-x) * var(--shadow-reach)) calc(var(--shadow-y) * var(--shadow-reach));
  transition: translate 0.35s ease-out;
  will-change: translate;
  pointer-events: none;
}
.book__shadow:nth-child(1) { --shadow-reach: 0.25rem; --shadow-blur: var(--shadow-blur-1); }
.book__shadow:nth-child(2) { --shadow-reach: 0.5rem; --shadow-blur: var(--shadow-blur-2); }
.book__shadow:nth-child(3) { --shadow-reach: 1rem; --shadow-blur: var(--shadow-blur-3); }
.book__shadow:nth-child(4) { --shadow-reach: 1.5rem; --shadow-blur: var(--shadow-blur-4); }
.book__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding: var(--book-pad, 0 2rem);
}
.book__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--book-gap, 1.5rem);
  width: 100%;
}
.book__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.6875rem;
  line-height: 2.25rem;
  text-wrap: balance;
}
.book__author {
  font-size: 1rem;
  line-height: 1.5625rem;
}
.book__author a {
  display: block;
}
.book__publisher {
  font-size: 0.625rem;
  line-height: 1.5;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.book__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
  /* The design row is 34px: the 32px line of the main price plus the 2px the smaller price
     hangs below it once both sit on one baseline. */
  padding-bottom: 0.125rem;
  line-height: 2rem;
}
.book__price-now {
  font-size: 1.5625rem;
}
.book__price-old {
  font-size: 1.09375rem;
  /* Keeps the baseline-aligned row at the 32px of the main price. */
  line-height: 1;
  text-decoration: line-through;
}
.book__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.book__bookmark {
  position: absolute;
  top: 0;
  right: 2rem;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--c-gray);
  border-radius: var(--radius-xs);
  background: var(--c-white);
  --icon-size: 1.5rem;
}
.book__bookmark[aria-pressed="true"] {
  border-color: var(--c-red);
  color: var(--c-red);
}
/* Plain cover photo (collections) instead of a square packshot. */
.book--flat {
  --book-pad: 1rem 2rem;
  --book-gap: 0.75rem;
}
.book--flat .book__cover {
  max-width: none;
}
/* Resting shadow of the design: straight to the left, with its own blurs. */
.book--flat {
  --shadow-x: -1;
  --shadow-y: 0;
  --shadow-blur-1: 0.5rem;
  --shadow-blur-2: 1rem;
  --shadow-blur-3: 0.375rem;
  --shadow-blur-4: 1rem;
}
.book--flat .book__cover img {
  width: auto;
  height: min(22rem, 92%);
}
@media (min-width: 64em) {
  .book--flat {
    --book-pad: 1rem 2rem 2.5rem;
  }
  .book__add {
    --icon-btn-border: 0 solid transparent;
    --icon-btn-fg: var(--c-red);
  }
}
/* Desktop with a pointer: gray at rest, full card on hover. */
@media (min-width: 64em) and (hover: hover) {
  .book__author,
  .book__price {
    color: var(--c-gray);
    transition: color var(--ease);
  }
  .book__cta {
    opacity: 0;
    transition: opacity var(--ease);
  }
  .book__bookmark {
    display: inline-flex;
    opacity: 0;
    transition: opacity var(--ease);
  }
  .book:hover .book__author,
  .book:focus-within .book__author,
  .book:hover .book__price,
  .book:focus-within .book__price {
    color: var(--c-black);
  }
  .book:hover .book__cta,
  .book:focus-within .book__cta,
  .book:hover .book__bookmark,
  .book:focus-within .book__bookmark {
    opacity: 1;
  }
}

/* ---------- Promo banner ---------- */
.promo {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  aspect-ratio: 360 / 444;
  padding-top: 1.75rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  text-align: center;
}
.promo__head {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding-inline: 0.3125rem;
}
.promo__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: 0;
}
.promo__media {
  flex: 1;
  min-height: 0;
}
.promo__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}
@media (min-width: 64em) {
  .promo {
    gap: 1rem;
    aspect-ratio: 628 / 660;
    padding-top: 2.5rem;
  }
  .promo__head {
    gap: 1rem;
    padding-inline: 3rem;
  }
  .promo__title {
    font-weight: 700;
    font-size: 2rem;
    line-height: 2.375rem;
    letter-spacing: var(--tracking);
  }
}

/* ---------- About ---------- */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.5rem;
  text-align: center;
}
.about__content {
  display: grid;
  justify-items: center;
  gap: 3.5rem;
}
.about__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.6875rem;
  line-height: 2rem;
}
.about__text {
  color: var(--c-gray);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.about__media {
  width: 100%;
  aspect-ratio: 382 / 430;
  object-fit: cover;
}
@media (min-width: 64em) {
  .about {
    flex-direction: row;
    justify-content: center;
    gap: 2.5625rem;
  }
  .about__content {
    flex: 0 1 36.25rem;
  }
  .about__content .link--serif {
    margin-top: -0.5rem;
    line-height: 1.1;
  }
  .about__title {
    line-height: 2.25rem;
  }
  .about__text {
    max-width: 32.5rem;
  }
  .about__media {
    flex: 0 1 39.25rem;
    min-width: 0;
    aspect-ratio: 1;
    object-fit: contain;
  }
}

/* ---------- Thumb card (themes, authors) ---------- */
.thumb-card {
  display: flex;
  flex-direction: column;
}
.thumb-card__figure {
  aspect-ratio: var(--thumb-ratio, 1);
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--thumb-bg, transparent);
}
.thumb-card__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 1.25rem var(--thumb-pad, 0);
  font-size: 1.125rem;
  line-height: 1.5625rem;
}
.thumb-card__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: underline 0.125rem transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--ease);
}
.thumb-card__count {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--c-red);
  color: var(--c-white);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: var(--tracking);
  opacity: 0;
  transition: opacity var(--ease);
}
.thumb-card:hover .thumb-card__name {
  font-weight: 500;
  text-decoration-color: var(--c-red);
}
.thumb-card:hover .thumb-card__count {
  opacity: 1;
}
.thumb-card--theme {
  --thumb-ratio: 208 / 263.467;
  --thumb-bg: var(--c-surface);
  --thumb-pad: 1.25rem;
}

/* ---------- Media card (blog, podcast, video, social) ----------
   Options: --ratio figure ratio, --gap-a figure to date, --gap-b date to title. */
.media-card {
  display: flex;
  flex-direction: column;
}
.media-card__figure {
  position: relative;
  aspect-ratio: var(--ratio, 1);
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.media-card__figure img {
  width: 100%;
  height: 100%;
  object-fit: var(--fit, cover);
}
.media-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.media-card__date {
  margin-top: var(--gap-a, 1rem);
}
.media-card__title {
  margin-top: var(--gap-b, 1.5rem);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.75rem;
  text-decoration: underline 0.125rem transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--ease);
}
.media-card__text {
  display: -webkit-box;
  margin-top: 1rem;
  overflow: hidden;
  color: var(--text-idle, var(--c-gray));
  font-size: 1rem;
  line-height: var(--text-lh, 1.5);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  transition: color var(--ease);
}
.media-card .tag-list {
  margin-top: 1.5rem;
}
.media-card:hover .media-card__title {
  text-decoration-color: var(--c-red);
}
.media-card:hover .media-card__text {
  color: var(--c-black);
}
/* Blog: serif type, grayscale photo that gets its color back on hover. */
.media-card--post .media-card__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 2.25rem;
  text-wrap: balance;
}
.media-card--post .media-card__text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.625rem;
}
.media-card--post .media-card__figure img {
  filter: grayscale(1);
  transition: filter var(--ease);
}
.media-card--post:hover .media-card__figure img {
  filter: none;
}
.media-card--video {
  --gap-a: 1.25rem;
  --gap-b: 1.25rem;
  --ratio: 16 / 9;
}
.media-card--podcast {
  --gap-b: 1rem;
  --text-idle: var(--c-black);
  --text-lh: 1.375;
}
.media-card--social {
  --ratio: 4 / 5;
}
.media-card--social .media-card__text {
  --text-idle: var(--c-black);
  font-size: 0.875rem;
}
@media (min-width: 64em) {
  .media-card--podcast {
    --gap-a: 0;
    --gap-b: 1.5rem;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }
  .media-card--podcast .media-card__figure {
    flex: 0 0 12.875rem;
  }
  .media-card--podcast .media-card__body {
    flex: 1;
  }
}

.play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgb(9 12 10 / 0.75);
  color: var(--c-white);
  translate: -50% -50%;
  transition: opacity var(--ease);
  --icon-size: 1.75rem;
}
.play--square {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--c-neutral-950);
  --icon-size: 1rem;
}
@media (min-width: 64em) and (hover: hover) {
  .media-card--podcast .play {
    opacity: 0;
  }
  .media-card--podcast:hover .play,
  .media-card--podcast:focus-within .play {
    opacity: 1;
  }
}

/* ---------- Event banner ---------- */
.event {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--c-event);
  color: var(--c-white);
}
.event__body {
  display: grid;
  justify-items: start;
  gap: 2rem;
  padding: 1.75rem 3rem 0;
}
.event__text,
.event__meta {
  display: grid;
  gap: 2rem;
}
.event__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 2.5rem;
}
.event__meta li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  --icon-size: 1.25rem;
}
.event__meta .icon {
  margin-top: 0.125rem;
}
.event__art {
  position: relative;
}
.event__art > picture img {
  width: 100%;
  aspect-ratio: 382 / 250;
  object-fit: cover;
  object-position: left top;
}
.event__logo {
  position: absolute;
  top: 6.4%;
  left: 6.28%;
  width: 24.1%;
}
@media (min-width: 64em) {
  .event {
    display: block;
    min-height: 26.6875rem;
  }
  .event__body {
    position: relative;
    z-index: 1;
    max-width: 50.1875rem;
    gap: 1.5rem;
    padding: 4rem;
  }
  .event__text,
  .event__meta {
    gap: 1rem;
  }
  .event__title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  .event__meta li {
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem;
    --icon-size: 1.5rem;
  }
  .event__meta .icon {
    margin-top: 0;
  }
  .event__art {
    position: absolute;
    inset: 0 0 0 auto;
    aspect-ratio: 473 / 427;
  }
  .event__art > picture img {
    height: 100%;
    aspect-ratio: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12.895%);
    mask-image: linear-gradient(90deg, transparent, #000 12.895%);
  }
  .event__logo {
    top: 7.5%;
    left: 22%;
    width: 24%;
  }
}

/* ---------- Newsletter ---------- */
.newsletter {
  padding: 6rem var(--gutter-wide);
  background: var(--c-surface);
}
.newsletter__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  max-width: var(--container);
  margin-inline: auto;
}
.newsletter__symbol {
  width: 4.393rem;
}
.newsletter__body {
  display: grid;
  gap: 2rem;
  width: 100%;
  max-width: 39.75rem;
}
.newsletter__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5625rem;
  line-height: 1.875rem;
  max-width: 14em;
}
.newsletter__form {
  display: flex;
  width: 100%;
  max-width: 33.25rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
/* The label plays the placeholder so it can wrap on narrow screens (an input placeholder
   cannot); it steps aside as soon as something is typed. */
.newsletter__field {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 5rem;
}
.newsletter__input {
  width: 100%;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0;
  background: var(--c-white);
  line-height: 1.5;
}
.newsletter__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-inline: 1.5rem;
  line-height: 1.5;
  letter-spacing: var(--tracking);
  pointer-events: none;
}
.newsletter__input:not(:placeholder-shown) + .newsletter__label {
  visibility: hidden;
}
.newsletter__submit {
  display: grid;
  flex: 0 0 6.25rem;
  place-items: center;
  background: var(--c-black);
  transition: background-color var(--ease);
}
.newsletter__submit:hover {
  background: var(--c-red);
}
.newsletter__submit img {
  width: 2.5rem;
}
.newsletter__note {
  font-size: 0.875rem;
  line-height: 1.3125rem;
}
@media (min-width: 64em) {
  .newsletter {
    padding-block: 5rem;
  }
  .newsletter__inner {
    flex-direction: row;
    gap: 6.625rem;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 6rem var(--gutter-wide);
  background: var(--c-footer);
  color: var(--c-white);
}
.site-footer__inner {
  display: grid;
  gap: 3rem;
  max-width: var(--container);
  margin-inline: auto;
}
.site-footer__columns {
  display: grid;
  align-items: start;
  gap: 3rem;
}
.site-footer__brand {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
}
.site-footer__brand img {
  width: 8rem;
}
.site-footer__brand p {
  color: var(--c-gray);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.5625rem;
}
.footer-nav {
  display: grid;
  justify-items: start;
  gap: 0.25rem;
}
.footer-nav__title,
.site-footer__legal {
  color: var(--c-gray);
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.5;
}
.footer-nav li {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.5rem;
  letter-spacing: 0;
}
.footer-nav a {
  text-decoration: underline 0.125rem transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--ease);
}
.footer-nav a:hover {
  text-decoration-color: var(--c-red);
}
.footer-nav ul {
  display: contents;
}
.site-footer__legal {
  display: grid;
  gap: 0.5rem;
}
.site-footer__legal span {
  white-space: pre-wrap;
}
@media (min-width: 64em) {
  .site-footer {
    padding-block: 5rem;
  }
  .site-footer__inner {
    gap: 5rem;
  }
  .site-footer__columns {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .footer-nav {
    gap: 0.75rem;
    padding-top: 2rem;
  }
  .footer-nav li {
    line-height: 1.5625rem;
  }
  .site-footer__legal {
    grid-template-columns: 28rem 1fr auto;
    gap: 0;
  }
}

/* Every transition reads --ease, so this turns them all off. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --ease: 0s;
  }
}
