:root {
  --bg: #060608;
  --fg: #ecebe6;
  --muted: rgba(236, 235, 230, 0.56);
  --line: rgba(236, 235, 230, 0.12);
  --accent: #ff7a45;
  --pad: clamp(20px, 4vw, 52px);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

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

html { height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(var(--pad), env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right))
           max(var(--pad), env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: none;
}

/* Edge vignette + film grain over the canvas. */
.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(130% 100% at 60% 45%, transparent 50%, rgba(0, 0, 0, 0.65) 100%);
}
.veil::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top, .hero, .bottom { position: relative; z-index: 2; }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.glyph { width: 22px; height: 22px; }
.status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%       { box-shadow: 0 0 0 0 rgba(255, 122, 69, 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(255, 122, 69, 0); }
}

/* Hero */
.hero {
  align-self: end;
  max-width: 780px;
  padding: 48px 0 clamp(28px, 6vh, 72px);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}
h1 {
  margin: 0;
  font-size: clamp(44px, 7.4vw, 112px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}
h1 .line { display: block; white-space: nowrap; }
.lede {
  max-width: 36ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.5;
}

.hero > * { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero > :nth-child(1) { animation-delay: 0.15s; }
.hero > :nth-child(2) { animation-delay: 0.3s; }
.hero > :nth-child(3) { animation-delay: 0.55s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* Footer */
.bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.bottom a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}
.bottom a:hover { color: var(--accent); }
a:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
#clock { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .bottom { flex-wrap: wrap; }
  #clock { display: none; }
  h1 .line { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse, .hero > * { animation: none; }
}
