/* =========================================================
   ENGLISH BOOK CLUB — estilos
   As fontes (Fraunces e DM Sans) são carregadas no <head> do index.html.
   ========================================================= */

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", Arial, Helvetica, sans-serif;

  --header-bg: #bed5ff;
  --r: 36px; /* raio do topo arredondado das seções */
  --line: #d8d0c1;
  --cream: #f5f1e8;

  /* Paleta da marca (PDF de lançamento) */
  --light-main: #94b9ff;
  --medium-main: #103c65;
  --dark-main: #000000;

  --light-1: #ffedab;
  --medium-1: #fede6f;
  --dark-1: #301c1c;

  --light-2: #e4a099;
  --medium-2: #c75555;
  --dark-2: #ad2525;

  --line-on-dark: rgba(245, 241, 232, .22);
  --max-width: 1180px;
  --glass-color-overlay: linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(16, 60, 101, .2));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  background: var(--medium-main);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
}

a {
  color: var(--medium-main);
  font-weight: 600;
  text-decoration: none;
}

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

/* acabamento arredondado padrão de botões e campos */
button,
input,
select { border-radius: 999px; }

.container { width: min(90%, var(--max-width)); margin: 0 auto; }

a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 2px solid var(--light-main); outline-offset: 3px; }


/* =========================================================
   TELA DE CARREGAMENTO
   ========================================================= */

.page-loader { display: none; }

.has-loader .page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: radial-gradient(circle at 50% 45%, #1a4f80, var(--medium-main) 55%, #071e36);
  transition: opacity .6s ease, visibility .6s;
}

html.is-loading { overflow: hidden; } /* não deixa rolar enquanto carrega */

.page-loader.done { opacity: 0; visibility: hidden; }

.page-loader-logo {
  width: 120px;
  height: auto;
  padding: 10px;
  border-radius: 24px;
  background: var(--header-bg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  animation: loader-breathe 1.8s ease-in-out infinite;
}

.page-loader-bar {
  position: relative;
  width: 140px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(148, 185, 255, .25);
}

.page-loader-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: inherit;
  background: var(--light-main);
  animation: loader-slide 1.1s ease-in-out infinite;
}

@keyframes loader-breathe { 50% { transform: scale(1.05); } }
@keyframes loader-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

@media (prefers-reduced-motion: reduce) {
  .page-loader-logo, .page-loader-bar::after { animation: none; }
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
}

.navbar {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-header .logo img { width: 70px; }

.nav-links { display: flex; gap: 25px; font-size: .82rem; }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--dark-main); text-decoration: underline; text-underline-offset: 5px; }

.site-header .button { background: var(--medium-main); color: var(--cream); }
.site-header .button:hover { background: var(--dark-main); }

/* Botão hambúrguer (só aparece no tablet/celular) */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--medium-main);
  border-radius: 2px;
  transition: transform .25s, top .25s, opacity .2s;
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }

.nav-toggle.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.nav-toggle:focus-visible { outline: 2px solid var(--medium-main); outline-offset: 2px; }


/* =========================================================
   TIPOGRAFIA E ESTRUTURA GERAL
   ========================================================= */

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--light-main);
  margin-bottom: 12px;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; }
h1, h2 { letter-spacing: -.015em; }
h1 { font-size: clamp(3.5rem, 8vw, 7rem); }
h1 em { font-weight: 300; }
h2 { font-size: clamp(2.6rem, 5vw, 5rem); }
h3 { font-size: 1.7rem; }

/* o respiro extra (--r) compensa a sobreposição das seções arredondadas */
.section { padding: calc(120px + var(--r)) 0; }

.section-light { background: var(--light-main); color: var(--medium-main); }
.section-light .eyebrow { color: var(--medium-main); }

.section-heading { margin-bottom: 60px; }
.section-heading.centered { text-align: center; }

.section-text { max-width: 650px; font-size: 1.15rem; }
.section-text p + p { margin-top: 20px; }


/* =========================================================
   BOTÕES E LINKS
   ========================================================= */

.button {
  display: inline-block;
  border: 0;
  padding: 15px 25px;
  background: var(--light-main);
  color: var(--medium-main);
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  border-radius: 1000px;
  transition: background .2s, transform .25s, box-shadow .25s;
}

