/* Airfide Networks — website revamp
   Dark navy + cyan, system font stack, no external dependencies.
   Mobile-first, responsive, accessible. */

:root {
  --navy-900: #071120;
  --navy-800: #0a1628;
  --navy-700: #0e2038;
  --navy-600: #14304f;
  --cyan: #22d3ee;
  --cyan-dim: #67e8f9;
  --cyan-dark: #0e7490;
  --text: #dbe7f3;
  --text-dim: #9db4c8;
  --text-bright: #ffffff;
  --border: rgba(148, 196, 226, 0.18);
  --card-bg: rgba(255, 255, 255, 0.03);
  --radius: 12px;
  --max-width: 1160px;
  --header-h: 68px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--navy-800);
  overflow-x: hidden;
}

h1, h2, h3 {
  color: var(--text-bright);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: var(--cyan-dim); }
a:hover { color: var(--cyan); }

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  background: var(--cyan);
  color: #04222b;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  z-index: 200;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #04222b; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

.accent { color: var(--cyan); }
.center { text-align: center; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.9em;
}

.section-lede {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 46rem;
}

.fine-print {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 17, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-bright);
  flex-shrink: 0;
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
}
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  color: var(--cyan);
  font-weight: 700;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--text-bright);
  background: rgba(34, 211, 238, 0.1);
}

.primary-nav a.nav-cta,
.btn-primary {
  background: var(--cyan);
  color: #04222b;
}
.primary-nav a.nav-cta:hover,
.primary-nav a.nav-cta:focus-visible {
  background: var(--cyan-dim);
  color: #04222b;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--text-bright);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5.5rem 0 6.5rem;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--navy-800);
  overflow: hidden;
}

.hero-inner { max-width: 56rem; }

.hero h1 { margin-bottom: 0.5em; }

.hero-sub {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 48rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.8rem 0 1.2rem;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin: 0;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: #04222b; }
.btn-primary:hover { background: var(--cyan-dim); color: #04222b; }
.btn-ghost {
  background: transparent;
  color: var(--text-bright);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan-dim); }

.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: radial-gradient(ellipse 90% 100% at 50% 120%, rgba(34, 211, 238, 0.12), transparent 70%);
  pointer-events: none;
}

/* ---------- Stats strip ---------- */
.stats {
  background: var(--navy-900);
  border-block: 1px solid var(--border);
  padding: 2.6rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat { text-align: center; padding: 0.5rem; }
.stat-value {
  display: block;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; scroll-margin-top: calc(var(--header-h) + 8px); }
.section-alt { background: var(--navy-900); border-block: 1px solid var(--border); }

.section-head { margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: 0.4em; }

/* ---------- Sensing chain ---------- */
.chain {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: chain;
}

.chain-step {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.3rem;
}
.chain-step h3 { font-size: 1.05rem; margin: 0.7em 0 0.35em; }
.chain-step p { font-size: 0.95rem; color: var(--text-dim); margin: 0; }

.chain-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  font-weight: 800;
  font-size: 0.95rem;
  border: 1px solid rgba(34, 211, 238, 0.4);
}

/* ---------- Cards ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.45em; }
.card p { color: var(--text-dim); margin: 0; font-size: 0.98rem; }

/* ---------- Check lists ---------- */
.check-list {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.85em;
  color: var(--text-dim);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.32em;
  width: 1.05rem; height: 1.05rem;
  background: var(--cyan);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.check-list li strong { color: var(--text-bright); font-weight: 700; }

/* ---------- Split layout (UAV) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split-text .section-lede { margin-bottom: 1.4em; }

.radar-figure { margin: 0; }
.radar-figure canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #04101f;
}
.radar-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- Tabs ---------- */
.tabs { margin-bottom: 2.5rem; }

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  color: var(--text-dim);
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.8rem 1.3rem;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-bright); background: rgba(255, 255, 255, 0.04); }
.tab-btn.is-active {
  color: var(--cyan);
  background: var(--navy-700);
  border-color: var(--border);
}

.tab-panel {
  background: var(--navy-700);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.8rem;
}
.tab-panel h3 { margin-bottom: 0.5em; }
.tab-panel > p { color: var(--text-dim); }
.tab-panel .check-list { margin-bottom: 0; }

/* ---------- Dashboard note ---------- */
.dashboard-note {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--cyan);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  background: var(--card-bg);
}
.dashboard-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin: 0 0 0.3em;
}
.dashboard-label { font-weight: 600; color: var(--text-bright); }
.dashboard-value { font-size: 1.6rem; font-weight: 800; color: var(--cyan); }
.dashboard-delta { font-size: 0.95rem; font-weight: 700; color: #4ade80; }
.dashboard-note .fine-print { margin: 0; }

/* ---------- Enablers table ---------- */
.table-wrap { margin-top: 3rem; overflow-x: auto; }
.table-title { margin-bottom: 1rem; }

table.enablers {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 560px;
}
.enablers th,
.enablers td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.enablers thead th {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  border-bottom: 2px solid rgba(34, 211, 238, 0.35);
}
.enablers tbody tr:hover { background: rgba(34, 211, 238, 0.05); }
.enablers td:first-child { font-weight: 700; color: var(--text-bright); white-space: nowrap; }
.enablers td:nth-child(2) { color: var(--text-dim); }

.loi-note {
  margin-top: 2.2rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text-dim);
}
.loi-note strong { color: var(--text-bright); }

