:root {
  --bg: #05060a;
  --fg: #e7e9ef;
  --muted: #a9afc6;
  --accent: #7cf0c6;
  --accent-2: #7aa8ff;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --font-display: "Sora", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --portrait-image: radial-gradient(circle at 30% 32%, rgba(124, 240, 198, 0.36), rgba(255, 95, 109, 0.28), rgba(7, 11, 19, 0.92));
}

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

body {
  margin: 0;
  background:
    radial-gradient(120% 120% at 18% 12%, rgba(124, 240, 198, 0.12), transparent 40%),
    radial-gradient(120% 120% at 82% 10%, rgba(122, 168, 255, 0.12), transparent 38%),
    linear-gradient(180deg, #0d1220 0%, #070b13 52%, #04060a 100%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  scrollbar-width: none; /* hide scrollbar in Firefox */
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

canvas#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
}

.page {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 48px clamp(32px, 5vw, 120px) 96px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid var(--border);
  position: sticky;
  top: 16px;
  z-index: 30;
  isolation: isolate;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.32);
}

.logo {
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

nav a {
  color: var(--fg);
  text-decoration: none;
  margin: 0 12px;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}

.btn.solid {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #020308;
  border: none;
  box-shadow: 0 10px 30px rgba(124, 240, 198, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
}

.btn.large {
  padding: 16px 28px;
  font-size: 1.05rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  gap: 6px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger:is(:hover, :focus-visible) {
  border-color: rgba(124, 240, 198, 0.6);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 40;
}

.nav-overlay.is-active {
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(78vw, 360px);
  background: rgba(10, 12, 20, 0.9);
  border-left: 1px solid var(--border);
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.45);
  padding: 22px 22px 30px;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.26s ease, opacity 0.26s ease;
  z-index: 41;
  display: grid;
  gap: 18px;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
}

.mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer__links {
  display: grid;
  gap: 12px;
}

.mobile-drawer a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.mobile-drawer a:hover {
  color: var(--accent);
}

.drawer-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.drawer-close span {
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--fg);
}

.drawer-close span:first-child {
  transform: rotate(45deg);
}

.drawer-close span:last-child {
  transform: rotate(-45deg);
}

.drawer-close:is(:hover, :focus-visible) {
  border-color: rgba(124, 240, 198, 0.6);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

body.no-scroll {
  overflow: hidden;
}

.hero {
  padding: 120px 0 96px;
  position: relative;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.9rem);
  line-height: 1.1;
  margin: 12px 0 16px;
}

.hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.05rem;
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
}

.cta-row {
  display: flex;
  gap: 14px;
  margin: 28px 0 34px;
  flex-wrap: wrap;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.section--teams {
  padding: 60px 0 32px;
}

.section--teams .teams__layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 32px;
  align-items: start;
  max-width: 1200px;
  margin-left: auto;
}

.section--teams .section-head {
  max-width: none;
  margin: 0;
  text-align: right;
}