.button:hover {
  background: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
}

.button-small { padding: 11px 16px; }

.text-link {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  color: var(--cream);
  transition: color .2s;
}

.text-link:hover { color: var(--light-main); }


/* =========================================================
   HERO
   ========================================================= */

.hero {
  --hero-tail: clamp(140px, 18vw, 260px); /* tamanho da "cauda" do vidro que some aos poucos */
  position: relative;
  isolation: isolate; /* mantém o vidro numa camada abaixo da seção seguinte */
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: clamp(28px, 4vw, 56px); /* respiro abaixo do header */
  background-color: var(--dark-main);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/background_silk.webp") center / cover no-repeat;
  opacity: 0.4;
  z-index: 0;
}

/* cartão de vidro: estica até o fim do hero e continua por baixo da
   seção seguinte, sumindo aos poucos (mesmo efeito em qualquer tela) */
.hero-content {
  position: relative;
  z-index: 1;
  flex: 1; /* ocupa toda a altura do hero, até a borda de baixo */
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding: 35px 35px calc(35px + var(--hero-tail) + var(--r));
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 32px 32px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--hero-tail) - var(--r)), transparent calc(100% - var(--r)));
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--hero-tail) - var(--r)), transparent calc(100% - var(--r)));
}

.hero-text { max-width: 720px; }

.hero h1 em { color: var(--light-main); font-style: italic; }

.hero-description { max-width: 600px; margin: 30px 0; font-size: 1.15rem; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 25px; }

.hero-visual {
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* leque de capas */
.hero-books { position: relative; width: 100%; max-width: min(360px, 80%); aspect-ratio: 3 / 4; }

.hb {
  position: absolute;
  width: 56%;
  aspect-ratio: 2 / 3;
  background-size: cover;
  background-position: center;
  border-radius: 3px 10px 10px 3px;
  box-shadow: 0 26px 40px rgba(0, 0, 0, .45), 0 2px 0 rgba(255, 255, 255, .15) inset;
  animation: bob 6s ease-in-out infinite;
  transition: rotate .5s cubic-bezier(.2, .8, .2, 1);
}

.hb::before { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(255,255,255,.2) 3%, rgba(0,0,0,.12) 6%, transparent 12%); }
.hb::after { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.22), transparent 40%); }

.hb1 { left: 0; top: 16%; rotate: -9deg; background-image: url("img/books/the_wind_in_the_willows.webp"); }
.hb2 { left: 22%; top: 0; rotate: 2deg; z-index: 2; background-image: url("img/books/the_wizard_of_oz.webp"); animation-delay: -2s; }
.hb3 { right: 0; top: 20%; rotate: 11deg; background-image: url("img/books/charlottes_web.webp"); animation-delay: -4s; }

.hero-books:hover .hb1 { rotate: -15deg; }
.hero-books:hover .hb3 { rotate: 17deg; }

@keyframes bob { 50% { translate: 0 -10px; } }


/* =========================================================
   CONTAGEM REGRESSIVA
   ========================================================= */

.announcement {
  background-color: var(--cream);
  color: var(--medium-main);
  padding: calc(45px + var(--r)) 0 calc(60px + var(--r));
}

.announcement .eyebrow { color: var(--medium-main); }
.announcement-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.announcement h2 { font-size: 2.5rem; margin-bottom: 10px; }

.countdown { display: flex; gap: 25px; text-align: center; }
.countdown div { min-width: 75px; }
.countdown strong { display: block; font-family: var(--font-display); font-size: 2.5rem; font-weight: 400; color: var(--medium-main); }
.countdown span { font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; }


/* =========================================================
   FUNDO DE VIDRO (Sobre + Modalidades + Como funciona)
   ========================================================= */

#about,
.program-process-background {
  position: relative;
  isolation: isolate;
  background-image: linear-gradient(to bottom, #000000, #000000, #000000, var(--medium-main), #000000);
}

#about::before,
.program-process-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("img/background_glass.webp");
  background-size: 100vw auto;
  background-position: center top;
  background-repeat: repeat-y;
  opacity: 0.5;
  z-index: 0;
}

#about::after,
.program-process-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glass-color-overlay);
  z-index: 0;
  pointer-events: none;
}

