/* =========================================================
   PROJETO SONORO — Escola de Música
   Design tokens + estilos globais
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500;1,9..144,600&family=Manrope:wght@400;500;600;700;800&family=Noto+Music&display=swap");

:root {
  /* --- Cor: extraída da identidade visual (clave de sol vermelha/laranja) --- */
  --ink: #191919;
  --ink-soft: #47433f;
  --bg: #ffffff;
  --bg-soft: #f6f3f0;
  --bg-card: #ffffff;
  --red: #a20b15;
  --red-strong: #7d0910;
  --orange: #e35825;
  --orange-bright: #ff691c;
  --line: rgba(25, 25, 25, 0.12);
  --line-soft: rgba(25, 25, 25, 0.07);
  --shadow: 0 20px 40px -20px rgba(25, 15, 10, 0.25);
  --shadow-soft: 0 10px 30px -18px rgba(25, 15, 10, 0.2);

  /* --- Tipografia --- */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", Arial, sans-serif;

  /* --- Layout --- */
  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --header-h: 84px;

  /* --- Movimento --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.35s;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #f5efe8;
  --ink-soft: #cfc6bd;
  --bg: #15110f;
  --bg-soft: #1e1815;
  --bg-card: #1b1512;
  --red: #e0525c;
  --red-strong: #ff6d76;
  --orange: #ff7a3d;
  --orange-bright: #ff9257;
  --line: rgba(245, 239, 232, 0.14);
  --line-soft: rgba(245, 239, 232, 0.08);
  --shadow: 0 20px 45px -18px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 12px 30px -18px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f5efe8;
    --ink-soft: #cfc6bd;
    --bg: #15110f;
    --bg-soft: #1e1815;
    --bg-card: #1b1512;
    --red: #e0525c;
    --red-strong: #ff6d76;
    --orange: #ff7a3d;
    --orange-bright: #ff9257;
    --line: rgba(245, 239, 232, 0.14);
    --line-soft: rgba(245, 239, 232, 0.08);
    color-scheme: dark;
  }
}

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

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

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

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

::selection {
  background: var(--orange);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* =========================================================
   HELPERS
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

.clef {
  font-family: "Noto Music", "Segoe UI Symbol", "Apple Symbols", serif;
  font-style: normal;
  line-height: 1;
  display: inline-block;
  transform: translateY(-0.05em);
}

.eyebrow .clef {
  font-size: 1.5em;
  flex-shrink: 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.9rem);
  font-weight: 700;
  margin-top: 0.6rem;
}

.eyebrow + h2 {
  margin-top: 0.6rem;
}

.section-head p {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

section {
  padding: clamp(4rem, 4rem + 3vw, 7rem) 0;
}

.bg-soft {
  background: var(--bg-soft);
}

/* --- Seções com imagem de fundo em camada (sutil, decorativa) --- */
.has-bg-image {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.has-bg-image .section-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -14%;
  height: 128%;
  width: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.14;
  filter: grayscale(0.35) contrast(1.05);
  pointer-events: none;
  transform: translateY(var(--parallax-y, 0px));
  will-change: transform;
}

.has-bg-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-soft) 0%, color-mix(in srgb, var(--bg-soft) 45%, transparent) 45%, var(--bg-soft) 100%);
  pointer-events: none;
}

:root[data-theme="dark"] .has-bg-image .section-bg {
  opacity: 0.22;
}

/* --- Costura suave entre seções com fundo alternado (em vez de linha reta) --- */
.fade-seam {
  position: relative;
}

.fade-seam::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  z-index: 0;
  pointer-events: none;
}

.fade-seam.from-soft::before {
  background: linear-gradient(180deg, var(--bg-soft), transparent);
}

.fade-seam.from-plain::before {
  background: linear-gradient(180deg, var(--bg), transparent);
}

/* --- Botões / CTAs --- */
.btn {
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-bright), var(--red));
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-soft);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), filter var(--speed) var(--ease);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(-1px);
}

.btn svg {
  width: 1.2em;
  height: 1.2em;
  transition: transform var(--speed) var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: none;
  filter: none;
}

/* =========================================================
   REVEAL ON SCROLL (acionado via IntersectionObserver no script.js)
   A classe "js" é adicionada ao <html> assim que o script roda;
   sem JS, o conteúdo permanece totalmente visível (progressive enhancement).
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Variantes de direção: dão mais variedade além do fade-up padrão --- */
.js .reveal-left {
  transform: translateX(-42px);
}

.js .reveal-right {
  transform: translateX(42px);
}

.js .reveal-scale {
  transform: scale(0.92);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), height var(--speed) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.4);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}

.brand-name strong {
  display: block;
  font-size: 1rem;
  color: var(--ink);
}

