/* ==========================================================================
   Agile Vehicle Technologies — "Mission Brief" system
   One coherent language: every section is a full-screen cinematic SCREEN
   with a consistent technical rail + content block. Archivo / Inter / Mono.
   ========================================================================== */

:root {
  --bg: #0a0b0d;
  --bg-elev: #0f1115;
  --bg-data: #0c0e11;
  --fg: #f3f4f6;
  --fg-muted: #9a9fa8;
  --fg-dim: #62676f;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --hairline: rgba(255, 255, 255, 0.30);
  --accent: #c8a45c;
  --accent-bright: #e6c384;

  --maxw: 1480px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --pad: max(var(--gutter), calc(50vw - var(--maxw) / 2 + var(--gutter)));
  --nav-h: 66px;

  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --grade:
    linear-gradient(to top, rgba(8, 9, 11, 0.96) 0%, rgba(8, 9, 11, 0.22) 46%, rgba(8, 9, 11, 0.56) 100%),
    radial-gradient(115% 100% at 50% 28%, transparent 38%, rgba(0, 0, 0, 0.5) 100%);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(10, 11, 13, 0.94), rgba(10, 11, 13, 0.94)),
    url("../img/topo.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--accent); color: #0a0b0d; }
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 4px;
}

/* --------------------------------------------------------- type primitives */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 1.4rem; height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.7rem;
  transform: translateY(-2px);
}
.crumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
}
.crumb b { color: var(--accent); font-weight: 600; }
.crumb span { color: var(--fg-muted); }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

/* CTAs */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  background: var(--fg); color: #0a0b0d;
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  border-radius: 2px; border: 1px solid var(--fg);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: var(--accent-bright); border-color: var(--accent-bright); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--fg); color: #0a0b0d; border-color: var(--fg); }
.link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  color: var(--fg);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.3rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.link:hover { border-color: var(--accent); color: var(--accent-bright); }
.link .arrow { transition: transform 0.3s var(--ease); }
.link:hover .arrow { transform: translateX(4px); }

/* ============================================================= THE SCREEN
   Unified full-bleed full-height band. Every section uses this. */
.screen {
  position: relative;
  min-height: 100svh;
  display: block;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.screen + .screen { margin-top: -1px; }      /* collapse to a single 1px divide */

.screen__bg { position: absolute; inset: 0; z-index: 0; background: #000; }
.screen__bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.95) brightness(0.86);
  transition: transform 1.2s var(--ease), filter 0.7s var(--ease);
}
.screen:hover > .screen__bg img { transform: scale(1.035); filter: saturate(1) brightness(0.95); }
.screen__bg::after { content: ""; position: absolute; inset: 0; background: var(--grade); }

/* the consistent content frame: top rail + bottom block */
.screen__pad {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw);
  min-height: 100svh;
  margin-inline: auto;
  padding: calc(var(--nav-h) + 2.25rem) var(--pad) clamp(2rem, 4vw, 3rem);
  display: flex; flex-direction: column;
}
.screen__top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.screen__main { margin-top: auto; max-width: 620px; }
.screen__title {
  font-family: var(--font-display); font-weight: 700;
  line-height: 0.98; letter-spacing: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  margin: 1.1rem 0 0;
}
.screen__text {
  color: var(--fg-muted); font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55; margin-top: 1.1rem; max-width: 46ch;
}
.screen__actions { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.9rem; }

/* centered variant (contact) */
.screen--center .screen__pad { justify-content: center; text-align: center; align-items: center; }
.screen--center .screen__main { margin-inline: auto; max-width: 760px; }
.screen--center .screen__top { border-bottom-color: transparent; }
.screen--center .screen__bg::after {
  background: linear-gradient(rgba(8, 9, 11, 0.82), rgba(8, 9, 11, 0.92)),
    radial-gradient(115% 100% at 50% 30%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}
.screen--center .screen__actions { justify-content: center; }
.screen--center .kicker::before { display: none; }

/* data variant (intel/news) — dark, photo-free, signals a "data" screen */
.screen--data { background: var(--bg-data); }
.screen--data .screen__bg { display: none; }

/* ================================================================ HERO */
.hero,
.hero .screen__pad {
  min-height: 92svh;
}
.hero .screen__main { max-width: 940px; }
.hero .screen__title { font-size: clamp(2.8rem, 8.5vw, 6.75rem); }
.hero__summary {
  max-width: 62ch;
  margin-top: 1.15rem;
  color: var(--fg);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}
.stats {
  display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); flex-wrap: wrap;
  margin-top: 2.25rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.stat { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg-muted); letter-spacing: 0.04em; }
