/* ---------------------------------------------------------------------------
   Twilight, el héroe de la plantilla de Scrolltide (sep-2026), portado sin
   React ni framer-motion para el héroe de Sedes del sitio Marca.

   Qué cambió respecto del original, y nada más:
   - Todo va dentro de .tw (los tokens estaban en :root y las clases .hero,
     .chip y .pin son genéricas: acá no pisan al sitio).
   - El acento lima pasa al oro de la marca, #f4b300; el resto de los valores
     son los medidos contra el video.
   - La barra de navegación es la del sitio, que va en el flujo y no fija: el
     marco ya no deja 84 a 130 px arriba para ella.
   - Las entradas de framer-motion (rise y pop) son @keyframes con los mismos
     tiempos, curva y retrasos.

   Composition note: a collage, not a column. Headline high and centred, a
   three-part band along the bottom (stat card / asterisk / clip card), and
   labelled pins scattered across the middle. Surfaces are opaque white with
   wide soft shadows; one accent carries every action.
   --------------------------------------------------------------------------- */

.tw {
  --lime: #f4b300;
  --lime-ghost: rgba(244, 179, 0, 0.5);
  --ink: #14161a;
  --ink-mid: #4c5250;
  --ink-muted: #8a8f8a;
  --card: #ffffff;
  --sky: #b4b7b3;
  --field: #5f5531;
  --shadow-card: 0 18px 44px rgba(26, 32, 24, 0.20);
  --shadow-chip: 0 8px 22px rgba(26, 32, 24, 0.18);
  /* the collage runs almost edge to edge; the centred column sits further in */
  --gutter: clamp(12px, 1.5vw, 22px);
  --gutter-wide: clamp(20px, 3vw, 44px);
  --ease-out: cubic-bezier(0.22, 0.68, 0.32, 1);

  /* one knob for display type + vertical rhythm, one for UI text and controls */
  --scale: 1;
  --ui-scale: 1;
  --radius-card: clamp(18px, 1.5vw, 26px);

  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 88px);
  overflow: hidden;
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  color: var(--ink);
  /* sampled from the footage so there is no flash before the video paints */
  background: linear-gradient(180deg, var(--sky) 0%, #b6b6ac 34%, #8b8677 62%, var(--field) 100%);
}

.tw p { margin: 0; }
.tw figure { margin: 0; }

/* Entradas: rise (opacidad + 18px) para bloques de contenido, pop (opacidad +
   escala 0,85) para pines, etiquetas y botones. Mismos 0,8 s / 0,6 s y la
   misma curva que el original. */
@keyframes tw-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes tw-pop { from { opacity: 0; transform: scale(0.85); } }
.tw [data-rise] { animation: tw-rise 0.8s var(--ease-out) both; animation-delay: var(--d, 0s); }
.tw [data-pop] { animation: tw-pop 0.6s var(--ease-out) both; animation-delay: var(--d, 0s); }

/* Media -------------------------------------------------------------------- */

.tw .hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.tw .hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the reference grade is markedly cooler and flatter than the raw frame */
  filter: saturate(0.58) brightness(1.09) contrast(0.90);
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
}

.tw .hero__video.is-ready {
  opacity: 1;
}

/*
  The reference lets white type sit on its own pale sky at roughly 2:1, which is
  not a contrast ratio worth reproducing. This footage's sky reads #b4b7b3, so a
  soft cool veil across the top band lifts the headline past 3:1 while keeping
  the airy, barely-graded look. The lower band is already dark enough (#5f5531).
*/
.tw .hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 38, 42, 0.46) 0%, rgba(26, 38, 42, 0.32) 16%, rgba(26, 38, 42, 0.12) 30%, rgba(26, 38, 42, 0) 43%),
    radial-gradient(56% 25% at 50% 19%, rgba(22, 34, 38, 0.22) 0%, rgba(22, 34, 38, 0) 72%),
    linear-gradient(0deg, rgba(20, 26, 18, 0.30) 0%, rgba(20, 26, 18, 0.10) 14%, rgba(20, 26, 18, 0) 30%),
    rgba(146, 172, 176, 0.10);
}

/* Frame -------------------------------------------------------------------- */

.tw .hero__frame {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 88px);
  padding: clamp(28px, 4vw, 60px) var(--gutter) clamp(14px, 1.6vw, 24px);
}

