/* ==========================================================================
   ESCUTA — Landing Page
   Design system e estilos
   ========================================================================== */

/* --- TOKENS -------------------------------------------------------------- */
:root {
  /* Cores da identidade */
  --color-navy: #1E3A5F;
  --color-navy-deep: #142A47;
  --color-yellow: #F4A11C;
  --color-yellow-deep: #D68908;
  --color-cream: #F8F0DC;
  --color-cream-warm: #F1E7CE;
  --color-ink: #2A1F1A;
  --color-terracotta: #B5654A;

  /* Uso semântico */
  --bg-primary: var(--color-cream);
  --bg-inverse: var(--color-navy);
  --bg-accent: var(--color-yellow);
  --text-primary: var(--color-ink);
  --text-inverse: var(--color-cream);
  --text-muted: rgba(42, 31, 26, 0.65);
  --text-accent: var(--color-terracotta);
  --line: rgba(42, 31, 26, 0.15);
  --line-inverse: rgba(248, 240, 220, 0.18);

  /* Tipografia */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Marker Felt', cursive;

  /* Ritmo */
  --step-0: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --step-1: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --step-2: clamp(1.15rem, 1rem + 0.75vw, 1.5rem);
  --step-3: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  --step-4: clamp(1.8rem, 1.5rem + 1.5vw, 2.8rem);
  --step-5: clamp(2.4rem, 1.8rem + 2.5vw, 4rem);
  --step-6: clamp(3rem, 2.2rem + 3.5vw, 5.5rem);
  --step-7: clamp(3.8rem, 2.5rem + 5vw, 7rem);

  /* Espaçamento */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --space-7: 8rem;
  --space-8: 12rem;

  --container-narrow: 720px;
  --container-mid: 980px;
  --container-wide: 1280px;
  --container-full: 1600px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --- RESET --------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-1);
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, audio {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

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

/* --- UTILITÁRIOS --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 2.5vw, 2rem);
  position: relative;
  z-index: 2;
}

.container--narrow { max-width: var(--container-narrow); }
.container--mid { max-width: var(--container-mid); }

.section {
  padding: var(--space-7) 0;
  position: relative;
}

.section--tight { padding: var(--space-6) 0; }
.section--wide { padding: var(--space-8) 0; }

.section--dark {
  background: var(--color-navy);
  color: var(--text-inverse);
}

.section--dark { --line: var(--line-inverse); --text-muted: rgba(248, 240, 220, 0.65); }

.eyebrow {
  font-family: var(--font-hand);
  font-size: var(--step-2);
  color: var(--color-terracotta);
  line-height: 1;
  display: inline-block;
  margin-bottom: var(--space-2);
}

.section--dark .eyebrow { color: var(--color-yellow); }

.title-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 0;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section--dark .title-display,
.hero .title-display,
.caminho .title-display,
.contactos .title-display { color: var(--text-inverse); }

.title-1 { font-size: var(--step-6); }
.title-2 { font-size: var(--step-5); }
.title-3 { font-size: var(--step-4); }

.lead {
  font-size: var(--step-3);
  line-height: 1.5;
  font-family: var(--font-display);
  font-variation-settings: 'opsz' 24, 'SOFT' 30;
  font-weight: 300;
  letter-spacing: -0.005em;
}

.prose {
  font-size: var(--step-1);
  line-height: 1.72;
  color: var(--text-primary);
}
.section--dark .prose,
.hero .prose,
.caminho .prose,
.contactos .prose { color: var(--text-inverse); }
.prose p + p { margin-top: var(--space-2); }
.prose strong {
  font-weight: 500;
  color: var(--text-accent);
  position: relative;
  white-space: nowrap;
}

/* Sublinhado manuscrito nas palavras-chave */
.prose strong::after {
  content: '';
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  bottom: -0.15em;
  height: 0.55em;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'><path d='M2 8 C 20 3, 40 10, 60 6, 80 3, 98 8' fill='none' stroke='%23F4A11C' stroke-width='2.5' stroke-linecap='round'/></svg>") no-repeat center/100% 100%;
  opacity: 0.75;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--ease-out) 0.2s;
}
.prose strong.is-visible::after { transform: scaleX(1); }

.section--dark .prose strong,
.caminho .prose strong,
.contactos .prose strong,
.hero .prose strong { color: var(--color-yellow); }

