/* Luz, escenario y transiciones del sitio (ADR-039). Todo el movimiento al hacer scroll es CSS
   (animation-timeline): sin soporte en el navegador o con movimiento reducido, cada bloque queda
   quieto y en su lugar. */

@property --tn-giro {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --tn-coral-suave: color-mix(in oklab, var(--p-accent) 38%, transparent);
  --tn-coral-tenue: color-mix(in oklab, var(--p-accent) 14%, transparent);
  /* El mismo ease-out de entrada del kit (motion.css). */
  --tn-sube: var(--m-ease-enter, cubic-bezier(0.22, 1, 0.36, 1));
}
main {
  overflow-x: clip;
}

/* Etiqueta pequeña sobre un título. */
.tn-etiqueta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--p-surface) 70%, transparent);
  font-size: var(--t-small);
  color: var(--muted);
}
.section-head > .tn-etiqueta {
  justify-self: start;
  width: max-content;
  margin-bottom: var(--s-4);
  font-size: var(--t-small);
}

/* ---------------------------------------------------------------- portada */
/* La portada mide lo que su escenario: la captura se ve entera, con sus cuatro esquinas, y la luz se
   apaga dentro de la portada, sin borde contra la sección siguiente. */
main > .tn-heroe {
  height: auto;
  min-height: 0;
  padding-bottom: var(--s-7);
}
.tn-heroe > .wrap {
  height: auto;
  grid-template-rows: auto auto;
  row-gap: var(--s-8);
}
.tn-heroe__texto {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.tn-heroe__texto > * + * {
  margin-top: var(--s-4);
}
.tn-heroe h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.6rem);
}
.tn-heroe .hero__lead {
  max-width: 56ch;
  color: var(--muted);
}
.tn-heroe .btn-row {
  justify-content: center;
  margin-top: var(--s-5);
}
/* La luz coral: un amanecer detrás del escenario y una línea de horizonte. */
.tn-heroe__luz {
  position: absolute;
  inset: 34% -10% 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(45% 30% at 50% 18%, var(--tn-coral-suave), transparent 70%),
    radial-gradient(60% 55% at 50% 30%, var(--tn-coral-tenue), transparent 72%);
}
.tn-heroe__luz::after {
  content: '';
  position: absolute;
  left: 26%;
  right: 26%;
  top: 9%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--p-accent), transparent);
  box-shadow: 0 0 28px 6px var(--tn-coral-suave);
}
.hero__art.tn-escenario {
  position: relative;
  flex: none;
  height: auto;
  min-height: 0;
  overflow: visible;
  border-radius: 0;
  background: none;
  perspective: 1600px;
}
.tn-escenario__marco {
  width: min(100%, 1080px);
  overflow: hidden;
  margin-inline: auto;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent);
  background: color-mix(in oklab, var(--p-surface) 88%, transparent);
  box-shadow:
    0 -20px 80px -30px var(--tn-coral-suave),
    0 40px 120px -40px rgb(0 0 0 / 0.7);
  transform-origin: 50% 0;
}
.tn-escenario__marco > .tn-captura {
  border-radius: 12px;
}
.tn-escenario__celular {
  position: absolute;
  right: max(-24px, calc(50% - 600px));
  top: 30%;
  width: 210px;
  z-index: 2;
}
/* El aviso de la cita nueva: entra una vez, después de la portada. */
.tn-aviso {
  position: absolute;
  left: max(-24px, calc(50% - 620px));
  top: 6%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 12px 16px 12px 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in oklab, var(--p-ink) 14%, transparent);
  background: var(--tn-ventana);
  box-shadow: 0 20px 50px -20px rgb(0 0 0 / 0.6);
  font-size: var(--t-small);
  text-align: left;
}
.tn-aviso__icono {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--p-accent) url('/favicon.svg') center / 22px no-repeat;
}
.tn-aviso__texto {
  display: grid;
  color: var(--muted);
}
.tn-aviso__texto b {
  font-weight: 500;
  color: var(--ink);
}
@media (max-width: 1023px) {
  .tn-escenario__celular {
    width: 140px;
  }
}
@media (max-width: 639px) {
  .tn-escenario__marco,
  .tn-aviso {
    display: none;
  }
  .tn-escenario__celular {
    position: relative;
    inset: auto;
    width: 230px;
    margin-inline: auto;
  }
  .tn-heroe .btn-row {
    width: 100%;
  }
  /* En celular la luz es un halo ancho detrás del teléfono, sin línea de horizonte. */
  .tn-heroe__luz {
    inset: 45% -40% 10%;
    background: radial-gradient(70% 35% at 50% 20%, var(--tn-coral-tenue), transparent 70%);
  }
  .tn-heroe__luz::after {
    display: none;
  }
}
