/* =========================================================================
   REBEL CARS // pages/team.css
   Team page only. Everything here is prefixed .team-
   01  Hero (green hypercar emerging from darkness)
   02  01 // Two pillars (panels + connector)
   03  02 // IXOR Digital (text, readout, gallery mosaic)
   ========================================================================= */


/* =========================================================================
   01  HERO
   ========================================================================= */
.team-hero { background: radial-gradient(52% 62% at 78% 56%, rgba(232,34,47,.14), transparent 70%); }
/* Centred as usual, but never higher than 20px below the fixed header
   (half the outline's height = .2752 x its width of max(900px, 78vw)). */
.team-hero > .rc-outline { top: max(50%, calc(var(--header-h) + 20px + max(248px, 21.47vw))); right: -18%; }
@media (min-width: 961px) {
  .team-hero .rc-pagehero__inner { grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(24px, 3vw, 48px); }
}
.team-hero__lead { max-width: 34rem; }
/* Side profile: a wide crop keeps the car and its floor reflection and leaves
   the studio credit (bottom-left of the render) fully outside the frame. */
.team-hero__car { --fade-l: 12%; --fade-t: 18%; --fade-b: 26%; }
.team-hero__car img { aspect-ratio: 2.2 / 1; object-position: 50% 60%; }
@media (max-width: 960px) {
  .team-hero__car img { aspect-ratio: 2 / 1; object-position: 50% 58%; }
}


/* =========================================================================
   02  01 // TWO PILLARS
   ========================================================================= */
.team-pillars__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(56px, 7vw, 112px) minmax(0, 1fr);
  align-items: stretch;
}
.team-pillar { display: flex; flex-direction: column; }
.team-pillar__body {
  position: relative;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3vw, 44px);
  padding-bottom: clamp(96px, 10vw, 150px);
}
.team-pillar__body > * + * { margin-top: 0; }
.team-pillar__title { position: relative; z-index: 1; font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: .9; }
.team-pillar__body p { position: relative; z-index: 1; max-width: 46ch; }
/* Big outlined index, cropped by the panel's bottom edge */
.team-pillar__num {
  position: absolute;
  right: clamp(16px, 2vw, 32px);
  bottom: -.2em;
  font: 500 clamp(7rem, 12vw, 11rem)/.8 var(--font-display);
  color: rgba(255,255,255,.045);
  pointer-events: none;
  user-select: none;
}

/* Connector between the two pillars: a hairline at panel-head height with
   three pixel-square nodes (decorative). */
.team-pillars__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: start;
  height: 60px;
  padding-inline: 10px;
}
.team-pillars__link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, var(--red), var(--line-2) 50%, var(--red));
}
.team-pillars__link span {
  position: relative;
  width: 7px;
  height: 7px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
}
.team-pillars__link span:nth-child(2) { width: 11px; height: 11px; background: var(--bg); border: 1px solid var(--red); box-shadow: none; }

@media (max-width: 960px) {
  .team-pillars__grid { grid-template-columns: minmax(0, 1fr); }
  .team-pillars__link {
    flex-direction: column;
    width: 11px;
    height: 64px;
    padding: 6px 0;
    margin-left: clamp(20px, 3vw, 44px);
  }
  .team-pillars__link::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, var(--red), var(--line-2) 50%, var(--red));
  }
}


/* =========================================================================
   03  02 // IXOR DIGITAL
   ========================================================================= */
.team-ixor { --glow-x: 92%; --glow-y: 520px; }
@media (min-width: 961px) {
  .team-ixor__split { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: end; }
}
.team-ixor__head { margin-bottom: 32px; }
.team-ixor__copy { display: grid; gap: 1.2em; }

/* Telemetry readout: the only number on the page */
.team-readout { background: rgba(12,14,20,.8); }
.team-readout__body { display: grid; gap: 22px; }
.team-readout__body > * + * { margin-top: 0; }
.team-readout__stat .rc-stat__value { font-size: clamp(5rem, 9vw, 8.4rem); line-height: .82; }
.team-readout__stat .rc-stat__unit { margin-left: .14em; font-size: .3em; letter-spacing: .12em; }
.team-readout__ruler { width: 100%; }