/* Headline ----------------------------------------------------------------- */

.tw .hero__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tw .hero__title {
  font-size: calc(clamp(2rem, 5.4vw, 5.9rem) * var(--scale));
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 15ch;
  margin: 0;
}

.tw .hero__line {
  display: block;
}

.tw .hero__title em {
  font-style: italic;
}

/* Peanut CTA: pill body plus an overlapping knob, one continuous silhouette. */

.tw .peanut {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out);
}

.tw .peanut:hover {
  transform: translateY(-2px);
}

.tw .peanut__body {
  display: inline-flex;
  align-items: center;
  height: var(--peanut-h);
  padding: 0 calc(var(--peanut-h) * 0.62);
  border-radius: 999px;
  background: var(--lime);
  font-size: var(--peanut-font);
  font-weight: 500;
  white-space: nowrap;
}

.tw .peanut__knob {
  display: grid;
  place-items: center;
  width: calc(var(--peanut-h) * 1.14);
  height: calc(var(--peanut-h) * 1.14);
  margin-left: calc(var(--peanut-h) * -0.2);
  border-radius: 999px;
  background: var(--lime);
}

.tw .hero__begin {
  --peanut-h: calc(clamp(38px, 2.79vw, 50px) * var(--ui-scale));
  --peanut-font: calc(clamp(13px, 0.99vw, 17px) * var(--ui-scale));
  margin-top: clamp(20px, 2.4vw, 38px);
}

/* Bottom band -------------------------------------------------------------- */

.tw .hero__foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 34px);
  padding-top: clamp(36px, 5vw, 80px);
}

/* Stat card, lower left ----------------------------------------------------- */

.tw .roomcard {
  position: relative;
  flex: none;
}

.tw .roomcard__ghost {
  position: absolute;
  left: -18px;
  top: -20px;
  width: 84%;
  height: 88%;
  border-radius: var(--radius-card);
  background: var(--lime-ghost);
}

.tw .roomcard__body {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.3vw, 22px);
  width: clamp(272px, 23.2vw, 400px);
  padding: clamp(12px, 1.05vw, 18px);
  padding-right: clamp(52px, 4.5vw, 70px);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.tw .gauge {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.7vw, 12px);
}

.tw .gauge__label {
  width: 4.4em;
  font-size: calc(clamp(10px, 0.75vw, 13px) * var(--ui-scale));
  line-height: 1.2;
  color: var(--ink-muted);
}

.tw .gauge__ring {
  position: relative;
  width: clamp(58px, 4.8vw, 82px);
  aspect-ratio: 1;
  flex: none;
}

.tw .gauge__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tw .gauge__read {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
}

.tw .gauge__num {
  font-style: italic;
  font-weight: 500;
  font-size: calc(clamp(15px, 1.28vw, 22px) * var(--ui-scale));
}

.tw .gauge__den {
  font-size: calc(clamp(9px, 0.7vw, 12px) * var(--ui-scale));
  color: var(--ink-muted);
}

.tw .roomthumb {
  flex: none;
  width: clamp(54px, 4.6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tw .roomthumb img {
  width: 100%;
  aspect-ratio: 300 / 444;
  object-fit: cover;
  border-radius: clamp(8px, 0.75vw, 13px);
}

.tw .roomthumb__cap {
  font-size: calc(clamp(9px, 0.72vw, 12px) * var(--ui-scale));
  font-weight: 500;
  line-height: 1.25;
}

.tw .roomcard__book {
  position: absolute;
  left: calc(100% - clamp(28px, 3.2vw, 48px));
  bottom: clamp(12px, 1.5vw, 26px);
}

.tw .pill-lime {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: calc(clamp(9px, 0.85vw, 14px) * var(--ui-scale)) calc(clamp(14px, 1.3vw, 22px) * var(--ui-scale));
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: calc(clamp(11px, 0.9vw, 15px) * var(--ui-scale));
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(26, 32, 24, 0.20);
  transition: transform 0.28s var(--ease-out);
}

.tw .pill-lime:hover {
  transform: translateY(-2px);
}

/* Centrepiece (en el original, un asterisco; acá, el rombo Tesla) ----------- */

.tw .aster {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.9vw, 16px);
  color: #fff;
  margin-bottom: clamp(12px, 3.7vw, 56px);
}

.tw .aster__side {
  font-size: calc(clamp(13px, 1.22vw, 21px) * var(--ui-scale));
  line-height: 1.3;
  white-space: nowrap;
}

.tw .aster__side--l {
  text-align: right;
}

.tw .aster__mark {
  position: relative;
  width: clamp(72px, 8.1vw, 140px);
  aspect-ratio: 1;
  flex: none;
}

.tw .aster__mark > svg {
  width: 100%;
  height: 100%;
  color: #fff;
}

.tw .aster__arrow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  color: var(--ink);
}