/* Sublinhado manuscrito nas palavras-chave — variante em fundo escuro */
.section--dark .prose strong::after,
.caminho .prose strong::after,
.contactos .prose strong::after,
.hero .prose strong::after {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'><path d='M2 8 C 20 3, 40 10, 60 6, 80 3, 98 8' fill='none' stroke='%23F4A11C' stroke-width='2.5' stroke-linecap='round'/></svg>") no-repeat center/100% 100%;
  opacity: 0.85;
}

/* Divisor manuscrito */
.brush-divider {
  display: block;
  width: 100%;
  height: 32px;
  margin: var(--space-5) auto;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 32' preserveAspectRatio='none'><path d='M5 16 C 100 8, 200 24, 300 14, 400 6, 500 22, 595 16' fill='none' stroke='%232A1F1A' stroke-width='2.2' stroke-linecap='round' opacity='0.5'/></svg>") no-repeat center/100% 100%;
}
.section--dark .brush-divider,
.hero .brush-divider,
.caminho .brush-divider,
.contactos .brush-divider {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 32' preserveAspectRatio='none'><path d='M5 16 C 100 8, 200 24, 300 14, 400 6, 500 22, 595 16' fill='none' stroke='%23F8F0DC' stroke-width='2.2' stroke-linecap='round' opacity='0.5'/></svg>") no-repeat center/100% 100%;
}

/* --- NAVIGATION ---------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-2) 0;
  transition: background-color 0.4s var(--ease-out), padding 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}

.nav.is-scrolled {
  background: rgba(30, 58, 95, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.nav__logo {
  display: block;
  width: 46px;
  height: 46px;
  background-image: url('../img/logo/mark-yellow.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  transition: opacity 0.3s var(--ease-out), transform 0.5s var(--ease-out);
}

.nav__logo:hover { opacity: 0.85; transform: scale(1.06); }

.nav__lang {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-inverse);
}

.nav__lang button {
  padding: 0.25rem 0.5rem;
  color: rgba(248, 240, 220, 0.55);
  transition: color 0.25s var(--ease-out);
  border-radius: 2px;
}
.nav__lang button:hover { color: var(--text-inverse); }
.nav__lang button.is-active { color: var(--color-yellow); }
.nav__lang .divider { color: rgba(248, 240, 220, 0.3); }

/* --- HERO ---------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-navy);
  color: var(--text-inverse);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--space-6) 0 var(--space-5);
}

/* Fundo do hero: imagem + vídeo opcional por cima */
.hero__video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background-image: url('../img/ana/ana-cantina.jpg');
  background-size: cover;
  background-position: center;
}

.hero__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.7;
}

.hero__video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20,42,71,0.55) 0%, rgba(20,42,71,0.7) 40%, rgba(20,42,71,0.9) 100%),
    radial-gradient(ellipse at 30% 40%, rgba(244, 161, 28, 0.12), transparent 50%);
  z-index: 1;
}

/* Hero content */
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
}

.hero__mark {
  width: clamp(280px, 40vw, 480px);
  height: auto;
  margin: 0 auto var(--space-4);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.35));
  animation: breathe 6s var(--ease-in-out) infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

.hero__manifesto {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
  font-size: var(--step-6);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-cream);
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 6vw, 4rem);
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .hero__manifesto {
    flex-direction: column;
    gap: 0.25rem;
    font-size: clamp(3rem, 14vw, 4.5rem);
  }
  .hero__manifesto span {
    line-height: 1;
  }
}

.hero__manifesto span { display: inline-block; }
.hero__manifesto span:nth-child(1) { animation: fadeUp 1.1s var(--ease-out) 0.2s both; }
.hero__manifesto span:nth-child(2) { animation: fadeUp 1.1s var(--ease-out) 0.4s both; color: var(--color-yellow); }
.hero__manifesto span:nth-child(3) { animation: fadeUp 1.1s var(--ease-out) 0.6s both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__signature {
  font-family: var(--font-hand);
  font-size: var(--step-3);
  color: var(--color-yellow);
  line-height: 1;
  animation: fadeUp 1.1s var(--ease-out) 0.9s both;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(248, 240, 220, 0.65);
  animation: fadeUp 1s var(--ease-out) 1.4s both;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(248, 240, 220, 0.6));
  animation: scrollHint 2.4s var(--ease-in-out) infinite;
}

@keyframes scrollHint {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
}

/* --- SECÇÃO INVESTIGAÇÃO ------------------------------------------------- */
.investigacao {
  position: relative;
  background: var(--color-cream);
  padding-top: var(--space-7);
  padding-bottom: var(--space-6);
}