#about > *,
.program-process-background > * {
  position: relative;
  z-index: 1;
}


/* =========================================================
   SOBRE
   ========================================================= */

.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(44px, 5vw, 64px) 100px; }

/* destaques numéricos */
.stats {
  grid-column: 1 / -1; /* ocupa as duas colunas da seção "Sobre" */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

.stats div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto; /* texto à esquerda, número à direita */
  align-items: center;                         /* os dois centralizados na vertical */
  gap: 10px;
  min-height: 155px;
  padding: 22px 22px 22px 20px;
  border: 1px solid rgba(16, 60, 101, .14);
  border-radius: 26px;
  background: rgba(245, 241, 232, .96);
}

/* nesta seção o número é o destaque do cartão (não um detalhe apagado) */
.stats strong {
  order: 2;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 6.5vw, 6.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: .8;
  color: var(--medium-main);
  opacity: .9;
}

.stats span {
  font-size: clamp(.78rem, 1.5vw, 1rem);
  line-height: 1.45;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--medium-main);
}


/* =========================================================
   MODALIDADES — Little Reads (papel amarelo) · Book & Talk (papel rosa)
   ========================================================= */

.program-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.program-card {
  padding: 60px;
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}

.program-card.little-reads { background-image: url("img/yellow-paper-bg.webp"); color: var(--dark-1); }
.program-card.book-talk { background-image: url("img/pink-paper-bg.webp"); color: var(--medium-main); }

.program-card.little-reads .eyebrow { color: var(--dark-1); }
.program-card.book-talk .eyebrow { color: var(--medium-main); }

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  height: 300px;
}

.program-card > p:not(.eyebrow) { margin-bottom: 30px; }

.program-card ul { list-style: none; margin-bottom: 35px; border-top: 1px solid; }
.program-card li { padding: 12px 0; font-size: .85rem; border-bottom: 1px solid; }

.program-card.little-reads ul,
.program-card.little-reads li { border-color: rgba(48, 28, 28, .25); }
.program-card.book-talk ul,
.program-card.book-talk li { border-color: rgba(16, 60, 101, .3); }

.program-card .text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.program-card.little-reads .text-link { color: var(--dark-1); }
.program-card.book-talk .text-link { color: var(--medium-main); }
.program-card.book-talk .text-link:hover { color: var(--dark-2); }


/* =========================================================
   COMO FUNCIONA + O QUE ESTÁ INCLUSO (cartões com numerais fantasmas)
   ========================================================= */

.process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.process-grid article {
  position: relative;
  min-width: 0;
  min-height: 290px;
  padding: 94px 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, .3);
  border-radius: 28px;
  background: rgba(245, 241, 232, .96);
  color: var(--medium-main);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}

.included-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.included-item {
  position: relative;
  min-width: 0;
  min-height: 220px;
  padding: 82px 28px 28px;
  overflow: hidden;
  border: 1px solid rgba(16, 60, 101, .18);
  border-radius: 28px;
  background: var(--cream);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}

/* numerais 01, 02, 03... grandes e apagados no canto */
.process-grid span,
.included-item span {
  position: absolute;
  top: -15px;
  right: 16px;
  font-family: var(--font-display);
  font-size: clamp(5rem, 8vw, 7.5rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  color: rgba(16, 60, 101, .1);
  pointer-events: none;
}

.process-grid h3,
.included-item h3 { position: relative; font-style: italic; color: var(--medium-main); }

.process-grid h3 { margin: 0 0 16px; }
.included-item h3 { margin: 0 0 10px; font-size: 1.5rem; }

.process-grid p { position: relative; color: var(--medium-main); opacity: .82; font-size: .85rem; }
.included-item p { position: relative; color: var(--medium-main); opacity: .85; font-size: .82rem; }


/* =========================================================
   ESTANTE
   ========================================================= */

.bookshelf-section {
  position: relative;
  isolation: isolate;
  background: var(--cream);
  color: var(--medium-main);
}

.bookshelf-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("img/paper-background.webp");
  background-size: cover;
  background-position: center;
  opacity: .2;
  pointer-events: none;
}

.bookshelf-section .eyebrow { color: var(--medium-main); }

.bookshelf-heading { display: flex; justify-content: space-between; gap: 60px; align-items: end; }
.bookshelf-heading > p { max-width: 390px; opacity: .8; }