.brand-name span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.main-nav a {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  transition: color var(--speed) var(--ease);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--orange);
  transition: right var(--speed) var(--ease);
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a:hover::after {
  right: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  transition: border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--orange);
  transform: rotate(-14deg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.nav-toggle span::before { transform: translate(-50%, -7px); }
.nav-toggle span::after { transform: translate(-50%, 5px); }

.site-header.nav-open .nav-toggle span { background: transparent; }
.site-header.nav-open .nav-toggle span::before { transform: translate(-50%, -50%) rotate(45deg); }
.site-header.nav-open .nav-toggle span::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 78vh, 800px);
  display: flex;
  align-items: center;
  padding-top: clamp(3rem, 3rem + 4vw, 5.5rem);
  padding-bottom: clamp(3rem, 3rem + 4vw, 5.5rem);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(100deg, rgba(10, 7, 5, 0.94) 0%, rgba(10, 7, 5, 0.8) 42%, rgba(10, 7, 5, 0.45) 68%, rgba(10, 7, 5, 0.22) 100%),
    linear-gradient(0deg, rgba(6, 4, 3, 0.6) 0%, transparent 32%);
}

.hero .container {
  width: 100%;
}

.hero-watermark {
  position: absolute;
  top: -14%;
  right: -4%;
  font-size: clamp(18rem, 15rem + 20vw, 34rem);
  color: var(--orange);
  opacity: 0.1;
  transform: rotate(8deg) translateY(var(--parallax-y, 0px));
  pointer-events: none;
  z-index: -1;
  user-select: none;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  --hero-pad-x: clamp(1.1rem, 0.7rem + 1.6vw, 2rem);
  --hero-pad-y: clamp(1rem, 0.7rem + 1.2vw, 1.75rem);
  padding: var(--hero-pad-y) var(--hero-pad-x);
  margin: calc(var(--hero-pad-y) * -1) calc(var(--hero-pad-x) * -1);
}

/* Painel escurecido atrás do texto — garante contraste com QUALQUER foto de
   fundo (clara ou escura), independente do tema claro/escuro do site. */
.hero-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(8, 5, 4, 0.55) 0%, rgba(8, 5, 4, 0.4) 70%, rgba(8, 5, 4, 0.12) 100%);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
}

.hero h1.eyebrow {
  font-size: 0.85rem;
  color: var(--orange-bright);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero h2 {
  margin-top: 1rem;
  font-size: clamp(2.3rem, 1.7rem + 3vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.4);
}

.hero h2 em {
  font-style: italic;
  font-weight: 600;
  color: var(--orange-bright);
  position: relative;
  background-image: linear-gradient(120deg,
    color-mix(in srgb, var(--orange) 30%, transparent) 0%,
    color-mix(in srgb, var(--orange) 30%, transparent) 100%);
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 0% 0.32em;
  animation: highlight-sweep 0.9s var(--ease) 1.05s forwards;
}

@keyframes highlight-sweep {
  to {
    background-size: 100% 0.32em;
  }
}

.hero h3 {
  margin-top: 1.4rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 46ch;
  line-height: 1.65;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero-cta-row {
  margin-top: 2.2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.hero-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-badge span {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* --- Fotos "memória": pilha sobreposta, tipo leque na mão --- */
.hero-memories {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(46%, 580px);
  z-index: 2;
  pointer-events: none;
}

.memory {
  position: absolute;
  margin: 0;
  padding: 9px 9px 24px;
  background: #fdfdfc;
  border: 1.5px solid hsla(30,100%,50%,.2);
  border-radius: 8px;
  box-shadow: 0 18px 30px -14px rgba(15, 8, 5, 0.55);
  animation-name: memory-bob;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.memory img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 3px;
  display: block;
  transition: opacity .5s ease-in-out;
}

@keyframes memory-bob {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-10px) rotate(calc(var(--rot, 0deg) + 1.5deg)); }
}

/* Empilhadas bem próximas: cada uma atrás fica um pouco maior deslocada
   para baixo/direita, então só a "pontinha" inferior de cada uma aparece
   por trás da foto da frente — como um maço de fotos segurado na mão. */
.memory-4 { top: 19%; left: 42%; width: 190px; z-index: 2; --rot: 72deg;  animation-duration: 8s;   animation-delay: 0.25s; }
.memory-3 { top: 20%; left: 10%; width: 190px; z-index: 1; --rot: -14deg; animation-duration: 8.5s;   animation-delay: 0.50s; }
.memory-2 { top: 44%; left: 8%; width: 190px; z-index: 3; --rot: -12deg; animation-duration: 7.5s; animation-delay: 0.75s; }
.memory-1 { top: 42%; left: 38%; width: 190px; z-index: 4; --rot: 10deg;  animation-duration: 9s;  animation-delay: 0.99s; }

@media (max-width: 1180px) {
  .hero-memories { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .memory { animation: none; }
}

/* =========================================================
   BENEFÍCIOS
   ========================================================= */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 2rem 1.8rem;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: var(--orange);
}

.benefit-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--orange) 14%, transparent);
  color: var(--orange);
  margin-bottom: 1.3rem;
  transition: transform var(--speed) var(--ease);
}

