/* =========================================================
   ARUS ROBOTICS — SHARED SITE POLISH
   Conservative global layer for navigation, accessibility and
   non-page-specific interaction states.
   ========================================================= */

@layer arus-foundation {
  :root {
    --paper: #f2f0e9;
    --paper-2: #e5e2d8;
    --paper-3: #d6d3ca;
    --ink: #10110f;
    --ink-soft: #454740;
    --muted: #7b7d76;
    --blue: #1648ff;
    --orange: #ff5a1f;
    --acid: #d7ff38;
    --white: #ffffff;
    --line: rgba(16, 17, 15, 0.17);
    --line-light: rgba(255, 255, 255, 0.22);
    --max: 1500px;
    --max-width: 1500px;
    --gutter: 38px;
  }

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

  html {
    scroll-behavior: smooth;
  }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

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

  button,
  input,
  select,
  textarea {
    font: inherit;
  }

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

  .mono {
    font-family: "Courier New", Courier, monospace;
  }
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

html {
  overflow-x: hidden;
}

[id] {
  scroll-margin-top: 110px;
}

body.nav-locked {
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--orange);
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.form input:focus-visible,
.form textarea:focus-visible,
.form select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
}

.topic-option input:focus-visible + label,
.budget-option input:focus-visible + label {
  outline: 2px solid var(--blue);
  outline-offset: -4px;
}

.topic-fieldset {
  border: 0;
  min-inline-size: 0;
}

.topic-fieldset .topic-title {
  display: block;
  width: 100%;
  padding: 0;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  cursor: pointer;
  border-radius: 0;
}

.nav-toggle-lines {
  width: 17px;
  display: grid;
  gap: 5px;
}

.nav-toggle-lines span {
  display: block;
  height: 1px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav.menu-open .nav-toggle-lines span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav.menu-open .nav-toggle-lines span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

@media (min-width: 961px) {
  .nav .nav-links {
    gap: clamp(14px, 2vw, 34px);
  }
}

@media (max-width: 960px) {
  .container {
    width: min(
      calc(100vw - (var(--gutter) * 2)),
      var(--max, var(--max-width))
    );
  }

  .hero-grid > *,
  .hero-bottom > *,
  .intro-grid > *,
  .principles-header > *,
  .principles-grid > *,
  .cta-grid > *,
  .cta-bottom > *,
  .careers-grid > *,
  .careers-bottom > *,
  .people-grid > *,
  .people-profile > *,
  .prototype-grid > *,
  .location-grid > *,
  .location-data > *,
  .simulation-grid > *,
  .safety-grid > *,
  .safety-content > *,
  .stack-row > *,
  .role > * {
    min-width: 0;
  }

  .nav .nav-inner {
    min-height: 72px;
    grid-template-columns: 1fr auto;
  }

  .nav .nav-cta,
  .nav .nav-action {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    display: grid;
    justify-content: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--ink);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
  }

  .nav.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav .nav-links a {
    min-height: 54px;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    opacity: 1;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .nav .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav .nav-links a::after {
    content: none !important;
  }

  .nav .nav-links a.active,
  .nav .nav-links a[aria-current="page"] {
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
  }

  html:not(.js-ready) .nav .nav-inner {
    grid-template-columns: 1fr;
  }

  html:not(.js-ready) .nav-toggle {
    display: none;
  }

  html:not(.js-ready) .nav .nav-links {
    position: static;
    z-index: auto;
    grid-column: 1 / -1;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    border-bottom: 0;
  }
}

footer [data-future-page] {
  cursor: not-allowed;
  opacity: 0.42;
}

.site-footer .footer-grid {
  grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(120px, 1fr));
  gap: 42px;
}

.context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.context-actions .button {
  min-width: min(100%, 220px);
}

.role[data-future-page] {
  cursor: default;
}

@media (max-width: 1150px) {
  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-brand {
    grid-column: auto;
  }

  .site-footer .footer-bottom {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
