@font-face {
  font-family: "Archivo Wide";
  src: url("fonts/archivo-wide-800.woff2") format("woff2");
  font-weight: 800;
  font-stretch: 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0b0b0a;
  --ink: #e9e6df;
  --muted: rgba(233, 230, 223, 0.56);
  --faint: rgba(233, 230, 223, 0.16);
  --accent: #e5482b;

  --display: "Archivo Wide", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 3.2vw, 44px);
  --meta: clamp(10px, 0.78vw, 11.5px);
  color-scheme: dark;
}

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

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

p, h1 { margin: 0; }
a { color: inherit; text-decoration: none; }

.strings {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("grain.svg") repeat;
  background-size: 200px 200px;
  opacity: 0.07;
}

.frame {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(calc(var(--gutter) * 0.8), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
  pointer-events: none;
}

.frame a { pointer-events: auto; }

/* Mono meta rows */
.meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: var(--meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.meta > span:first-child { color: var(--ink); }

.clock { display: inline-flex; align-items: baseline; gap: 0.7em; }
.clock time { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 12ch; text-align: right; }

.pulse {
  width: 6px;
  height: 6px;
  align-self: center;
  background: var(--accent);
  animation: pulse 2.4s steps(1, end) infinite;
}

@keyframes pulse { 50% { opacity: 0.25; } }

.show-sm { display: none; }

/* Core */
.core {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(20px, 4.4vh, 48px);
  padding-bottom: clamp(18px, 4.5vh, 52px);
  min-height: 0;
}

.mark {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: min(9.58vw, 24vh);
  line-height: 0.8;
  letter-spacing: -0.035em;
  margin-left: -0.04em;
  white-space: nowrap;
}

.mark span { display: inline-block; }

.lower {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.copy { max-width: 34rem; }

.blurb {
  font-size: clamp(19px, min(1.9vw, 3.4vh), 28px);
  line-height: 1.22;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.sub {
  margin-top: 0.9em;
  font-family: var(--mono);
  font-size: var(--meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.actions { display: flex; gap: 10px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4em;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(233, 230, 223, 0.34);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(11, 11, 10, 0.6);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover { border-color: var(--ink); }

.btn-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-solid .addr { text-transform: none; letter-spacing: 0.01em; font-weight: 400; opacity: 0.7; }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Phones and narrow windows */
@media (max-width: 820px) {
  .lower { flex-direction: column; align-items: stretch; gap: clamp(18px, 3.4vh, 28px); }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .mark { font-size: min(18.6vw, 13vh); line-height: 0.84; }
  .mark span { display: block; }
  .core { padding-bottom: clamp(14px, 3vh, 28px); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .btn { transition: none; }
}