.stat b { color: var(--fg); font-weight: 600; font-size: 1.05rem; margin-right: 0.45rem; }

/* =========================================================== PLATFORMS (products) */
.product .screen__main { max-width: 560px; }
.product .screen__title { font-size: clamp(2.4rem, 5.5vw, 4.25rem); }
.product .screen__cat {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); margin-top: 1.4rem; display: block;
}
.product__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.55rem;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
  max-width: 680px;
}
.product__facts div {
  min-width: 0;
  background: rgba(10, 11, 13, 0.74);
  padding: 0.9rem 1rem;
}
.product__facts dt {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.product__facts dd {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0.35rem;
}

/* ========================================================= CAPABILITIES */
.capabilities .screen__pad {
  gap: clamp(2rem, 5vw, 4.5rem);
}
.capabilities .screen__main {
  margin-top: auto;
  max-width: 840px;
}
.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background:
    linear-gradient(rgba(12, 14, 17, 0.92), rgba(12, 14, 17, 0.92)),
    url("../img/topo.svg");
  background-size: cover;
  border: 1px solid var(--border-strong);
}
.capability {
  min-height: 250px;
  padding: clamp(1.2rem, 2.2vw, 1.8rem);
  background: rgba(15, 17, 21, 0.88);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.capability__label {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: auto;
}
.capability h3 {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}
.capability p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 0.75rem;
}

/* ============================================================ METHOD (capabilities) */
.methods {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 2.5rem; width: 100%; max-width: var(--maxw);
}
.method__num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); letter-spacing: 0.08em; }
.method__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.4rem); margin: 0.5rem 0 0.55rem; letter-spacing: 0; }
.method__text { color: var(--fg-muted); font-size: 0.95rem; line-height: 1.55; }
.screen.method .screen__main { max-width: none; }