/* --- PERCURSO ------------------------------------------------------------ */
.percurso {
  background: var(--color-cream);
  position: relative;
}

.percurso__intro {
  max-width: var(--container-mid);
  margin: 0 auto var(--space-6);
  text-align: center;
}

/* Cada etapa */
.etapa {
  position: relative;
  margin-bottom: var(--space-7);
}

.etapa__header {
  display: flex;
  align-items: baseline;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  margin-bottom: var(--space-3);
  flex-wrap: nowrap;
}

@media (max-width: 500px) {
  .etapa__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

.etapa__num {
  font-family: var(--font-hand);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  color: var(--color-yellow);
  line-height: 0.8;
  font-weight: 500;
  flex-shrink: 0;
  position: relative;
  top: 0.15em;
}

.etapa__num::before {
  content: '';
  position: absolute;
  left: -8px; right: -8px; bottom: 8px;
  height: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'><path d='M2 6 Q 50 2, 98 6' fill='none' stroke='%23B5654A' stroke-width='3' stroke-linecap='round' opacity='0.7'/></svg>") no-repeat center/100% 100%;
  z-index: -1;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out) 0.3s, opacity 0.8s var(--ease-out) 0.3s;
}

.etapa.is-visible .etapa__num::before {
  opacity: 1;
  transform: scaleX(1);
}

.etapa__title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 400;
  font-variation-settings: 'opsz' 96, 'SOFT' 40;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.etapa__body {
  max-width: var(--container-mid);
  margin-bottom: var(--space-4);
}

/* Bloco de galeria com label */
.gallery-block {
  margin-top: var(--space-4);
}

.gallery-block__label {
  font-family: var(--font-hand);
  color: var(--color-terracotta);
  font-size: var(--step-2);
  line-height: 1;
  margin-bottom: var(--space-2);
  padding-left: 0.5rem;
  position: relative;
}

.gallery-block__label::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--color-terracotta);
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}

/* Galerias */
.gallery {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.gallery--3 { grid-template-columns: 1fr; }
.gallery--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .gallery--3 { grid-template-columns: repeat(3, 1fr); }
  .gallery--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .gallery--4 { grid-template-columns: repeat(4, 1fr); }
}

.gallery__item {
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--color-cream-warm);
  border-radius: 6px;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
  aspect-ratio: 4/3;
}

.gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(30, 58, 95, 0.35);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.gallery__item:hover img { transform: scale(1.04); }

/* Rotação subtil das ilustrações infantis para dar vida */
.gallery--mapas .gallery__item:nth-child(1) { transform: rotate(-1deg); }
.gallery--mapas .gallery__item:nth-child(2) { transform: rotate(0.5deg); }
.gallery--mapas .gallery__item:nth-child(3) { transform: rotate(-0.5deg); }
.gallery--mapas .gallery__item:nth-child(4) { transform: rotate(1deg); }

.gallery--mapas .gallery__item:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.02);
}

.gallery__item img {
  padding: 0.5rem;
  background: var(--color-cream);
}

/* Duplo video */
.video-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

@media (min-width: 800px) {
  .video-pair { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
}

.video-box {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-navy-deep);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px -25px rgba(30, 58, 95, 0.4);
}

.video-box video, .video-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-box--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cream);
  font-family: var(--font-hand);
  font-size: var(--step-2);
  text-align: center;
  padding: var(--space-3);
  background:
    radial-gradient(circle at 30% 40%, rgba(244, 161, 28, 0.15), transparent 60%),
    var(--color-navy-deep);
}

.video-box--placeholder::before {
  content: '▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 70px;
  background: rgba(244, 161, 28, 0.15);
  border: 2px solid var(--color-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: var(--color-yellow);
  font-size: 28px;
  transition: transform 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.video-box--placeholder:hover::before {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(244, 161, 28, 0.25);
}

.video-box__label {
  position: relative;
  z-index: 2;
  color: rgba(248, 240, 220, 0.8);
  font-size: 0.9rem;
  margin-top: 90px;
}

/* Trio de áudios */
.audio-trio {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

@media (min-width: 800px) {
  .audio-trio { grid-template-columns: repeat(3, 1fr); }
}

.audio-card {
  background: var(--color-cream-warm);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.audio-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -25px rgba(30, 58, 95, 0.25);
}

.audio-card__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  font-variation-settings: 'opsz' 24, 'SOFT' 30;
  line-height: 1.2;
  color: var(--color-navy);
}

.audio-card__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Player áudio custom */
.player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem 0.6rem 0.6rem;
  background: var(--color-cream);
  border-radius: 40px;
  border: 1px solid var(--line);
  margin-top: auto;
}

.player__toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-yellow);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out);
  flex-shrink: 0;
}
.player__toggle:hover { transform: scale(1.06); background: var(--color-yellow-deep); }
.player__toggle svg { width: 14px; height: 14px; }

