/* ==========================================================================
   FLUJD — stylesheet
   Dark engineering / motorsport look. Air-cyan accent on near-black blue.
   ========================================================================== */

:root {
  /* colour */
  --bg: #06080c;
  --bg-alt: #0b0f16;
  --panel: #0a0e14;
  --text: #e8edf5;
  --soft: #a6b1c2;
  --muted: #8b97a8;
  --accent: #5ee7ff;
  --accent-dim: rgba(94, 231, 255, .35);
  --accent-glow: rgba(94, 231, 255, .22);
  --accent-2: #5b7cff;
  --violet: #b79cff;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --card: rgba(255, 255, 255, .025);

  /* type */
  --font-head: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* layout */
  --maxw: 1200px;
  --gutter: 24px;
  --pad-x: max(var(--gutter), calc((100% - var(--maxw)) / 2));
  --nav-h: 72px;
  --radius: 20px;

  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

html:has(.nav--open) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, canvas, video { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
}
p { margin: 0; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
button { font: inherit; color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.mono, code, pre, time, .tag, .eyebrow {
  font-family: var(--font-mono);
}

/* ---------- eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: .9; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background-color .25s, border-color .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--accent);
  color: #04202a;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn--primary:hover {
  box-shadow: 0 10px 40px -8px rgba(94, 231, 255, .6);
  background: #86efff;
}

.btn--ghost {
  background: rgba(255, 255, 255, .02);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(94, 231, 255, .06);
}

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  padding: 14px var(--pad-x);
  transition: padding .3s var(--ease);
}
/* the blur lives on a pseudo-element so the mobile panel (position:fixed)
   is not trapped inside a backdrop-filter containing block */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 8, 12, .72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.nav--scrolled::before { opacity: 1; }

.nav__logo {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}
.nav__logo svg { width: 28px; height: 28px; color: var(--accent); }
.nav__logo span {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.3vw, 34px);
}
.nav__links a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .25s;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__links a:not(.nav__cta):hover,
.nav__links a.is-active:not(.nav__cta) { color: var(--text); }
.nav__links a.is-active:not(.nav__cta)::after { transform: scaleX(1); }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }

.nav__links .nav__cta {
  padding: 9px 20px;
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 600;
  background: rgba(94, 231, 255, .06);
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .3s;
}
.nav__links .nav__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #04202a;
  box-shadow: 0 8px 28px -8px rgba(94, 231, 255, .6);
}

.nav__burger {
  display: none;
  position: relative;
  z-index: 3;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav__burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  top: 21px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .4s var(--ease), background-color .25s;
}
.nav__burger span:nth-child(1) { transform: translateY(-4px); }
.nav__burger span:nth-child(2) { transform: translateY(4px); }
.nav--open .nav__burger span:nth-child(1) { transform: rotate(45deg); background: var(--accent); }
.nav--open .nav__burger span:nth-child(2) { transform: rotate(-45deg); background: var(--accent); }

