/* =========================================================
   Seções — Tio Dani
   ========================================================= */

/* =============== 1 · HERO · Chegada =============== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -3; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
/* escurece a base pro texto respirar; deixa o céu claro em cima */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      180deg,
      rgba(11, 38, 35, 0.15) 0%,
      rgba(11, 38, 35, 0.05) 34%,
      rgba(11, 38, 35, 0.55) 74%,
      rgba(11, 38, 35, 0.92) 100%
    );
}

/* O SIGNATURE — o sol que nasce atrás do nome */
.hero__sun {
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 30%;
  width: min(70vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(242, 231, 208, 0.95) 0%,
    rgba(231, 168, 58, 0.9) 26%,
    rgba(236, 107, 59, 0.55) 52%,
    rgba(236, 107, 59, 0) 72%
  );
  transform: translate(-50%, 60%) scale(0.6);
  opacity: 0;
  will-change: transform, opacity;
}
.hero.lit .hero__sun {
  animation: sunrise 1.6s var(--ease) 0.15s forwards;
}
@keyframes sunrise {
  from { transform: translate(-50%, 60%) scale(0.6); opacity: 0; }
  to   { transform: translate(-50%, 0%)  scale(1);   opacity: 1; }
}

.hero__content {
  position: relative;
  width: var(--wrap);
  margin: 0 auto;
  padding-bottom: clamp(4rem, 12vh, 8rem);
  text-align: center;
}
.hero__stamp { color: var(--areia-70); margin-bottom: 1.4rem; }
/* estado inicial só com JS — sem JS o hero aparece direto */
.js .hero__stamp,
.js .hero__name,
.js .hero__roles,
.js .hero__age {
  opacity: 0;
  transform: translateY(14px);
}
.hero.lit .hero__stamp { animation: heroUp 0.9s var(--ease) 0.5s forwards; }
.hero.lit .hero__name  { animation: heroUp 1s var(--ease) 0.7s forwards; }
.hero.lit .hero__roles { animation: heroUp 0.9s var(--ease) 1.05s forwards; }
.hero.lit .hero__age   { animation: heroUp 0.9s var(--ease) 1.3s forwards; }
@keyframes heroUp { to { opacity: 1; transform: none; } }

.hero__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.4rem, 22vw, 13rem);
  line-height: 0.86;
  letter-spacing: -0.03em;
  color: var(--areia);
  text-shadow: 0 8px 60px rgba(0, 0, 0, 0.4);
  margin: 0;
}
.hero__roles {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  color: var(--areia);
  margin: 0.4rem 0 1.6rem;
}
.hero__age { color: var(--sol); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--areia-70);
  text-decoration: none;
}
.hero__arrow {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--sol), transparent);
  animation: bob 2s var(--ease) infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.5; }
}

/* =============== 2 · Quem é o Dani =============== */
.quem__intro { max-width: 30ch; margin-bottom: clamp(3rem, 8vw, 5.5rem); }
.quem__intro .section-title { margin-top: 0.6rem; }

.palavra {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
  margin-bottom: clamp(3.5rem, 9vw, 6rem);
}
.palavra:last-child { margin-bottom: 0; }
.palavra__foto { aspect-ratio: 4 / 5; }

.palavra__nome {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 8vw, 3.4rem);
  color: var(--sol);
  margin-bottom: 0.5rem;
  line-height: 1;
}
.palavra__texto p { color: var(--areia-70); max-width: 46ch; }

@media (min-width: 760px) {
  .palavra {
    grid-template-columns: 0.85fr 1fr;
    gap: clamp(2.5rem, 6vw, 5rem);
  }
  .palavra__foto { aspect-ratio: 4 / 5; }
  .palavra--flip .palavra__foto { order: 2; }
  .palavra--flip .palavra__texto { order: 1; text-align: right; }
  .palavra--flip .palavra__texto p { margin-left: auto; }
}

/* =============== 3 · Rifaina =============== */
.rifaina__head { text-align: center; margin-bottom: clamp(2.5rem, 7vw, 4rem); }
.rifaina__head .section-title { margin: 0.5rem 0 0.8rem; }

