/* ==========================================================================
   W2033 — Team
   Design system ported from IX (testnet.ix.finance/ix-core)
   Structure modelled on rocketlabcorp.com/about/team
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg: #080808;
  --surface: #0d0d0d;
  --surface-2: #161616;
  --panel: #0a0a0c;
  --line: #121212;
  --line-2: #1f1f1f;

  /* Ink */
  --ink: #ffffff;
  --ink-muted: rgba(255, 255, 255, 0.5);
  --grey: #9c9c9c;

  /* Accent */
  --accent: #3b9dff;
  --accent-light: #7fb8ff;
  --accent-deep: #2b6bff;
  --glow: rgba(43, 107, 255, 0.22);

  /* Type */
  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --content: 1200px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  letter-spacing: inherit;
}

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

ul {
  list-style: none;
}

::selection {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. Type presets
   -------------------------------------------------------------------------- */
.t-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--grey);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(156, 156, 156, 0.6);
}

.t-h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.t-body3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.04em;
  color: var(--ink-muted);
}

.t-body5 {
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey);
}

@media (min-width: 810px) {
  .t-h2 { font-size: 34px; }
  .t-body3 { font-size: 22px; }
}

@media (min-width: 1200px) {
  .t-h2 { font-size: 44px; }
  .t-body3 { font-size: 28px; }
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  position: relative;
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 1200px) {
  .wrap { padding-inline: 40px; }
}

.section {
  position: relative;
  border-top: 1px solid var(--line);
  padding-block: 64px;
}

@media (min-width: 1200px) {
  .section { padding-block: 80px; }
}

/* Blueprint grid — 28px cells (panels) */
.grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Blueprint grid — 56px cells, radially masked (hero) */
.grid-lines--hero {
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 30% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 30% 30%, #000 30%, transparent 100%);
}

/* Blue radial glow */
.glow {
  position: absolute;
  pointer-events: none;
  border-radius: 9999px;
  background: radial-gradient(ellipse at center, var(--glow), transparent 70%);
  filter: blur(130px);
  opacity: 0.6;
}

.glow--hero {
  left: -10%;
  top: -20%;
  width: 760px;
  height: 480px;
}

.glow--cta {
  left: 50%;
  top: 50%;
  width: 720px;
  max-width: 95vw;
  height: 360px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(43, 107, 255, 0.18), transparent 70%);
  filter: blur(120px);
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   5. Scroll progress
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 60;
  height: 2px;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(to right, #2b9bff, #5f7bff, #8b5cff);
}

/* --------------------------------------------------------------------------
   6. Pinging accent dot (hero pill)
   -------------------------------------------------------------------------- */
.ping {
  position: relative;
  display: inline-flex;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
}

.ping::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(59, 157, 255, 0.8);
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.ping::after {
  content: "";
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--accent);
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-block: 96px;
}

@media (min-width: 1200px) {
  .hero__inner { padding-block: 128px; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  background: rgba(13, 13, 13, 0.6);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--grey);
}

/* Brand mark — sized off the file's own aspect ratio */
.logo {
  width: 96px;
  height: auto;
  margin-bottom: 8px;
}

@media (min-width: 1200px) {
  .logo { width: 116px; }
}

.hero h1 {
  max-width: 820px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(38px, 6.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 em {
  font-style: normal;
  color: var(--ink-muted);
}

.hero__sub {
  max-width: 600px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  margin-top: 32px;
}

.stat__num {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.stat__label {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   8. Section header
   -------------------------------------------------------------------------- */
.sec-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

.sec-head__row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.sec-head__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   9. Filter tabs
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.tab {
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
  color: rgba(156, 156, 156, 0.6);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.tab__count {
  color: rgba(156, 156, 156, 0.55);
  margin-left: 6px;
}

.tab.is-active .tab__count {
  color: var(--accent-light);
}

/* --------------------------------------------------------------------------
   10. Team groups + grid
   -------------------------------------------------------------------------- */
.group {
  margin-top: 56px;
}

.group[hidden] {
  display: none;
}

.group__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.group__title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.group__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-2), transparent);
}

.group__count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(156, 156, 156, 0.6);
}

/* Hairline-seam grid: 1px gap over a line-coloured backplate */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 810px) {
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   11. Member card
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  text-align: left;
  transition: background 0.3s ease;
}