.shelf-hint { margin-bottom: 10px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }

/* estante com profundidade */
.bookshelf {
  position: relative;
  display: flex;
  justify-content: safe center;
  align-items: flex-end;
  gap: 2px;
  padding: 56px 28px 22px;
  overflow-x: auto;
  perspective: 1000px;
  perspective-origin: 50% 40%;
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(#35689a, #103c65 35%, #082742) bottom / 100% 22px no-repeat,
    radial-gradient(ellipse 70% 90% at 50% 100%, rgba(16, 60, 101, .2), transparent 70%),
    linear-gradient(rgba(16, 60, 101, .1), rgba(16, 60, 101, .03));
  box-shadow: inset 0 18px 24px -16px rgba(16, 60, 101, .35), inset 14px 0 18px -14px rgba(16, 60, 101, .3), inset -14px 0 18px -14px rgba(16, 60, 101, .3), 0 18px 22px -14px rgba(0, 0, 0, .45);
}

/* cores de cada livro */
/* cores de cada livro: definidas no próprio HTML, em style="--cover-bg: ...; --cover-fg: ..."
   (--cover-bg = cor da capa, --cover-fg = cor das letras). Estas são as cores padrão. */
.spine { --cover-bg: var(--medium-main); --cover-fg: var(--cream); }

/* arte da lombada: usada na estante (.spine) e no livro 3D (.bk-spine) */
.spine, .bk-spine {
  background-color: var(--cover-bg);
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.38), rgba(255,255,255,.16) 14%, rgba(255,255,255,0) 34%, rgba(0,0,0,.05) 66%, rgba(0,0,0,.34)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
  color: var(--cover-fg);
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spine::before, .spine::after, .bk-spine::before, .bk-spine::after {
  content: ""; position: absolute; left: 10%; right: 10%; height: 7px;
  border-block: 1.5px solid currentColor; opacity: .7;
}
.spine::before, .bk-spine::before { top: 5%; }
.spine::after, .bk-spine::after { bottom: 5%; }

.spine-title {
  flex: 1; min-height: 0; overflow: hidden;
  margin: calc(34px / var(--k, 1)) 0 calc(6px / var(--k, 1));
  display: flex; align-items: center;
  writing-mode: vertical-rl;
  font-size: calc(var(--fs, 17px) / var(--k, 1));
  font-weight: bold; letter-spacing: .04em; text-align: center; line-height: 1.1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

.spine-num {
  font: 700 calc(10px / var(--k, 1)) var(--font-body);
  letter-spacing: .14em; opacity: .85;
  margin-bottom: calc(34px / var(--k, 1));
}

.spine {
  --w: 72px; --h: 390px;
  position: relative; flex: none; width: var(--w); height: var(--h);
  padding: 0; border: 0; border-radius: 5px 5px 1px 1px; cursor: pointer;
  box-shadow: 5px 0 12px rgba(8, 39, 71, .3), -1px 0 0 rgba(0, 0, 0, .25);
  transform-origin: 50% 100%;
  transform: translate3d(0, 0, 0) rotate(var(--lean, 0deg));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

/* alturas e larguras variadas, como livros de verdade */
.spine:nth-child(4n+2) { --w: 62px; --h: 360px; }
.spine:nth-child(4n+3) { --w: 78px; --h: 405px; }
.spine:nth-child(4n+4) { --w: 66px; --h: 345px; }

/* o livro "sai" da estante; vizinhos abrem espaço */
.spine:hover, .spine:focus-visible { transform: translate3d(0, -16px, 40px) rotate(var(--lean, 0deg)); z-index: 2; }
.spine:hover + .spine { transform: translate3d(8px, 0, 0) rotate(var(--lean, 0deg)); }
.spine:has(+ .spine:hover) { transform: translate3d(-8px, 0, 0) rotate(var(--lean, 0deg)); }
.spine:focus-visible { outline: 2px solid var(--medium-main); outline-offset: 3px; }
.spine.pulled { visibility: hidden; }

/* livro "a revelar": encostado no vizinho, com letras que brilham
   (precisa vir depois de .spine para o transform-origin valer) */
.reveal {
  --cover-bg: var(--light-main); --cover-fg: var(--medium-main);
  --lean: -4deg; transform-origin: 0 100%; margin-left: 20px;
}
.reveal .spine-title {
  background: linear-gradient(180deg, currentColor 0 40%, #fff 50%, currentColor 60% 100%) 0 0 / 100% 250%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: foil 3.5s linear infinite;
}
@keyframes foil { to { background-position: 0 -250%; } }

/* entrada: os livros caem na prateleira quando ela aparece na tela */
.bookshelf.pre .spine { opacity: 0; }
.bookshelf.in .spine { animation: drop .8s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: calc(var(--i, 0) * 120ms); }
@keyframes drop { from { opacity: 0; transform: translate3d(0, -70px, 0) rotate(calc(var(--lean, 0deg) - 6deg)); } }


/* =========================================================
   LIVRO ABERTO (modal 3D)
   ========================================================= */

.book-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; color: var(--cream); }
.book-modal[hidden] { display: none; }
html.modal-open { overflow: hidden; }

.book-modal-backdrop { position: absolute; inset: 0; background: radial-gradient(circle at 35% 50%, rgba(30, 86, 140, .96), rgba(8, 28, 50, .98)); opacity: 0; transition: opacity .45s; cursor: pointer; }
.book-modal.show .book-modal-backdrop { opacity: 1; }

.book-modal-inner { position: relative; display: flex; align-items: center; gap: 90px; padding: 24px; }

.book-stage { position: relative; flex: none; perspective: 1600px; }
.book-stage::after {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: -38px; height: 26px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
  filter: blur(4px); opacity: 0; transition: opacity .5s .3s;
}
.book-modal.show .book-stage::after { opacity: 1; }

.book-3d {
  --bw: min(300px, 40vh); --d: 80px;
  position: relative; width: var(--bw); height: calc(var(--bw) * 1.5);
  transform-style: preserve-3d; will-change: transform;
}
.bk {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
  transition: transform .25s ease-out;
}
.bk-face { position: absolute; backface-visibility: hidden; }

.bk-front {
  inset: 0; transform: translateZ(calc(var(--d) / 2));
  background-color: var(--cover-bg); background-size: cover; background-position: center;
  border-radius: 3px 8px 8px 3px; padding: 8%;
  display: flex; align-items: flex-end;
  color: var(--cover-fg); font-weight: bold; font-size: 1.4rem; line-height: 1;
}
.bk-front::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.4) 0, rgba(255,255,255,.2) 2.5%, rgba(0,0,0,.14) 5%, transparent 10%); }
.bk-front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.2), transparent 38%); }
.book-3d.has-image .bk-front span { display: none; }