@media (max-width: 859px) {
  .nav__burger { display: block; }

  .nav__links {
    position: fixed;
    inset: 0;
    z-index: 2;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    padding: 90px var(--gutter) 48px;
    background:
      radial-gradient(70% 50% at 100% 0, rgba(94, 231, 255, .12), transparent 70%),
      rgba(6, 8, 12, .97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
    overflow-y: auto;
  }
  .nav--open .nav__links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s;
  }
  .nav--open::before { opacity: 0; }

  .nav__links a {
    padding: 10px 0;
    font-family: var(--font-head);
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s var(--ease), transform .5s var(--ease), color .25s;
  }
  .nav--open .nav__links a { opacity: 1; transform: none; }
  .nav--open .nav__links a:nth-child(1) { transition-delay: .05s; }
  .nav--open .nav__links a:nth-child(2) { transition-delay: .09s; }
  .nav--open .nav__links a:nth-child(3) { transition-delay: .13s; }
  .nav--open .nav__links a:nth-child(4) { transition-delay: .17s; }
  .nav--open .nav__links a:nth-child(5) { transition-delay: .21s; }
  .nav--open .nav__links a:nth-child(6) { transition-delay: .25s; }
  .nav--open .nav__links a:nth-child(7) { transition-delay: .29s; }
  .nav--open .nav__links a:nth-child(8) { transition-delay: .33s; }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__links .nav__cta {
    margin-top: 20px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 40px) var(--pad-x) 110px;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 78% 45%, rgba(91, 124, 255, .12), transparent 70%),
    radial-gradient(45% 45% at 15% 100%, rgba(94, 231, 255, .07), transparent 70%),
    var(--bg);
}
.hero::after { /* fade into next section */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.hero__flow {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 3;
  max-width: 820px;
}

.hero__title { margin: 0; font-weight: 700; letter-spacing: normal; }

.hero__word {
  display: block;
  padding: 0 .06em .04em 0;
  font-family: var(--font-head);
  font-size: clamp(5rem, 15.5vw, 14rem);
  font-weight: 700;
  line-height: .86;
  letter-spacing: -.06em;
  background: linear-gradient(100deg, #ffffff 15%, #c9f6ff 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__sub {
  display: block;
  margin-top: clamp(14px, 2vw, 26px);
  font-family: var(--font-head);
  font-size: clamp(1.45rem, 3.3vw, 2.7rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.025em;
  color: var(--text);
}
.hero__sub em { font-style: normal; color: var(--accent); }

.hero__lead {
  max-width: min(540px, 42vw);
  margin: clamp(22px, 3vw, 32px) 0 clamp(28px, 4vw, 40px);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.65;
  color: var(--soft);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; max-width: min(560px, 44vw); }

/* car */
.hero__car {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -2vw;
  width: min(56vw, 940px);
  transform: translateY(-46%);
}
.hero__car::before { /* soft cyan glow behind the car */
  content: "";
  position: absolute;
  inset: 12% 6% 6% 14%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(94, 231, 255, .34), rgba(91, 124, 255, .12) 60%, transparent);
  filter: blur(50px);
}
.hero__car img {
  width: 100%;
  height: auto;
  max-height: 82vh;
  max-height: 82svh;
  object-fit: cover;
  /* soft edges: fade left, bottom, top and (slightly) right into the background */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, rgba(0, 0, 0, .55) 14%, #000 34%),
    linear-gradient(to top, transparent 0, #000 26%),
    linear-gradient(to bottom, transparent 0, #000 14%),
    linear-gradient(to left, transparent 0, #000 9%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, rgba(0, 0, 0, .55) 14%, #000 34%),
    linear-gradient(to top, transparent 0, #000 26%),
    linear-gradient(to bottom, transparent 0, #000 14%),
    linear-gradient(to left, transparent 0, #000 9%);
  mask-composite: intersect;
}
.hero__car figcaption {
  position: absolute;
  right: 9%;
  bottom: 9%;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 8, 12, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}
.hero__car figcaption .mono { color: var(--accent); }

/* scroll cue */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, .28);
  border-radius: 14px;
  transition: border-color .25s;
}
.hero__scroll:hover { border-color: var(--accent); }
.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  animation: wheel 1.9s var(--ease) infinite;
}
@keyframes wheel {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* entrance (CSS only, works without JS) */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
}
@keyframes fade-in {
  from { opacity: 0; }
}
.hero__inner > * { animation: rise 1s var(--ease) both; }
.hero__inner > :nth-child(1) { animation-delay: .05s; }
.hero__inner > :nth-child(2) { animation-delay: .15s; }
.hero__inner > :nth-child(3) { animation-delay: .3s; }
.hero__inner > :nth-child(4) { animation-delay: .42s; }
.hero__car { animation: fade-in 1.6s .25s ease both; }

@media (max-width: 959px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding-bottom: 72px;
  }
  .hero__car {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 640px;
    margin: clamp(36px, 7vw, 56px) auto 0;
    transform: none;
  }
  .hero__lead, .hero__actions { max-width: none; }
  .hero__car img {
    max-height: none;
    border-radius: 22px;
    border: 1px solid var(--line);
    -webkit-mask-image: none;
    mask-image: none;
    box-shadow: 0 30px 80px -30px rgba(94, 231, 255, .35);
  }
  .hero__car::before { inset: 10%; }
  .hero__car figcaption { right: auto; left: 14px; bottom: 14px; }
  .hero__scroll { display: none; }
}

/* ==========================================================================
   STATS
   ========================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 var(--pad-x);
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 42px 28px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.stat:first-child { padding-left: 0; border-left: 0; }

.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(3.2rem, 6vw, 5.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  text-shadow: 0 0 40px rgba(94, 231, 255, .3);
}
.stat span {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}
.stat small {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 979px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 559px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 28px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
  padding: clamp(80px, 12vw, 160px) var(--pad-x);
  background: var(--bg);
}
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head {
  max-width: 860px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section h2, .contact h2 {
  margin-bottom: 22px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section__head h2:last-child { margin-bottom: 0; }

.section__lead {
  max-width: 65ch;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: var(--muted);
}
.section__lead strong, .section__lead em { color: var(--text); }
.section__lead em { font-style: italic; }

/* ---------- team ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.member {
  position: relative;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01) 55%),
    var(--card);
  transition: translate .4s var(--ease), border-color .3s, box-shadow .4s var(--ease);
}
.member:hover {
  translate: 0 -6px;
  border-color: rgba(94, 231, 255, .45);
  box-shadow:
    0 0 0 1px rgba(94, 231, 255, .12),
    0 24px 60px -24px rgba(94, 231, 255, .35);
}
.member__avatar,
.member__photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}
.member__avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04141a;
  font-family: var(--font-head);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 8px 28px -8px rgba(94, 231, 255, .55);
}
/* optional portrait: <img class="member__photo"> replaces the initials avatar */
.member__photo {
  object-fit: cover;
  object-position: 50% 25%;
  border: 2px solid var(--accent-dim);
  box-shadow: 0 8px 28px -8px rgba(94, 231, 255, .55);
}
.member:has(.member__photo) .member__avatar { display: none; }
.member h3 { margin: 22px 0 8px; font-size: 1.3rem; letter-spacing: -.015em; }
.member__role {
  min-height: 3em; /* two role lines for every card, so the texts below line up */
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--accent);
}
.member__role span { display: block; text-wrap: balance; }
.member__role span + span { color: var(--soft); }
.member p:not(.member__role) {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--soft);
}
.member em { font-style: normal; color: var(--text); }

@media (max-width: 1023px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px)  { .team { grid-template-columns: 1fr; } }

/* ---------- wide photo ---------- */
.wide-photo {
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  background: var(--panel);
}
.wide-photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 42%;
}
.wide-photo figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 72px clamp(18px, 3vw, 32px) clamp(16px, 2.4vw, 26px);
  background: linear-gradient(to top, rgba(6, 8, 12, .88), transparent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--text);
}
@media (max-width: 599px) {
  .wide-photo { border-radius: 18px; }
  .wide-photo img { aspect-ratio: 4 / 3; }
}

