/* MARTINSEC front page */
:root {
  --navy: #14243B;
  --navy-2: #0d1929;
  --amber: #F0A202;
  --gray: #EEF1F5;
  --body: #1e2228;
  --body-dark: #b9c3d3;
  --blue: #2E6FDB;
  --purple: #7B2FBE;
  --red: #C0392B;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  background: var(--navy-2);
  color: var(--body);
  line-height: 1.6;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 2rem;
  background: rgba(13, 25, 41, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(240, 162, 2, 0.15);
}
.brand {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--gray); font-weight: 700; letter-spacing: 0.12em;
  text-decoration: none; font-size: 0.95rem;
}
.nav nav { display: flex; gap: 1.4rem; align-items: center; }
.nav nav a {
  color: var(--body-dark); text-decoration: none; font-size: 0.85rem;
  letter-spacing: 0.04em; transition: color 0.2s;
}
.nav nav a:hover { color: var(--amber); }
.nav-cta {
  border: 1px solid var(--amber); color: var(--amber) !important;
  padding: 0.35rem 0.9rem; border-radius: 4px;
}
.nav-cta:hover { background: rgba(240, 162, 2, 0.12); }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 50% -10%, rgba(46, 111, 219, 0.18), transparent 60%),
    radial-gradient(700px 400px at 80% 20%, rgba(123, 47, 190, 0.14), transparent 60%),
    linear-gradient(180deg, #0d1929 0%, #14243B 100%);
  color: var(--gray);
  padding: 4.5rem 2rem 4rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.25; letter-spacing: 0.01em;
  max-width: 60rem; margin: 0 auto;
}
.accent { color: var(--amber); }
.subline {
  margin: 1.2rem auto 0; max-width: 44rem;
  color: var(--body-dark); font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

/* ---------- carousel ---------- */
.carousel-wrap {
  display: grid; grid-template-columns: minmax(320px, 520px) minmax(300px, 460px);
  gap: 2.5rem; align-items: center; justify-content: center;
  margin-top: 3rem; text-align: left;
}
.stage-frame {
  background: linear-gradient(180deg, rgba(20, 36, 59, 0.6), rgba(10, 18, 30, 0.8));
  border: 1px solid rgba(240, 162, 2, 0.2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
#stage { width: 100%; aspect-ratio: 5 / 4; display: block; cursor: grab; touch-action: pan-y; }
#stage:active { cursor: grabbing; }
.stage-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1rem; border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 18, 30, 0.6);
}
.ctrl {
  background: transparent; color: var(--gray);
  border: 1px solid rgba(238, 241, 245, 0.25); border-radius: 6px;
  width: 2.2rem; height: 2.2rem; font-size: 1rem; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.ctrl:hover { border-color: var(--amber); color: var(--amber); }
.bird-label { text-align: center; line-height: 1.3; }
.bl-name { display: block; font-weight: 700; letter-spacing: 0.14em; font-size: 0.85rem; color: var(--gray); }
.bl-role { display: block; font-size: 0.78rem; color: var(--body-dark); transition: color 0.4s; }

/* panels */
.panels { position: relative; min-height: 21rem; }
.panel {
  position: absolute; inset: 0;
  background: rgba(238, 241, 245, 0.04);
  border: 1px solid rgba(238, 241, 245, 0.1);
  border-left: 3px solid var(--pc, var(--amber));
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  color: var(--gray);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}
.panel.active { opacity: 1; transform: translateY(0); pointer-events: auto; position: relative; }
.panel h2 { font-size: 1.1rem; letter-spacing: 0.05em; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; }
.dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--pc); box-shadow: 0 0 12px var(--pc); flex: none; }
.panel ul { list-style: none; }
.panel li { padding: 0.45rem 0 0.45rem 1.3rem; position: relative; font-size: 0.92rem; color: var(--body-dark); }
.panel li::before { content: "▸"; position: absolute; left: 0; color: var(--pc); }
.panel em { color: var(--amber); font-style: normal; font-weight: 600; }