.bk-back { inset: 0; transform: translateZ(calc(var(--d) / -2)) rotateY(180deg); background: var(--cover-bg); }
.bk-spine { top: 0; height: 100%; width: var(--d); left: calc(var(--d) / -2); transform: rotateY(-90deg); }

.bk-pages {
  top: 0; height: 100%; width: var(--d); left: calc(100% - var(--d) / 2); transform: rotateY(90deg);
  background:
    linear-gradient(90deg, var(--cover-bg) 0 4px, transparent 4px calc(100% - 4px), var(--cover-bg) calc(100% - 4px)),
    repeating-linear-gradient(90deg, #f6f0de 0 2px, #ddd2b5 2px 3px);
}
.bk-top, .bk-bottom {
  left: 0; width: 100%; height: var(--d);
  background:
    linear-gradient(0deg, var(--cover-bg) 0 4px, transparent 4px calc(100% - 4px), var(--cover-bg) calc(100% - 4px)),
    repeating-linear-gradient(0deg, #f6f0de 0 2px, #ddd2b5 2px 3px);
}
.bk-top { top: calc(var(--d) / -2); transform: rotateX(90deg); }
.bk-bottom { top: calc(100% - var(--d) / 2); transform: rotateX(-90deg); }

.book-info { max-width: 380px; }
.book-info h3 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; }
.book-info p:not(.eyebrow) { font-size: 1.1rem; margin-bottom: 30px; }
.book-info .eyebrow { color: var(--book-accent, var(--light-main)); }
.book-info .text-link { background: none; border: 0; cursor: pointer; }


/* =========================================================
   PROFESSORAS
   ========================================================= */

#teachers {
  background-color: var(--medium-main);
  background-image: linear-gradient(45deg, #000, var(--medium-main));
}

.teachers-grid { display: grid; gap: clamp(20px, 3vw, 32px); max-width: 1000px; margin: 0 auto; }

/* uma professora por linha, em cartão de vidro: o cartão cresce com o tamanho da biografia */
.teacher-card {
  --photo: clamp(180px, 24vw, 280px);
  display: grid;
  grid-template-columns: var(--photo) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(22px, 3.5vw, 44px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 32px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* alterna: na segunda professora a foto vai para a direita */
.teacher-card:nth-child(even) { grid-template-columns: minmax(0, 1fr) var(--photo); }
.teacher-card:nth-child(even) .teacher-photo { order: 2; }

/* serve tanto para <img> (foto real) quanto para o espaço reservado "FOTO" */
.teacher-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: var(--light-main);
  font-size: .7rem;
  color: var(--medium-main);
}

.teacher-card h3 { margin-bottom: 6px; }
.teacher-card .handle { display: inline-block; margin-bottom: 18px; font-size: .8rem; color: var(--light-main); }
.teacher-card .handle:hover { color: var(--cream); }

.teacher-bio {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--light-main);
  text-align: justify;
  hyphens: auto; /* quebra palavras com hífen para o justificado não abrir buracos */
  -webkit-hyphens: auto;
}


/* =========================================================
   DEPOIMENTOS
   ========================================================= */

.testimonials-section { background: var(--cream); color: var(--medium-main); }
.testimonials-section .eyebrow { color: var(--medium-main); }

.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }

