/* ── Company Console showcase section ─────────────────────────────
   Sits under the Driver Console showcase. A night-highway background
   (darkened with CSS overlays, never baked in), a centred heading, then
   a large laptop whose screen is a stack of layers: a title card (HTML)
   then real Company Console screenshots. The first layer is the base;
   each later one fades in over the one before it (0.5s), 4s per screen,
   11 screens = 44s loop. CSS only: no script, no inline styles, no
   frames (website CSP). Every class is cs-/cshow- so nothing here
   touches the Driver Console showcase.
   The screenshots start at 0s, so the title card (and its caption) shows
   at the end of each loop, not the start. */

.cshow {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 56px 0 52px;
  background: #05080d;
}

.cshow-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.cshow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 38% at 50% 56%, rgba(8, 215, 190, 0.12), transparent 72%),
    linear-gradient(180deg, rgba(5, 8, 13, 0.94) 0%, rgba(5, 8, 13, 0.55) 26%, rgba(5, 8, 13, 0.22) 58%, rgba(5, 8, 13, 0.80) 100%);
}

/* hairline between the two showcase sections */
.cshow::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.35), transparent);
}

.cshow-head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.cshow-head h2 {
  margin-top: 12px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

.cshow-head p {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 17px;
}

/* ── the laptop: wider than the text column, centred on the page ── */
.cs-stage {
  position: relative;
  left: 50%;
  width: min(1180px, 100vw);
  margin-top: 36px;
  transform: translateX(-50%);
}

.cs-laptop {
  position: relative;
}

/* lid: thin aluminium rim around a black glass bezel */
.cs-lid {
  position: relative;
  margin: 0 3%;
  padding: 1.6% 1.6% 2.3%;
  border-radius: 2.4% / 3.8%;
  background: linear-gradient(180deg, #0c0d10, #050608);
  box-shadow:
    0 0 0 1px #59606a,
    0 0 0 2.5px #1a1d22,
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 0 120px rgba(8, 215, 190, 0.10);
}

/* camera, centred in the top bezel */
.cs-cam {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.55%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, 100%);
  background: radial-gradient(circle at 40% 35%, #2b3442 0%, #0d1117 55%, #030405 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.cs-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 3px;
  background: #0a0e14;
}

/* a faint reflection across the glass */
.cs-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 34%, rgba(255, 255, 255, 0) 52%);
}

.cs-screen > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  animation: cs-in 44s linear infinite both;
}

/* base: the front edge of the keyboard half, with the opening notch */
.cs-base {
  position: relative;
  height: 0;
  padding-bottom: 2.4%;
  border-radius: 0 0 1.6% 1.6% / 0 0 75% 75%;
  background: linear-gradient(180deg, #16181c 0%, #16181c 9%, #c8cdd3 14%, #a3a9b1 34%, #7d838c 62%, #4a4f56 88%, #2c2f34 100%);
}

.cs-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 12%;
  height: 42%;
  transform: translateX(-50%);
  border-radius: 0 0 40% 40% / 0 0 100% 100%;
  background: linear-gradient(180deg, #2a2d32 0%, #5b6168 55%, #8f959d 100%);
}

/* contact shadow on the desk */
.cs-base::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 2%;
  right: 2%;
  height: 140%;
  background: radial-gradient(50% 100% at 50% 0%, rgba(0, 0, 0, 0.75), transparent 70%);
}

/* title card (first, base layer) */
.cs-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6%;
  text-align: center;
  background:
    radial-gradient(70% 70% at 50% 42%, rgba(8, 215, 190, 0.16), transparent 70%),
    #0a0e14;
}

.cs-title-mark {
  width: 9%;
  height: auto;
}

.cs-title .wordmark {
  font-size: clamp(22px, 3.4vw, 44px);
}

