/* ==========================================================================
   AUTOMOTION — Base layer (reset, typography, a11y, primitives)
   Depends on: tokens.css
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--am-bg);
  color: var(--am-text);
  font-family: var(--am-font-ui);
  font-size: var(--am-fs-body);
  line-height: var(--am-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--am-font-display);
  font-weight: 700;
  line-height: var(--am-lh-tight);
  margin: 0;
  letter-spacing: -0.015em;
}

p  { margin: 0 0 var(--am-4); }
p:last-child { margin-bottom: 0; }

ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---- Focus: always visible, always metallic green ----------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--am-green-action);
  outline-offset: 2px;
  border-radius: var(--am-r-sm);
}

/* ---- Numerals ----------------------------------------------------------- */
.am-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---- Icons -------------------------------------------------------------- */
.am-ico {
  width: 20px; height: 20px;
  flex: none;
  color: currentColor;
}
.am-ico--sm { width: 16px; height: 16px; }
.am-ico--lg { width: 24px; height: 24px; }

/* ---- Micro label -------------------------------------------------------- */
.am-label {
  font-size: var(--am-fs-xs);
  letter-spacing: var(--am-track-label);
  text-transform: uppercase;
  color: var(--am-muted);
  font-weight: 600;
}

/* ---- Layout primitives -------------------------------------------------- */
.am-wrap {
  width: 100%;
  max-width: var(--am-max);
  margin-inline: auto;
  padding-inline: var(--am-gutter);
}

.am-card {
  background: var(--am-panel);
  border: 1px solid var(--am-border);
  border-radius: var(--am-r-lg);
}

.am-rule { height: 1px; background: var(--am-border-soft); border: 0; margin: var(--am-6) 0; }

/* ---- Accessibility helpers ---------------------------------------------- */
.am-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.am-skip {
  position: absolute; left: var(--am-4); top: -100px; z-index: 200;
  background: var(--am-green-action); color: var(--am-on-action);
  padding: var(--am-3) var(--am-5); border-radius: var(--am-r);
  font-weight: 700;
}
.am-skip:focus { top: var(--am-4); }

[hidden] { display: none !important; }