/* ---------- section scaffolding ---------- */
section { padding: 4rem 2rem; }
.section-title {
  text-align: center; font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--gray); letter-spacing: 0.02em;
}
.section-sub { text-align: center; color: var(--amber); margin-top: 0.4rem; font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* how it works */
.how { background: var(--navy-2); }
.pipeline {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.5rem; margin-top: 2.5rem;
}
.pipeline li {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  min-width: 8.5rem; padding: 1.2rem 1rem;
  background: rgba(238, 241, 245, 0.04);
  border: 1px solid rgba(238, 241, 245, 0.1);
  border-radius: 10px; color: var(--gray); font-weight: 600;
  position: relative;
}
.pipeline li span { font-size: 0.7rem; color: var(--amber); letter-spacing: 0.2em; }
.pipeline li:not(:last-child)::after {
  content: "→"; position: absolute; right: -0.85rem; top: 50%;
  transform: translateY(-50%); color: var(--amber); z-index: 1;
}
.how-note { max-width: 46rem; margin: 2rem auto 0; text-align: center; color: var(--body-dark); font-size: 0.92rem; }

/* feature sections */
#birds { background: linear-gradient(180deg, #14243B, #0d1929); }
.feature {
  display: grid; grid-template-columns: 90px 1fr; gap: 1.6rem;
  max-width: 52rem; margin: 2.5rem auto 0;
  background: rgba(238, 241, 245, 0.04);
  border: 1px solid rgba(238, 241, 245, 0.1);
  border-left: 3px solid transparent;
  border-radius: 12px; padding: 1.8rem 2rem;
}
.feature[data-bird="blue"] { border-left-color: var(--blue); }
.feature[data-bird="purple"] { border-left-color: var(--purple); }
.feature[data-bird="red"] { border-left-color: var(--red); }
.feature-badge { width: 70px; }
.feature h3 { color: var(--gray); font-size: 1.05rem; letter-spacing: 0.06em; margin-bottom: 0.6rem; }
.feature p { color: var(--body-dark); font-size: 0.92rem; }
.feature ul { list-style: none; margin-top: 0.8rem; }
.feature li { font-size: 0.88rem; color: var(--body-dark); padding: 0.25rem 0 0.25rem 1.2rem; position: relative; }
.feature[data-bird="blue"] li::before { content: "●"; color: var(--blue); position: absolute; left: 0; font-size: 0.6rem; top: 0.55rem; }
.feature[data-bird="purple"] li::before { content: "●"; color: var(--purple); position: absolute; left: 0; font-size: 0.6rem; top: 0.55rem; }
.feature[data-bird="red"] li::before { content: "●"; color: var(--red); position: absolute; left: 0; font-size: 0.6rem; top: 0.55rem; }

/* evidence */
.evidence { background: var(--navy-2); }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; max-width: 62rem; margin: 2.5rem auto 0; }
.ev-card {
  background: rgba(240, 162, 2, 0.05);
  border: 1px solid rgba(240, 162, 2, 0.25);
  border-radius: 12px; padding: 1.6rem;
}
.ev-card h4 { color: var(--gray); font-size: 0.98rem; margin-bottom: 0.6rem; }
.ev-card p { color: var(--body-dark); font-size: 0.9rem; }

