/* Elvado — one light source, above and slightly behind the mark.
   Every surface on this page is a face of the same solid: lit on top,
   shadowed on the underside. Colours are the icon's own gradient stops. */

:root {
  --void:      #060B14;
  --plane:     #0E1A2C;
  --face-dark: #091220;
  --edge:      #1E3A5F;
  --beam:      #53D6F5;
  --cobalt:    #2379C4;

  --text:      #C6D6E6;
  --text-dim:  #6E869E;
  --text-faint:#48607A;

  --font-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* The light sits just behind the mark, and everything is lit from it. */
  --light-x: 50%;
  --light-y: 46%;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(83, 214, 245, 0.22); color: #EAF4FC; }

/* ─── Atmosphere ─────────────────────────────────────────────── */

/* The light itself. */
.light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(70rem 40rem at var(--light-x) var(--light-y),
      rgba(35, 121, 196, 0.17), transparent 68%),
    radial-gradient(26rem 16rem at var(--light-x) calc(var(--light-y) - 4%),
      rgba(83, 214, 245, 0.09), transparent 70%);
}

/* Isometric drafting grid — the geometry the mark is drawn in.
   It pools where the light falls and dissolves into the dark. */
.ground {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(60deg,  transparent 0 71px, rgba(90, 160, 220, 0.09) 71px 72px),
    repeating-linear-gradient(120deg, transparent 0 71px, rgba(90, 160, 220, 0.09) 71px 72px);
  -webkit-mask-image: radial-gradient(64rem 48rem at var(--light-x) var(--light-y), #000 0%, rgba(0,0,0,0.40) 44%, transparent 76%);
  mask-image: radial-gradient(64rem 48rem at var(--light-x) var(--light-y), #000 0%, rgba(0,0,0,0.40) 44%, transparent 76%);
  animation: settle 1400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes settle { from { opacity: 0; } to { opacity: 1; } }

/* Breaks gradient banding on the dark wash. Not decoration. */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Sheet ──────────────────────────────────────────────────── */

.sheet {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(56px, 9vh, 96px) 24px clamp(56px, 9vh, 96px);
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 44rem;
}

/* ─── Mark ───────────────────────────────────────────────────── */

.mark {
  width: clamp(96px, 10vw, 132px);
  aspect-ratio: 1;
  border-radius: 22.5%;
  position: relative;
  isolation: isolate;
  box-shadow:
    inset 0 1px 0 rgba(120, 200, 245, 0.30),
    0 0 0 1px rgba(30, 58, 95, 0.55),
    0 28px 60px -22px rgba(0, 0, 0, 0.95),
    0 0 90px -20px rgba(35, 121, 196, 0.45);
}

.mark svg { display: block; width: 100%; height: 100%; border-radius: inherit; }

/* ─── Wordmark ───────────────────────────────────────────────── */

.wordmark {
  margin: clamp(28px, 4vh, 40px) 0 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: uppercase;
  color: #DCEAF6;
}

/* ─── Lede ───────────────────────────────────────────────────── */

.lede {
  margin: clamp(22px, 3.4vh, 34px) 0 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(18px, 1.2rem + 0.6vw, 28px);
  line-height: 1.44;
  letter-spacing: -0.011em;
  color: var(--text);
  text-wrap: balance;
}

/* ─── Countdown ──────────────────────────────────────────────── */

.counter {
  margin-top: clamp(40px, 6vh, 60px);
  width: min(100%, 26rem);
}

/* One extruded solid, not four cards. */
.bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 14px;
  position: relative;
  background: linear-gradient(180deg, var(--plane) 0%, var(--face-dark) 100%);
  box-shadow:
    inset 0 1px 0 rgba(120, 200, 245, 0.16),
    0 0 0 1px rgba(30, 58, 95, 0.62),
    0 22px 52px -22px rgba(0, 0, 0, 0.95),
    0 1px 0 rgba(0, 0, 0, 0.55);
}

/* The light catching the top face, drawn across on load. */
.bar::before {
  content: "";
  position: absolute;
  top: 0; left: 4%; right: 4%;
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 220, 250, 0.75), transparent);
  transform: scaleX(0);
  animation: draw 900ms cubic-bezier(0.22, 1, 0.36, 1) 560ms both;
}

@keyframes draw { to { transform: scaleX(1); } }

.cell {
  padding: clamp(18px, 2.6vw, 26px) 8px;
  display: grid;
  place-items: center;
  min-width: 0;
}

/* Two-tone hairline seam: lit left face, dark right face. */
.cell + .cell {
  border-left: 1px solid rgba(3, 7, 14, 0.72);
  box-shadow: inset 1px 0 0 rgba(83, 214, 245, 0.055);
}

.digits {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(24px, 1.4rem + 1.5vw, 42px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #E4F1FB;
  display: block;
}

/* The face catches the light as it turns. */
.digits.tick { animation: turn 260ms cubic-bezier(0.32, 0.72, 0, 1); }

@keyframes turn {
  0%   { transform: translateY(-0.11em); opacity: 0.35; }
  55%  { color: #FFFFFF; text-shadow: 0 0 18px rgba(83, 214, 245, 0.45); }
  100% { transform: translateY(0); opacity: 1; }
}

.legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: #55708C;
}

/* ─── Title block ────────────────────────────────────────────── */

.block {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin: 0 clamp(20px, 4vw, 52px);
  padding: 16px 0 clamp(18px, 3vh, 30px);
  border-top: 1px solid rgba(30, 58, 95, 0.42);
  box-shadow: inset 0 1px 0 rgba(83, 214, 245, 0.04);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.block-cell { white-space: nowrap; }

.block a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 220ms ease;
}

.block a:hover, .block a:focus-visible { color: var(--beam); }

/* ─── After the date passes ──────────────────────────────────── */

body.is-live .bar::before { animation-delay: 0ms; }

/* ─── Utility ────────────────────────────────────────────────── */

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

:focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 4px;
  border-radius: 3px;
}

/* ─── Load sequence ──────────────────────────────────────────── */

.reveal { animation: rise 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms) both; }

/* Stagger, in the order the page assembles itself. */
.mark     { --d: 0ms; }
.wordmark { --d: 120ms; }
.lede     { --d: 220ms; }
.counter  { --d: 340ms; }
.block    { --d: 480ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Narrow ─────────────────────────────────────────────────── */

@media (max-width: 620px) {
  .block-mid { display: none; }
  .block { justify-content: space-between; }
  .legend { letter-spacing: 0.22em; text-indent: 0.22em; }
}

@media (max-width: 360px) {
  .legend { font-size: 8.5px; letter-spacing: 0.16em; text-indent: 0.16em; }
}

/* ─── Reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .bar::before { transform: scaleX(1); }
}