.grid--lean {
  max-width: none;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.teams__intro {
  grid-column: 1;
}

.section--teams .grid--lean {
  grid-column: 2;
  justify-self: end;
}

.section--teams .card {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card--compact {
  width: 100%;
  margin-left: 0;
  padding: 18px;
  opacity: 0.9;
}

.car-shot {
  height: 210px;
  border-radius: 12px;
  border: none;
  background-color: #0b0f18;
  background-image:
    linear-gradient(145deg, rgba(124, 240, 198, 0.16), rgba(255, 95, 109, 0.12)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 42%),
    radial-gradient(circle at 78% 76%, rgba(124, 240, 198, 0.12), transparent 48%);
  background-size: 140% 140%, 120% 120%, 120% 120%;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  overflow: hidden;
  position: relative;
  transition: transform 0.35s ease, background-size 0.35s ease;
}

.car-shot + .car-shot {
  margin-top: 12px;
}

.car-shot::after {
  content: "Drop car photo here";
  padding: 6px 14px;
  background: rgba(10, 12, 20, 0.7);
  border-radius: 10px;
}

.car-shot[style*="--portrait-image"]::after {
  content: "";
}

.car-shot[style*="--portrait-image"] {
  background-image: var(--portrait-image);
  background-size: 104%;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
}

.car-shot:hover {
  transform: scale(1.05);
}

.car-shot:hover[style*="--portrait-image"] {
  background-size: 96%;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 90px 0 40px;
}

.section-lede {
  max-width: 720px;
  color: var(--muted);
  margin: 0;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 10px 0 4px;
}

.grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

/* Ensure the Teams list stacks vertically even on wide viewports */
.grid.grid--lean {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  padding: 22px;
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card--link {
  cursor: pointer;
}

.card--brand {
  position: relative;
  overflow: hidden;
  border-color: rgba(124, 240, 198, 0.22);
}

.card--brand::before {
  content: "";
  position: absolute;
  inset: -28% 40% 56% -32%;
  background: radial-gradient(ellipse at center, rgba(124, 240, 198, 0.25), rgba(255, 95, 109, 0.18), transparent 70%);
  transform: rotate(8deg);
  pointer-events: none;
}

.card--brand::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.9;
}

.card--brand h3 {
  position: relative;
  z-index: 1;
}

.card--brand p,
.card--brand .meta,
.card--brand .card__tag {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 240, 198, 0.5);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.card__tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(124, 240, 198, 0.12);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.card h3 {
  margin: 6px 0 10px;
  font-size: 1.25rem;
  font-family: var(--font-display);
}

.card p {
  color: var(--muted);
  margin: 0 0 14px;
}

.meta {
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 32px;
  align-items: center;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pill {
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-weight: 600;
}

.portrait {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 32px;
  align-items: center;
}

.portrait__frame {
  position: relative;
  padding: 14px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  isolation: isolate;
}

.portrait__frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(124, 240, 198, 0.16), rgba(122, 168, 255, 0.16), rgba(255, 95, 109, 0.14));
  filter: blur(32px);
  z-index: -1;
}

.portrait__photo {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 16px;
  background-image: var(--portrait-image), radial-gradient(110% 110% at 18% 20%, rgba(124, 240, 198, 0.22), transparent 46%), radial-gradient(120% 120% at 78% 80%, rgba(122, 168, 255, 0.22), transparent 52%);
  background-size: cover, auto, auto;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.28);
}

.portrait__note {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.portrait__copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin: 10px 0 10px;
}

.portrait__copy p {
  color: var(--muted);
}

.timeline {
  border-left: 2px solid var(--border);
  padding-left: 16px;
  display: grid;
  gap: 22px;
  position: relative;
}

.timeline__item {
  position: relative;
  transition: transform 0.65s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.65s ease, filter 0.65s ease;
  transform: translateY(16px);
  opacity: 0;
  filter: blur(8px);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity, filter;
}

.timeline__item::before {
  content: "";
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  position: absolute;
  left: -22px;
  top: 8px;
  box-shadow: 0 0 0 6px rgba(124, 240, 198, 0.12);
  animation: timeline-pulse 3.3s ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0ms);
}

body.motion-ok .timeline__item.is-visible {
  transform: translateY(0);
  opacity: 1;
  filter: blur(0);
}

.timeline__date {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

@keyframes timeline-pulse {
  0% {
    box-shadow: 0 0 0 6px rgba(124, 240, 198, 0.14);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(124, 240, 198, 0.08), 0 0 0 18px rgba(122, 168, 255, 0.06);
  }
  100% {
    box-shadow: 0 0 0 6px rgba(124, 240, 198, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline__item {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .timeline__item::before {
    animation: none;
  }
}

.contact {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  background: linear-gradient(120deg, rgba(124, 240, 198, 0.08), rgba(122, 168, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.contact p {
  color: var(--muted);
  max-width: 620px;
}

.contact__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .section--teams .teams__layout {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-left: 0;
  }

  .grid--lean {
    margin-top: 4px;
  }

  .teams__intro,
  .section--teams .grid--lean {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
  }
  .topbar .logo {
    font-size: 0.95rem;
  }
  .topbar .topnav,
  .topbar .topbar__cta {
    display: none;
  }
  .burger {
    display: inline-flex;
  }
  .hero {
    padding: 88px 0 72px;
  }
  .portrait {
    grid-template-columns: 1fr;
  }

  .section--teams .teams__layout {
    gap: 16px;
  }

  .card--compact {
    max-width: 100%;
    margin-left: 0;
  }
}

@media (min-width: 1600px) {
  .hero h1 {
    font-size: clamp(3rem, 4vw, 4.6rem);
  }

  .hero p {
    max-width: 900px;
    font-size: 1.12rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 22px;
  }

  .contact {
    padding: 48px clamp(64px, 6vw, 160px);
  }
}

/* Background accent blobs */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

body::before {
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 70, 85, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 70, 85, 0.05) 1px, transparent 1px);
  background-size: 140px 140px, 140px 140px;
  mix-blend-mode: soft-light;
  opacity: 0.18;
}

body::after {
  inset: 0;
  background: radial-gradient(circle at 50% 65%, rgba(255, 255, 255, 0.05), transparent 55%);
  opacity: 0.4;
}