.player__wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 32px;
  cursor: pointer;
}

.player__wave-bar {
  flex: 1;
  background: var(--color-navy);
  opacity: 0.25;
  border-radius: 1px;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.player__wave-bar.is-played { opacity: 0.85; background: var(--color-terracotta); }
.player__wave.is-playing .player__wave-bar.is-current {
  opacity: 1;
  transform: scaleY(1.2);
  background: var(--color-terracotta);
}

.player__time {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 3.2em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- CAMINHO EM CONSTRUÇÃO (secção pessoal) ----------------------------- */
.caminho {
  background: var(--color-navy);
  color: var(--text-inverse);
  padding: var(--space-7) 0;
  position: relative;
  overflow: hidden;
}

.caminho::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 300px; height: 300px;
  background-image: url('../img/logo/mark-yellow.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}

.caminho__inner {
  max-width: var(--container-mid);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.caminho__question {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-4);
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
  color: var(--color-yellow);
  line-height: 1.2;
  margin: var(--space-4) 0;
  padding: var(--space-3) 0 var(--space-3) var(--space-3);
  border-left: 3px solid var(--color-yellow);
  max-width: 42rem;
}

.caminho__closing {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-style: italic;
  font-variation-settings: 'opsz' 48, 'SOFT' 40;
  line-height: 1.4;
  color: var(--color-cream);
  margin-top: var(--space-4);
  text-align: center;
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--line-inverse);
  border-bottom: 1px solid var(--line-inverse);
}

/* --- BIO ----------------------------------------------------------------- */
.bio {
  background: var(--color-cream);
  padding: var(--space-7) 0;
}

.bio__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 900px) {
  .bio__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: var(--space-6);
  }
}

.bio__portrait {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
}

.bio__portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.05);
}

.bio__portrait::before {
  content: '';
  position: absolute;
  inset: -20px -20px 20px 20px;
  background: var(--color-yellow);
  z-index: -1;
  border-radius: 4px;
}

.bio__portrait { position: relative; z-index: 0; }

.bio__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-3) 0 var(--space-4);
}

.bio__tag {
  padding: 0.35rem 0.9rem;
  background: transparent;
  border: 1px solid var(--color-navy);
  color: var(--color-navy);
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* --- CONTACTOS ----------------------------------------------------------- */
.contactos {
  background: var(--color-navy);
  color: var(--text-inverse);
  padding: var(--space-7) 0;
  position: relative;
  overflow: hidden;
}

.contactos::before {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background-image: url('../img/logo/mark-yellow.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
  transform: rotate(-10deg);
}

.contactos__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .contactos__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-6);
  }
}

.contactos__email {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-variation-settings: 'opsz' 48;
  color: var(--color-yellow);
  word-break: break-all;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(244, 161, 28, 0.4);
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.contactos__email:hover {
  color: var(--color-cream);
  border-bottom-color: var(--color-cream);
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 700px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form__label {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--color-yellow);
  line-height: 1;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(248, 240, 220, 0.35);
  color: var(--text-inverse);
  font: inherit;
  font-size: var(--step-1);
  transition: border-color 0.3s var(--ease-out);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-bottom-color: var(--color-yellow);
}

.form__textarea {
  min-height: 5rem;
  resize: vertical;
  line-height: 1.5;
}

.btn {
  align-self: flex-start;
  padding: 0.9rem 2rem;
  background: var(--color-yellow);
  color: var(--color-navy);
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease-out), background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  margin-top: var(--space-2);
  cursor: pointer;
  border: none;
}

.btn:hover {
  background: var(--color-cream);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(244, 161, 28, 0.5);
}

/* --- FILIAÇÕES / APOIOS -------------------------------------------------- */
.filiacoes {
  background: var(--color-cream-warm);
  padding: var(--space-6) 0 var(--space-5);
  border-top: 1px solid var(--line);
}

.filiacoes__block {
  margin-bottom: var(--space-5);
  text-align: center;
}