.testimonial {
  min-height: 230px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  background: var(--light-main);
}

.quote { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; }
.testimonial span { font-size: .7rem; }

.testimonial.screenshot {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--medium-main);
  color: var(--light-main);
  font-size: .7rem;
}


/* =========================================================
   PERGUNTAS FREQUENTES
   ========================================================= */

#faq { background: var(--medium-main); }

.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.faq-list { border-top: 1px solid var(--line-on-dark); }

details { border-bottom: 1px solid var(--line-on-dark); padding: 20px 0; }

summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
summary:hover { color: var(--light-main); }
summary::after { content: "+"; color: var(--light-main); }
details[open] summary::after { content: "−"; }

details p { padding-top: 15px; max-width: 700px; color: var(--light-main); font-size: .85rem; }


/* =========================================================
   LISTA DE ESPERA (formulário)
   ========================================================= */

.waitlist { background: var(--light-main); color: var(--medium-main); padding: calc(110px + var(--r)) 0; }
.waitlist .eyebrow { color: var(--medium-main); }
.waitlist-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; }
.waitlist h2 { margin-bottom: 25px; }
.waitlist-inner > div > p:last-child { max-width: 450px; }

.waitlist-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.waitlist-form label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }

.waitlist-form input,
.waitlist-form select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(16, 60, 101, .35);
  border-radius: 14px;
  background: var(--cream);
  color: var(--medium-main);
  font-family: var(--font-body);
}

.waitlist-form input::placeholder { color: rgba(16, 60, 101, .5); }
.waitlist-form input.invalid { border-color: var(--dark-2); box-shadow: 0 0 0 2px rgba(173, 37, 37, .25); }
.waitlist-form input:focus,
.waitlist-form select:focus { outline: 2px solid var(--medium-main); outline-offset: 1px; }

.waitlist-form .button { grid-column: 1 / -1; justify-self: start; margin-top: 8px; background: var(--medium-main); color: var(--cream); }
.waitlist-form .button:hover { background: var(--dark-main); }
.waitlist-form .button:disabled { opacity: .6; cursor: wait; transform: none; }

/* armadilha anti-spam: fora da tela para humanos */
.honeypot { position: absolute; left: -9999px; }