.rifaina__hero {
  width: min(1280px, 100vw);
  margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 0;
  aspect-ratio: 16 / 10;
  max-height: 76vh;
}
@media (min-width: 760px) { .rifaina__hero { aspect-ratio: 21 / 9; } }

.rifaina__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.9rem, 2.5vw, 1.4rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 640px) {
  .rifaina__grid { grid-template-columns: repeat(3, 1fr); }
}
/* figure = imagem (3:4) + legenda embaixo, em fluxo normal (sem sobreposição) */
.rifaina__grid .photo {
  aspect-ratio: auto;
  overflow: visible;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.rifaina__grid .photo::after { content: none; }
.rifaina__grid .photo picture {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.75);
}
.rifaina__grid .photo img { width: 100%; height: 100%; object-fit: cover; }
.cap {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--agua);
  text-transform: lowercase;
  padding: 0.7rem 0.2rem 0;
}

.rifaina__texto { text-align: center; }
.rifaina__texto p:first-child { color: var(--areia-70); font-size: 1.15rem; }
.rifaina__coord { display: inline-block; margin-top: 1.5rem; color: var(--agua); }

/* =============== 4 · Álbum =============== */
.album__head { text-align: center; margin-bottom: clamp(2.5rem, 7vw, 4rem); }
.album__head .section-title { margin-top: 0.5rem; }

.album__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}
@media (min-width: 720px) {
  .album__grid { grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
}

.snap {
  position: relative;
  margin: 0;
  background: #fbf4e6;
  padding: 0.6rem 0.6rem 0;
  border-radius: 3px;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  transform: rotate(var(--rot, -2deg));
}
.snap:nth-child(3n) { --rot: 2.2deg; }
.snap:nth-child(3n+2) { --rot: -1.2deg; }
.snap:nth-child(4n) { --rot: 1.4deg; }
.snap picture { display: block; overflow: hidden; border-radius: 1px; }
.snap img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.snap:hover,
.snap:focus-visible {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 26px 48px -18px rgba(0, 0, 0, 0.85);
  z-index: 2;
}
.snap__cap {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: #6a4a2a;
  text-align: center;
  padding: 0.55rem 0.3rem 0.7rem;
  text-transform: lowercase;
}
.snap__cap .crown { color: var(--brasa); font-size: 0.8rem; }

.snap--tape::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 78px;
  height: 22px;
  background: rgba(231, 168, 58, 0.34);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.snap--video .play {
  position: absolute;
  top: calc(50% - 0.9rem);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(11, 38, 35, 0.55);
  border: 2px solid var(--areia);
  backdrop-filter: blur(2px);
}
.snap--video .play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--areia);
}

/* =============== 5 · Recados =============== */
.recados__head { text-align: center; margin-bottom: clamp(2.5rem, 7vw, 4rem); }
.recados__head .section-title { margin-top: 0.5rem; }

.mural {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
  align-items: start;
}
.bilhete {
  margin: 0;
  padding: 1.6rem 1.5rem 1.3rem;
  border-radius: 2px;
  color: #43301c;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.7);
  transform: rotate(var(--rot, -1.5deg));
  transition: transform 0.3s var(--ease);
  position: relative;
}
.bilhete::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 22px;
  width: 60px;
  height: 20px;
  background: rgba(193, 62, 106, 0.28);
  transform: rotate(-6deg);
}
.bilhete:hover { transform: rotate(0deg) translateY(-3px); }
.bilhete blockquote {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.4;
}
.bilhete figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #7a5a3a;
}
.bilhete--a { background: #f4ead4; --rot: -1.8deg; }
.bilhete--b { background: #eef0dd; --rot: 1.6deg; }
.bilhete--c { background: #f6e6d8; --rot: -0.8deg; }
.bilhete--vazio {
  background: transparent;
  border: 1.5px dashed var(--areia-45);
  color: var(--areia-45);
  box-shadow: none;
  --rot: 1deg;
}
.bilhete--vazio::before { display: none; }
.bilhete--vazio blockquote { color: var(--areia-70); font-style: italic; font-weight: 400; }
.bilhete--vazio figcaption { color: var(--areia-45); }

/* =============== 6 · Fecho · O brinde =============== */
.fecho {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(4rem, 12vh, 8rem) 0 0;
}
.fecho__media { position: absolute; inset: 0; z-index: -3; }
.fecho__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.fecho__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    180deg,
    rgba(11, 38, 35, 0.45) 0%,
    rgba(11, 38, 35, 0.2) 30%,
    rgba(11, 38, 35, 0.5) 65%,
    rgba(11, 38, 35, 0.9) 100%
  );
}
.fecho__content { position: relative; margin-top: auto; }
.fecho__msg {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 5rem);
  line-height: 1.02;
  color: var(--areia);
  margin: 0.8rem 0 1rem;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.45);
}
.fecho__breath { margin: 0 auto; max-width: 34ch; }
.fecho__age { display: inline-block; margin-top: 1.6rem; color: var(--sol); }

