/* ============================================================
   Airinfotek — Design tokens
   Concept: circuit trace meets trade route. Deep gulf-night navy,
   brand teal kept for continuity with /shop/, copper as a second
   accent nodding to PCB traces + the desert.
   ============================================================ */
:root {
  --navy-950: #0B1420;
  --navy-900: #101B2B;
  --navy-800: #162336;
  --surface: #121D2E;
  --border: rgba(148, 163, 184, 0.16);
  --teal: #00A896;
  --teal-soft: rgba(0, 168, 150, 0.14);
  --copper: #E0A458;
  --text-hi: #EDF2F7;
  --text-mid: #C3CEDD;
  --text-mute: #8A97AC;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--navy-950);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

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

h1, h2, h3 { font-family: var(--font-display); color: var(--text-hi); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 18px; }
h3 { font-size: 1.25rem; margin-bottom: 10px; }
p { margin-bottom: 18px; color: var(--text-mid); }
strong { color: var(--text-hi); font-weight: 600; }
a { color: inherit; text-decoration: none; }

.tagline {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--copper);
  margin-bottom: 14px;
}

blockquote {
  border-left: 2px solid var(--teal);
  padding: 4px 0 4px 20px;
  margin: 24px 0 6px;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-hi);
}

/* ============ Nav ============ */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(11, 20, 32, 0.72);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.nav-container { max-width: var(--container); margin: 0 auto; padding: 0 28px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.02em; color: var(--text-hi); }
.logo-accent { color: var(--teal); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.92rem; color: var(--text-mid); transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--text-hi); }
.btn-nav {
  border: 1px solid var(--teal);
  color: var(--teal) !important;
  padding: 8px 18px;
  border-radius: 999px;
  transition: all 0.2s var(--ease);
}
.btn-nav:hover { background: var(--teal); color: var(--navy-950) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text-hi); transition: transform 0.25s var(--ease), opacity 0.2s; }
.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); }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s var(--ease);
}
.btn-primary { background: var(--teal); color: var(--navy-950); }
.btn-primary:hover { background: #05bfa9; transform: translateY(-1px); }
.btn-secondary { border: 1px solid var(--border); color: var(--text-hi); }
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }
.btn-block { width: 100%; text-align: center; border: none; cursor: pointer; }
.btn-link { color: var(--teal); font-weight: 500; font-size: 0.92rem; }
.btn-link:hover { color: var(--copper); }

/* ============ Hero ============ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 28px 100px;
  overflow: hidden;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, #16233a 0%, var(--navy-950) 60%);
}
.trade-route-canvas { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.route-svg { width: 100%; height: 100%; }
.trace { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s var(--ease) forwards; }
.trace:nth-of-type(1) { animation-delay: 0.1s; }
.trace:nth-of-type(2) { animation-delay: 0.3s; }
.trace:nth-of-type(3) { animation-delay: 0.5s; }
.trace:nth-of-type(4) { animation-delay: 0.2s; }
.trace:nth-of-type(5) { animation-delay: 0.4s; }
.trace:nth-of-type(6) { animation-delay: 0.6s; }
.trace:nth-of-type(7) { animation-delay: 0.35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.node { opacity: 0; animation: nodeIn 0.5s ease forwards 1.8s; }
.node.hub { fill: var(--teal); r: 7; animation: nodeIn 0.5s ease forwards 0.2s, pulse 2.4s ease-in-out infinite 2.3s; }
@keyframes nodeIn { to { opacity: 1; } }
@keyframes pulse { 0%,100% { r: 7; opacity: 1; } 50% { r: 10; opacity: 0.7; } }

.hero-content { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em; color: var(--copper); }
.hero-title { font-size: clamp(2.4rem, 5.2vw, 4.1rem); margin: 18px 0 22px; }
.hero-title em { font-style: normal; color: var(--teal); }
.hero-subtitle { font-size: 1.1rem; color: var(--text-mid); max-width: 600px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.reveal-line { display: inline-block; opacity: 0; transform: translateY(16px); animation: lineUp 0.7s var(--ease) forwards; }
.hero-title .reveal-line { display: block; }
.hero-title .reveal-line:nth-child(1) { animation-delay: 0.15s; }
.hero-title .reveal-line:nth-child(2) { animation-delay: 0.3s; }
.hero-subtitle.reveal-line { animation-delay: 0.5s; }
.hero-actions.reveal-line { animation-delay: 0.68s; }
@keyframes lineUp { to { opacity: 1; transform: translateY(0); } }

.scroll-indicator { position: absolute; bottom: 36px; left: 28px; z-index: 1; display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-mute); letter-spacing: 0.06em; }
.arrow-down { width: 1px; height: 28px; background: linear-gradient(var(--text-mute), transparent); }

body.reduced-motion .trace,
body.reduced-motion .node,
body.reduced-motion .reveal-line { animation: none; opacity: 1; stroke-dashoffset: 0; transform: none; }

/* ============ Story / Spec sheet ============ */
.story-section { padding: 120px 0; border-top: 1px solid var(--border); }
.grid-2 { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; }
.grid-2.align-start { align-items: start; }
.grid-2.align-center { align-items: center; }