/* =========================================================== NEWSROOM (3-up) */
.screen.newsroom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  gap: 1px;
  background: var(--hairline);
}
.news-card {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; background: #000;
}
.news-card > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.95) brightness(0.85);
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
}
.news-card:hover > img { transform: scale(1.05); filter: saturate(1) brightness(0.95); }
.news-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 9, 11, 0.96) 0%, rgba(8, 9, 11, 0.12) 52%, rgba(8, 9, 11, 0.5) 100%);
}
.news-card__inner { position: relative; z-index: 2; padding: clamp(1.5rem, 3vw, 2.5rem); }
.news__meta {
  display: flex; align-items: center; gap: 0.85rem;
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--fg-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.news__cat { color: var(--accent); font-weight: 600; }
.news__title {
  font-family: var(--font-display); font-weight: 700;
  line-height: 1.08; letter-spacing: 0;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  margin-top: 0.7rem; transition: color 0.25s var(--ease);
}
.news-card:hover .news__title { color: var(--accent-bright); }

/* ================================================================ NAV */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 13, 0.8);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 2rem;
}
.nav__brand { display: flex; align-items: center; flex-shrink: 0; }
.nav__logo { height: 28px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 0.2rem; margin-left: auto; }
.nav__item { position: relative; }
.nav__link {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  color: var(--fg-muted); transition: color 0.25s var(--ease);
}
.nav__link:hover,
.nav__link.active { color: var(--fg); }
.nav__link.active {
  background: rgba(255, 255, 255, 0.06);
}
.nav__link .caret {
  width: 9px; height: 9px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: 0.6;
  transition: transform 0.25s var(--ease);
}
.nav__item:hover .caret { transform: rotate(225deg) translateY(0); }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 320px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
.nav__item:hover .dropdown, .nav__item:focus-within .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.dropdown__link { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.7rem 0.85rem; border-radius: 4px; transition: background 0.2s var(--ease); }
.dropdown__link:hover { background: rgba(255, 255, 255, 0.05); }
.dropdown__name { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--fg); }
.dropdown__tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-dim); }
.nav__cta {
  margin-left: 0.5rem; padding: 0.6rem 1.25rem;
  background: var(--fg); color: #0a0b0d;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  border-radius: 2px; transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav__cta:hover { background: var(--accent-bright); transform: translateY(-1px); }
.nav__toggle { display: none; }

/* =============================================================== FOOTER */
.footer { background: var(--bg); border-top: 1px solid var(--hairline); padding-block: clamp(3.5rem, 6vw, 5rem) 2rem; }
.footer__top {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 3rem;
  padding-bottom: 3.5rem; border-bottom: 1px solid var(--border);
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}
.footer__brand .nav__logo { height: 36px; margin-bottom: 1.25rem; }
.footer__brand p { color: var(--fg-dim); font-size: 0.92rem; max-width: 34ch; }
.footer__col h4 {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 1.25rem;
}
.footer__col li { margin-bottom: 0.7rem; }
.footer__col a { color: var(--fg-muted); font-size: 0.95rem; transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--fg); }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 2rem var(--gutter) 0; flex-wrap: wrap;
  max-width: var(--maxw); margin-inline: auto;
}
.footer__copy { font-family: var(--font-mono); color: var(--fg-dim); font-size: 0.8rem; letter-spacing: 0.04em; }
.footer__social { display: flex; gap: 0.5rem; }
.footer__social a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%; color: var(--fg-muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.footer__social a:hover { color: var(--fg); border-color: var(--border-strong); background: var(--bg-elev); }
.footer__social svg { width: 16px; height: 16px; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1024px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer__brand { grid-column: 1 / -1; }
  .methods { grid-template-columns: 1fr 1fr; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --nav-h: 60px; }
  .nav__links, .nav__cta {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: rgba(10, 11, 13, 0.98); backdrop-filter: blur(16px);
    padding: 1rem var(--gutter) 2.5rem; border-bottom: 1px solid var(--border);
    transform: translateY(-130%); transition: transform 0.45s var(--ease);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav__links.open, .nav__cta.open { transform: translateY(0); }
  .nav__cta {
    inset: auto 0 0 0;
    max-height: none;
    padding: 1rem var(--gutter) 1.5rem;
    transform: translateY(130%);
    text-align: center;
  }
  .nav__cta.open { transform: translateY(0); }
  .nav__link { padding: 1rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--border); }
  .nav__link.active { background: transparent; color: var(--accent-bright); }
  .nav__link .caret { margin-left: auto; }
  .dropdown { position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto; box-shadow: none; border: none; min-width: 0; background: transparent; padding: 0 0 0.5rem; }
  .dropdown__link { padding: 0.85rem 0 0.85rem 1rem; }
  .nav__toggle { display: flex; flex-direction: column; gap: 5px; margin-left: auto; padding: 8px; }
  .nav__toggle span { width: 24px; height: 2px; background: var(--fg); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
  .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .screen { min-height: 88svh; }
  .hero,
  .hero .screen__pad { min-height: 88svh; }
  .screen__top { flex-wrap: wrap; }
  .product__facts { grid-template-columns: 1fr; }
  .methods { grid-template-columns: 1fr; gap: 1.75rem; }
  .capabilities .screen__pad { min-height: auto; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability { min-height: 210px; }
  .screen.newsroom { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; }
  .news-card { min-height: 60svh; }
  .screen--center .screen__pad { align-items: flex-start; text-align: left; }
  .screen--center .screen__actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 16px; background-attachment: scroll; }
  .screen__pad { padding-inline: var(--gutter); }
  .screen__actions { gap: 1rem; }
  .btn { width: 100%; justify-content: center; }
  .stats { gap: 1rem; }
  .stat { flex: 1 1 100%; }
  .footer__top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