.filiacoes__block:last-child { margin-bottom: 0; }

.filiacoes__label {
  font-family: var(--font-hand);
  color: var(--color-terracotta);
  font-size: var(--step-2);
  margin-bottom: var(--space-3);
  line-height: 1;
}

.filiacoes__logos {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  justify-content: center;
}

.filiacoes__logos img {
  height: 55px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(0.3);
  opacity: 0.8;
  transition: opacity 0.3s var(--ease-out), filter 0.3s var(--ease-out);
}

.filiacoes__logos img:hover {
  opacity: 1;
  filter: grayscale(0);
}

.filiacoes__logos--large img { height: 60px; max-width: 180px; }

/* Ajustes por logo (rácios muito diferentes) */
.filiacoes__logos img[src*="apem"] { height: 65px; }
.filiacoes__logos img[src*="isme"] { height: 60px; }
.filiacoes__logos img[src*="ulisboa.png"] { height: 65px; }
.filiacoes__logos img[src*="ie-ulisboa"] { height: 55px; }
.filiacoes__logos img[src*="fba-ulisboa"] { height: 55px; }

/* --- FOOTER -------------------------------------------------------------- */
.footer {
  background: var(--color-navy-deep);
  color: rgba(248, 240, 220, 0.7);
  padding: var(--space-4) 0 var(--space-3);
  font-size: 0.85rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.footer__logo img {
  width: 44px;
  height: auto;
  display: block;
}

.footer__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.footer__hand {
  font-family: var(--font-hand);
  color: var(--color-yellow);
  font-size: 1rem;
}

/* --- CURSOR PERSONALIZADO (só desktop com hover) --------------------- */
@media (hover: hover) and (pointer: fine) {
  /* Elementos interactivos ganham cursor traço curvo */
  a, button, [data-lightbox], .player__toggle, .nav__lang button {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M6 22 C 12 8, 20 8, 30 20' fill='none' stroke='%23F4A11C' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='30' cy='20' r='3' fill='%23F4A11C'/%3E%3C/svg%3E") 6 22, pointer;
  }

  /* Cursor ambiental que segue o rato — traço curvo */
  body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 16 C 8 8, 14 8, 20 14' fill='none' stroke='%232A1F1A' stroke-width='2' stroke-linecap='round' opacity='0.7'/%3E%3C/svg%3E") 4 16, default;
  }

  /* Fundo escuro — cursor claro */
  .section--dark, .hero, .caminho, .contactos, .footer {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 16 C 8 8, 14 8, 20 14' fill='none' stroke='%23F8F0DC' stroke-width='2' stroke-linecap='round' opacity='0.85'/%3E%3C/svg%3E") 4 16, default;
  }
}

/* --- TRAÇOS OVERLAY (parallax scroll) --------------------------------- */
.brush-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.1s linear;
  will-change: transform;
  opacity: 0.4;
}

.brush-overlay svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.brush-overlay path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Variantes de traço */
.brush-overlay--1 {
  top: 10%;
  left: -80px;
  width: 220px;
  height: 60px;
  transform: rotate(-8deg);
}

.brush-overlay--2 {
  top: 60%;
  right: -60px;
  width: 200px;
  height: 80px;
  transform: rotate(15deg);
}

.brush-overlay--3 {
  top: 30%;
  right: 5%;
  width: 140px;
  height: 100px;
}

.brush-overlay--4 {
  bottom: 15%;
  left: 8%;
  width: 180px;
  height: 60px;
  transform: rotate(-5deg);
}

/* Sobre fundos claros — traço terracota subtil */
.section:not(.section--dark) .brush-overlay path {
  stroke: var(--color-terracotta);
  opacity: 0.35;
}

/* Sobre fundos escuros — traço cream subtil */
.section--dark .brush-overlay path,
.hero .brush-overlay path,
.caminho .brush-overlay path,
.contactos .brush-overlay path {
  stroke: var(--color-cream);
  opacity: 0.3;
}

/* --- PROGRESS BAR HORIZONTAL (topo) ----------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-yellow), var(--color-terracotta));
  z-index: 200;
  transition: width 0.05s linear;
  will-change: width;
}

@media (max-width: 800px) {
  .scroll-progress { height: 4px; }
}

/* --- SECTION INDICATOR (nav pills laterais) --------------------------- */
.section-indicator {
  position: fixed;
  right: clamp(1rem, 2vw, 1.75rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}

.section-indicator.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.section-indicator__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0;
  color: rgba(42, 31, 26, 0.55);
  transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  background: none;
  border: none;
}

