@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-VF.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0B0C0F;
  --bg2: #15171C;
  --ink: #E9E6DF;
  --muted: #A29E96;
  --faint: rgba(233, 230, 223, 0.13);
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg2), var(--bg) 70%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ------- top line ------- */
.top {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 16px 0;
  font-size: 13px; letter-spacing: 0.08em; text-transform: lowercase;
  color: var(--muted);
}
.top .sep { opacity: 0.5; }
.beacon-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 0 rgba(233, 230, 223, 0.5);
  animation: beacon 1.6s ease-out infinite;
}
@keyframes beacon {
  0% { box-shadow: 0 0 0 0 rgba(233, 230, 223, 0.55); opacity: 1; }
  70% { box-shadow: 0 0 0 10px rgba(233, 230, 223, 0); opacity: 0.55; }
  100% { box-shadow: 0 0 0 0 rgba(233, 230, 223, 0); opacity: 1; }
}

/* ------- stage ------- */
main {
  width: 100%; max-width: 1400px; margin: 0 auto;
  padding: 8px 16px 24px;
  display: flex; flex-direction: column; justify-content: center;
}

.stage-wrap {
  position: relative; margin: 8px 0 0;
  border-radius: 14px;
  background-image: radial-gradient(var(--faint) 1px, transparent 1.5px);
  background-size: 22px 22px;
  background-position: center;
}

#stage {
  display: block; width: 100%; height: auto;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}

.static-logo { display: block; width: 60%; margin: 8% auto; }

#stage .ground { stroke: var(--ink); stroke-width: 6; fill: none; }
#stage .hatch { stroke: var(--muted); stroke-width: 4; fill: none; opacity: 0.45; }
#stage .anchor { fill: var(--ink); }
/* the tensegrity grammar: thick bars in compression, thin cables in tension, pins where they meet */
#stage .strut { stroke: var(--ink); stroke-width: 40; stroke-linecap: round; }
#stage .node { fill: var(--bg); stroke: var(--ink); stroke-width: 7; }
#stage .chalk { stroke: var(--muted); stroke-width: 6; stroke-dasharray: 34 24; }
#stage .stay { stroke: var(--muted); stroke-width: 5; fill: none; stroke-linecap: round; }
#stage .letter path { fill: var(--ink); }
#stage .rope { stroke: var(--muted); stroke-width: 6; fill: none; }
#stage .block { fill: var(--bg); stroke: var(--ink); stroke-width: 8; }
#stage .hookline { stroke: var(--ink); stroke-width: 12; fill: none; stroke-linecap: round; }
#stage .sling { stroke: var(--muted); stroke-width: 5; fill: none; stroke-linejoin: round; }
#stage .bolt { fill: var(--ink); }
#stage .worker path, #stage .bird path { fill: var(--ink); shape-rendering: crispEdges; }
#stage .hit { fill: transparent; cursor: pointer; }
#stage .bob { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
#stage .bubble rect, #stage .bubble path { fill: var(--bg); stroke: var(--ink); stroke-width: 8; stroke-linejoin: round; }
#stage .bubble text { fill: var(--ink); font: 600 110px var(--display); }

/* the caution tape, slightly crooked like the real thing */
.tape {
  position: relative; overflow: hidden;
  margin: 1.2% -6px 0;
  transform: rotate(-1.4deg);
  background: var(--ink); color: var(--bg);
  border-block: 7px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--bg) 0 9px, var(--ink) 9px 18px) 7;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  white-space: nowrap; display: flex;
  pointer-events: none;
}
.tape span { flex: none; padding: 6px 0; animation: tape 70s linear infinite; }
@keyframes tape { to { transform: translateX(-100%); } }

/* ------- text ------- */
.about { text-align: center; margin-top: clamp(28px, 6vw, 56px); }
.name { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; letter-spacing: 0.02em; }
.lead {
  margin: 0 auto; max-width: 44ch;
  font-size: clamp(1.1rem, 2.6vw, 1.45rem); line-height: 1.45; font-weight: 400;
  text-wrap: balance;
}
.en { margin: 10px auto 0; max-width: 46ch; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.contact { margin: clamp(26px, 5vw, 40px) 0 0; }
.cta { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.9rem; }

.mail {
  position: relative; display: inline-block;
  color: var(--ink); text-decoration: none;
  font-size: clamp(1.45rem, 5.4vw, 2.3rem); font-weight: 600; letter-spacing: -0.02em;
  padding-bottom: 12px;
}
/* the underline is a cable: pluck it */
.mail .string { position: absolute; left: 0; bottom: 0; width: 100%; height: 12px; overflow: visible; }
.mail .string path {
  fill: none; stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke;
  transform-box: view-box; transform-origin: 50% 50%;
  transform: scaleY(0);
}
.mail:hover .string path, .mail:focus-visible .string path, .mail:active .string path { animation: pluck 0.9s ease-out; }
@keyframes pluck {
  0% { transform: scaleY(0); }
  12% { transform: scaleY(1.6); }
  28% { transform: scaleY(-1.2); }
  45% { transform: scaleY(0.8); }
  62% { transform: scaleY(-0.45); }
  80% { transform: scaleY(0.2); }
  100% { transform: scaleY(0); }
}
.mail:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 4px; }

/* ------- footer ------- */
footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  font-size: 12.5px; color: var(--muted);
}
#rebuild {
  font: inherit; color: var(--muted);
  background: transparent; border: 1px solid var(--faint); border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
}
#rebuild:hover { color: var(--ink); border-color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html:not(.anim) :is(.beacon-dot, #stage .bob) { animation: none; }
  html:not(.anim) .mail:is(:hover, :focus-visible, :active) .string path { animation: none; }
}
