/* uli web: one screen. A moving picture, a headline, three popups. */

:root {
  --bg: #000;
  --red: #e8251b;
  --red-soft: #ff9b91;
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, 0.72);
  --ink-3: rgba(255, 255, 255, 0.5);
  --panel: #070202;
  --line: rgba(255, 255, 255, 0.12);
  --font: "Sora", "Helvetica Neue", Arial, sans-serif;
  --gutter: 40px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------------------------------------------------------------- the screen */

.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; }

.media { position: absolute; inset: 0; overflow: hidden; }
.media img {
  position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.62);
  transform-origin: 40% 50%;
  animation: pan 46s ease-in-out infinite alternate;
  will-change: transform;
}
/* A slow camera move across the mural, so the picture reads as footage, not a still. */
@keyframes pan {
  0%   { transform: translate3d(3.5%, 1.5%, 0) scale(1.02); }
  50%  { transform: translate3d(-1%, -1.2%, 0) scale(1.09); }
  100% { transform: translate3d(-4%, 1%, 0) scale(1.05); }
}
.media .shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08) 55%, rgba(0, 0, 0, 0.3)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 30%);
}
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: 0.08; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 50% { transform: translate(-3%, 2%); } 100% { transform: translate(2%, -3%); } }

.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 30px var(--gutter);
}
.mark { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; letter-spacing: -0.02em; }
.mark svg { width: 15px; height: 15px; }
.mark span { font-size: 16px; line-height: 1; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.top nav button, .top nav a { line-height: 1.3; }
.top nav button, .top nav a { padding: 2px 0; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.top nav button:hover, .top nav a:hover, .top nav button[aria-expanded="true"] { color: var(--red-soft); border-color: currentColor; }

.hero-copy {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-columns: 10.8% 1fr 1fr 1fr 10.8%;
  align-items: start; padding-top: 41.5vh; pointer-events: none;
}
.hero-copy h1 {
  grid-column: 2; margin: 0; font-weight: 400; font-size: clamp(32px, 2.95vw, 48px);
  line-height: 1.17; letter-spacing: -0.025em;
}
.hero-copy .tag { grid-column: 3; justify-self: center; margin: 0; padding-top: 0.3em; font-size: 14px; }
.hero-copy .ctas { grid-column: 4; justify-self: end; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px 22px; max-width: 360px; pointer-events: auto; }
.hero-copy .ctas small { flex-basis: 100%; text-align: right; font-size: 12px; color: rgba(255, 255, 255, 0.62); }
.hero-copy .ctas small a { border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.cta.primary { background: var(--red); color: #fff; border: none; padding: 10px 18px; border-radius: 999px; }
.cta.primary:hover { background: #ff3b30; color: #fff; }
.cta { display: inline-block; font-size: 14px; padding-bottom: 4px; border-bottom: 1px solid currentColor; transition: color 0.2s; }
.cta:hover { color: var(--red-soft); }

.corner { position: absolute; bottom: 26px; z-index: 3; font-size: 12px; line-height: 1.15; }
.corner.left { left: var(--gutter); }
.corner.left small { display: block; color: var(--ink-3); font-size: 12px; }
.corner.right { right: var(--gutter); display: flex; gap: 18px; }
.corner a:hover, .corner button:hover { color: var(--red-soft); }

/* ---------------------------------------------------------------- popups */

.panel {
  position: fixed; right: 42px; top: 84px; z-index: 20;
  width: 420px; max-height: calc(100vh - 116px);
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.panel.on { opacity: 1; transform: none; pointer-events: auto; }
.panel > header {
  display: flex; justify-content: space-between; align-items: center; flex: none;
  padding: 16px 20px; background: #120403; border-bottom: 1px solid var(--line); font-size: 15px;
}
.panel > header button { font-size: 18px; line-height: 1; color: var(--ink-2); }
.panel > header button:hover { color: #fff; }

.panel .body { overflow: auto; padding: 6px 22px 24px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.panel .body h2 { margin: 22px 0 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--red-soft); }
.panel .body p { margin: 0 0 12px; }
.panel .body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.panel .body li { padding-left: 14px; position: relative; }
.panel .body li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; background: var(--red); }
.panel .body b { color: #fff; font-weight: 500; }
.panel .body .cta { margin-top: 8px; color: #fff; }
.panel .body p a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.panel .body p a:hover { color: var(--red-soft); }
.panel figure { margin: 18px 0 16px; }
.panel figure img { display: block; width: 100%; aspect-ratio: 1177 / 851; object-fit: cover; filter: grayscale(1); border-radius: 2px; }
.panel figcaption { margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.panel .credit { margin-top: 18px; font-size: 10.5px; line-height: 1.55; color: var(--ink-3); }
.panel .credit a { border-bottom: 1px solid rgba(255, 255, 255, 0.35); }

.term { width: 548px; height: min(612px, calc(100vh - 116px)); background: #050101; }
.term pre {
  flex: 1; margin: 0; padding: 16px 18px; overflow: auto; white-space: pre;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 10px; line-height: 1.55; color: rgba(255, 255, 255, 0.82);
}
.term pre .p { color: var(--red-soft); }
.term pre .ok { color: #fff; }
.term pre .ans { display: block; white-space: pre-wrap; margin-top: 4px; font-family: var(--font); font-size: 11.5px; line-height: 1.55; color: #fff; }
.term .chips { display: grid; gap: 8px; padding: 0 18px 12px; justify-items: start; flex: none; }
.term .chips button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16); font-size: 11px; color: var(--ink-2); }
.term .chips button:hover { border-color: var(--red); color: #fff; }
.term .chips svg { width: 13px; height: 13px; }
.term .ask { flex: none; margin: 0 18px 16px; padding: 11px 14px; border-radius: 999px; background: #140605; font-size: 11px; color: var(--ink-3); display: flex; justify-content: space-between; text-align: left; }
.term .ask:hover { color: #fff; }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 860px) {
  :root { --gutter: 18px; }
  .top { padding: 20px var(--gutter); }
  .top nav { gap: 14px; font-size: 12px; }
  .top nav a.join { display: none; }
  .corner.right { flex-direction: column; align-items: flex-end; gap: 6px; }
  .hero-copy { grid-template-columns: var(--gutter) 1fr var(--gutter); padding-top: 32vh; row-gap: 16px; align-content: start; }
  .hero-copy h1, .hero-copy .tag, .hero-copy .ctas { grid-column: 2; justify-self: start; }
  .hero-copy .ctas { justify-content: flex-start; }
  .hero-copy .ctas small { text-align: left; }
  .panel, .term { left: 10px; right: 10px; width: auto; top: 64px; max-height: calc(100svh - 80px); }
  .term { height: calc(100svh - 80px); }
}
@media (max-width: 420px) {
  .top .mark span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .media img { animation-duration: 120s; }
  .grain { animation: none; }
  .panel { transition: none; }
}

.top nav a.join { color: #fff; background: var(--red); border: none; padding: 5px 12px; border-radius: 999px; }
.top nav a.join:hover { background: #ff3b30; color: #fff; }
