/*
 * Automations page redesign
 * Direction: live operational intelligence / editorial control room.
 * Loaded after automations-space.css so the existing system can be evolved
 * without duplicating its structure or breaking the shared navigation.
 */
:root {
  --auto-ink: #f7f8f5;
  --auto-muted: #a9b1b7;
  --auto-dim: #68727b;
  --auto-black: #050607;
  --auto-panel: #0b0e11;
  --auto-line: rgba(247, 248, 245, 0.14);
  --auto-coral: #ff5b63;
  --auto-lime: #d7ff65;
  --auto-cyan: #8de8ff;
  --auto-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background:
    radial-gradient(circle at 72% 12%, rgba(255, 91, 99, 0.08), transparent 26rem),
    radial-gradient(circle at 16% 48%, rgba(141, 232, 255, 0.05), transparent 32rem),
    var(--auto-black);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.space-stage {
  opacity: 0.2;
  filter: saturate(0.2) contrast(1.2) brightness(0.35);
}

.space-atmosphere {
  background:
    radial-gradient(circle at 78% 32%, rgba(255, 91, 99, 0.18), transparent 22%),
    radial-gradient(circle at 30% 70%, rgba(141, 232, 255, 0.08), transparent 24%);
}

.site-header {
  min-height: 86px;
  padding-inline: clamp(22px, 5vw, 88px);
  border-bottom-color: transparent;
}

.site-header.is-scrolled {
  background: rgba(5, 6, 7, 0.78);
  border-bottom-color: rgba(247, 248, 245, 0.1);
}

.wordmark {
  letter-spacing: -0.08em !important;
}

.primary-nav {
  gap: clamp(18px, 2.6vw, 44px);
}

.primary-nav > a,
.nav-services > a {
  color: rgba(247, 248, 245, 0.7);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
}

.primary-nav .nav-contact {
  border: 1px solid rgba(215, 255, 101, 0.5);
  color: var(--auto-lime);
  border-radius: 999px;
  padding: 10px 16px;
}

.hero {
  width: min(100%, 1700px);
  min-height: min(980px, 100dvh);
  padding: 132px clamp(22px, 7vw, 120px) 74px;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  gap: clamp(30px, 5vw, 110px);
  isolation: isolate;
}

.hero::before {
  content: "01 / 06  —  OPERATIONS CONTROL";
  position: absolute;
  top: 112px;
  right: clamp(22px, 7vw, 120px);
  color: var(--auto-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.hero-copy {
  width: min(700px, 100%);
  padding-bottom: 12vh;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--auto-lime);
}

.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--auto-coral);
  box-shadow: 0 0 0 5px rgba(255, 91, 99, 0.12), 0 0 22px rgba(255, 91, 99, 0.8);
}

.hero h1 {
  max-width: 8ch;
  font-size: clamp(4rem, 7.8vw, 9.4rem);
  letter-spacing: -0.09em;
  line-height: 0.82;
}

.hero h1 span {
  white-space: normal;
}

.hero h1 span:nth-child(2) {
  color: var(--auto-lime);
}

.hero h1 span:last-child {
  color: var(--auto-coral);
  transform: translateX(0.45em);
}

.hero-intro {
  max-width: 37ch;
  margin-top: 36px;
  color: rgba(247, 248, 245, 0.78);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.5;
}

.hero-actions {
  margin-top: 38px;
  gap: 18px;
}

.button {
  min-height: 54px;
  padding-inline: 22px;
  border-radius: 999px;
  letter-spacing: 0.13em;
}

.button-primary {
  background: var(--auto-lime);
  color: #111507;
  box-shadow: 0 0 0 1px rgba(215, 255, 101, 0.2), 0 18px 50px rgba(215, 255, 101, 0.12);
}

.button-primary:hover {
  background: #efffb6;
  color: #111507;
}

.text-link {
  color: var(--auto-ink);
}

.text-link::after {
  background: var(--auto-coral);
}

