/* Vizcaya site styles.
   Layout concept: one living "specimen window" carries all the motion; everything
   around it is calm, left-aligned and lab-quiet, like a clean instrument bench.

   How to read this file (for learning):
   1. :root holds the design tokens (colors, fonts, sizes). Change a token, the whole site follows.
   2. The two "dark" blocks only re-define tokens, so dark mode is free everywhere.
   3. Below that, each section of the page has its own small block. */

/* One look, on purpose: the site is always "night in the lab", so there is no
   light theme. Every color is still a token, so a light theme can be added later. */
:root {
  --bg: #050d12;
  --bg-2: #071a22;
  --surface: rgba(12, 30, 38, 0.62);   /* glass panels over the moving background */
  --surface-solid: #0b1c23;
  --ink: #e4f0ee;
  --muted: #8ea6ac;
  --line: rgba(160, 220, 215, 0.13);
  --accent: #45e3cb;          /* bioluminescent teal */
  --accent-2: #5caaff;        /* second strand: cyan-blue */
  --accent-ink: #04161b;
  --warm: #f6b462;            /* "under test" amber */
  --win-bg: #040b0f;
  --win-ink: #d8e9e6;
  --win-muted: #7f979d;
  --glow: #45e3cb;
  --glow-warm: #f6b462;

  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Geist", "Inter", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --t-xl: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --t-hero: clamp(2.9rem, 1.6rem + 6vw, 7rem);

  --radius: 22px;
  --wrap: 1240px;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(80% 60% at 85% 0%, #0b2f38 0%, transparent 60%),
              radial-gradient(60% 50% at 0% 100%, #0a1d3a 0%, transparent 65%), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { /* paints the phone's top safe-area band behind the sticky nav */
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--bg);
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 650; line-height: 1.02; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.eyebrow {
  font-family: var(--f-mono); font-size: var(--t-xs); text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted);
  display: inline-flex; align-items: center; gap: 0.6em;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------- animated background ---------- */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block; }
.scanlines { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px);
  mask-image: radial-gradient(120% 80% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 30%, #000 30%, transparent 80%); }
.nav, main, .footer { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  font: 500 var(--t-sm) / 1 var(--f-body);
  padding: 0.95em 1.35em; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink); }
.btn-solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 24px -6px var(--accent); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); color: var(--accent-ink); box-shadow: 0 0 36px -4px var(--accent); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 650 1.2rem/1 var(--f-display); letter-spacing: -0.02em; }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: var(--t-sm); }
.nav-links a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { padding: 0.75em 1.1em; }
@media (max-width: 720px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- hero: just the statement, the helix and the rain ---------- */
.hero { position: relative; overflow-x: clip; min-height: min(92vh, 900px); display: grid; align-items: center; padding-block: 64px 96px; }
.hero-copy { position: relative; max-width: 54rem; min-width: 0; }
.hero-copy::before { content: ""; position: absolute; inset: -14% -20% -14% -30%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 88%, transparent) 40%, transparent 100%); }
.hero h1 { font-size: var(--t-hero); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; }
.hero h1 .line { display: block; }
.hero h1 .soft { width: fit-content; max-width: 100%; font-weight: 420; background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin-top: 32px; max-width: 30rem; font-size: var(--t-lg); line-height: 1.45; color: var(--muted); }
.readout { margin-top: 40px; font: 500 var(--t-xs)/1.4 var(--f-mono); letter-spacing: 0.14em; color: var(--muted); display: flex; gap: 10px; align-items: center; overflow: hidden; white-space: nowrap; max-width: 100%; }
.readout b { color: var(--accent); font-weight: 500; }
.readout .seq { color: var(--ink); opacity: 0.7; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px;
  font: 500 10px/1 var(--f-mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.scroll-cue i { width: 1px; height: 48px; background: linear-gradient(var(--accent), transparent); transform-origin: top; animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- kinetic line: giant outlined words that slide as you scroll ---------- */
.kinetic { overflow: hidden; padding-block: clamp(40px, 7vw, 90px); }
.kinetic-track { display: flex; gap: 0.6em; width: max-content; font: 700 clamp(3.2rem, 2rem + 7vw, 9rem)/1 var(--f-display); letter-spacing: -0.04em; white-space: nowrap; will-change: transform; }
.kinetic-track span { color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--ink) 35%, transparent); }
.kinetic-track span.fill { color: var(--ink); -webkit-text-stroke: 0; }
.kinetic-track span.dot { -webkit-text-stroke: 0; color: var(--accent); }

/* ---------- method: one pinned scene ---------- */
.method { position: relative; padding-block: clamp(64px, 9vw, 120px); }
.method-stage { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .method-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 72px; min-height: 100vh; } }
.kicker { font: 500 var(--t-xs)/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.steps-stack { position: relative; display: grid; gap: 48px; margin-top: 28px; }
.step-big h3 { font-size: clamp(3rem, 2rem + 5vw, 6.5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; }
.step-big p { margin-top: 18px; max-width: 26rem; font-size: var(--t-lg); line-height: 1.45; color: var(--muted); }
.step-big .n { font: 500 var(--t-sm)/1 var(--f-mono); color: var(--accent); letter-spacing: 0.1em; display: block; margin-bottom: 14px; }
/* when the motion script runs, the five steps stack in one place and swap */
.is-animated .steps-stack { display: block; min-height: 22rem; }
.is-animated .step-big { position: absolute; inset: 0 auto auto 0; }
.progress { margin-top: 36px; display: flex; gap: 6px; }
.progress i { height: 2px; flex: 1; max-width: 64px; background: var(--line); position: relative; overflow: hidden; }
.progress i b { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.method .specimen { margin: 0; aspect-ratio: 1 / 1; min-height: 0; max-height: 78vh; width: 100%; }
@media (max-width: 959px) { .method .specimen { aspect-ratio: 4 / 5; } .is-animated .steps-stack { min-height: 17rem; } }

/* ---------- principles: big lines that light up word by word ---------- */
.principles { padding-block: clamp(80px, 12vw, 180px); display: grid; gap: clamp(72px, 12vw, 160px); }
.statement { max-width: 62rem; }
.statement .tag { font: 500 var(--t-xs)/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 22px; }
.statement p { font: 600 clamp(2rem, 1.3rem + 3.4vw, 4.4rem)/1.05 var(--f-display); letter-spacing: -0.035em; text-wrap: balance; }
.statement p .w { opacity: 0.18; transition: opacity 0.2s linear; }
.statement small { display: block; margin-top: 22px; max-width: 34rem; font-size: var(--t-md); color: var(--muted); line-height: 1.55; }
.statement:nth-child(even) { margin-left: auto; }

/* ---------- the lab: a living diagram ---------- */
.lab { padding-block: clamp(64px, 9vw, 120px); display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .lab { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; } }
.lab h2 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.6rem); letter-spacing: -0.04em; line-height: 0.98; }
.lab p { margin-top: 22px; max-width: 28rem; font-size: var(--t-lg); line-height: 1.45; color: var(--muted); }
.net { width: 100%; height: auto; display: block; overflow: visible; }
.net .edge { fill: none; stroke: color-mix(in srgb, var(--accent) 35%, transparent); stroke-width: 1; }
.net .edge.human { stroke: color-mix(in srgb, var(--ink) 40%, transparent); stroke-dasharray: 3 5; }
.net .pkt { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.net .pkt.warm { fill: var(--warm); filter: drop-shadow(0 0 6px var(--warm)); }
.net .node circle.core { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.net .node.human circle.core { stroke: var(--ink); }
.net .node circle.halo { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.net .node.human circle.halo { fill: color-mix(in srgb, var(--ink) 8%, transparent); }
.net .node circle.halo { transform-box: fill-box; transform-origin: center; animation: breathe 3.6s ease-in-out infinite; }
.net .node:nth-child(2n) circle.halo { animation-delay: -1.2s; }
@keyframes breathe { 50% { transform: scale(1.35); opacity: 0.4; } }
.net text { font: 500 12px var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; fill: var(--ink); }
.net text.sub { font: 400 11px var(--f-body); letter-spacing: 0; text-transform: none; fill: var(--muted); }

/* ---------- ending: a giant wordmark ---------- */
.finale { padding-block: clamp(80px, 12vw, 160px) 0; display: grid; gap: 28px; justify-items: start; }
.finale p { font-size: var(--t-lg); color: var(--muted); max-width: 30rem; }
.link-arrow { display: inline-flex; gap: 12px; align-items: center; font: 600 var(--t-lg)/1 var(--f-display); text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 8px; }
.link-arrow .arrow { transition: transform 0.25s ease; }
.link-arrow:hover .arrow { transform: translateX(6px); }
.wordmark { font: 800 clamp(5rem, 1rem + 22vw, 22rem)/0.8 var(--f-display); letter-spacing: -0.06em; margin-top: clamp(40px, 7vw, 100px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 90%, transparent) 0%, color-mix(in srgb, var(--accent) 20%, transparent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; white-space: nowrap; max-width: 100%; overflow: hidden; }

/* ---------- footer ---------- */
.footer { padding-block: 28px 36px; color: var(--muted); font-size: var(--t-sm); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 24px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- custom cursor (mouse only) ---------- */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; border-radius: 50%; display: none; }
.cursor { width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); transition: width 0.25s, height 0.25s, margin 0.25s, background-color 0.25s; }
.cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--accent); }
@media (pointer: fine) { .has-cursor .cursor, .has-cursor .cursor-dot { display: block; } }

/* ---------- specimen window ---------- */
.specimen {
  position: relative; margin: clamp(36px, 6vw, 64px) 0 0;
  border-radius: calc(var(--radius) + 6px); overflow: hidden;
  background: radial-gradient(120% 90% at 70% 10%, #0b2630 0%, var(--win-bg) 55%);
  color: var(--win-ink);
  aspect-ratio: 16 / 7; min-height: 340px; max-width: 100%;
  box-shadow: 0 40px 80px -40px rgba(6, 17, 23, 0.55), inset 0 0 0 1px rgba(216, 233, 230, 0.08);
}
@media (max-width: 720px) { .specimen { aspect-ratio: 4 / 5; } .hud .tr { display: none; } }
.specimen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--win-muted); }
.hud > * { position: absolute; }
.hud .tl { top: 18px; left: 20px; display: flex; align-items: center; gap: 8px; color: var(--win-ink); }
.hud .tl i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 12px var(--glow); animation: blink 2.4s ease-in-out infinite; }
.hud .tr { top: 18px; right: 20px; font-variant-numeric: tabular-nums; }
.hud .bl { bottom: 18px; left: 20px; right: 20px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hud .bl span { display: inline-flex; align-items: center; gap: 7px; }
.hud .bl b { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hud .corner { width: 14px; height: 14px; border-color: rgba(216, 233, 230, 0.3); border-style: solid; border-width: 0; }
.hud .c1 { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.hud .c2 { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.hud .c3 { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.hud .c4 { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
@keyframes blink { 50% { opacity: 0.35; } }
.specimen-caption { margin-top: 14px; font-size: var(--t-sm); color: var(--muted); max-width: 44rem; }

/* ---------- members area ---------- */
.member-hero { padding-block: clamp(48px, 8vw, 96px) 32px; display: grid; gap: 18px; }
.member-hero h1 { font-size: var(--t-xl); }
.member-hero p { color: var(--muted); font-size: var(--t-lg); }
.who { font-family: var(--f-mono); font-size: var(--t-sm); color: var(--muted); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); padding-bottom: 40px; }
.tile { display: grid; gap: 10px; align-content: start; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-decoration: none; transition: border-color 0.2s, transform 0.2s; min-width: 0; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile .tag { font: 500 var(--t-xs)/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.tile h3 { font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.015em; }
.tile p { color: var(--muted); font-size: var(--t-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* the lab diagram on phones: bigger labels, drop the small print */
@media (max-width: 600px) {
  .net text { font-size: 22px; }
  .net text.sub { display: none; }
}
