:root {
    --navy: #06304f;
    --navy-deep: #031f36;
    --gold: #f2a900;
    --gold-soft: #e5b21a;
    --white: #ffffff;
    --glass: rgba(3, 31, 54, .45);
    --glass-border: rgba(229, 178, 26, .55);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { min-height: 100%; }
  body {
    font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background: var(--navy-deep);
    color: var(--white);
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* Fondo: la imagen correcta según el tamaño de pantalla */
  .hero { position: relative; width: 100%; min-height: 100vh; min-height: 100dvh; }
  .hero picture, .hero img.bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
  }
  .hero img.bg { object-fit: cover; object-position: center top; display: block; }

  /* Contador, ubicado en el espacio libre del cielo */
  .countdown-wrap {
    position: absolute; left: 50%; top: 61%;
    transform: translateX(-50%);
    width: min(92vw, 720px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    text-align: center;
  }
  .countdown {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: clamp(8px, 1.8vw, 18px);
    list-style: none;
  }
  .unit {
    position: relative;
    min-width: 0;
    padding: clamp(12px, 2vw, 22px) 4px clamp(10px, 1.6vw, 16px);
    background: rgba(3, 31, 54, .78);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 178, 26, .65);
    border-top: 3px solid var(--gold);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
    transition: transform .2s ease, border-color .2s ease;
  }
  .unit:hover { transform: translateY(-3px); border-color: var(--gold); }
  .num {
    display: block;
    font-size: clamp(21px, 6.4vw, 68px);
    font-weight: 700; font-style: italic;
    line-height: 1;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
  }
  .num.tick { animation: tick .35s ease-out; }
  @keyframes tick {
    from { transform: translateY(-6px); opacity: .35; }
    to   { transform: none; opacity: 1; }
  }
  .label {
    display: block; margin-top: clamp(6px, 1vw, 10px);
    font-size: clamp(10px, 1.5vw, 15px);
    font-weight: 500; font-style: italic;
    color: var(--gold-soft);
    letter-spacing: .04em;
  }
  .date-note {
    margin-top: clamp(12px, 2vw, 22px);
    font-size: clamp(12px, 1.6vw, 16px);
    font-style: italic; font-weight: 500;
    color: rgba(255, 255, 255, .85);
  }
  .date-note strong { color: var(--gold-soft); font-weight: 700; }

  .social-links {
    position: absolute;
    z-index: 1;
    left: 50%;
    bottom: max(22px, env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
  }
  .social-link {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--white);
    background: rgba(3, 31, 54, .74);
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 50%;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
  }
  .social-link:hover, .social-link:focus-visible {
    color: var(--navy-deep);
    background: var(--gold);
    border-color: var(--gold);
    transform: translateY(-3px);
  }
  .social-link:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
  .social-link svg { width: 20px; height: 20px; fill: currentColor; }

  .launched { display: none; font-size: clamp(22px, 4vw, 40px); font-weight: 700; font-style: italic; }
  .launched span { color: var(--gold-soft); }
  .is-done .countdown, .is-done .date-note { display: none; }
  .is-done .launched { display: block; }

  /* Da espacio al subtítulo integrado en las imágenes para tabletas. */
  @media (max-width: 1024px) { .countdown-wrap { top: 64%; } }
  @media (max-width: 600px) {
    .countdown-wrap { top: 58%; width: min(94vw, 480px); }
    .unit { border-radius: 8px; }
    .social-links { gap: 10px; }
    .social-link { width: 42px; height: 42px; }
  }

  /* Pantallas bajas (celular horizontal): usar imagen de escritorio y compactar */
  @media (max-height: 520px) and (orientation: landscape) {
    .countdown-wrap { top: 62%; width: min(60vw, 520px); }
    .num { font-size: clamp(22px, 5vh, 40px); }
    .unit { padding: 8px 4px; }
    .date-note { display: none; }
    .social-links { bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
    .social-link { width: 36px; height: 36px; }
    .social-link svg { width: 17px; height: 17px; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .num.tick { animation: none; }
  }