.form-status { grid-column: 1 / -1; font-size: .9rem; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.success { color: var(--medium-main); }
.form-status.error { color: var(--dark-2); }


/* =========================================================
   RODAPÉ
   ========================================================= */

.site-footer { background: var(--dark-main); color: var(--cream); padding: calc(50px + var(--r)) 0 50px; }
.site-footer a { color: var(--cream); }
.site-footer .logo img { width: 64px; padding: 6px; background: var(--header-bg); border-radius: 16px; }

.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.footer-inner p { font-size: .75rem; color: var(--light-main); margin-top: 8px; }

.footer-links { display: flex; gap: 25px; font-size: .72rem; }
.footer-links a:hover { color: var(--light-main); }


/* =========================================================
   SEÇÕES EMPILHADAS: cada uma desliza sobre a anterior,
   com topo arredondado e sombra para cima
   ========================================================= */

.announcement, #about, .program-process-background, .bookshelf-section, #included,
#teachers, .testimonials-section, #faq, .waitlist, .site-footer {
  position: relative;
  margin-top: calc(var(--r) * -1);
  border-radius: var(--r) var(--r) 0 0;
  overflow: clip;
  box-shadow: 0 -10px 28px -12px rgba(0, 0, 0, .28);
}

/* Modalidades + Como funciona dividem o mesmo fundo, sem sobreposição entre si */
#modalities { padding-bottom: 120px; }
.program-process-background .process-section { padding-top: 120px; }


/* =========================================================
   ENTRADA POR ROLAGEM E HOVER DOS CARTÕES
   ========================================================= */

.fx { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--fxi, 0) * 70ms); }
.fx.fx-in { opacity: 1; transform: none; }

/* depois do .fx-in para o "levantar" no hover funcionar */
.included-item:hover,
.process-grid article:hover { transform: translateY(-6px); box-shadow: 0 18px 30px rgba(16, 60, 101, .18); }


/* =========================================================
   TELAS MÉDIAS (até 1150px)
   ========================================================= */

@media (max-width: 1150px) {
  /* abaixo disso os cartões 3/6/1 ficavam espremidos ao lado do texto */
  .two-column { grid-template-columns: 1fr; gap: 50px; }
}


/* =========================================================
   TABLET (até 900px)
   ========================================================= */

@media (max-width: 900px) {

  html { scroll-padding-top: 80px; }

  /* menu hambúrguer: painel que desce sob o header */
  .navbar { min-height: 68px; gap: 12px; }
  .logo { margin-right: auto; }
  .site-header .button { order: 2; }
  .nav-toggle { display: block; order: 3; margin-right: -8px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 6px 5% 12px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 14px 24px rgba(16, 60, 101, .18);
    font-size: 1rem;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }

  .hero { min-height: 0; }
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; padding: 10px 0 30px; }
  .hero-books { margin-inline: auto; max-width: min(320px, 70vw); }

  .faq-layout,
  .waitlist-inner { grid-template-columns: 1fr; gap: 50px; }

  .bookshelf-heading { flex-direction: column; align-items: flex-start; gap: 20px; }

  .announcement-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .countdown { flex-wrap: wrap; }

  .program-grid,
  .testimonial-grid { grid-template-columns: 1fr; }

  .process-grid,
  .included-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* =========================================================
   CELULAR (até 600px)
   ========================================================= */