/* Clip card, lower right ---------------------------------------------------- */

.tw .clipcard {
  flex: none;
  width: clamp(218px, 16.9vw, 300px);
  padding: clamp(9px, 0.8vw, 14px);
  border-radius: clamp(14px, 1.2vw, 20px);
  background: var(--card);
  box-shadow: var(--shadow-card);
  margin-bottom: clamp(0px, 4.4vw, 66px);
}

.tw .clipcard__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 9px;
}

.tw .clipcard__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--lime);
  flex: none;
}

.tw .clipcard__name {
  flex: 1;
  font-size: calc(clamp(11px, 0.92vw, 15px) * var(--ui-scale));
  font-weight: 500;
}

.tw .clipcard__frame {
  position: relative;
}

.tw .clipcard__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  border-radius: clamp(9px, 0.75vw, 13px);
  overflow: hidden;
  aspect-ratio: 263 / 125;
}

.tw .clipcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tw .clipcard__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: calc(clamp(10px, 0.8vw, 13px) * var(--ui-scale));
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* Scattered pins ------------------------------------------------------------ */

.tw .decor {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.tw .decor__slot {
  position: absolute;
  transform: translate(-50%, -50%);
}

.tw .chip {
  display: block;
  padding: calc(clamp(7px, 0.62vw, 11px) * var(--ui-scale)) calc(clamp(14px, 1.28vw, 22px) * var(--ui-scale));
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: calc(clamp(11px, 0.99vw, 16px) * var(--ui-scale));
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-chip);
}

.tw .pin {
  display: grid;
  place-items: center;
  width: clamp(20px, 1.74vw, 30px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}

.tw .pin::after {
  content: "";
  width: 24%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #fff;
}

.tw .nudges {
  display: flex;
  gap: clamp(8px, 0.9vw, 14px);
  pointer-events: auto;
}

.tw .nudge {
  display: grid;
  place-items: center;
  width: clamp(32px, 2.55vw, 44px);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 0;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-chip);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out);
}

.tw .nudge:hover {
  transform: translateY(-2px);
}

/* Responsive ---------------------------------------------------------------- */

/* Agregado: con pantalla alta y ancha (un celular en «versión para
   computadora», un monitor vertical) el alto de pantalla completa estiraba el
   héroe y dejaba el centro vacío. Desde 901 px el alto se topa como una foto
   apaisada; en pantallas normales el tope no alcanza a actuar. */
@media (min-width: 901px) {
  .tw,
  .tw .hero__frame {
    min-height: min(calc(100svh - 88px), 64vw);
  }
}

@media (max-width: 1120px) {
  /* the scattered pins are pure decoration and the first thing to crowd */
  .tw .decor {
    display: none;
  }
}

@media (max-width: 900px) {
  .tw .hero__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
    padding-top: 44px;
  }

  .tw .aster {
    order: -1;
    justify-content: center;
    margin-bottom: 0;
  }

  .tw .roomcard {
    align-self: flex-start;
  }

  .tw .roomcard__body {
    width: min(100%, 400px);
  }

  .tw .clipcard {
    align-self: flex-end;
    margin-bottom: 0;
  }
}

@media (max-width: 560px) {
  .tw .hero__title {
    max-width: 100%;
  }

  .tw .aster__side {
    font-size: calc(12px * var(--ui-scale));
  }

  .tw .roomcard__book {
    position: static;
    margin-top: 12px;
  }

  .tw .clipcard {
    align-self: stretch;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw .hero__video,
  .tw .pill-lime,
  .tw .nudge,
  .tw .peanut {
    transition: none;
  }

  .tw [data-rise],
  .tw [data-pop] {
    animation: none;
  }
}