/* ---------- split / pneuracer ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.split__text, .split__media { min-width: 0; }

.facts {
  margin: 36px 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.facts li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.facts .mono {
  padding-top: 2px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.callout {
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(94, 231, 255, .1), rgba(94, 231, 255, .02) 70%, transparent);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}
.callout b { color: var(--accent); font-family: var(--font-head); font-size: 1.15em; }

.stack {
  position: relative;
  padding-bottom: 14%;
}
.stack img {
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8);
}
.stack__a {
  width: 86%;
  aspect-ratio: 5 / 6;
  object-position: 42% 50%;
  border: 1px solid var(--line);
}
.stack .stack__b {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46%;
  aspect-ratio: 3 / 4;
  border: 4px solid var(--bg-alt);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(94, 231, 255, .25),
    0 30px 70px -15px rgba(0, 0, 0, .9),
    0 0 60px -10px rgba(94, 231, 255, .25);
}

@media (max-width: 899px) {
  .split { grid-template-columns: 1fr; }
  .stack { max-width: 560px; margin-inline: auto; }
  .stack__a { aspect-ratio: 4 / 3; }
}
@media (max-width: 479px) {
  .facts li { grid-template-columns: 1fr; gap: 2px; }
}

/* ==========================================================================
   TECH
   ========================================================================== */