@media (max-width: 600px) {

  :root { --r: 24px; }

  .section { padding: calc(70px + var(--r)) 0; }
  #modalities { padding-bottom: 70px; }
  .program-process-background .process-section { padding-top: 70px; }
  .section-heading { margin-bottom: 40px; }

  h2 { font-size: 2.3rem; }
  h2 br { display: none; } /* as quebras manuais do desktop ficam estranhas no celular */
  h3 { font-size: 1.45rem; }

  /* Hero */
  .hero { padding-top: 18px; }
  .hero-content { grid-template-columns: minmax(0, 1fr); padding: 36px 22px calc(var(--hero-tail)); }
  .hero-text { min-width: 0; width: 100%; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.2rem); }
  .hero-description { font-size: 1.05rem; margin: 22px 0; }
  .hero-actions { width: 100%; flex-direction: column; align-items: center; gap: 16px 18px; text-align: center; }
  .hero-actions .button { width: min(100%, 230px); max-width: 100%; padding: 16px 18px; white-space: normal; }
  .hero-visual { display: none; }

  /* Contagem: 4 colunas iguais em cartões azuis */
  .announcement { padding: calc(40px + var(--r)) 0; }
  .announcement h2 { font-size: 2rem; }
  .countdown { width: 100%; gap: 8px; }
  .countdown div { flex: 1; min-width: 0; padding: 14px 4px; background: var(--medium-main); border-radius: 20px; }
  .countdown strong { font-size: 1.8rem; color: var(--cream); }
  .countdown span { color: var(--light-main); font-size: .55rem; }

  /* Sobre */
  .section-text { font-size: 1.05rem; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stats div { min-height: 120px; padding: 20px 28px 20px 24px; }

  /* Modalidades */
  .program-grid { gap: 16px; }
  .program-card { padding: 40px 24px; }

  /* Como funciona + Incluso */
  .process-grid,
  .included-grid { grid-template-columns: 1fr; }
  .process-grid article { min-height: 220px; padding: 82px 24px 26px; }
  .included-item { min-height: 190px; padding: 76px 24px 24px; border-radius: 24px; }

  /* Estante e livro aberto */
  .bookshelf { padding: 40px 12px 16px; }
  /* lombadas mais finas no celular para caberem todos os livros (se ainda faltar espaço, a estante rola para o lado) */
  .spine { width: calc(var(--w) * .56); height: calc(var(--h) * .72); --fs: 13px; }
  .reveal { margin-left: 12px; }
  .book-modal-inner { flex-direction: column; justify-content: center; gap: 28px; padding: 20px; }
  .book-3d { --bw: min(54vw, 30vh); }
  .book-info { text-align: center; }

  /* Professoras */
  .teacher-card,
  .teacher-card:nth-child(even) { grid-template-columns: 1fr; gap: 22px; padding: 18px 18px 24px; }
  .teacher-card:nth-child(even) .teacher-photo { order: 0; }
  .teacher-photo { width: min(100%, 320px); }
  .teacher-bio { font-size: .95rem; }

  /* Depoimentos */
  .testimonial { padding: 28px; min-height: 0; gap: 24px; }
  .quote { font-size: 1.25rem; }
  .testimonial.screenshot { min-height: 150px; }

  /* FAQ: área de toque maior */
  .faq-layout { gap: 30px; }
  details { padding: 0; }
  summary { padding: 20px 0; font-size: 1.05rem; align-items: center; }
  summary::after { font-size: 1.5rem; line-height: 1; }
  details p { padding: 0 0 20px; }

  /* Lista de espera: campos em 16px evitam zoom automático no iPhone */
  .waitlist { padding: calc(70px + var(--r)) 0; }
  .waitlist-form { grid-template-columns: 1fr; }
  .waitlist-form input,
  .waitlist-form select { font-size: 16px; padding: 16px 14px; }
  .waitlist-form .button { width: 100%; padding: 18px; justify-self: stretch; }

  /* Rodapé */
  .site-footer { padding: calc(40px + var(--r)) 0 40px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; gap: 14px 22px; }
}


/* =========================================================
   LEITURA CONFORTÁVEL: textos dos cartões maiores no tablet e no celular
   (no computador continuam como estão)
   ========================================================= */

@media (max-width: 900px) {
  .stats span { font-size: .95rem; }
  .process-grid p,
  .included-item p,
  .program-card li,
  details p { font-size: .95rem; }
  .testimonial span { font-size: .8rem; }
}

@media (max-width: 600px) {
  .stats span { font-size: 1rem; line-height: 1.4; }
  .process-grid p,
  .included-item p { font-size: 1rem; line-height: 1.6; opacity: .9; }
  .program-card li { font-size: 1rem; }
  .teacher-bio { font-size: 1rem; }
  details p { font-size: 1rem; line-height: 1.6; }
  .testimonial span { font-size: .85rem; }
  .waitlist-form label { font-size: .78rem; }
  .countdown span { font-size: .6rem; }
}


/* =========================================================
   TELAS MUITO ESTREITAS (até 380px)
   ========================================================= */

@media (max-width: 380px) {
  .site-header .button-small { padding: 10px 12px; font-size: .68rem; letter-spacing: .04em; }
  .site-header .logo img { width: 56px; }
}


/* =========================================================
   MOVIMENTO REDUZIDO (acessibilidade)
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .bookshelf.in .spine, .reveal .spine-title, .hb { animation: none; }
  .spine { transition: none; }
  .fx { opacity: 1; transform: none; transition: none; }
}
