/* ==========================================================================
   AIMA INNOVATIONS SRL - Clean Engineering Stylesheet
   Rule 10: Plain HTML & CSS, zero external servers/CDNs, local assets only.
   Brand colors sourced from 8-logos-and-marketing: #170f79, #5331c7, #54c7f2.
   ========================================================================== */

:root {
  --font-sans: 'Bahnschrift', 'DIN Alternate', 'Franklin Gothic Medium', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Mono', 'Consolas', 'Courier New', monospace;

  --brand-navy: #170f79;
  --brand-indigo: #5331c7;
  --brand-cyan: #54c7f2;

  --radius-sm: 3px;
  --radius-md: 6px;
  --container-max: 1180px;
  --header-h: 76px;
}

/* ---------- LIGHT THEME (Default: Technical Engineering Paper) ---------- */
[data-theme="light"] {
  --bg-page: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-subtle: #edf1f8;
  --bg-header: #ffffff;
  --bg-footer: #0f1424;

  --text-primary: #0f172a;
  --text-secondary: #3b475e;
  --text-muted: #5d6a82;
  --text-on-dark: #edf2fa;
  --text-on-dark-muted: #9aa7bf;

  --border-subtle: #d8e0ee;
  --border-strong: #b8c6de;

  --accent-primary: #170f79;
  --accent-primary-hover: #24199e;
  --accent-secondary: #0b7dad;
  --accent-soft-bg: rgba(23, 15, 121, 0.06);
  --accent-soft-border: rgba(23, 15, 121, 0.18);

  --grid-line: rgba(23, 15, 121, 0.045);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);

  --missing-bg: #fff8eb;
  --missing-border: #d99b26;
  --missing-text: #7a4f01;
}

/* ---------- DARK THEME (Aerospace Instrument / Avionics Slate) ---------- */
[data-theme="dark"] {
  --bg-page: #0f0f10;
  --bg-surface: #161820;
  --bg-subtle: #1d202b;
  --bg-header: #0f0f10;
  --bg-footer: #090a0d;

  --text-primary: #eef2f9;
  --text-secondary: #b7c2d6;
  --text-muted: #8492ab;
  --text-on-dark: #eef2f9;
  --text-on-dark-muted: #8492ab;

  --border-subtle: #272c3b;
  --border-strong: #394158;

  --accent-primary: #54c7f2;
  --accent-primary-hover: #7ad5f6;
  --accent-secondary: #8369f2;
  --accent-soft-bg: rgba(84, 199, 242, 0.09);
  --accent-soft-border: rgba(84, 199, 242, 0.28);

  --grid-line: rgba(84, 199, 242, 0.05);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.35);

  --missing-bg: rgba(217, 155, 38, 0.11);
  --missing-border: #c58f24;
  --missing-text: #f3c96b;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

p, li, dd, .text-missing {
  overflow-wrap: anywhere;
}

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

a {
  color: var(--accent-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-primary-hover);
}

:focus-visible {
  outline: 2px solid var(--brand-cyan);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- HEADER & NAVIGATION ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

/* Unmodified official logo framed via CSS crop (Rule 8: never alter logo files) */
.brand-link {
  position: relative;
  display: block;
  width: 152px;
  height: 55px;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  position: absolute;
  width: 124.05%;
  max-width: none;
  height: auto;
  left: -14.28%;
  top: -104.38%;
  pointer-events: none;
}

[data-theme="light"] .brand-logo--dark { display: none; }
[data-theme="light"] .brand-logo--light { display: block; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: block; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link,
.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover,
.nav-dropdown-btn:hover,
.nav-dropdown-btn[aria-expanded="true"] {
  background-color: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}

.nav-dropdown-btn[aria-expanded="true"] .chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  padding: 6px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  list-style: none;
  margin: 0;
  display: none;
  z-index: 60;
}

.dropdown-menu.is-open {
  display: block;
}

.dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
}

.dropdown-link:hover {
  background-color: var(--accent-soft-bg);
  color: var(--accent-primary);
}

.dropdown-link strong {
  display: block;
  font-size: 0.94rem;
}

.dropdown-link span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Header Controls (Language + Theme Preview + Mobile Menu Button) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}

.seg-btn {
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--accent-primary);
  color: #ffffff;
}

