@font-face {
  font-family: "Tiempos Headline";
  src: url("https://www.emma-sleep.co.uk/fonts/Tiempos-headline-semibold.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}

@font-face {
  font-family: "Tiempos Headline";
  src: url("https://www.emma-sleep.co.uk/fonts/Tiempos-headline-semibold-italic.woff2") format("woff2");
  font-display: swap;
  font-style: italic;
  font-weight: 600;
}

@font-face {
  font-family: "Emma Inter";
  src: url("https://www.emma-sleep.co.uk/_fonts/HMIpvSGaowt7SlR6hOzitNhapl3-DP_uKEIrqDYZqm4-TR4adq7OWcw3ccMrfRUsKwRNoXJh3OBAOX83AEC3CEI.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}

@font-face {
  font-family: "Emma Inter";
  src: url("https://www.emma-sleep.co.uk/_fonts/glWiZgUjTW_66zZrAes3rA_89fcxEK7C4QeR_lEysw0-9RVEIHfNYwi6RJ4qcrx09MoXsAbExqCeJ8m_f8Oc6ls.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --page-bg: #080b1f;
  --page-bg-top: #0d1030;
  --panel: rgba(28, 34, 72, 0.72);
  --panel-strong: rgba(38, 43, 82, 0.88);
  --panel-border: rgba(188, 198, 255, 0.12);
  --text-main: #f6f2eb;
  --text-muted: rgba(241, 239, 247, 0.76);
  --emma-blue: #0047e1;
  --emma-blue-soft: #2d5ef5;
  --emma-gold: #ffb933;
  --emma-orange: #ff8b1f;
  --shadow: 0 32px 80px rgba(1, 4, 15, 0.48);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top, rgba(50, 70, 158, 0.22), transparent 36%),
    linear-gradient(180deg, var(--page-bg-top) 0%, var(--page-bg) 70%);
  color: var(--text-main);
  font-family: "Emma Inter", Inter, Arial, sans-serif;
}

img {
  display: block;
  max-width: 80%;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.sky-stars {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  z-index: -1;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.2px),
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.48) 0 1px, transparent 1.1px),
    radial-gradient(circle at 30% 10%, rgba(255, 240, 190, 0.65) 0 1.2px, transparent 1.3px),
    radial-gradient(circle at 40% 34%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.1px),
    radial-gradient(circle at 52% 18%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.2px),
    radial-gradient(circle at 62% 8%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.1px),
    radial-gradient(circle at 76% 25%, rgba(255, 240, 190, 0.55) 0 1.2px, transparent 1.3px),
    radial-gradient(circle at 90% 16%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.2px),
    radial-gradient(circle at 12% 72%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.2px),
    radial-gradient(circle at 68% 74%, rgba(255, 255, 255, 0.46) 0 1px, transparent 1.2px),
    radial-gradient(circle at 86% 68%, rgba(255, 240, 190, 0.42) 0 1px, transparent 1.2px),
    radial-gradient(circle at 16% 56%, rgba(255, 240, 190, 0.32) 0 0.9px, transparent 1.1px),
    radial-gradient(circle at 44% 12%, rgba(255, 240, 190, 0.36) 0 0.9px, transparent 1.1px),
    radial-gradient(circle at 73% 14%, rgba(255, 240, 190, 0.34) 0 0.9px, transparent 1.1px),
    radial-gradient(circle at 94% 38%, rgba(255, 255, 255, 0.36) 0 0.9px, transparent 1.1px);
  animation: skyDrift 18s ease-in-out infinite alternate, starFieldPulse 7.5s ease-in-out infinite;
}

.sky-stars::before,
.sky-stars::after,
.sparkle {
  content: "";
  position: absolute;
  pointer-events: none;
}

.sky-stars::before,
.sky-stars::after {
  inset: 0;
  background-repeat: no-repeat;
}

.sky-stars::before {
  opacity: 0.48;
  background-image:
    radial-gradient(circle at 10% 22%, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 1.5px),
    radial-gradient(circle at 24% 8%, rgba(255, 240, 190, 0.75) 0 1.1px, transparent 1.4px),
    radial-gradient(circle at 39% 26%, rgba(255, 255, 255, 0.85) 0 1.1px, transparent 1.4px),
    radial-gradient(circle at 49% 6%, rgba(255, 255, 255, 0.92) 0 1.2px, transparent 1.5px),
    radial-gradient(circle at 58% 30%, rgba(255, 240, 190, 0.72) 0 1.1px, transparent 1.4px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.88) 0 1.1px, transparent 1.4px),
    radial-gradient(circle at 14% 66%, rgba(255, 255, 255, 0.8) 0 1.1px, transparent 1.4px),
    radial-gradient(circle at 61% 74%, rgba(255, 255, 255, 0.82) 0 1.1px, transparent 1.4px);
  animation: starTwinkleA 4.8s ease-in-out infinite;
}

.sky-stars::after {
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 4% 34%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.3px),
    radial-gradient(circle at 19% 46%, rgba(255, 240, 190, 0.62) 0 1px, transparent 1.3px),
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.74) 0 1px, transparent 1.3px),
    radial-gradient(circle at 46% 40%, rgba(255, 255, 255, 0.66) 0 1px, transparent 1.3px),
    radial-gradient(circle at 67% 50%, rgba(255, 255, 255, 0.68) 0 1px, transparent 1.3px),
    radial-gradient(circle at 92% 24%, rgba(255, 240, 190, 0.58) 0 1px, transparent 1.3px),
    radial-gradient(circle at 42% 88%, rgba(255, 255, 255, 0.66) 0 1px, transparent 1.3px);
  animation: starTwinkleB 6.2s ease-in-out 0.9s infinite;
}