/* Gallery mosaic, seven renders in three bands on a 12-column grid:
   1  large render left (8 cols) | two stacked frames right (4 cols)
   2  mono meta + ruler (3 cols) | wide strip (9 cols)
   3  mirror of band 1: two stacked detail crops left | large render right
   The large frames take their height from the stacked pair beside them. */
.team-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(64px, 8vw, 120px);
}
.team-shot { margin: 0; }
.team-shot--a { grid-column: 1 / 9; grid-row: 1 / 3; }
.team-shot--b { grid-column: 9 / 13; grid-row: 1; }
.team-shot--c { grid-column: 9 / 13; grid-row: 2; }
.team-shot--d { grid-column: 4 / 13; grid-row: 3; }
.team-shot--f { grid-column: 1 / 5; grid-row: 4; }
.team-shot--g { grid-column: 1 / 5; grid-row: 5; }
.team-shot--e { grid-column: 5 / 13; grid-row: 4 / 6; }
.team-gallery__meta {
  grid-column: 1 / 4;
  grid-row: 3;
  align-self: end;
  display: grid;
  gap: 12px;
  padding-bottom: 4px;
}
.team-gallery__ruler { width: 100%; }
.team-shot .rc-media__cap { letter-spacing: .16em; }
.team-shot .rc-media__cap > span { white-space: nowrap; }

/* All seven renders are 16:10. The large ones fill both rows of their band
   (about 1.95:1 at 1440, 2:1 on tablets, 16:9 on phones).
   The two renders with a studio credit at the bottom-left (02, 07) are
   cropped so the credit (bottom 5-6 %) stays fully outside the frame at every
   breakpoint. 02 and 06 have light backgrounds: always in these closed frames,
   and only in the small frames (06 is a 1296 px still). */
.team-shot--a img,
.team-shot--e img { position: absolute; inset: 0; }
.team-shot--a img { object-position: 50% 40%; }
.team-shot--e img { object-position: 50% 44%; }
.team-shot--b img,
.team-shot--c img,
.team-shot--f img,
.team-shot--g img { aspect-ratio: 2 / 1; }
.team-shot--b img { object-position: 50% 50%; }
.team-shot--c img { object-position: 50% 85%; }
.team-shot--d img { aspect-ratio: 21 / 9; object-position: 50% 45%; }
.team-shot--f img { object-position: 50% 15%; } /* keeps the wing; the car runs off the right edge by design */
.team-shot--g img { object-position: 50% 50%; }

/* Narrow small frames: tighter caption strip so both labels stay on one line. */
@media (max-width: 1199px) {
  .team-shot--b .rc-media__cap,
  .team-shot--c .rc-media__cap,
  .team-shot--f .rc-media__cap,
  .team-shot--g .rc-media__cap { padding-inline: 12px; letter-spacing: .1em; }
}
/* Tablet: two columns. Large frames full width (2:1), pairs side by side:
   full, pair, full, pair, full. */
@media (max-width: 1024px) {
  .team-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-shot--a, .team-shot--d, .team-shot--e { grid-column: 1 / -1; grid-row: auto; }
  .team-shot--b, .team-shot--c, .team-shot--f, .team-shot--g { grid-column: auto; grid-row: auto; }
  .team-shot--a img,
  .team-shot--e img { position: static; aspect-ratio: 2 / 1; }
  .team-gallery__meta { display: none; }
}
@media (max-width: 720px) {
  .team-gallery { gap: 16px; }
  .team-shot--d img { aspect-ratio: 16 / 9; }
}
/* Phones: one snapping strip of equal 16:9 frames that bleeds to the page
   edges (keyboard-focusable via data-scroll-region). 16:9 shows 90 % of the
   render's height: the credited renders show rows 2-92 % / 3-93 %. */
@media (max-width: 600px) {
  .team-gallery {
    display: flex;
    gap: 14px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 12px;
    scroll-padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
  }
  .team-shot { flex: none; width: min(82vw, 360px); scroll-snap-align: start; }
  .team-shot img,
  .team-shot--a img,
  .team-shot--e img { position: static; aspect-ratio: 16 / 9; }
  .team-shot--b img { object-position: 50% 20%; }
  .team-shot--e img { object-position: 50% 30%; }
  .team-shot .rc-media__cap { padding-inline: 14px; letter-spacing: .12em; }
}
/* Smallest phones: keep the REF number, drop the studio label. */
@media (max-width: 359px) {
  .team-shot .rc-media__cap > :last-child { display: none; }
}