[data-theme="dark"] .seg-btn.is-active {
  color: #0b0e17;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.theme-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

.hamburger {
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  display: block;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* Preview Notice Strip (Temporary for Page 1 Test) */
.preview-strip {
  background: var(--accent-soft-bg);
  border-bottom: 1px solid var(--accent-soft-border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 7px 0;
}

.preview-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  padding: 68px 0 64px;
  background-color: var(--bg-surface);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
  gap: 44px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin: 0 0 16px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--brand-cyan);
  display: inline-block;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.8vw, 3.05rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 58ch;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  color: #ffffff;
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:hover {
  color: #0b0e17;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Hero Right: Engineering Specification Panel */
.spec-panel {
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}

.spec-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.spec-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.spec-idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.spec-item strong {
  display: block;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.spec-item span {
  display: block;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- SHARED SECTION LAYOUT ---------- */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section--surface {
  background-color: var(--bg-surface);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin: 0 0 8px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.05rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

.section-intro {
  margin: 10px 0 0;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* ---------- RULE 6: TEXT MISSING MARKER ---------- */
.text-missing {
  margin-top: 16px;
  padding: 12px 14px;
  background-color: var(--missing-bg);
  border: 1px dashed var(--missing-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--missing-text);
}

.text-missing strong {
  display: inline-block;
  margin-right: 6px;
}

/* ---------- SERVICES SPLIT (2 COLUMNS) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tag-mono {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-border);
  color: var(--accent-primary);
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: 1.38rem;
  line-height: 1.25;
}

.service-card p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.detail-block {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.bullet-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.94rem;
  color: var(--text-primary);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 2px;
  background: var(--brand-cyan);
}

.specs-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.spec-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.spec-chip dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.spec-chip dd {
  margin: 3px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rd-feature {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.rd-thumb {
  width: 112px;
  height: 112px;
  object-fit: cover;
  object-position: center 42%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
}

.rd-feature h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.rd-feature p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.48;
  color: var(--text-secondary);
}

.card-footer-actions {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-link {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inline-link:hover {
  text-decoration: underline;
}

/* ---------- FAI SOFTWARE SNEAK PEEK BAND ---------- */
.fai-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 32px;
  align-items: center;
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--brand-cyan);
  border-radius: var(--radius-md);
  padding: 32px;
}

.fai-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(1.38rem, 2.2vw, 1.8rem);
  line-height: 1.24;
}

.fai-quote {
  margin: 0 0 14px;
  font-size: 1.04rem;
  color: var(--text-primary);
}

.fai-sub {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.fai-status-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.fai-status-box p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.fai-status-box p:last-child {
  margin-bottom: 0;
}

/* ---------- ABOUT PREVIEW SECTION ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.founder-frame {
  margin: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.founder-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.founder-caption {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
}

.founder-caption strong {
  display: block;
  font-size: 0.95rem;
}

.founder-caption span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.about-body p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  max-width: 66ch;
}

.collab-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 24px;
}

.collab-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.collab-item strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.collab-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- CONTACT BAND ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 32px;
  align-items: start;
}

.contact-email-card {
  background: var(--bg-page);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
}

.contact-dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.contact-dl dt {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.contact-dl dd {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background-color: var(--bg-footer);
  color: var(--text-on-dark);
  padding: 40px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.footer-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.footer-company {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.footer-legal {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-on-dark-muted);
  line-height: 1.65;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: flex-end;
}

.footer-links a,
.footer-links button {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-on-dark);
  text-decoration: none;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--brand-cyan);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  font-size: 0.82rem;
  color: var(--text-on-dark-muted);
}

/* ---------- FIRST-VISIT COOKIES / PRIVACY NOTICE BAR ---------- */
.privacy-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 980px;
  margin: 0 auto;
  z-index: 80;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--brand-cyan);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.privacy-bar[hidden] {
  display: none;
}

.privacy-bar-copy {
  flex: 1 1 360px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.privacy-bar-copy strong {
  color: var(--text-primary);
}

.privacy-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.84rem;
}

/* ---------- PRIVACY & COOKIES MODAL ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 12, 24, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-dialog h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.modal-dialog p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.84rem;
}

.cookie-table th,
.cookie-table td {
  text-align: left;
  padding: 9px 10px;
  border: 1px solid var(--border-subtle);
}

.cookie-table th {
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- RESPONSIVE: TABLET & PHONE ---------- */
@media (max-width: 960px) {
  .hero-grid,
  .services-grid,
  .fai-panel,
  .about-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 24px;
  }

  .founder-frame {
    max-width: 300px;
  }

  .collab-strip {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 8px 0;
    gap: 10px;
  }

  .brand-link {
    width: 118px;
    height: 43px;
  }

  .header-controls {
    gap: 6px;
  }

  .seg-btn {
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  .theme-btn {
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  .mobile-menu-btn {
    display: inline-flex;
    width: 36px;
    height: 36px;
  }

  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
  }

  .primary-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link,
  .nav-dropdown-btn {
    width: 100%;
    justify-content: space-between;
    padding: 11px 12px;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    margin-top: 4px;
    margin-left: 12px;
    border: 0;
    border-left: 2px solid var(--brand-cyan);
    border-radius: 0;
    background: transparent;
    padding: 0 0 0 10px;
  }

  .hero {
    padding: 44px 0 44px;
  }

  .section {
    padding: 44px 0;
  }

  .service-card,
  .fai-panel,
  .contact-email-card {
    padding: 20px;
  }

  .specs-inline {
    grid-template-columns: 1fr;
  }

  .rd-feature {
    grid-template-columns: 1fr;
  }

  .rd-thumb {
    width: 100%;
    height: 200px;
  }

  .privacy-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 14px;
  }
}


/* ==========================================================================
   MULTI-PAGE COMPONENTS (About Us, Quality Consulting, 3D Printing & R&D,
   FAI Soft, Privacy & Cookies Policy)
   ========================================================================== */

.nav-link.is-current,
.nav-dropdown-btn.is-current {
  color: var(--accent-primary);
  background-color: var(--accent-soft-bg);
  border-color: var(--accent-soft-border);
}

.dropdown-link.is-current {
  background-color: var(--accent-soft-bg);
  color: var(--accent-primary);
}

/* Sub-page Header Hero */
.page-hero {
  position: relative;
  padding: 52px 0 48px;
  background-color: var(--bg-surface);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  border-bottom: 1px solid var(--border-subtle);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  max-width: 24ch;
}

.page-hero-lead {
  margin: 0;
  font-size: 1.06rem;
  color: var(--text-secondary);
  max-width: 64ch;
}

.page-hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Homepage FAI Thumbnail */
.fai-thumb-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.fai-thumb-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.fai-thumb-cap {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Generic 2-column & 3-column Engineering Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.card--subtle {
  background: var(--bg-subtle);
  box-shadow: none;
}

.card--accent-left {
  border-left: 4px solid var(--brand-cyan);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.28;
}

.card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.card p:last-child {
  margin-bottom: 0;
}

/* Chronological Story Blocks (About Us) */
.story-stack {
  display: grid;
  gap: 28px;
}

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 32px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.story-row--reverse {
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
}

.story-step {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin: 0 0 8px;
}

.story-row h3 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  line-height: 1.25;
}

.story-row p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.story-row p:last-child {
  margin-bottom: 0;
}

.story-figure {
  margin: 0;
}

.story-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.story-img--portrait {
  aspect-ratio: 4 / 5;
  object-position: center top;
}

.story-img--heli {
  aspect-ratio: 4 / 5;
  object-position: center 35%;
}

.story-figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Publications & Thesis Cards */
.pub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.pub-meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-secondary);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pub-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.3;
}

.pub-card p {
  margin: 0 0 10px;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.pub-card p:last-child {
  margin-bottom: 0;
}

/* Specs Strip (4-up metrics) */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.metric-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.metric-box dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.metric-box dd {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* 3D Printing & R&D Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gallery-card {
  margin: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.gallery-card--wide {
  grid-column: span 2;
}

.gallery-img {
  width: 100%;
  height: 290px;
  object-fit: cover;
  object-position: center;
  background: #0c0e14;
}

.gallery-img--heli {
  height: 360px;
  object-position: center 45%;
}

.gallery-img--tall {
  height: 360px;
  object-position: center 30%;
}

.gallery-caption {
  padding: 16px 18px;
  border-top: 1px solid var(--border-subtle);
}

.gallery-caption strong {
  display: block;
  font-size: 0.96rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.gallery-caption span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.48;
}

/* FAI Soft Vertical Narrative Flow */
.fai-flow {
  display: grid;
  gap: 20px;
  max-width: 820px;
}

.fai-step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
}

.fai-step-card--direction {
  border-left-color: var(--brand-cyan);
}

.fai-step-card h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.fai-step-card p {
  margin: 0 0 12px;
  font-size: 1.02rem;
  color: var(--text-secondary);
}

.fai-step-card p:last-child {
  margin-bottom: 0;
}

.fai-showcase-figure {
  margin: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.fai-showcase-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.fai-showcase-figure figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* CTA Banner at bottom of sub-pages */
.cta-band {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 28px 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-band h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}

.cta-band p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 58ch;
}

/* Legal / Privacy Document */
.legal-doc {
  max-width: 820px;
  display: grid;
  gap: 22px;
}

.legal-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 26px;
}

.legal-section h2 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.legal-section p {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
}

/* Sub-page Responsive Overrides */
@media (max-width: 960px) {
  .grid-2,
  .grid-3,
  .story-row,
  .story-row--reverse,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card--wide {
    grid-column: span 1;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-row--reverse .story-figure {
    order: 2;
  }
}

@media (max-width: 600px) {
  .page-hero {
    padding: 36px 0 34px;
  }

  .story-row,
  .card,
  .pub-card,
  .fai-step-card,
  .cta-band,
  .legal-section {
    padding: 20px;
  }

  .metrics-strip {
    grid-template-columns: 1fr;
  }

  .gallery-img,
  .gallery-img--heli,
  .gallery-img--tall {
    height: 240px;
  }
}