.arch {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(32px, 5vw, 56px);
  padding: clamp(20px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background-color: var(--panel);
  background-image:
    linear-gradient(rgba(94, 231, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 231, 255, .045) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

.arch__node {
  min-width: 0;
  padding: 20px 24px 22px;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--accent-dim);
  border-radius: 16px;
  background: var(--bg-alt);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .9);
}
.arch__node > .mono {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.arch__node ul { margin: 0; padding: 0; list-style: none; }
.arch__node li {
  position: relative;
  padding: 5px 0 5px 18px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--soft);
}
.arch__node li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.arch__node small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

.arch__node--rc {
  width: min(100%, 340px);
  text-align: center;
  border-top-color: var(--accent);
  box-shadow: 0 0 50px -12px var(--accent-glow), 0 20px 50px -30px rgba(0, 0, 0, .9);
}

/* connectors */
.arch__link { position: relative; }
.arch__link span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
  text-align: center;
  color: var(--muted);
}

.arch__link--v {
  flex: none;
  width: 2px;
  height: 64px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px 12px);
  background-size: 2px 12px;
  animation: flow-v .7s linear infinite;
}
.arch__link--v::after { /* arrow head */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-top: 7px solid var(--accent);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.arch__link--v span {
  position: absolute;
  left: 18px;
  top: 50%;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  white-space: nowrap;
}

.arch__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 210px) minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
}

.arch__link--h {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
.arch__link--h::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: repeating-linear-gradient(to right, var(--accent) 0 6px, transparent 6px 12px);
  background-size: 12px 2px;
  animation: flow-h .7s linear infinite;
}
.arch__link--h span { max-width: 100%; }

@keyframes flow-h { to { background-position: 12px 0; } }
@keyframes flow-v { to { background-position: 0 12px; } }

@media (max-width: 859px) {
  .arch__row { grid-template-columns: 1fr; justify-items: stretch; }
  .arch__link--h {
    min-height: 88px;
    width: 100%;
  }
  .arch__link--h::before {
    left: 50%; right: auto;
    top: 0; bottom: 0;
    width: 2px; height: auto;
    margin: 0 0 0 -1px;
    background: repeating-linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px 12px);
    background-size: 2px 12px;
    animation-name: flow-v;
  }
  .arch__link--h span { width: max-content; margin-inline: auto; }
}

/* cards */
/* ---------- PCB viewer ---------- */
.pcbv { margin: clamp(40px, 6vw, 72px) 0; }
.pcbv__head { max-width: 62ch; margin-bottom: 28px; }
.pcbv__head h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.pcbv__head p { margin-top: 12px; font-size: 16px; line-height: 1.65; color: var(--soft); }

.pcbv__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.pcbv__viewer, .pcbv__info { min-width: 0; }

.pcbv__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pcbv__tab {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.2;
  color: var(--soft);
  cursor: pointer;
  transition: color .25s, background-color .25s, border-color .25s;
}
.pcbv__tab:hover { color: var(--text); border-color: var(--accent-dim); }
.pcbv__tab[aria-selected="true"] {
  border-color: var(--accent);
  background: rgba(94, 231, 255, .12);
  color: var(--accent);
}

.pcbv__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  overflow: hidden;
}
.pcbv__zoom {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: zoom-in;
}
.pcbv__zoom::after {
  content: "Zväčšiť";
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(6, 8, 12, .72);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.pcbv__zoom:hover::after, .pcbv__zoom:focus-visible::after { opacity: 1; }
.pcbv__zoom:focus-visible { outline-offset: -3px; }

.pcbv__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .45s var(--ease);
  pointer-events: none;
}
.pcbv__img--light { background: #fff; }
.pcbv__img.is-active { opacity: 1; }

.pcbv__cap {
  min-height: 3em;
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.pcbv__info .facts { margin-top: 0; }
.pcbv__mottos {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--soft);
}
.pcbv__mottos q { color: var(--text); font-style: italic; }

@media (max-width: 899px) {
  .pcbv__grid { grid-template-columns: 1fr; }
  .pcbv__info .facts { margin-top: 8px; }
}
@media (max-width: 599px) {
  .pcbv__stage { border-radius: 16px; }
  .pcbv__tab { padding: 8px 12px; }
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.tcard {
  min-width: 0;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .008) 55%),
    var(--card);
  transition: translate .4s var(--ease), border-color .3s, box-shadow .4s var(--ease);
}
.tcard:hover {
  translate: 0 -4px;
  border-color: rgba(94, 231, 255, .35);
  box-shadow: 0 24px 60px -30px rgba(94, 231, 255, .3);
}
.tcard h3 { font-size: 1.3rem; letter-spacing: -.015em; }
.tcard p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--soft);
}