.hero-visual {
  min-height: min(71vh, 740px);
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -7% -4% 3% -8%;
  z-index: -1;
  background: url("../assets/generated/automation-command-core.png") 62% 50% / cover no-repeat;
  filter: saturate(1.08) contrast(1.08);
  transform: translate3d(var(--hero-shift-x, 0), var(--hero-shift-y, 0), 0) scale(1.04);
  transition: transform 900ms var(--auto-ease), filter 600ms var(--auto-ease);
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 4% 100%, 0 76%, 7% 34%);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0 -8% 3% -8%;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.98) 0%, rgba(5, 6, 7, 0.4) 25%, transparent 52%),
    linear-gradient(180deg, rgba(5, 6, 7, 0.1), transparent 56%, rgba(5, 6, 7, 0.84));
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 4% 100%, 0 76%, 7% 34%);
  pointer-events: none;
}

.hero-orbit-ui {
  position: absolute;
  top: 8%;
  right: 3%;
  width: min(210px, 30vw);
  aspect-ratio: 1;
  border: 1px solid rgba(215, 255, 101, 0.36);
  border-radius: 50%;
  animation: orbit-spin 22s linear infinite;
  pointer-events: none;
}

.hero-orbit-ui::before,
.hero-orbit-ui::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(141, 232, 255, 0.3);
  border-radius: 50%;
}

.hero-orbit-ui::after {
  inset: 45% -6%;
  border-color: rgba(255, 91, 99, 0.8);
  transform: rotate(-18deg);
}

.hero-readout {
  position: absolute;
  right: 0;
  bottom: 7%;
  width: min(320px, 76%);
  padding: 15px 17px;
  border: 1px solid rgba(247, 248, 245, 0.18);
  border-radius: 14px;
  background: rgba(5, 6, 7, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.hero-readout-head,
.hero-readout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-readout-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--auto-line);
  color: var(--auto-lime);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-readout-head span:last-child {
  color: var(--auto-coral);
}

.hero-readout-row {
  padding-top: 12px;
  color: var(--auto-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.hero-readout-row strong {
  color: var(--auto-ink);
  font-weight: 500;
}

.control-strip {
  position: relative;
  z-index: 3;
  margin: -34px auto 0;
  width: min(calc(100% - 44px), 1450px);
  padding: 12px;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 10px;
  border: 1px solid var(--auto-line);
  border-radius: 16px;
  background: rgba(11, 14, 17, 0.82);
  backdrop-filter: blur(16px);
}

.control-strip div {
  min-height: 76px;
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-left: 1px solid var(--auto-line);
}

.control-strip div:first-child {
  border: 0;
}

.control-strip span {
  color: var(--auto-dim);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.control-strip strong {
  color: var(--auto-ink);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 2rem);
  letter-spacing: -0.04em;
}

.control-strip div:first-child strong {
  color: var(--auto-lime);
}

.section-shell {
  width: min(calc(100% - clamp(44px, 11vw, 190px)), 1480px);
  padding-block: clamp(120px, 16vw, 220px);
}

.architecture {
  padding-top: clamp(120px, 14vw, 200px);
}

.section-heading {
  max-width: 990px;
  margin-bottom: clamp(56px, 8vw, 110px);
}

.section-heading h2,
.systems-copy h2,
.faq-heading h2,
.launch-copy h2 {
  font-size: clamp(3rem, 7vw, 8rem);
  letter-spacing: -0.09em;
  line-height: 0.84;
}

.section-heading h2::first-line {
  color: var(--auto-ink);
}

.section-heading p,
.systems-copy > p:last-child,
.faq-heading p,
.launch-copy p {
  max-width: 46ch;
  margin-top: 28px;
  color: var(--auto-muted);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
}

.process-vessel {
  padding: 0;
  gap: 0;
  overflow: visible;
  border: 0;
  background: none;
  box-shadow: none;
}

.process-vessel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--auto-line), transparent);
}

.process-vessel::after {
  background: none;
}

.process-deck {
  min-height: 236px;
  padding: clamp(28px, 5vw, 64px) clamp(22px, 5vw, 70px);
  grid-template-columns: minmax(160px, 0.55fr) minmax(280px, 1.1fr) minmax(220px, 0.7fr);
  gap: clamp(24px, 7vw, 110px);
  border-width: 1px 0;
  border-color: var(--auto-line);
  border-radius: 0;
  background: transparent;
  transition: background 420ms var(--auto-ease), transform 420ms var(--auto-ease), border-color 420ms var(--auto-ease);
}