.benefit-card:hover .benefit-icon {
  transform: rotate(-8deg) scale(1.08);
}

.benefit-icon svg {
  width: 26px;
  height: 26px;
}

.benefit-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.benefit-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* =========================================================
   DESEJOS
   ========================================================= */
.desires .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 2rem + 3vw, 4rem);
  align-items: center;
}

.desires-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 3 / 4;
}

.desires-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desire-list {
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
}

.desire-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1.08rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}

.desire-list li:hover {
  transform: translateX(6px);
  border-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 7%, var(--bg-card));
}

.desire-list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--orange);
}

.desires .btn {
  margin-top: 2.2rem;
}

/* =========================================================
   DEPOIMENTOS — carrossel infinito (CSS puro)
   ========================================================= */
.testimonial-viewport {
  overflow: hidden;
  margin-top: 1rem;
  /* fade nas bordas para o carrossel "nascer" e "sumir" suavemente */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.testimonial-track {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  padding: 0.4rem calc((100vw - min(100vw, var(--container))) / 2 + 1.5rem) 0.4rem 1.5rem;
  animation: testimonial-marquee 70s linear infinite;
}

.testimonial-viewport:hover .testimonial-track,
.testimonial-viewport:focus-within .testimonial-track {
  animation-play-state: paused;
}

@keyframes testimonial-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-track {
    animation: none;
  }
  .testimonial-viewport {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.testimonial-card {
  flex: 0 0 320px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: var(--orange);
}

.stars {
  display: flex;
  gap: 3px;
  color: var(--orange);
}

.stars svg {
  width: 16px;
  height: 16px;
}

.testimonial-card blockquote {
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink-soft);
  line-height: 1.6;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.testimonial-author span {
  color: var(--ink-soft);
}

.avatar-initials {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-bright), var(--red));
}

.testimonial-card:nth-child(3n+2) .avatar-initials {
  background: linear-gradient(135deg, var(--red), var(--red-strong));
}

.testimonial-card:nth-child(3n) .avatar-initials {
  background: linear-gradient(135deg, var(--orange), var(--orange-bright));
}

.testimonial-author strong {
  display: block;
  font-size: 0.92rem;
}

/* =========================================================
   CURSOS
   ========================================================= */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
  margin-bottom: 2.6rem;
}

.course-chip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  text-align: center;
  aspect-ratio: 1 / 1.05;
  padding: 1.4rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.course-chip:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--orange);
  box-shadow: var(--shadow);
}

.course-chip .course-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.6s var(--ease);
}

.course-chip:hover .course-cover {
  transform: scale(1.1);
}

.course-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 12, 8, 0.05) 0%, rgba(15, 8, 5, 0.82) 100%);
}

.course-chip .icon-wrap {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
  transition: transform var(--speed) var(--ease);
}

.course-chip:hover .icon-wrap {
  transform: scale(1.1) rotate(-6deg);
}

.course-chip .icon-wrap svg {
  width: 22px;
  height: 22px;
}

.course-chip span:last-child {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.courses-cta {
  text-align: center;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2rem, 2rem + 3vw, 4rem);
  align-items: start;
}

.faq-media figure {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 3 / 4;
  margin: 0;
}

.faq-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faq-list {
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 0;
  overflow: hidden;
  transition: border-color var(--speed) var(--ease);
}

.faq-list details[open] {
  border-color: var(--orange);
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.6rem;
  font-weight: 700;
  font-size: 1.02rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary .marker {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  transition: transform var(--speed) var(--ease), background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.faq-list summary .marker svg {
  width: 14px;
  height: 14px;
  transition: transform var(--speed) var(--ease);
}

.faq-list details[open] summary .marker {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.faq-list details[open] summary .marker svg {
  transform: rotate(45deg);
}

.faq-content {
  height: 0;
  overflow: hidden;
  transition: height var(--speed) var(--ease);
}

.faq-content-inner {
  padding: 0 1.6rem 1.5rem;
}

.faq-list .faq-answer {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 65ch;
}

/* fallback sem JS: o navegador exibe/oculta nativamente via [open] */
.faq-list details:not(.js-managed)[open] .faq-content {
  height: auto;
}

/* =========================================================
   SOBRE / AUTORIDADE
   ========================================================= */
.about .container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 2rem + 3vw, 4rem);
  align-items: center;
}

.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 3 / 4;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-media .since {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.1rem;
  box-shadow: var(--shadow);
}

.about-media .since strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--orange);
}

