/* Phosphor: green CRT terminal. rings.js reads --ring-*. */
:root {
  --bg: #050905;
  --ring-core: #071108;
  --ring-rim: #2fe06a;
  --ink: #d5ffe0;
  --ink-soft: #8fd9a5;
  --accent: #39ff7f;
  --panel: rgba(6, 14, 8, 0.72);
  --panel-line: rgba(57, 255, 127, 0.22);
  --on-accent: #031006;
  --grain-blend: screen;
  --grain-opacity: 0.14;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease;
}

a { color: inherit; text-decoration: none; }

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
}

#rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* Film grain, same trick as the reference: fractal noise multiplied over the gradient. */
.grain {
  position: absolute;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Nav ---------- */
.nav {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 32px));
  /* Equal outer columns keep the links on the page's true center,
     regardless of how wide the logo and the buttons are. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.brand {
  justify-self: start;
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.04em;
}
.brand-sub { font-weight: 400; color: var(--ink-soft); }
.brand-mark { width: 32px; height: 32px; color: var(--accent); }

.nav-links { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.04em; }
.nav-links a { position: relative; padding: 4px 0; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions { grid-column: 3; justify-self: end; display: flex; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font: 500 13px/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-solid {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 2px 0 0 var(--accent);
}
.btn-solid:hover { background: var(--accent); color: var(--on-accent); box-shadow: 0 2px 0 0 var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
}
.btn-ghost:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }

.arrow { width: 12px; height: 12px; margin-right: -2px; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translate(2px, -2px); }

.btn-lg { height: 52px; padding: 0 26px; font-size: 14px; }

/* ---------- Hero copy ---------- */
.hero-copy {
  align-self: center;
  justify-self: center;
  text-align: center;
  max-width: 880px;
  padding: 120px 24px;
}

h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 420;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: clamp(40px, 6.66vw, 94px);
  line-height: 0.98;
  letter-spacing: -0.022em;
  opacity: 0;
  animation: rise 0.9s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
h1 em {
  font-style: italic;
  font-weight: 380;
  color: var(--accent);
}

.lede {
  margin: 28px auto 0;
  max-width: 560px;
  text-wrap: balance;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  opacity: 0;
  animation: rise 0.9s 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.cta-row {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: rise 0.9s 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.cta-row { position: relative; }
.cta-row .btn { position: relative; }

/* Audio-in / decision-out illustration on either side of the CTA (flow.js). */
#flow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(860px, calc(100vw - 48px));
  height: 110px;
  pointer-events: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Trusted-by logo marquee ---------- */
.trusted {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 10px 14px 28px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  opacity: 0;
  animation: fade 1.2s 0.6s ease forwards;
}

.trusted-title {
  flex: none;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.marquee {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  /* Fade logos in and out at the edges instead of hard-clipping them. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 60s linear infinite; /* ~same speed as before with 15 logos */
}
.trusted:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}
@keyframes fade {
  to { opacity: 1; }
}

.logo {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 28px;
  margin-right: 52px;
  color: var(--ink);
  opacity: 0.72;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}
.logo:hover { opacity: 1; }
.logo svg { width: 20px; height: 20px; flex: none; }
/* Full wordmarks (no text label). Each source file has different padding, so size them individually. */
.logo-wordmark svg { width: auto; height: 22px; }
.logo-bolna svg { height: 56px; margin: -14px -6px; }
.logo-together svg { height: 23px; }
.logo-emergent svg { height: 21px; }
.logo-purestorage svg { height: 31px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
}
@media (max-width: 760px) {
  #flow { display: none; }
}
@media (max-width: 560px) {
  .brand { margin-left: 4px; }
  .nav-actions .btn-ghost { display: none; }
  .lede { font-size: 14px; }
  .trusted { flex-direction: column; gap: 10px; padding: 14px 0; border-radius: 22px; }
  .marquee { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .marquee-track { animation: none; }
  .trusted { animation: none; opacity: 1; }
  h1, .lede, .cta-row { animation: none; opacity: 1; }
}