.process-deck:nth-child(even),
.process-deck:nth-child(odd) {
  margin-inline: 0;
}

.process-deck:nth-child(even) {
  background: linear-gradient(90deg, transparent, rgba(141, 232, 255, 0.05), transparent);
}

.process-deck:nth-child(3) {
  background: linear-gradient(90deg, transparent, rgba(255, 91, 99, 0.06), transparent);
}

.process-deck:hover {
  transform: translateX(12px);
  border-color: rgba(215, 255, 101, 0.45);
  background: linear-gradient(90deg, rgba(215, 255, 101, 0.08), transparent 70%);
}

.deck-name h3 {
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  letter-spacing: -0.09em;
}

.deck-name span {
  color: var(--auto-lime);
}

.process-deck:nth-child(2) .deck-name span,
.process-deck:nth-child(4) .deck-name span {
  color: var(--auto-cyan);
}

.process-deck:nth-child(3) .deck-name span {
  color: var(--auto-coral);
}

.process-deck > p {
  max-width: 32ch;
  color: rgba(247, 248, 245, 0.72);
}

.process-deck li::before {
  background: var(--auto-lime);
}

.crew-console {
  border-color: rgba(215, 255, 101, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(215, 255, 101, 0.06), transparent 28%),
    rgba(8, 10, 12, 0.9);
  box-shadow: 0 60px 140px rgba(0, 0, 0, 0.42), 0 0 80px rgba(255, 91, 99, 0.08);
}

.crew-portrait {
  min-height: 660px;
}

.crew-portrait-image {
  filter: saturate(0.9) contrast(1.12) brightness(0.82);
}

.crew-portrait::after {
  background:
    linear-gradient(180deg, rgba(5, 6, 7, 0.08), rgba(5, 6, 7, 0.2) 42%, rgba(5, 6, 7, 0.95) 100%),
    linear-gradient(90deg, rgba(5, 6, 7, 0.18), transparent 62%);
}

.crew-tabs {
  background: rgba(4, 5, 6, 0.5);
}

.crew-tab.is-active {
  background: rgba(215, 255, 101, 0.08);
  color: var(--auto-lime);
}

.crew-tab::before {
  background: var(--auto-lime);
}

.crew-panel h3 {
  font-size: clamp(2.2rem, 4.5vw, 5rem);
}

.system-map {
  min-height: 620px;
  border-radius: 24px;
  border-color: rgba(141, 232, 255, 0.28);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 91, 99, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(141, 232, 255, 0.06), transparent 42%),
    rgba(5, 7, 9, 0.86);
}

.system-stack span {
  border-radius: 999px;
  background: rgba(11, 15, 18, 0.78);
  transition: transform 300ms var(--auto-ease), border-color 220ms ease, color 220ms ease;
}

.system-stack span:nth-child(odd) {
  border-color: rgba(141, 232, 255, 0.28);
}

.system-stack span:nth-child(even) {
  border-color: rgba(215, 255, 101, 0.24);
}

.system-stack span:hover {
  transform: translateX(9px);
  color: var(--auto-lime);
}

.system-stack-output span:hover {
  transform: translateX(-9px);
}

