/* ==========================================================================
   ENTARDECER NA BAIXADA · GOLEIRO LARANJA 2027
   Pôr do sol orgânico no scroll + leitura leve (Outfit + Birthstone)
   ========================================================================== */

/* --------------------------------------------------------------------------
   SEÇÃO 1 · CENA DE ABERTURA — O PÔR DO SOL ACONTECE
   Céu contínuo em 3 tempos, disco solar descendo atrás da camisa e
   horizonte baixo com brilho atmosférico suave na base.
   -------------------------------------------------------------------------- */
.sun-hero {
  color: #fff5eb;
}

.sun-hero__sky--day {
  background: linear-gradient(
    180deg,
    #d67e3e 0%,
    #e06218 42%,
    #c4430a 76%,
    #872606 100%
  );
  opacity: calc(1 - var(--p-day-fade, 0));
}

.sun-hero__sky--dusk {
  background: linear-gradient(
    180deg,
    #2b1224 0%,
    #7a2022 36%,
    #d2490e 70%,
    #8f2707 90%,
    #5b1805 100%
  );
  opacity: var(--p-dusk, 0);
}

/* Conecta na base com o tom da seção seguinte (#A63609) para transição sem cortes */
.sun-hero__sky--night {
  background: linear-gradient(
    180deg,
    #140910 0%,
    #351212 38%,
    #7c2508 78%,
    #a63609 100%
  );
  opacity: var(--p-night, 0);
}

/* Sol orgânico posicionado atrás do palco da camisa (direita no desktop) */
.sun-hero__sun {
  inset: auto;
  top: clamp(64px, 10svh, 110px);
  right: clamp(6%, 14vw, 210px);
  width: clamp(220px, 28vw, 400px);
  aspect-ratio: 1;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 249, 232, 0.96) 0%,
    rgba(255, 214, 140, 0.88) 22%,
    rgba(255, 146, 60, 0.56) 46%,
    rgba(222, 74, 18, 0.2) 68%,
    rgba(222, 74, 18, 0) 84%
  );
  transform: translate3d(0, calc(var(--p-sun, 0) * 56svh), 0) scale(calc(0.95 + var(--p-sun, 0) * 0.25));
  opacity: calc(1 - var(--p-sun-fade, 0) * 0.82);
  will-change: transform, opacity;
}

/* Brilho atmosférico baixo no horizonte, sem linha dura cortando o meio da tela */
.sun-hero__horizon {
  inset: auto 0 0 0;
  height: 30svh;
  z-index: 2;
  background:
    radial-gradient(65% 90% at 72% 100%, rgba(255, 152, 66, 0.52) 0%, rgba(217, 73, 7, 0.24) 48%, transparent 80%),
    linear-gradient(180deg, transparent 0%, rgba(36, 10, 4, 0.34) 76%, rgba(28, 8, 3, 0.56) 100%);
  opacity: calc(0.55 + var(--p-horizon, 0) * 0.45);
  will-change: opacity;
}

.sun-hero__time {
  color: rgba(255, 236, 216, 0.9);
}

.sun-hero__figure {
  transform: translate3d(0, calc((1 - var(--p-jersey, 0)) * 2.5svh), 0) scale(calc(1.03 - var(--p-jersey, 0) * 0.03));
  will-change: transform;
}

.sun-hero__halo {
  position: absolute;
  width: min(86%, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 186, 108, 0.36) 0%,
    rgba(242, 103, 29, 0.16) 52%,
    transparent 74%
  );
  opacity: calc(0.45 + var(--p-horizon, 0) * 0.55);
  pointer-events: none;
}

.sun-hero__jersey {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 28px 42px rgba(42, 12, 2, 0.52));
}

/* --------------------------------------------------------------------------
   SEÇÃO 2 · MANIFESTO — O LARANJA QUE TOMA CONTA DO CÉU
   -------------------------------------------------------------------------- */
.sun-manifesto__title {
  margin-top: 20px;
}

.sun-manifesto__title em {
  color: var(--page-accent);
}

.sun-manifesto__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 54ch));
  gap: clamp(24px, 5vw, 68px);
  align-items: start;
  margin-top: clamp(34px, 4.5vw, 60px);
}