/* ---------- Partners ---------- */
.wordmarks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem 2.2rem;
}
.wordmarks li {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 0.5rem 0.4rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.wordmarks li:hover { color: var(--text-bright); border-bottom-color: var(--cyan); }

/* ---------- Contact ---------- */
.contact-section {
  background:
    radial-gradient(ellipse 55% 80% at 50% 120%, rgba(34, 211, 238, 0.16), transparent 65%),
    var(--navy-900);
  border-top: 1px solid var(--border);
  text-align: center;
}
.contact-inner { max-width: 44rem; margin-inline: auto; }
.contact-inner .section-lede { margin-inline: auto; }
.contact-details {
  text-align: left;
  display: inline-block;
  margin: 0.5rem auto 1.6rem;
  color: var(--text-dim);
}
.contact-details p { margin: 0.35em 0; }
.contact-details strong { color: var(--text-bright); }
.placeholder {
  color: #fbbf24;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  border-top: 1px solid var(--border);
  padding: 2.8rem 0 2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; margin: 0.6rem 0 0; }
.footer-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.2rem;
}
.footer-nav a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--cyan-dim); }
.footer-legal {
  flex-basis: 100%;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
}

/* ---------- Brand logo (from airfidenet.com) ---------- */
.logo-chip {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  line-height: 0;
}
.logo-chip img {
  height: 34px;
  width: auto;
  display: block;
}
.logo-chip-sm img { height: 28px; }

/* ---------- Media figures, images & video ---------- */
.media-figure { margin: 0; }
.media-figure img,
.media-figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--navy-900);
}
.media-figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.hero-figure { margin: 2.2rem 0 0; }
.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 3rem;
  align-items: start;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.panel-media { margin-top: 1.6rem; }

.card-media { margin-bottom: 1.1rem; }

.dashboard-figure { margin-top: 2rem; }

.shots-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2rem;
  align-items: start;
}

/* Single-figure rows (after picture removals): one figure spans the full row */
.figure-row.figure-row--single,
.shots-row.shots-row--single { grid-template-columns: 1fr; }

.media-grid + .gallery-strip,
.shots-row + .media-grid { margin-top: 2rem; }

/* ---------- Sensor gallery strip ---------- */
.gallery-strip {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.4rem 0.1rem 0.9rem;
  margin-top: 2rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.gallery-strip img {
  height: 168px;
  width: auto;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  object-fit: cover;
}

/* ---------- Partner logo strip ---------- */
.logo-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.9rem;
}
.logo-strip li {
  background: #ffffff;
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5rem;
}
/* MaxLinear logo is supplied on a black background — dark chip so it reads as a logo, not a black rectangle on white. */
.logo-strip li.logo-dark {
  background: #000000;
}
.logo-strip img {
  max-height: 40px;
  max-width: 150px;
  width: auto;
  height: auto;
  display: block;
}

/* ---------- News & events ---------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.events-grid .media-figure img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- News ---------- */
.news-list { display: grid; gap: 2.6rem; }
.news-item { border-top: 1px solid var(--border); padding-top: 2rem; }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item h3 { font-size: 1.3rem; line-height: 1.35; margin-bottom: 0.6em; }
.news-item h3 a { color: var(--text-bright); text-decoration: none; }
.news-item h3 a:hover { color: var(--cyan); text-decoration: underline; }
.news-item p { color: var(--text-dim); max-width: 56rem; }
.news-item .events-grid { margin-top: 1.6rem; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .chain { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .events-grid { grid-template-columns: 1fr 1fr; }
  .shots-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--navy-900);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .primary-nav a { padding: 0.75rem 0.8rem; }
  .primary-nav a.nav-cta { text-align: center; margin-top: 0.4rem; }

  .hero { padding: 3.5rem 0 4.5rem; }
  .section { padding: 3.5rem 0; }
}

@media (max-width: 560px) {
  .chain { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .tab-btn { padding: 0.7rem 0.85rem; font-size: 0.9rem; }
  .tab-panel { padding: 1.3rem; }
  .figure-row,
  .media-grid,
  .events-grid,
  .shots-row { grid-template-columns: 1fr; }
  .gallery-strip img { height: 132px; }
  .logo-chip img { height: 28px; }
  .logo-strip li { min-width: 7rem; padding: 0.6rem 0.8rem; }
}

@media (max-width: 640px) {
  /* Enablers table becomes stacked cards — no sideways scroll on phones */
  .table-wrap { overflow-x: visible; }
  table.enablers { min-width: 0; display: block; }
  .enablers thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .enablers tbody,
  .enablers tr { display: block; }
  .enablers tbody tr {
    margin-bottom: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    padding: 0.9rem 1rem;
  }
  .enablers tbody tr:hover { background: var(--card-bg); }
  .enablers td { display: block; border-bottom: 0; padding: 0; }
  .enablers td:first-child { font-size: 1rem; margin-bottom: 0.25rem; }
}