pre {
  margin: 22px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #04060a;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.75;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}
pre code {
  font-size: inherit;
  color: #d3dcea;
  white-space: pre;
}
@media (max-width: 900px) {
  /* narrow cards: wrap code instead of cutting it off (pre still scrolls as a fallback) */
  pre { padding: 14px; font-size: 12px; line-height: 1.7; }
  pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
pre .k { color: var(--violet); }
pre .c { color: var(--muted); font-style: italic; }

.gears {
  width: 100%;
  margin-top: 22px;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}
.gears td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.gears tr:first-child td { border-top: 1px solid var(--line); }
.gears td:first-child { color: var(--accent); }
.gears td:last-child { text-align: right; color: var(--soft); }

@media (max-width: 759px) { .tech-grid { grid-template-columns: 1fr; } }


/* ==========================================================================
   MECHANIKA & PNEUMATIKA (inside #pneuracer)
   ========================================================================== */
.mech {
  margin-top: clamp(72px, 10vw, 128px);
  padding-top: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--line);
}
.mech__head { max-width: 860px; margin-bottom: clamp(32px, 5vw, 56px); }
.mech__head h2 { margin-bottom: 22px; font-size: clamp(2rem, 4.2vw, 3.2rem); }

.keynums {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}
.keynum {
  grid-column: span 2;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.keynum:nth-child(n+4) { grid-column: span 3; }
.keynum dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.keynum dd {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.keynum dd small { font-size: .5em; letter-spacing: 0; color: var(--soft); }

.mech-grid { margin-bottom: 28px; }
.tcard--wide { grid-column: 1 / -1; }
.tcard .facts { margin: 20px 0 0; }
.tcard .facts li { grid-template-columns: 96px 1fr; padding: 11px 0; font-size: 14.5px; }
.tcard p + p { margin-top: 10px; }
.tcard .facts--tight { margin-top: 16px; }
.tcard .facts--tight li { grid-template-columns: 112px 1fr; }
.tcard .facts--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
.tcard--lessons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); align-items: start; }
.tcard--lessons h3 { grid-column: 1 / -1; }
.tcard--lessons .lessons { margin-top: 12px; }
@media (max-width: 759px) {
  .tcard .facts--cols, .tcard--lessons { grid-template-columns: minmax(0, 1fr); }
}

.mech-drive {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.diagram {
  margin: 0;
  padding: 16px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #04060a;
}
.diagram svg { width: 100%; height: auto; max-width: 460px; margin-inline: auto; overflow: visible; }
.diagram figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
}
.d-body, .d-head, .d-hub { fill: #0a1a22; stroke: var(--accent); stroke-width: 2; }
.d-head { fill: rgba(94, 231, 255, .25); }
.d-hub { fill: var(--bg); stroke: var(--violet); }
.d-rod, .d-carriage, .d-shaft { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.d-shaft { stroke: var(--accent-dim); stroke-width: 4; }
.d-shaft--out { stroke: var(--accent); stroke-width: 3; }
.d-arrow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.d-rack { stroke: var(--accent); stroke-width: 12; stroke-dasharray: 5.6 5.6; fill: none; }
.d-rack--b { stroke-dashoffset: 5.6; }
.d-teeth { fill: rgba(94, 231, 255, .06); stroke: var(--accent); stroke-width: 9; stroke-dasharray: 4.5 4.5; }
.d-lbl { font-family: var(--font-body); font-size: 13.5px; font-weight: 500; fill: var(--soft); }
.d-lbl--out { fill: var(--accent); }

.d-slide { animation: d-slide 5s ease-in-out infinite alternate; }
.d-gear { transform-box: fill-box; transform-origin: center; animation: d-spin 5s ease-in-out infinite alternate; }
@keyframes d-slide { from { transform: translateX(0); } to { transform: translateX(44px); } }
@keyframes d-spin  { from { transform: rotate(0); } to { transform: rotate(-110deg); } }

/* pneumatic flow */
.flow {
  display: flex;
  align-items: stretch;
  gap: 28px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.flow__node {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 14px 14px;
  border: 1px solid var(--accent-dim);
  border-radius: 12px;
  background: rgba(94, 231, 255, .05);
}
.flow__node .mono {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  overflow-wrap: anywhere;
}
.flow__node small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.flow__node:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 6px);
  width: 16px;
  height: 2px;
  background: var(--accent);
  translate: 0 -50%;
}
.flow__node:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 15px);
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  rotate: 45deg;
  translate: 0 -50%;
}
.flow__node--end { border-color: var(--accent); background: rgba(94, 231, 255, .12); }
.flow--branch { align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.flow--branch .flow__node { flex: 0 1 220px; }
.flow__tag { flex: none; width: 150px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); }
.flow--branch .flow__node { border-color: rgba(183, 156, 255, .4); background: rgba(183, 156, 255, .06); }
.flow--branch .flow__node--end { border-color: var(--violet); background: rgba(183, 156, 255, .12); }
.flow--branch .flow__node::after { background: var(--violet); }
.flow--branch .flow__node::before { border-color: var(--violet); }
.tcard .mech-pneu__note { margin-top: 20px; font-size: 15px; color: var(--soft); }
.mech-pneu__note b { color: var(--accent); }