.sun-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4.5vw, 68px);
  margin-top: clamp(48px, 6vw, 92px);
  padding-top: clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--page-border);
}

.sun-fact__num {
  display: block;
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: clamp(2.8rem, 5.2vw, 4.8rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--page-accent);
}

.sun-fact h3 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 16px 0 10px;
}

.sun-fact p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.72;
  color: var(--page-muted);
  max-width: 44ch;
}

/* --------------------------------------------------------------------------
   SEÇÃO 3 · SIMULADOR DA LUZ DA PARTIDA
   -------------------------------------------------------------------------- */
.sun-light__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
}

.sun-light__stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--page-border);
  padding: clamp(24px, 3.2vw, 44px);
  display: grid;
  place-items: center;
  min-height: clamp(410px, 64svh, 600px);
  background: #220b03;
}

.sun-sky-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ff963c 0%, #dc4a08 55%, #4d1906 100%);
  transition: background 0.35s ease;
  z-index: 0;
}

.sun-rays-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 24%, rgba(255, 224, 168, 0.28), transparent 68%);
  opacity: 0.45;
  mix-blend-mode: screen;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sun-light__jersey {
  position: relative;
  z-index: 2;
  width: min(80vw, 430px);
  max-height: 56svh;
  object-fit: contain;
  filter: drop-shadow(0 28px 42px rgba(24, 8, 2, 0.55));
  transition: filter 0.3s ease;
}

.sun-clock-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(18, 12, 8, 0.78);
  color: #fff5eb;
  border: 1px solid rgba(255, 245, 235, 0.24);
}

.sun-light__controls .ed-kicker {
  margin-bottom: 14px;
}

.sun-h2 {
  margin-bottom: 18px;
}

.sun-text {
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--page-muted);
  max-width: 46ch;
  min-height: 3.4em;
}

.sun-scrubber {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sun-scrubber__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--page-muted);
}

.sun-range {
  width: 100%;
  accent-color: var(--page-fg);
  height: 6px;
  cursor: pointer;
}

.sun-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.sun-stop {
  appearance: none;
  border: 1px solid var(--page-border);
  background: var(--page-surface);
  color: inherit;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 0.3s var(--ease-expo),
    color 0.3s var(--ease-expo),
    border-color 0.3s ease,
    transform 0.3s var(--ease-expo);
}

.sun-stop:hover {
  transform: translateY(-2px);
  border-color: var(--page-fg);
}

.sun-stop.is-active,
.sun-stop[aria-pressed='true'] {
  background: var(--page-fg);
  color: var(--page-bg);
  border-color: var(--page-fg);
}

/* --------------------------------------------------------------------------
   SEÇÃO 4 · CENA DE SCROLL — A LUZ ESCREVE A PARTIDA
   -------------------------------------------------------------------------- */
.sun-dusk {
  color: #fff2e5;
}

.sun-dusk__wash {
  background: linear-gradient(180deg, #7a2c0c 0%, #a84613 34%, #5c1e06 70%, #2a0f05 100%);
}

.sun-dusk__glow {
  background: radial-gradient(68% 55% at 72% 30%,
    rgba(255, 180, 105, 0.48) 0%,
    rgba(255, 140, 70, 0.14) 55%,
    transparent 78%);
  opacity: calc(0.25 + var(--p-glow, 0) * 0.75);
  transform: scale(calc(0.92 + var(--p-glow, 0) * 0.16));
  will-change: transform, opacity;
}

.sun-dusk__content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: clamp(28px, 5svh, 64px);
}

.sun-dusk__kicker {
  opacity: calc(0.4 + var(--p-dusk-title, 0) * 0.6);
}

.sun-dusk__title {
  margin: auto 0;
  opacity: calc(0.3 + var(--p-dusk-title, 0) * 0.7);
  transform: translate3d(0, calc((1 - var(--p-dusk-title, 0)) * 2.5svh), 0);
  will-change: transform, opacity;
}

.sun-dusk__title em {
  color: #ffa05c;
}

.sun-dusk__caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  font-size: clamp(0.98rem, 1.25vw, 1.18rem);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 242, 229, 0.84);
}

.sun-dusk__caption p {
  max-width: 52ch;
}

