@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f2f1ec;
  --ink: #121211;
  --ink-2: #5d5c57;
  --rule: rgba(18, 18, 17, 0.14);
  --accent: #003da5; /* Zurich blue (Pantone 293 C); keep in sync with field.js */
  --pad: clamp(20px, 3.2vw, 48px);
  --screen: 100vh;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

@supports (height: 1svh) {
  :root {
    --screen: 100svh;
  }
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.page {
  position: relative;
  min-height: var(--screen);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 var(--pad);
}

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.top,
.hero,
.bottom {
  position: relative;
}

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* the key mark (tools/key.py), upright; width follows the viewBox ratio 13.35 : 32 */
.mark {
  width: 19.2px;
  height: 46px;
  flex: none;
  fill: var(--accent);
}

.meta,
.bottom {
  color: var(--ink-2);
  font: 400 11.5px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Headline ---------- */

.hero {
  align-self: end;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  padding: 48px 0 clamp(24px, 4vh, 44px);
}

h1 {
  margin: 0;
  font-size: clamp(3.5rem, min(25vw, 30vh), 15rem);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: -0.06em;
}

/* each line slides up out of its own mask; the padding keeps the "g" descender visible */
h1 .line {
  display: block;
  overflow: hidden;
  padding: 0 0.04em 0.12em 0;
  margin-bottom: -0.12em;
}

h1 .line > span {
  display: block;
}

/* --live is set by field.js: it starts as the key blue and changes color every 10 s */
h1 .dot {
  color: var(--live, var(--accent));
}

.about {
  max-width: 30ch;
  margin: 0 0 0.6em;
  color: var(--ink-2);
  font-size: clamp(1rem, 0.92rem + 0.3vw, 1.175rem);
  line-height: 1.45;
  text-wrap: pretty;
}

/* ---------- Footer ---------- */

.bottom {
  display: flex;
  justify-content: space-between;
  gap: 6px 24px;
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
}

@media (max-width: 760px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .about {
    margin: 0;
  }

  .coords {
    display: none;
  }
}

@media (max-width: 520px) {
  .meta {
    display: none;
  }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  h1 .line > span {
    animation: line-up 1.2s 0.25s var(--ease) both;
  }

  h1 .line:nth-child(2) > span {
    animation-delay: 0.37s;
  }

  h1 .dot {
    animation: blink 1.6s 1.6s ease-in-out infinite;
  }

  .about {
    animation: fade-up 1s 0.7s var(--ease) both;
  }

  .top,
  .bottom {
    animation: fade-in 1s 0.1s ease-out both;
  }
}

@keyframes line-up {
  from {
    transform: translateY(105%);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

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