.mech__hard { margin-top: 8px; }
.mech__hard b { font-size: 1em; }

.lessons { margin: 16px 0 0; padding: 0 0 0 18px; font-size: 14.5px; line-height: 1.6; color: var(--soft); }
.lessons li + li { margin-top: 6px; }
.lessons li::marker { color: var(--accent); }

@media (max-width: 899px) {
  .keynum, .keynum:nth-child(n+4) { grid-column: span 3; }
  .keynum:last-child { grid-column: 1 / -1; }
  .mech-drive { grid-template-columns: 1fr; }
}
@media (max-width: 759px) {
  .flow { flex-direction: column; gap: 26px; }
  .flow__node:not(:last-child)::after { top: 100%; left: 50%; width: 2px; height: 16px; translate: -50% 5px; }
  .flow__node:not(:last-child)::before { top: calc(100% + 11px); left: 50%; translate: -50% 0; rotate: 135deg; }
  .flow--branch { align-items: stretch; }
  .flow--branch .flow__node { flex: 1 1 auto; }
  .flow__tag { width: auto; }
}
@media (max-width: 559px) {
  .d-lbl { font-size: 15.5px; }
  .keynums { grid-template-columns: 1fr; gap: 10px; }
  .keynum, .keynum:nth-child(n+4), .keynum:last-child { grid-column: auto; }
  .tcard .facts li, .tcard .facts--tight li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-slide, .d-gear { animation: none; }
}

/* ---------- zoomable renders / photos (mechanika, plagát) ---------- */
.shot { margin: 0; min-width: 0; }
.shot__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color .3s, box-shadow .4s var(--ease);
}
.shot__btn:hover { border-color: rgba(94, 231, 255, .55); box-shadow: 0 18px 50px -24px rgba(94, 231, 255, .45); }
.shot__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shot__btn img { width: 100%; height: 100%; object-fit: contain; }
.shot figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.shot--card { margin-bottom: 20px; }
.shot--card .shot__btn { aspect-ratio: 5 / 2; padding: 10px; }
.shot--drive { grid-column: 1 / -1; width: 100%; max-width: 760px; margin-inline: auto; text-align: center; }
.shot--drive .shot__btn { aspect-ratio: 1280 / 545; }