.sparkle {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #ffffff;
  opacity: 0.14;
  transform: scale(0.68);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 6px rgba(255, 255, 255, 0.12);
  animation: starSparkle 10.8s ease-in-out infinite;
}

.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.88);
  transform: translate(-50%, -50%);
  border-radius: 999px;
}

.sparkle::before {
  width: 10px;
  height: 1px;
}

.sparkle::after {
  width: 1px;
  height: 10px;
}

.sparkle-1 {
  left: 10%;
  top: 18%;
  animation-delay: -0.8s;
}

.sparkle-2 {
  left: 23%;
  top: 9%;
  animation-delay: -3.1s;
}

.sparkle-3 {
  left: 41%;
  top: 25%;
  animation-delay: -1.7s;
}

.sparkle-4 {
  left: 57%;
  top: 12%;
  animation-delay: -4.4s;
}

.sparkle-5 {
  left: 73%;
  top: 20%;
  animation-delay: -2.6s;
}

.sparkle-6 {
  left: 88%;
  top: 15%;
  animation-delay: -5s;
}

.sparkle-7 {
  left: 31%;
  top: 74%;
  animation-delay: -3.8s;
}

.sparkle-8 {
  left: 79%;
  top: 68%;
  animation-delay: -1.2s;
}

.brand-header {
  padding: 32px 24px 0;
}

.brand-logo {
  width: 128px;
  height: auto;
}

.hero {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 72px;
  text-align: center;
}

.hero-illustration {
  width: min(360px, 100%);
  margin: 0 auto 18px;
}

.hero-illustration > img,
.hero-illustration > svg {
  width: 100%;
  height: auto;
}

.hero-copy {
  max-width: 920px;
  margin: 0 auto;
}

.hero-title {
  margin: 0;
  color: var(--text-main);
  font-family: "Tiempos Headline", Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-title-accent {
  display: block;
  margin: 0.14em 0;
  color: #f09146;
  font-style: italic;
}

.hero-description {
  width: min(760px, 100%);
  margin: 28px auto 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1.45vw, 1.16rem);
  line-height: 1.65;
}

.hero-description strong {
  color: var(--text-main);
  font-weight: 700;
}

.launch-pill {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  margin: 40px auto 0;
  padding: 16px 28px;
  border: 1px solid rgba(255, 145, 66, 0.42);
  border-radius: 999px;
  background: rgba(62, 39, 39, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 172, 104, 0.08);
}

.launch-pill::before {
  content: "\23F0";
  font-size: 1.65rem;
  line-height: 1;
}

.launch-pill-label,
.launch-pill-date {
  display: block;
}

.launch-pill-label {
  color: #f49b58;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.launch-pill-date {
  color: #fff7ef;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 700;
}

.countdown {
  margin-top: 36px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: min(720px, 100%);
  margin: 0 auto;
}

.time-card {
  position: relative;
  padding: 22px 16px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(48, 54, 95, 0.84), rgba(34, 39, 74, 0.74));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.time-card::after {
  content: ":";
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-56%);
  color: rgba(255, 145, 66, 0.85);
  font-size: 2.6rem;
  font-weight: 700;
}

.time-card:last-child::after {
  content: none;
}

.time-value {
  display: block;
  color: #ffffff;
  font-size: clamp(2.45rem, 4vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
}

.time-label {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.countdown-complete {
  margin: 18px 0 0;
  color: #fff0de;
  font-size: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes skyDrift {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-8px);
  }
}

@keyframes starFieldPulse {
  0%,
  100% {
    opacity: 0.76;
  }

  50% {
    opacity: 0.9;
  }
}

@keyframes starTwinkleA {
  0%,
  100% {
    opacity: 0.42;
  }

  35% {
    opacity: 0.7;
  }

  65% {
    opacity: 0.52;
  }
}

@keyframes starTwinkleB {
  0%,
  100% {
    opacity: 0.3;
  }

  40% {
    opacity: 0.58;
  }

  72% {
    opacity: 0.4;
  }
}

@keyframes starSparkle {
  0%,
  100% {
    opacity: 0.12;
    transform: scale(0.66);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 6px rgba(255, 255, 255, 0.1);
  }

  42% {
    opacity: 0.2;
    transform: scale(0.82);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.12),
      0 0 10px rgba(255, 255, 255, 0.16);
  }

  50% {
    opacity: 0.62;
    transform: scale(1.45);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.24),
      0 0 14px rgba(255, 255, 255, 0.24),
      0 0 22px rgba(127, 180, 255, 0.12);
  }

  58% {
    opacity: 0.24;
    transform: scale(0.88);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.12),
      0 0 10px rgba(255, 255, 255, 0.14);
  }
}

@media (max-width: 860px) {
  .hero {
    width: min(100% - 24px, 960px);
    padding-bottom: 56px;
  }

  .countdown-grid {
    gap: 14px;
  }

  .time-card::before,
  .time-card::after {
    right: -11px;
    font-size: 2.1rem;
  }
}

@media (max-width: 640px) {
  .brand-header {
    padding: 24px 20px 0;
  }

  .brand-logo {
    width: 108px;
  }

  .hero {
    width: min(100% - 20px, 960px);
    padding-bottom: 44px;
  }

  .hero-illustration {
    margin-bottom: 8px;
  }

  .hero-description {
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.6;
  }

  .launch-pill {
    flex-direction: column;
    gap: 8px;
    width: min(100%, 420px);
    border-radius: 28px;
    padding: 16px 22px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(460px, 100%);
  }

  .time-card::before,
  .time-card::after {
    content: none;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2.15rem;
  }

  .time-card {
    padding: 18px 14px 16px;
    border-radius: 18px;
  }

  .time-value {
    font-size: 2.15rem;
  }

  .time-label {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