.rodape {
  position: relative;
  margin-top: auto;
  width: var(--wrap-narrow);
  padding: clamp(3rem, 8vh, 5rem) 0 2.5rem;
  text-align: center;
}
.rodape__nota {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--areia-70);
  margin-bottom: 1rem;
}
.rodape .stamp { color: var(--areia-45); font-size: 0.68rem; }

/* =============== Portal de entrada =============== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(58% 48% at 50% 45%, rgba(231, 168, 58, 0.18), transparent 70%),
    var(--verde-fundo);
  transition: opacity 0.9s var(--ease);
}
.js .intro { display: flex; }
.intro.gone {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0s 0.9s;
}
.intro__enter {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  color: var(--areia);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}
.intro__sun {
  width: clamp(78px, 20vw, 124px);
  height: clamp(78px, 20vw, 124px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 44%, #f7ecd4, var(--sol) 46%, var(--brasa) 80%);
  box-shadow: 0 0 54px rgba(231, 168, 58, 0.45), 0 0 120px rgba(236, 107, 59, 0.28);
  animation: introPulse 2.8s var(--ease) infinite;
  transition: transform 0.4s var(--ease);
}
@keyframes introPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); box-shadow: 0 0 78px rgba(231, 168, 58, 0.6), 0 0 160px rgba(236, 107, 59, 0.42); }
}
.intro__enter:hover .intro__sun,
.intro__enter:focus-visible .intro__sun { transform: scale(1.09); }
.intro__cta {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  color: var(--areia);
  line-height: 1.2;
}
.intro__hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--areia-45);
}

/* Rede de segurança: se o JS falhar, libera tudo e some o portal */
.degraded .intro { display: none !important; }
.degraded .reveal { opacity: 1 !important; transform: none !important; }
.degraded .hero__stamp,
.degraded .hero__name,
.degraded .hero__roles,
.degraded .hero__age { opacity: 1 !important; transform: none !important; }

/* =============== Controle de som =============== */
.sound {
  position: fixed;
  right: clamp(0.9rem, 4vw, 2rem);
  bottom: clamp(0.9rem, 4vw, 2rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--areia-15);
  background: rgba(11, 38, 35, 0.62);
  backdrop-filter: blur(8px);
  color: var(--areia-70);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.sound[hidden] { display: none; }
.sound:hover,
.sound:focus-visible { color: var(--sol); border-color: var(--areia-45); }
.sound__ico { font-size: 0.9rem; line-height: 1; }

/* player do YouTube — presente mas invisível */
#ytHost {
  position: fixed;
  width: 1px;
  height: 1px;
  left: -12px;
  bottom: -12px;
  opacity: 0.01;
  pointer-events: none;
  z-index: -5;
}

/* =============== Lightbox =============== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(6, 22, 20, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lightbox__stage {
  max-width: min(1000px, 94vw);
  max-height: 86vh;
  display: grid;
  place-items: center;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}
.lightbox__close {
  position: absolute;
  top: clamp(0.8rem, 3vw, 1.6rem);
  right: clamp(0.8rem, 3vw, 1.6rem);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--areia-45);
  background: rgba(11, 38, 35, 0.6);
  color: var(--areia);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.lightbox__close:hover { background: var(--brasa); border-color: var(--brasa); color: #fff; }