.about-media .since span {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.about-body p {
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
}

.about-body .btn {
  margin-top: 1.2rem;
}

/* =========================================================
   LOCALIZAÇÃO
   ========================================================= */
.location .container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 2rem + 3vw, 3.5rem);
  align-items: stretch;
}

.location-info address {
  font-style: normal;
  margin-top: 1.5rem;
  display: grid;
  gap: 1.3rem;
}

.location-info .info-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.location-info .info-row svg {
  width: 22px;
  height: 22px;
  color: var(--orange);
  flex-shrink: 0;
  margin-top: 2px;
}

.location-info .info-row strong {
  display: block;
  font-size: 0.98rem;
}

.location-info .info-row span,
.location-info .info-row a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.location-info .info-row a:hover {
  color: var(--orange);
}

.location-info .btn {
  margin-top: 1.6rem;
}

.map-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 340px;
  border: 1px solid var(--line);
  filter: grayscale(0.15) contrast(1.02);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  display: block;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: var(--ink);
  color: var(--bg);
  padding-top: 4.5rem;
}

:root[data-theme="dark"] footer {
  background: #0d0a09;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) footer {
    background: #0d0a09;
  }
}

footer .footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

footer .brand {
  color: var(--bg);
}

footer .brand-name strong {
  color: var(--bg);
}

footer .brand-name span {
  color: rgba(255, 255, 255, 0.6);
}

footer p.tagline {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  max-width: 32ch;
}

footer .social-row {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.7rem;
}

footer .social-row a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease), transform var(--speed) var(--ease);
}

footer .social-row a:hover {
  border-color: var(--orange);
  background: var(--orange);
  transform: translateY(-3px);
}

footer .social-row svg {
  width: 18px;
  height: 18px;
}

footer h4 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.2rem;
}

footer .footer-links {
  display: grid;
  gap: 0.75rem;
}

footer .footer-links a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  transition: color var(--speed) var(--ease), padding-left var(--speed) var(--ease);
}

footer .footer-links a:hover {
  color: var(--orange);
  padding-left: 4px;
}

footer table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

footer table caption {
  text-align: left;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

footer table th,
footer table td {
  text-align: left;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

footer table th {
  font-weight: 600;
  color: var(--bg);
}

footer table tr:last-child th,
footer table tr:last-child td {
  border-bottom: none;
}

.footer-bottom {
  padding: 1.6rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom a:hover {
  color: var(--orange);
}

.footer-bottom .legal-links {
  display: flex;
  gap: 1.4rem;
}

/* =========================================================
   WHATSAPP FLOAT
   ========================================================= */
.whatsapp-float {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 60px;
  height: 60px;
  padding: 0;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.4);
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  transition: width var(--speed) var(--ease), border-radius var(--speed) var(--ease),
    padding var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  width: 196px;
  justify-content: flex-start;
  padding-inline: 1.2rem;
  border-radius: 999px;
  box-shadow: 0 18px 36px -10px rgba(0, 0, 0, 0.45);
}

.whatsapp-float svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.whatsapp-float .wa-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  margin-left: 0;
  transition: max-width var(--speed) var(--ease), opacity 0.25s ease 0.05s, margin-left var(--speed) var(--ease);
}

.whatsapp-float:hover .wa-label,
.whatsapp-float:focus-visible .wa-label {
  max-width: 140px;
  opacity: 1;
  margin-left: 0.65rem;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  animation: pulse-wa 2.4s var(--ease) infinite;
  pointer-events: none;
}

@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1024px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .courses-grid { grid-template-columns: repeat(3, 1fr); }
  .testimonial-card { flex-basis: 280px; }

  .desires .container,
  .about .container,
  .location .container,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  /* Imagem sempre depois do texto no mobile — senão fica sem contexto */
  .desires-media { max-width: 420px; margin-inline: auto; order: 2; }
  .desires-content { order: 1; }
  .about-media { max-width: 420px; margin-inline: auto; order: 2; }
  .about-body { order: 1; }
  .faq-media { order: 2; }
  .faq-body { order: 1; }
  .faq-media figure { position: static; max-width: 420px; aspect-ratio: 16/9; margin-inline: auto; }

  footer .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }

  .site-header.nav-open .main-nav {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1.1rem;
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  p { font-size: 1rem; }

  .benefits-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-card { flex-basis: 260px; }
  footer .footer-grid { grid-template-columns: 1fr; }

  .hero-cta-row { flex-direction: column; align-items: flex-start; }
  .whatsapp-float .wa-label { display: none; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}