@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* Colours taken from the 3 Fingers logo presentation. */
:root {
  --ink: #0a0a0a;
  --ink-2: #111111;
  --sky: #8cc8e0;
  --paper: #ededed;
  --muted: rgba(237, 237, 237, 0.56);
  --rule: rgba(237, 237, 237, 0.16);
  --gutter: clamp(16px, 6vw, 98px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--ink);
  color: var(--paper);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 350;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Atmosphere: a slow sky-blue glow and a fine film grain. */
.glow {
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  background:
    radial-gradient(38vmax 30vmax at 50% 42%, rgba(140, 200, 224, 0.14), transparent 70%),
    radial-gradient(60vmax 40vmax at 50% 120%, rgba(140, 200, 224, 0.06), transparent 70%);
  animation: breathe 12s ease-in-out infinite alternate;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes breathe {
  from { transform: scale(1); opacity: 0.8; }
  to   { transform: scale(1.08); opacity: 1; }
}

/* Top and bottom rules echo the presentation's page frame. */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.bar--top { border-bottom: 1px solid var(--rule); }
.bar--bottom { border-top: 1px solid var(--rule); }
.bar__symbol { width: 24px; height: 24px; opacity: 0.9; }

.status { display: inline-flex; align-items: center; gap: 10px; }
.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 0 rgba(140, 200, 224, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(140, 200, 224, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(140, 200, 224, 0); }
  100% { box-shadow: 0 0 0 0 rgba(140, 200, 224, 0); }
}

/* Stage */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(40px, 8vh, 96px) var(--gutter);
}

.emblem {
  position: relative;
  width: clamp(150px, 22vmin, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: clamp(28px, 5vh, 48px);
}

.emblem__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
  animation: spin 40s linear infinite;
}

.emblem__mark {
  width: 34%;
  height: auto;
  transform: translateY(3%);
  filter: drop-shadow(0 0 24px rgba(140, 200, 224, 0.35));
}

@keyframes spin { to { transform: rotate(360deg); } }

h1 { margin: 0; line-height: 0; }

.wordmark {
  width: min(560px, 82vw);
  height: auto;
}

.tagline {
  margin: clamp(18px, 3vh, 28px) 0 0;
  font-size: clamp(16px, 2.1vw, 20px);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* Countdown */
.countdown { margin-top: clamp(44px, 8vh, 80px); width: 100%; max-width: 720px; }

.countdown__label {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sky);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: clamp(16px, 3vh, 26px) 4px;
}

.unit + .unit { border-left: 1px solid var(--rule); }

.num {
  font-size: clamp(38px, 8vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

.num.tick { animation: tick 0.5s var(--ease); }

@keyframes tick {
  from { opacity: 0.25; transform: translateY(-0.12em); }
  to   { opacity: 1; transform: none; }
}

.cap {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown__date,
.countdown__done {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.countdown__done { color: var(--sky); font-size: 16px; }

/* Entrance */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1.1s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 140ms + 120ms);
}

.emblem.reveal { transform: scale(0.94); }

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

@media (max-width: 520px) {
  .bar { font-size: 13px; padding-top: 18px; padding-bottom: 18px; }
  .bar--bottom { flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
  .bar__symbol { display: none; }
  .unit { padding-left: 0; padding-right: 0; }
  .cap { font-size: 10px; letter-spacing: 0.14em; }
}

@media (prefers-reduced-motion: reduce) {
  .glow, .emblem__ring, .status i, .num.tick { animation: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
}