.core-center {
  width: 56%;
  background:
    radial-gradient(circle at 30% 20%, rgba(215, 255, 101, 0.24), transparent 18%),
    linear-gradient(145deg, #29352b, #101614 56%, #090c0e);
  border-color: rgba(215, 255, 101, 0.66);
  box-shadow: 0 0 0 14px rgba(215, 255, 101, 0.025), 0 0 90px rgba(255, 91, 99, 0.18), inset -20px -24px 50px rgba(0, 0, 0, 0.44);
}

.core-center span {
  color: var(--auto-lime);
}

.signal-line,
.signal-line::after {
  background-color: rgba(141, 232, 255, 0.22);
}

.signal-line::after {
  background: linear-gradient(90deg, transparent, var(--auto-cyan), var(--auto-lime), transparent);
}

.reliability-primary,
.reliability-module {
  border-radius: 22px;
  border-color: var(--auto-line);
}

.reliability-primary {
  background:
    radial-gradient(circle at 84% 18%, rgba(215, 255, 101, 0.14), transparent 23%),
    linear-gradient(135deg, rgba(255, 91, 99, 0.09), transparent 48%),
    rgba(11, 14, 17, 0.92);
}

.module-label {
  color: var(--auto-lime);
}

.permission-stack span:nth-child(3),
.permission-stack span:nth-child(4) {
  border-color: rgba(215, 255, 101, 0.55);
  color: var(--auto-lime);
}

.handoff {
  border-radius: 999px;
  border-color: rgba(215, 255, 101, 0.28);
  background: rgba(215, 255, 101, 0.04);
}

.handoff p {
  color: var(--auto-lime);
}

.faq {
  gap: clamp(54px, 10vw, 180px);
}

.faq-heading h2 {
  max-width: 7ch;
}

.faq-item button {
  padding-block: 32px;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

.faq-mark {
  color: var(--auto-lime);
}

.launch-cta {
  min-height: 88dvh;
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.94) 0%, rgba(5, 6, 7, 0.6) 42%, rgba(5, 6, 7, 0.88) 100%),
    url("../assets/generated/automation-command-core.png") 72% 48% / cover no-repeat;
}

.launch-copy {
  align-items: flex-start;
  text-align: left;
}

.launch-copy h2 {
  max-width: 8ch;
  color: var(--auto-lime);
}

.launch-copy p {
  color: rgba(247, 248, 245, 0.76);
}

.launch-door,
.launch-door::before,
.door,
.launch-light {
  display: none;
}

.site-footer {
  background: #030405;
}

.footer-wordmark {
  letter-spacing: -0.12em;
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .hero {
    min-height: 900px;
    grid-template-columns: 1fr;
    padding-top: 148px;
    align-content: center;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-visual {
    position: absolute;
    inset: 88px 0 0;
    z-index: -1;
    min-height: 0;
  }

  .hero-visual::before,
  .hero-visual::after {
    inset: 0;
    clip-path: none;
  }

  .hero::before {
    top: 104px;
  }

  .control-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .control-strip div:first-child {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--auto-line);
  }
}

@media (max-width: 760px) {
  body::before {
    background-size: 44px 44px;
  }

  .site-header {
    min-height: 72px;
  }

  .hero {
    min-height: 820px;
    padding: 132px 22px 46px;
  }

  .hero::before {
    top: 98px;
    right: 22px;
    font-size: 0.5rem;
  }

  .hero h1 {
    max-width: 7ch;
    font-size: clamp(3.7rem, 17vw, 6rem);
  }

  .hero h1 span:last-child {
    transform: none;
  }

  .hero-intro {
    max-width: 31ch;
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button,
  .hero-actions .text-link {
    width: fit-content;
  }

  .hero-readout {
    right: 22px;
    bottom: 25px;
    width: calc(100% - 44px);
  }

  .hero-orbit-ui {
    top: 18%;
    right: 9%;
    width: 150px;
  }

  .control-strip {
    width: calc(100% - 28px);
    margin-top: -18px;
    grid-template-columns: repeat(2, 1fr);
    padding: 8px;
    border-radius: 14px;
  }

  .control-strip div {
    min-height: 66px;
    padding: 11px;
  }

  .control-strip div:first-child {
    grid-column: 1 / -1;
  }

  .section-shell {
    width: calc(100% - 36px);
    padding-block: 110px;
  }

  .section-heading h2,
  .systems-copy h2,
  .faq-heading h2,
  .launch-copy h2 {
    font-size: clamp(3rem, 15vw, 5.4rem);
  }

  .process-vessel::before {
    left: 9px;
  }

  .process-deck {
    min-height: 0;
    padding: 34px 22px 38px 34px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .process-deck:hover {
    transform: translateX(5px);
  }

  .crew-console {
    border-radius: 18px;
  }

  .crew-portrait {
    min-height: 440px;
  }

  .system-map {
    min-height: 0;
    border-radius: 18px;
  }

  .handoff {
    border-radius: 18px;
  }

  .launch-cta {
    min-height: 680px;
    padding-inline: 22px;
    background-position: 68% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orbit-ui {
    animation: none;
  }

  .hero-visual::before,
  .process-deck,
  .system-stack span {
    transition: none;
  }
}