/* packaging */
.packaging { background: linear-gradient(180deg, #0d1929, #14243B); }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; max-width: 62rem; margin: 2.5rem auto 0; }
.pack {
  background: rgba(238, 241, 245, 0.04);
  border: 1px solid rgba(238, 241, 245, 0.12);
  border-top: 3px solid var(--amber);
  border-radius: 12px; padding: 1.6rem;
}
.pack h4 { color: var(--gray); font-size: 1rem; margin-bottom: 0.5rem; }
.pack p { color: var(--body-dark); font-size: 0.88rem; }

/* FAQ */
.faq { background: var(--navy-2); max-width: 52rem; margin: 0 auto; }
.faq details {
  background: rgba(238, 241, 245, 0.04);
  border: 1px solid rgba(238, 241, 245, 0.1);
  border-radius: 10px; margin-top: 1rem; padding: 1rem 1.4rem;
}
.faq summary { cursor: pointer; color: var(--gray); font-weight: 600; font-size: 0.95rem; }
.faq details[open] summary { color: var(--amber); margin-bottom: 0.5rem; }
.faq p { color: var(--body-dark); font-size: 0.9rem; }

/* contact */
.contact {
  background: linear-gradient(180deg, #14243B, #0a1220);
  text-align: center; border-top: 1px solid rgba(240, 162, 2, 0.25);
}
.contact h2 { color: var(--gray); font-size: clamp(1.3rem, 3vw, 1.9rem); }
.contact-cta { color: var(--body-dark); margin-top: 0.8rem; }
.contact address { font-style: normal; margin: 1.6rem 0; color: var(--gray); line-height: 2; }
.contact a { color: var(--amber); text-decoration: none; }
.contact a:hover { text-decoration: underline; }
.tagline { color: var(--body-dark); font-size: 0.82rem; max-width: 40rem; margin: 0 auto; opacity: 0.8; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .carousel-wrap { grid-template-columns: 1fr; }
  .panel { min-height: 0; }
  .panels { min-height: 0; }
}
@media (max-width: 640px) {
  .nav { padding: 0.7rem 1rem; }
  .nav nav { gap: 0.8rem; }
  .nav nav a:not(.nav-cta) { display: none; }
  .carousel-wrap { margin-top: 2rem; }
  .pipeline li { min-width: 5.5rem; font-size: 0.8rem; }
  .pipeline li:not(:last-child)::after { right: -0.7rem; }
  .feature { grid-template-columns: 1fr; }
  .feature-badge { width: 46px; }
  section { padding: 3rem 1.2rem; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .panel { transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}


/* --- stitch flow (how-it-stitches) --- */
.stitch { display:flex; align-items:stretch; gap:10px; margin:22px 0 10px; flex-wrap:wrap; }
.stitch-node { flex:1 1 240px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.12); border-radius:12px; padding:16px 18px; }
.stitch-node h4 { margin:0 0 6px; font-size:15px; }
.stitch-node p { margin:0; font-size:13.5px; color:#b9c4d4; line-height:1.55; }
.sn-purple h4 { color:#b57ae0; }
.sn-blue h4 { color:#5d93ec; }
.sn-red h4 { color:#e07a6a; }
.sn-platform { border-color:rgba(240,162,2,.45); background:rgba(240,162,2,.06); }
.sn-platform h4 { color:#F0A202; }
.stitch-arrow { align-self:center; font-size:22px; color:#6e7682; }
.stitch-join { text-align:center; font-size:22px; color:#6e7682; margin:6px 0; }

/* --- feedback meta --- */
.fb-meta { margin-top:10px; font-size:12px; color:#6e7682; font-style:italic; }


/* --- live sensor map --- */
.map-section { padding:60px 20px; }
.map-wrap { display:flex; flex-direction:column; align-items:center; max-width:900px; margin:24px auto 0; }
.map-wrap #threatmap { width:100%; }
.map-stats { width:100%; box-sizing:border-box; }
#threatmap { max-width:100%; height:auto; border:1px solid rgba(255,255,255,.12); border-radius:12px; background:#0d1929; }
.map-stats { flex:1 1 260px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.12); border-radius:12px; padding:16px 18px; }
.ms-head { font-size:14px; margin-bottom:12px; line-height:1.5; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; color:#d5dbe3; }
.ms-head b { color:#C0392B; font-size:26px; line-height:1; }
.ms-date { color:#6e7682; font-size:12px; }
.ms-row, .ms-table-head { display:grid; grid-template-columns: 1fr 1.4fr 90px; gap:8px; padding:6px 0; font-size:13px; font-family:Consolas,'Courier New',monospace; }
.ms-row { border-bottom:1px solid rgba(255,255,255,.07); }
.ms-table-head { font-size:10.5px; letter-spacing:.12em; color:#6e7682; border-bottom:1px solid rgba(240,162,2,.35); text-align:left; }
.ms-row .ms-n, .ms-table-head span:last-child { text-align:right; }
.ms-row:last-child { border-bottom:none; }
.ms-c { color:#d5dbe3; }
.ms-n { color:#C0392B; font-weight:600; }
.map-note { max-width:900px; margin:14px auto 0; font-size:12.5px; color:#9aa5b1; text-align:center; padding:0 20px; box-sizing:border-box; }


/* --- CTA button --- */
.cta-btn { display:inline-block; background:#F0A202; color:#14243B; font-weight:700;
  padding:14px 28px; border-radius:10px; text-decoration:none; font-size:16px;
  transition:transform .15s, box-shadow .15s; }
.cta-btn:hover { transform:translateY(-2px); box-shadow:0 6px 24px rgba(240,162,2,.35); }
.cta-note { margin-top:10px; font-size:12.5px; color:#6e7682; }

/* --- CTA button (override .contact a amber-on-amber) --- */
.contact a.cta-btn, a.cta-btn { color:#14243B !important; text-decoration:none; }
.cta-note { margin-top:10px; font-size:12.5px; color:#9aa5b1; }

.ms-table-head { display:flex; justify-content:space-between; gap:8px; padding:4px 0; font-size:10.5px;
  letter-spacing:.12em; color:#6e7682; border-bottom:1px solid rgba(240,162,2,.35); }
.ms-ip { color:#8fd0ff; }

.map-section .ms-row span, .map-section .ms-table-head span { text-align:left !important; }
.map-section .ms-row .ms-n, .map-section .ms-table-head span:last-child { text-align:right !important; }

/* --- live telemetry table --- */
.ms-row, .ms-table-head { grid-template-columns: 1.2fr 1.1fr 80px 64px; }
.ms-t { color:#6e7682; font-size:11.5px; text-align:right !important; }
.live-badge { display:inline-flex; align-items:center; gap:6px; margin-left:4px;
  font-size:10px; letter-spacing:.18em; color:#F0A202; font-weight:700;
  border:1px solid rgba(240,162,2,.45); border-radius:999px; padding:2px 9px; }
.live-dot { width:7px; height:7px; border-radius:50%; background:#F0A202; animation:livePulse 1.6s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow:0 0 0 0 rgba(240,162,2,.7); } 70% { box-shadow:0 0 0 7px rgba(240,162,2,0); } 100% { box-shadow:0 0 0 0 rgba(240,162,2,0); } }
@keyframes rowFlash { 0% { background:rgba(240,162,2,.22); } 100% { background:transparent; } }
.ms-new { animation:rowFlash 2.2s ease-out; }
@media (max-width:640px) { .ms-row, .ms-table-head { grid-template-columns:1fr 1fr 64px 56px; font-size:11.5px; } }