.spec-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.spec-sheet.in-view { opacity: 1; transform: translateY(0); }
.spec-sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
}
.spec-label { color: var(--text-hi); }
.spec-rev { color: var(--text-mute); }
.spec-rows { display: flex; flex-direction: column; }
.spec-row {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt { font-family: var(--font-mono); font-size: 0.76rem; color: var(--copper); letter-spacing: 0.04em; text-transform: uppercase; padding-top: 2px; }
.spec-row dd { color: var(--text-hi); font-size: 0.95rem; }

/* ============ Specialties ============ */
.specialties-section { padding: 120px 0; background: var(--navy-900); border-top: 1px solid var(--border); }
.section-header { max-width: 640px; margin: 0 auto 60px; text-align: center; }
.section-header p { font-size: 1.05rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.specialty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
  opacity: 0; transform: translateY(20px);
}
.specialty-card.in-view { opacity: 1; transform: translateY(0); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), border-color 0.3s; }
.specialty-card:hover { transform: translateY(-4px); border-color: var(--teal); }
.icon-wrap { width: 48px; height: 48px; color: var(--teal); margin-bottom: 20px; }
.icon-wrap svg { width: 100%; height: 100%; }
.specialty-card p { font-size: 0.95rem; }

/* ============ Network / map ============ */
.network-section { padding: 120px 0; border-top: 1px solid var(--border); }
.stats-row { display: flex; gap: 40px; margin-top: 30px; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--teal); }
.stat-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-mute); letter-spacing: 0.06em; margin-top: 4px; }

.network-visual { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.network-visual.in-view { opacity: 1; transform: translateY(0); }
.map-svg { width: 100%; height: auto; }
.arc { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 2s var(--ease) forwards; }
.network-visual.in-view .arc:nth-child(1) { animation-delay: 0.1s; }
.network-visual.in-view .arc:nth-child(2) { animation-delay: 0.25s; }
.network-visual.in-view .arc:nth-child(3) { animation-delay: 0.4s; }
.network-visual.in-view .arc:nth-child(4) { animation-delay: 0.55s; }
.network-visual.in-view .arc:nth-child(5) { animation-delay: 0.7s; }
.hub-ring { transform-origin: 200px 160px; animation: ring 2.4s ease-in-out infinite; }
@keyframes ring { 0% { r: 6; opacity: 1; } 100% { r: 22; opacity: 0; } }
.hub-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; fill: var(--text-mute); letter-spacing: 1px; }

/* ============ Contact ============ */
.contact-section { padding: 120px 0; background: var(--navy-900); border-top: 1px solid var(--border); }
.contact-box {
  max-width: 640px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 50px 44px;
  opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.contact-box.in-view { opacity: 1; transform: translateY(0); }
.contact-box .section-header { margin-bottom: 34px; text-align: left; max-width: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  background: var(--navy-950);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.contact-form textarea { grid-column: 1 / -1; resize: vertical; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-mute); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--teal); }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.form-status { min-height: 22px; font-size: 0.9rem; margin-top: 4px; margin-bottom: 0; }
.form-status.success { color: var(--teal); }
.form-status.error { color: #E8837A; }

.contact-form button:disabled { opacity: 0.7; cursor: not-allowed; }

/* ============ Footer ============ */
.footer { padding: 64px 0 28px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 0.88rem; margin-top: 12px; max-width: 320px; }
.footer-links h4, .footer-info h4 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--text-mute); margin-bottom: 14px; font-weight: 500; }
.footer-links a, .footer-info p { display: block; font-size: 0.9rem; color: var(--text-mid); margin-bottom: 10px; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; font-size: 0.85rem; color: var(--text-mute); }

/* ============ Focus visibility ============ */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 64px; right: 0; left: 0;
    background: var(--navy-900); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease);
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { width: 100%; padding: 14px 28px; border-bottom: 1px solid var(--border); }
  .btn-nav { margin: 14px 28px; display: inline-block; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .story-section, .specialties-section, .network-section, .contact-section { padding: 80px 0; }
}