.mech-strip { grid-column: 1 / -1; }
.mech-strip__title { margin-bottom: 14px; }
.mech-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.mech-strip .shot__btn { aspect-ratio: 4 / 3; padding: 8px; }
.mech-strip .shot--photo .shot__btn { padding: 0; }
.mech-strip .shot--photo img { object-fit: cover; }
@media (max-width: 899px) { .mech-strip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .mech-strip__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   TIMELINE - one rail on the left; per row: date + place | text | fixed thumbnail
   ========================================================================== */
.timeline {
  --thumb-w: 260px;
  position: relative;
  max-width: 1120px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline::before { /* the rail */
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(94, 231, 255, .15), var(--accent-dim) 8%, var(--accent-dim) 92%, var(--accent));
}

.tl {
  position: relative;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) var(--thumb-w);
  column-gap: clamp(24px, 3.4vw, 48px);
  align-items: start;
  min-width: 0;
  padding: 0 0 clamp(28px, 3.4vw, 40px) 44px;
}
.tl:last-child { padding-bottom: 0; }
.tl::before { /* dot */
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 18px rgba(94, 231, 255, .55);
}
.tl time {
  display: block;
  padding-top: 1px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.tl__date, .tl__place { display: block; }
.tl__place { font-weight: 400; color: var(--muted); }
.tl h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); letter-spacing: -.02em; }
.tl p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--soft);
}
.tl p b { color: var(--text); }

.tl__media { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.tl__thumb {
  position: relative;
  display: block;
  width: 100%;
  max-width: min(100%, var(--nw, var(--thumb-w)));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color .3s, box-shadow .4s var(--ease);
}
.tl__thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.tl__thumb:hover, .tl__thumb:focus-visible { border-color: rgba(94, 231, 255, .55); box-shadow: 0 18px 50px -24px rgba(94, 231, 255, .45); }
.tl__thumb:hover img { transform: scale(1.05); }
.tl__thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tl__chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--soft);
  cursor: zoom-in;
  transition: color .25s, border-color .25s, background-color .25s;
}
.tl__chip img { width: 26px; height: 34px; border-radius: 6px; object-fit: cover; object-position: 50% 0; }
.tl__chip:hover, .tl__chip:focus-visible { color: var(--accent); border-color: var(--accent); background: rgba(94, 231, 255, .08); }

/* final item: same structure, highlighted */
.tl--big {
  margin: 28px 0 0 44px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(94, 231, 255, .5);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(94, 231, 255, .1), rgba(91, 124, 255, .04) 60%, transparent),
    var(--bg-alt);
  box-shadow:
    0 0 0 1px rgba(94, 231, 255, .08),
    0 0 70px -10px rgba(94, 231, 255, .3),
    0 30px 80px -30px rgba(0, 0, 0, .9);
}
.tl:last-child.tl--big { padding-bottom: clamp(22px, 3vw, 32px); }
.tl--big::before { top: 28px; left: -45px; width: 15px; height: 15px; background: var(--accent); }
.tl--big h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.tl--big p { font-size: 16px; }
.tl--big p b { color: var(--accent); }

@media (max-width: 899px) {
  .tl { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-left: 36px; }
  .tl time { margin-bottom: 6px; }
  .tl__date, .tl__place { display: inline; }
  .tl__place::before { content: " \00b7  "; }
  .tl__media { margin-top: 16px; }
  .tl__thumb { max-width: min(100%, 460px, var(--nw, 460px)); }
  .tl--big { margin-left: 36px; padding: 20px; }
  .tl--big::before { left: -37px; top: 22px; }
}
@media (max-width: 479px) {
  .tl--big { margin-left: 30px; padding: 18px 16px; }
  .tl--big::before { left: -31px; }
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.proj {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: translate .4s var(--ease), border-color .3s, box-shadow .4s var(--ease);
}
.proj:hover {
  translate: 0 -6px;
  border-color: rgba(94, 231, 255, .4);
  box-shadow: 0 28px 70px -30px rgba(94, 231, 255, .3);
}
.proj__media {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.proj__media > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.proj:hover .proj__media > img { transform: scale(1.04); }
.proj { isolation: isolate; }

.proj__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 24px 26px;
  background: var(--bg);
  position: relative;
  z-index: 1;
}
.proj h3 { margin: 16px 0 10px; font-size: 1.25rem; letter-spacing: -.015em; }
.proj p { font-size: 14.5px; line-height: 1.65; color: var(--soft); }

.tag {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid rgba(94, 231, 255, .3);
  border-radius: 999px;
  background: rgba(94, 231, 255, .07);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}

.link {
  margin-top: auto;
  padding-top: 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent);
  transition: color .25s, letter-spacing .3s var(--ease);
}
.link:hover { color: #fff; letter-spacing: .01em; }
.link--inline { display: inline-block; margin-top: 22px; padding-top: 0; }

@media (max-width: 899px) {
  .projects { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-wrap { container-type: inline-size; }
.gallery {
  --gap: 14px;
  --cols: 4;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  /* every cell is 4:3; a portrait tile (.g--tall) spans two rows */
  grid-auto-rows: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols) * .75);
  grid-auto-flow: dense;
  gap: var(--gap);
}
.g {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
  cursor: zoom-in;
  isolation: isolate;
}
.g--tall { grid-row: span 2; }
.g img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease), filter .4s;
}
.g::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  background: linear-gradient(to top, rgba(6, 8, 12, .45), transparent 45%);
  opacity: 0;
  transition: opacity .35s, box-shadow .35s;
  pointer-events: none;
}
.g:hover img { transform: scale(1.07); }
.g:hover::after { opacity: 1; box-shadow: inset 0 0 0 1px rgba(94, 231, 255, .45); }
.g:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 1023px) { .gallery { --cols: 3; } }
@media (max-width: 599px) {
  .gallery { --cols: 2; --gap: 10px; }
  .g { border-radius: 12px; }
}

