/* Shared layout for every Coming soon page.
   Each page sets its own display font and sizing with these variables:
     --display-font      font for the heading and the clock labels
     --display-size      heading size
     --display-tracking  heading letter-spacing
     --label-size        clock label size
     --label-tracking    clock label letter-spacing
     --clock-font        font for the countdown digits
     --clock-size        countdown digit size
     --clock-weight      countdown digit weight
     --digit-width       width of each digit cell, for fonts whose digits
                         differ in width (needs data-digit-cells on the clock)
   Defaults are the first Coming soon page (Gill Sans, monospace digits). */

:root {
  color-scheme: dark;
  --display-font: "Gill Sans", "Gill Sans MT", Futura, Optima, "Avenir Next", "Trebuchet MS", sans-serif;
  --display-size: 1.75rem;
  --display-tracking: 0.35em;
  --label-size: clamp(0.625rem, 1.6vw, 0.875rem);
  --label-tracking: 0.2em;
  --clock-font: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --clock-size: clamp(2.25rem, 11vw, 9rem);
  --clock-weight: 500;
  --digit-width: auto;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #000;
  color: #f5f5f7;
  font-family: ui-serif, "New York", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

/* Background effect: concentric rings (rings.js). Drawn as SVG circles so
   each one can expand at a steady pace. */
.rings {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.rings circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);   /* matches the brightest drifting numbers (number-field.js) */
  stroke-width: 1;
  animation: grow var(--period) linear infinite;
  animation-delay: var(--delay);
}

@keyframes grow {
  from { r: 0; }
  to   { r: var(--rmax); }
}

@media (prefers-reduced-motion: reduce) {
  .rings circle { animation: none; }
}

/* Background effect: drifting depth contours (contours.js) */
.contours {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Background effect: a beam of light turning at mirrors, ending in a rainbow (light-beams.js) */
.light-beams {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Background effect: numbers drifting toward you (number-field.js) */
.number-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
  text-align: center;
}

.back {
  position: fixed;
  z-index: 2;
  top: max(1.25rem, env(safe-area-inset-top));
  left: max(1.25rem, env(safe-area-inset-left));
  color: #6e6e73;
  text-decoration: none;
  font-size: 0.95rem;
}

.back:hover, .back:focus-visible { color: #f5f5f7; }

/* Wide-tracked capitals */
h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display-font);
  font-size: var(--display-size);
  font-weight: 400;
  letter-spacing: var(--display-tracking);
  margin-right: calc(-1 * var(--display-tracking)); /* balance the trailing letter-space */
  text-transform: uppercase;
  color: #8e8e93;
}

/* The clock: one line of tabular digits that always fits the screen */
.clock {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: var(--clock-font);
  font-variant-numeric: tabular-nums;
  font-size: var(--clock-size);
  font-weight: var(--clock-weight);
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0;
}

.clock .n { white-space: nowrap; }

/* Each digit in its own fixed-width cell, so the clock doesn't wobble */
.clock .digit {
  display: inline-block;
  width: var(--digit-width);
  text-align: center;
}

.clock .sep {
  color: #48484a;
  padding: 0 0.08em;
}

.clock .group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.clock .label {
  font-family: var(--display-font);
  font-size: var(--label-size);
  font-weight: 400;
  letter-spacing: var(--label-tracking);
  margin-right: calc(-1 * var(--label-tracking));
  text-transform: uppercase;
  color: #6e6e73;
}
