:root {
  color-scheme: dark;
  color: #dce8ff;
  background: #3777d1;
  --brand-blue: #3777d1;
  font-family: 'Space Grotesk', sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--brand-blue);
  background-image:
    linear-gradient(180deg, rgba(7, 25, 63, 0.12), rgba(3, 12, 31, 0.3)),
    url('jungle-blue-background.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.22) 1px, transparent 1.5px),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 22px 22px, 88px 88px, 88px 88px;
  background-position: 0 0, 11px 11px, 11px 11px;
  pointer-events: none;
  opacity: 0.3;
}

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.signal-box {
  width: min(820px, 100%);
  padding: 1.25rem 2.5rem 3rem;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(ellipse 54% 34% at 50% 7%, rgba(55, 119, 209, 0.72), rgba(21, 52, 112, 0.28) 54%, transparent 100%),
    rgba(7, 11, 20, 0.92);
  box-shadow: 0 40px 90px rgba(7, 31, 82, 0.48), 0 0 0 1px rgba(22, 83, 176, 0.24);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}

.signal-box::after {
  content: '████ 010101 111010 101011';
  position: absolute;
  inset: 0;
  color: rgba(80, 112, 255, 0.08);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  padding: 2rem;
  pointer-events: none;
  mix-blend-mode: screen;
}

.sound-toggle {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 12, 27, 0.62);
  color: #c7d5ff;
  font: 600 0.68rem/1 'Space Grotesk', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  backdrop-filter: blur(12px);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(15, 32, 68, 0.82);
  color: #fff;
  outline: none;
}

.sound-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #66759e;
  box-shadow: 0 0 0 transparent;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.sound-toggle[aria-pressed='true'] .sound-dot {
  background: #ffe43b;
  box-shadow: 0 0 10px rgba(255, 228, 59, 0.72);
}

.brand-stage {
  width: min(480px, 90%);
  height: clamp(250px, 38vw, 320px);
  margin: 0 auto 2.25rem;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.brand-stage::before {
  content: '';
  position: absolute;
  width: 82%;
  aspect-ratio: 1.45;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(55, 119, 209, 0.58) 0%, rgba(55, 119, 209, 0.24) 48%, transparent 76%);
  filter: blur(20px);
  opacity: 0.9;
  z-index: -1;
}

.brand-stage::after {
  content: '';
  position: absolute;
  inset: 16% 2% 10%;
  background:
    linear-gradient(90deg, transparent, rgba(142, 168, 255, 0.18) 18%, rgba(142, 168, 255, 0.18) 82%, transparent) top / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(142, 168, 255, 0.1) 30%, rgba(142, 168, 255, 0.1) 70%, transparent) bottom / 100% 1px no-repeat;
  pointer-events: none;
}

.brand-mark {
  display: block;
  width: clamp(225px, 38vw, 310px);
  max-height: calc(100% - 12px);
  object-fit: contain;
  filter: saturate(0.92) contrast(1.06) drop-shadow(0 18px 30px rgba(1, 7, 22, 0.62));
}

.intro-copy {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hint {
  display: inline-block;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #8ea8ff;
  margin-bottom: 1rem;
}

.description {
  margin: 0.85rem auto 0;
  max-width: 640px;
  color: #bcc9ff;
  line-height: 1.75;
  font-size: 1.02rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.6rem auto 0;
  position: relative;
  z-index: 1;
}

.countdown-grid div {
  background: rgba(11, 17, 34, 0.86);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 1.4rem 1rem;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.countdown-grid span {
  display: block;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.countdown-grid small {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.79rem;
  letter-spacing: 0.18em;
  color: #96a7ff;
}

.context-copy {
  margin-top: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.context-copy p {
  margin: 0.55rem auto;
  color: #b7c2e8;
}

.footer-copy {
  margin-top: 2rem;
  text-align: center;
  color: rgba(179, 199, 255, 0.72);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  html, body {
    background-image:
      linear-gradient(180deg, rgba(7, 25, 63, 0.08), rgba(3, 12, 31, 0.28)),
      url('jungle-blue-background-mobile.jpg');
    background-attachment: scroll;
  }

  .page-shell {
    place-items: start center;
    padding:
      max(0.75rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      max(0.9rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
  }

  .signal-box {
    padding: 0.75rem 1rem 1.5rem;
    border-radius: 24px;
  }

  .brand-stage {
    width: 100%;
    height: 220px;
    margin-bottom: 1.35rem;
  }

  .sound-toggle {
    top: 0.85rem;
    right: 0.85rem;
    min-height: 44px;
    padding: 0.65rem 0.8rem;
  }

  .brand-mark {
    width: min(240px, 72vw);
    max-height: 210px;
  }

  .hint {
    margin-bottom: 0.7rem;
    font-size: 0.74rem;
  }

  .description {
    margin-top: 0.55rem;
    padding: 0 0.5rem;
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 1.5rem;
  }

  .countdown-grid div {
    min-width: 0;
    min-height: 92px;
    padding: 0.75rem 0.2rem;
    border-radius: 14px;
    display: grid;
    align-content: center;
  }

  .countdown-grid span {
    font-size: clamp(1.65rem, 8vw, 2.4rem);
    line-height: 1;
    letter-spacing: 0.02em;
  }

  .countdown-grid small {
    margin-top: 0.5rem;
    font-size: clamp(0.48rem, 1.85vw, 0.63rem);
    letter-spacing: 0.08em;
  }

  .context-copy {
    margin-top: 1.25rem;
    padding: 0 0.4rem;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .footer-copy {
    margin-top: 1rem;
    padding-bottom: env(safe-area-inset-bottom);
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .page-shell {
    padding-right: max(0.5rem, env(safe-area-inset-right));
    padding-left: max(0.5rem, env(safe-area-inset-left));
  }

  .signal-box {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    border-radius: 20px;
  }

  .brand-stage {
    height: 202px;
    margin-bottom: 1.1rem;
  }

  .brand-mark {
    width: min(218px, 68vw);
    max-height: 194px;
  }

  .countdown-grid div {
    min-height: 84px;
  }

  .countdown-grid span {
    font-size: 1.62rem;
  }

  .countdown-grid small {
    font-size: 0.46rem;
    letter-spacing: 0.05em;
  }
}