/* ==========================================================================
   PARTNERS
   ========================================================================== */
.partners {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  transition: translate .4s var(--ease);
}
.partner img {
  width: 100%;
  aspect-ratio: 300 / 140;
  padding: 14px 20px;
  border-radius: 16px;
  background: #f2f5f9;
  object-fit: contain;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 16px 40px -22px rgba(0, 0, 0, .9);
  transition: box-shadow .4s var(--ease), background-color .3s;
}
.partner span {
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  color: var(--muted);
  transition: color .25s;
}
.partner:hover { translate: 0 -5px; }
.partner:hover img {
  background: #fff;
  box-shadow: 0 0 0 2px var(--accent), 0 20px 50px -18px rgba(94, 231, 255, .5);
}
.partner:hover span { color: var(--text); }

.partners__note {
  max-width: 60ch;
  margin: clamp(36px, 5vw, 56px) auto 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}
.partners__note b { color: var(--text); }

@media (max-width: 899px) {
  .partners { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .partners { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .partner:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 7px); justify-self: center; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact {
  position: relative;
  isolation: isolate;
  padding: clamp(100px, 16vw, 200px) var(--pad-x);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 50% 110%, rgba(94, 231, 255, .26), transparent 70%),
    radial-gradient(40% 55% at 85% 0%, rgba(91, 124, 255, .16), transparent 70%),
    radial-gradient(35% 50% at 10% 20%, rgba(94, 231, 255, .06), transparent 70%),
    var(--bg);
}
.contact::before { /* hairline grid fading upward */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(94, 231, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 231, 255, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 75%);
  mask-image: linear-gradient(to top, #000, transparent 75%);
}
.contact__inner { max-width: 820px; margin: 0 auto; }
.contact h2 { font-size: clamp(2.2rem, 5.4vw, 4.2rem); }
.contact .section__lead { margin: 0 auto; }
.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(32px, 5vw, 44px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 28px var(--pad-x);
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  color: var(--muted);
}
.footer span { display: inline-flex; align-items: center; gap: 8px; }
.footer svg { width: 18px; height: 18px; color: var(--accent); }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 5, 8, .93);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
  animation: fade-in .3s ease both;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  max-height: 88dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9), 0 0 0 1px var(--line);
  animation: pop .45s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  font-size: 30px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease);
}
.lightbox__close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #04202a;
  transform: rotate(90deg);
}

/* ==========================================================================
   REVEAL (only hidden when JS is running)
   ========================================================================== */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .9s var(--ease),
    transform .9s var(--ease),
    translate .4s var(--ease),
    border-color .3s,
    box-shadow .4s var(--ease);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .member:hover, .tcard:hover, .proj:hover, .partner:hover, .btn:hover { translate: none; transform: none; }
  .g:hover img, .proj:hover .proj__media > img { transform: none; }
}
