/**
 * TAS Simulator — dual mission virtual-cockpit showcase
 * Prefix: tas-simulator
 */

#tas-simulator {
  --sim-gold: #f3b20c;
  --sim-gold-soft: rgba(243, 178, 12, 0.22);
  --sim-gold-faint: rgba(243, 178, 12, 0.1);
  --sim-text: #ffffff;
  --sim-muted: #cecece;
  --sim-line: rgba(255, 255, 255, 0.12);
  --sim-bg: #050505;
  --sim-panel: #0b0d12;
  --sim-max: 1320px;
  --sim-display: "Clash Grotesk", "Clash Grotesk Placeholder", "Segoe UI", sans-serif;
  --sim-body: "Nunito Sans", "Segoe UI", sans-serif;

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(16px, 4vw, 40px) clamp(56px, 8vw, 96px);
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(243, 178, 12, 0.08), transparent 58%),
    var(--sim-bg);
  color: var(--sim-text);
  box-sizing: border-box;
  overflow-x: clip;
  isolation: isolate;
  scroll-margin-top: 96px;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 1199.98px) {
  /* Framer root is flex-ordered on tablet/phone: about=2, services=4.
     Keep Simulator between SkyStream and Operational Outcomes like desktop DOM. */
  #main #tas-simulator {
    order: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    align-self: stretch !important;
  }
}

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

.tas-simulator__container {
  width: min(var(--sim-max), 100%);
  margin: 0 auto;
}

.tas-simulator__header {
  width: min(760px, 100%);
  margin: 0 auto 32px;
  text-align: center;
}

.tas-simulator__eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-family: var(--sim-body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sim-gold);
}

.tas-simulator__header h2 {
  margin: 0 0 16px;
  font-family: var(--sim-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--sim-text);
}

.tas-simulator__header > p {
  margin: 0 auto 24px;
  max-width: 54ch;
  font-family: var(--sim-body);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.65;
  color: var(--sim-muted);
}

.tas-simulator__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid var(--sim-gold);
  background: var(--sim-gold);
  color: #111;
  font-family: var(--sim-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.tas-simulator__cta:hover {
  background: transparent;
  color: var(--sim-gold);
}

.tas-simulator__cta:focus-visible {
  outline: 2px solid var(--sim-gold);
  outline-offset: 3px;
}

.tas-simulator__stage-wrap {
  display: grid;
  gap: 18px;
  width: min(920px, 100%);
  margin: 0 auto;
}

.tas-simulator__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tas-simulator__tab {
  appearance: none;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: var(--sim-muted);
  font-family: var(--sim-body);
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.tas-simulator__tab:hover {
  border-color: rgba(243, 178, 12, 0.45);
  color: var(--sim-text);
}

.tas-simulator__tab.is-active,
.tas-simulator__tab[aria-pressed="true"] {
  background: var(--sim-gold-faint);
  border-color: var(--sim-gold);
  color: var(--sim-gold);
}

.tas-simulator__tab:focus-visible {
  outline: 2px solid var(--sim-gold);
  outline-offset: 2px;
}

.tas-simulator__stage {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background-color: #000;
  background-image: var(--sim-poster, none);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.tas-simulator__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 1;
  background: transparent;
}

.tas-simulator__video.is-active {
  opacity: 1;
}

.tas-simulator__chrome {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 22%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 34%, transparent 58%);
  z-index: 1;
}

.tas-simulator__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px 22px 18px;
  pointer-events: none;
}

.tas-simulator__mission-label {
  margin: 0 0 4px;
  font-family: var(--sim-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
}

.tas-simulator__mission-copy {
  margin: 0;
  max-width: 46ch;
  font-family: var(--sim-body);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.tas-simulator__play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.tas-simulator__play span {
  display: inline-block;
  margin-left: 3px;
}

.tas-simulator__signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tas-simulator__signals li {
  padding: 16px 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--sim-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 50%), var(--sim-panel);
}

.tas-simulator__signals strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--sim-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sim-text);
}

.tas-simulator__signals span {
  font-family: var(--sim-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--sim-muted);
}

#tas-simulator.is-playing .tas-simulator__stage {
  background-image: none;
}

@media (max-width: 899.98px) {
  .tas-simulator__signals {
    grid-template-columns: 1fr;
  }

  .tas-simulator__stage {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
  }

  .tas-simulator__caption {
    padding: 24px 16px 14px;
  }
}

@media (max-width: 809.98px) {
  #tas-simulator {
    padding: 40px 16px 56px;
  }

  .tas-simulator__header {
    text-align: left;
    margin-bottom: 24px;
  }

  .tas-simulator__header > p {
    margin-left: 0;
  }

  .tas-simulator__tabs {
    justify-content: flex-start;
  }

  .tas-simulator__tab {
    padding: 0 12px;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tas-simulator__video {
    transition: none !important;
  }

  .tas-simulator__video:not(.is-active) {
    display: none;
  }
}