.cs-title-tagline {
  color: var(--text-soft);
  font-size: clamp(11px, 1.2vw, 16px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-screen > :first-child {
  opacity: 1;
  animation: none;
}

.cs-screen > :nth-child(2), .cs-steps span:nth-child(2) { animation-delay: 0s; }
.cs-screen > :nth-child(3), .cs-steps span:nth-child(3) { animation-delay: 4s; }
.cs-screen > :nth-child(4), .cs-steps span:nth-child(4) { animation-delay: 8s; }
.cs-screen > :nth-child(5), .cs-steps span:nth-child(5) { animation-delay: 12s; }
.cs-screen > :nth-child(6), .cs-steps span:nth-child(6) { animation-delay: 16s; }
.cs-screen > :nth-child(7), .cs-steps span:nth-child(7) { animation-delay: 20s; }
.cs-screen > :nth-child(8), .cs-steps span:nth-child(8) { animation-delay: 24s; }
.cs-screen > :nth-child(9), .cs-steps span:nth-child(9) { animation-delay: 28s; }
.cs-screen > :nth-child(10), .cs-steps span:nth-child(10) { animation-delay: 32s; }
.cs-screen > :nth-child(11), .cs-steps span:nth-child(11) { animation-delay: 36s; }

.cs-steps span:nth-child(1) { animation-delay: 40s; }

.cs-screen > :nth-child(11) {
  animation-name: cs-last;
}

/* later screens: fade in over 0.5s, hold, drop once the next one is fully in */
@keyframes cs-in {
  0% { opacity: 0; }
  1.136% { opacity: 1; }
  10.227% { opacity: 1; }
  10.5% { opacity: 0; }
  100% { opacity: 0; }
}

/* last screen fades out to reveal the title card again */
@keyframes cs-last {
  0% { opacity: 0; }
  1.136% { opacity: 1; }
  7.955% { opacity: 1; }
  9.091% { opacity: 0; }
  100% { opacity: 0; }
}

/* captions: one per 4s slot (the first included), fade out then in --
   text never cross-fades over other text */
@keyframes cs-cap {
  0% { opacity: 0; }
  0.568% { opacity: 1; }
  8.523% { opacity: 1; }
  9.091% { opacity: 0; }
  100% { opacity: 0; }
}

/* ── step label + pause control, centred under the laptop ── */
.cs-pause-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cs-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  margin: 36px auto 0;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid rgba(94, 234, 212, 0.35);
  white-space: nowrap;
}

.cs-caption-label {
  color: var(--teal-bright);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-steps {
  display: grid;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.cs-steps span {
  grid-area: 1 / 1;
  opacity: 0;
  animation: cs-cap 44s linear infinite both;
}

.cs-pause {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.cs-pause::before,
.cs-pause::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 3px;
  height: 10px;
  border-radius: 1px;
  background: #ffffff;
}

.cs-pause::before { left: 10px; }
.cs-pause::after { left: 15px; }

.cs-pause-input:checked ~ .cs-caption .cs-pause::before {
  left: 11px;
  width: 0;
  height: 0;
  border-radius: 0;
  background: none;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #ffffff;
}

.cs-pause-input:checked ~ .cs-caption .cs-pause::after {
  display: none;
}

.cs-pause-input:focus-visible ~ .cs-caption .cs-pause {
  outline: 2px solid var(--teal-bright);
  outline-offset: 2px;
}

.cs-pause-input:checked ~ .cs-caption .cs-steps span,
.cs-pause-input:checked ~ .cs-stage .cs-screen > * {
  animation-play-state: paused;
}

/* ── feature points ── */
.cs-points {
  display: grid;
  gap: 10px;
  max-width: 980px;
  margin: 32px auto 0;
  padding: 0;
  list-style: none;
  color: var(--text-soft);
  font-size: 15px;
}

.cs-points li {
  position: relative;
  padding-left: 22px;
}

.cs-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-bright);
}

/* closing message: the Company Console on a laptop or a phone */
.cs-anywhere {
  max-width: 720px;
  margin: 36px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(94, 234, 212, 0.18);
  text-align: center;
}

.cs-anywhere h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.cs-anywhere p {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 16px;
  text-wrap: balance;
}

/* Reduced motion: no cycling -- one static screen (the Active board), no pause control */
@media (prefers-reduced-motion: reduce) {
  .cs-screen > :nth-child(n),
  .cs-steps span:nth-child(n) {
    animation: none;
  }

  .cs-screen > :nth-child(2),
  .cs-steps span:nth-child(2) {
    opacity: 1;
  }

  .cs-pause {
    display: none;
  }
}

/* ── Tablet and up ── */
@media (min-width: 700px) {
  .cs-stage {
    width: min(1180px, 94vw);
  }

  .cs-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
}

/* ── Desktop (≥ 1024px) ── */
@media (min-width: 1024px) {
  .cshow {
    padding: 88px 0 76px;
  }

  .cshow-head h2 {
    font-size: 46px;
  }

  .cs-stage {
    width: min(1180px, 90vw);
    margin-top: 48px;
  }

  .cs-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cs-anywhere h3 {
    font-size: 26px;
  }
}

/* Phones: drop the "On screen" label so the pill fits */
@media (max-width: 699px) {
  .cs-caption-label {
    display: none;
  }
}