.card:hover {
  background: #0e0e11;
}

/* Blue hairline sweep on hover */
.card__sweep {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  z-index: 3;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(to right, var(--accent), transparent);
  transition: transform 0.5s ease-out;
}

.card:hover .card__sweep,
.card:focus-visible .card__sweep {
  transform: scaleX(1);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.55), transparent 45%);
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(1) contrast(1.05) brightness(0.92);
  transform: scale(1);
  transition: filter 0.5s var(--ease), transform 0.7s var(--ease);
}

.card:hover .card__img {
  filter: grayscale(1) contrast(1.12) brightness(1);
  transform: scale(1.035);
}

.card__index {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(156, 156, 156, 0.6);
}

.card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 18px 16px 20px;
  border-top: 1px solid var(--line);
}

.card__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.card__role {
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--grey);
}

/* Monogram fallback (shown when a member has no photo) */
.card__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
}

.card__ph .grid-lines { opacity: 1; }

.card__ph span {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 40px;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.14);
}

/* --------------------------------------------------------------------------
   12. Feature blocks + FIG frames
   -------------------------------------------------------------------------- */
.block {
  padding-block: 56px;
}

.block--rule {
  border-top: 1px solid var(--line);
}

@media (min-width: 1200px) {
  .block { padding-block: 72px; }
}

.block__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 36px;
}

@media (min-width: 1200px) {
  .block__grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.block__row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.block__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--accent);
}

.block__copy h3 {
  margin-top: 16px;
  max-width: 440px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

@media (min-width: 1200px) {
  .block__copy h3 { font-size: 38px; }
}

.block__copy p {
  margin-top: 14px;
  max-width: 440px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--grey);
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--grey);
}

/* Blue tick, drawn in CSS so there is no repeated SVG in the markup */
.check {
  position: relative;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 3px;
}

.check::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 0;
  width: 5px;
  height: 9px;
  border: solid var(--accent);
  border-width: 0 1.4px 1.4px 0;
  transform: rotate(42deg);
}

/* FIG frame — bordered panel, blueprint grid, corner label */
.fig {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.fig__label {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(156, 156, 156, 0.6);
}

.fig__body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 22px 20px 18px;
  padding-top: 40px;
}

@media (min-width: 1200px) {
  .fig__body { min-height: 380px; }
}

.fig svg {
  width: 100%;
  height: auto;
  max-height: 360px;
}

@media (prefers-reduced-motion: reduce) {
  .fig animateMotion,
  .fig animate { display: none; }
}

/* --------------------------------------------------------------------------
   13. CTA
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-block: 112px;
}

@media (min-width: 1200px) {
  .cta { padding-block: 128px; }
}

.cta__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.cta h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.cta p {
  max-width: 520px;
}

.mail {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: clamp(15px, 2.2vw, 20px);
  letter-spacing: 0;
  color: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.mail:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
}

.footer__rails {
  border-inline: 1px solid var(--line);
}

.footer__band {
  border-bottom: 1px solid var(--line);
  padding: 32px 24px;
}

@media (min-width: 1200px) {
  .footer__band { padding: 40px 60px; }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer__mark {
  width: 120px;
  height: auto;
  opacity: .9;
}

.footer__word {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(56px, 16vw, 200px);
  line-height: 0.85;
  letter-spacing: -0.055em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.09);
  text-align: center;
  padding-block: 20px;
  user-select: none;
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 0;
}

/* --------------------------------------------------------------------------
   15. Scroll reveal
   -------------------------------------------------------------------------- */
/* Scoped to .js so the page degrades to fully visible if the script fails to
   load or throws — otherwise a JS error leaves nothing on screen but the nav. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ping::before { animation: none; }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