.section-indicator__item:hover {
  color: var(--color-terracotta);
  transform: translateX(-4px);
}

.section-indicator__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  white-space: nowrap;
  order: 1;
}

.section-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid currentColor;
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  order: 2;
  flex-shrink: 0;
}

.section-indicator__item:hover .section-indicator__label,
.section-indicator__item.is-active .section-indicator__label {
  opacity: 1;
  transform: translateX(0);
}

.section-indicator__item.is-active {
  color: var(--color-terracotta);
}

.section-indicator__item.is-active .section-indicator__dot {
  background: var(--color-terracotta);
  border-color: var(--color-terracotta);
  transform: scale(1.3);
}

.section-indicator.on-dark .section-indicator__item {
  color: rgba(248, 240, 220, 0.6);
}

.section-indicator.on-dark .section-indicator__item:hover,
.section-indicator.on-dark .section-indicator__item.is-active {
  color: var(--color-yellow);
}

.section-indicator.on-dark .section-indicator__item.is-active .section-indicator__dot {
  background: var(--color-yellow);
  border-color: var(--color-yellow);
}

@media (max-width: 900px) {
  .section-indicator { display: none; }
}

/* --- WAVEFORM (onda sonora animada de fundo) --------------------------- */
.waveform-bg {
  position: absolute;
  left: 0; right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
  overflow: hidden;
}

.waveform-bg--top { top: 15%; }
.waveform-bg--mid { top: 50%; transform: translateY(-50%); }
.waveform-bg--bottom { bottom: 15%; }

.waveform-bg svg { width: 200%; height: 100%; display: block; }

.waveform-bg path {
  fill: none;
  stroke: var(--color-yellow);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.waveform-bg--anim svg {
  animation: waveScroll 25s linear infinite;
}

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

/* Ajustar cor por contexto */
.caminho .waveform-bg path,
.contactos .waveform-bg path { stroke: var(--color-yellow); }

/* --- CURSOR ECHO (pontinho que segue com delay) ---------------------- */
.cursor-echo {
  position: fixed;
  top: 0; left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--color-terracotta);
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s var(--ease-out), width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
  will-change: transform;
}

.cursor-echo.is-active { opacity: 0.7; }
.cursor-echo.is-hover {
  width: 48px;
  height: 48px;
  border-color: var(--color-yellow);
  opacity: 0.9;
}

.cursor-echo.on-dark {
  border-color: var(--color-yellow);
}

.cursor-echo.on-dark.is-hover {
  border-color: var(--color-cream);
}

@media (hover: none), (max-width: 800px) {
  .cursor-echo { display: none; }
}

/* --- TEXT REVEAL POR PALAVRAS (títulos display) ---------------------- */
.title-display .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.title-display.is-visible .word {
  opacity: 1;
  transform: translateY(0);
}

.title-display.is-visible .word:nth-child(1) { transition-delay: 0.05s; }
.title-display.is-visible .word:nth-child(2) { transition-delay: 0.13s; }
.title-display.is-visible .word:nth-child(3) { transition-delay: 0.21s; }
.title-display.is-visible .word:nth-child(4) { transition-delay: 0.29s; }
.title-display.is-visible .word:nth-child(5) { transition-delay: 0.37s; }
.title-display.is-visible .word:nth-child(6) { transition-delay: 0.45s; }
.title-display.is-visible .word:nth-child(7) { transition-delay: 0.53s; }
.title-display.is-visible .word:nth-child(8) { transition-delay: 0.61s; }
.title-display.is-visible .word:nth-child(9) { transition-delay: 0.69s; }
.title-display.is-visible .word:nth-child(10) { transition-delay: 0.77s; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 42, 71, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--space-3);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox__img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.4s var(--ease-out);
}

.lightbox.is-open .lightbox__img { transform: scale(1); }

.lightbox__close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(244, 161, 28, 0.2);
  color: var(--color-cream);
  border: 1px solid rgba(248, 240, 220, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s var(--ease-out);
}
.lightbox__close:hover { background: rgba(244, 161, 28, 0.4); }

/* --- REVEAL ANIMATION ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.3s; }
.reveal--delay-3 { transition-delay: 0.45s; }

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

/* --- SELECTION ----------------------------------------------------------- */
::selection {
  background: var(--color-yellow);
  color: var(--color-navy);
}