.sun-dusk__cue {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  opacity: 0.75;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   SEÇÃO 5 · PAUSA CREPUSCULAR — MACROS + CITAÇÃO
   -------------------------------------------------------------------------- */
.sun-macro__layout {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4.5vw, 56px);
}

.sun-macro__top .ed-kicker {
  margin-bottom: 16px;
}

.sun-macro__quote {
  max-width: 24ch;
}

.sun-macro__quote em {
  color: #ff9c54;
}

.sun-macro__pair {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(26px, 4vw, 44px);
  align-items: start;
}

.sun-macro__card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.sun-macro__card--offset {
  margin-top: 44px;
}

.sun-macro__card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 12px;
  background: #240c04;
  transform: translate3d(0, calc(var(--p-macro, 1) * -3%), 0) scale(1.06);
  transform-origin: center;
  will-change: transform;
}

.sun-macro__card figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sun-macro__card strong {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.sun-macro__card span {
  font-size: 0.96rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--page-muted);
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   SEÇÃO 6 · NOITE — A GOLA E AS COSTAS SOB A LUZ DO REFLETOR
   -------------------------------------------------------------------------- */
.sun-night__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
}

.sun-night__collar-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sun-night__seal {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--page-border);
  margin-bottom: 6px;
}

.sun-night__seal img {
  width: 100%;
  height: auto;
}

.sun-night__title em {
  color: var(--page-accent);
}

.sun-night__back {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
}

.sun-night__back img {
  width: min(80vw, 450px);
  max-height: 66svh;
  object-fit: contain;
  filter: drop-shadow(0 30px 48px rgba(0, 0, 0, 0.75));
  transform: translate3d(0, calc((1 - var(--p-night-drift, 1)) * 2.5%), 0) scale(1.04);
  will-change: transform;
}

.sun-night__spot {
  position: absolute;
  inset: 4%;
  background: radial-gradient(58% 48% at 50% 32%,
    rgba(255, 214, 170, 0.36) 0%,
    rgba(255, 180, 120, 0.12) 55%,
    transparent 78%);
  mix-blend-mode: screen;
  opacity: var(--p-night-glow, 0.4);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   SEÇÃO 7 · ENCERRAMENTO
   -------------------------------------------------------------------------- */
.sun-finale__wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4.5vw, 60px);
}

.sun-finale__line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--page-border);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--page-muted);
}

.sun-finale__statement em {
  color: var(--page-accent);
}

.sun-finale__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.sun-finale__place {
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.22;
  padding-block: 0.08em;
}

.sun-finale__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--page-border);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.sun-finale__link:hover {
  border-color: var(--page-fg);
  background: var(--page-surface);
}

/* --------------------------------------------------------------------------
   RESPONSIVO
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .sun-light__grid,
  .sun-night__grid,
  .sun-manifesto__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sun-light__stage {
    min-height: clamp(380px, 56svh, 540px);
  }
}

@media (max-width: 860px) {
  .sun-hero__sun {
    left: 50%;
    right: auto;
    top: clamp(72px, 12svh, 120px);
    width: clamp(190px, 52vw, 290px);
    transform: translate3d(-50%, calc(var(--p-sun, 0) * 28svh), 0) scale(calc(0.95 + var(--p-sun, 0) * 0.2));
  }
}

@media (max-width: 720px) {
  .sun-facts {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sun-macro__pair {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sun-macro__card--offset {
    margin-top: 0;
  }

  .sun-dusk__caption {
    flex-direction: column;
    align-items: flex-start;
  }

  .sun-night__back img {
    width: min(86vw, 420px);
  }

  .sun-finale__line {
    flex-direction: column;
    gap: 8px;
  }
}

/* --------------------------------------------------------------------------
   MOVIMENTO REDUZIDO
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sun-hero__sky--day,
  .sun-hero__sky--dusk {
    opacity: 0 !important;
  }

  .sun-hero__sky--night {
    opacity: 1 !important;
  }

  .sun-hero__sun {
    transform: translate3d(0, 34svh, 0);
    opacity: 0.55;
  }

  .sun-hero__figure,
  .sun-dusk__title,
  .sun-macro__card img,
  .sun-night__back img {
    transform: none !important;
    opacity: 1 !important;
  }

  .sun-dusk__kicker {
    opacity: 1 !important;
  }

  .sun-night__spot {
    opacity: 0.5;
  }
}
