/* Colours come from assets/brand/kit-2026-10: the screen when it is off, and the glow of the eyes.
   The wordmark is the kit's Unbounded outlines; small text is the system font, as the guide says. */
:root {
  --screen: #12191D;
  --eye: #EAF6F9;
  --glow: rgba(27, 127, 155, 0.5);
  --paper: #FFFDF8;
  --muted: #8A9BA2;
  /* The idle face of the device, scaled by --e (eye width). */
  --e: clamp(52px, 10vw, 112px);
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--screen);
  color: var(--paper);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

main {
  display: grid;
  justify-items: center;
  text-align: center;
}

.face {
  display: flex;
  gap: calc(var(--e) * 0.57);
  margin-bottom: calc(var(--e) * 1.15);
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.eye {
  width: var(--e);
  height: calc(var(--e) * 1.3);
  border-radius: calc(var(--e) * 0.38);
  background: var(--eye);
  box-shadow: 0 0 calc(var(--e) * 0.25) var(--glow), 0 0 calc(var(--e) * 0.6) rgba(27, 127, 155, 0.16);
  transform-origin: 50% 55%;
  animation: wake 1400ms cubic-bezier(0.16, 1, 0.3, 1) 700ms backwards;
  transition: transform 110ms ease-out;
}

.face.blink .eye { transform: scaleY(0.07); }
.face.look-left { transform: translateX(calc(var(--e) * -0.28)); }
.face.look-right { transform: translateX(calc(var(--e) * 0.28)); }

@keyframes wake {
  from { transform: scaleY(0.04); opacity: 0; }
  30% { transform: scaleY(0.04); opacity: 1; }
  to { transform: scaleY(1); opacity: 1; }
}

h1 { line-height: 0; }

h1 svg {
  width: clamp(176px, 36vw, 300px);
  height: auto;
  color: var(--paper);
  opacity: 0;
  animation: rise 1200ms ease-out 1900ms forwards;
}

.soon {
  margin-top: 18px;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  opacity: 0;
  animation: rise 1200ms ease-out 2300ms forwards;
}

@keyframes rise { to { opacity: 1; } }

.lang {
  position: fixed;
  right: 16px;
  bottom: 14px;
  display: flex;
  gap: 2px;
}

.lang button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
}

.lang button:hover { color: var(--paper); }
.lang button[aria-pressed="true"] { color: var(--paper); }
.lang button:focus-visible { outline: 2px solid #1B7F9B; outline-offset: 2px; }

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

@media (prefers-reduced-motion: reduce) {
  .eye, h1 svg, .soon { animation: none; opacity: 1; }
  .face, .eye { transition: none; }
}
