/* ==========================================================================
   Global styles — shared across all N5 Sensors pages
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --navy: #051a33;
  --navy-light: #071e35;
  --navy-lighter: #0a2444;
  --ink: #f5f3ef;
  --ink-dim: rgba(245, 243, 239, 0.62);
  --ink-dimmer: rgba(245, 243, 239, 0.42);
  --orange: #f29a2e;
  --orange-dim: rgba(242, 154, 46, 0.14);
  --line: rgba(245, 243, 239, 0.1);
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Poppins", sans-serif;
  background: var(--navy);
  color: var(--ink);
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
.eyebrow {
  font-size: 20px;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--orange);
}
.btn-primary,
.btn-ghost {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 3px;
  text-decoration: none;
  transition:
    opacity 0.2s,
    background 0.2s,
    border-color 0.2s;
  display: inline-block;
}
.btn-primary {
  background: var(--orange);
  color: #1a0f00;
  border: 1px solid transparent;
}
.btn-primary:hover {
  opacity: 0.88;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(245, 243, 239, 0.28);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.65, 0.3, 1),
    transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
.tag-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tag-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--orange-dim);
  color: var(--orange);
}

/* STEP LIST (shared — used by index and contact pages) */
.step {
  display: flex;
  gap: 18px;
}
.step-num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.step h4 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
}
.step p {
  font-size: 16px;
  color: var(--ink-dim);
  line-height: 1.5;
}

/* SECTION LAYOUT (shared defaults — product detail pages; index/contact override) */
section {
  padding: 68px 80px;
}
.section-head {
  /* max-width: 640px; */
  margin-bottom: 32px;
}
.section-head h2:not(.eyebrow) {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.section-head p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--orange);
}

/* DETAIL HERO (product pages) */
.detail-hero {
  position: relative;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
}
.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/product-bg.jpg");
  background-size: cover;
  background-position: center;
}
.detail-hero-product {
  position: absolute;
  right: 14%;
  bottom: 0;
  height: 78%;
  max-width: 40%;
  object-fit: contain;
  z-index: 1;
}
.detail-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(5, 26, 51, 0.93) 0%,
    rgba(5, 26, 51, 0.75) 30%,
    rgba(5, 26, 51, 0.2) 45%,
    rgba(5, 26, 51, 0) 60%
  );
  z-index: 2;
}
.detail-hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 96px 80px 56px;
  max-width: 820px;
}
.detail-hero h1 {
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1.05;
  margin-bottom: 8px;
}
.detail-tagline {
  font-size: 18px;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 18px;
}
.detail-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-dim);
  max-width: 520px;
  margin-bottom: 32px;
}

/* FEATURES (product pages) */
.features-section {
  background: var(--navy-light);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-item {
  background: var(--navy-light);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px 26px;
}
.feature-item h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-item p {
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.6;
}

/* SPEC TABLE + IMAGE BLEED (product pages) */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.spec-table tr {
  border-bottom: 1px solid var(--line);
}
.spec-table tr:last-child {
  border-bottom: none;
}
.spec-table td {
  padding: 14px 20px;
  font-size: 13.5px;
  color: var(--ink-dim);
  vertical-align: top;
}
.spec-table td:first-child {
  font-weight: 700;
  color: var(--ink);
  width: 38%;
  white-space: nowrap;
}
.spec-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.detail-img-bleed {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--navy-lighter);
  margin-right: -80px;
  width: calc(100% + 80px);
  border-radius: 8px 0 0 8px;
  border-right: none;
}
.detail-img-bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-img-bleed figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(5, 26, 51, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-dim);
}

/* MORE PLATFORMS (product pages) */
.more-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.more-card {
  display: block;
  background: var(--navy-lighter);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 28px;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}
.more-card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 154, 46, 0.4);
}
.more-card .product-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  display: block;
  margin-bottom: 8px;
}
.more-card h4 {
  font-size: 19px;
  font-weight: 800;
}

/* CTA (shared) */
.cta-section {
  background: linear-gradient(135deg, var(--navy), #0e2745);
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 16px;
  color: var(--ink-dim);
  max-width: 520px;
  margin: 0 auto 36px;
}
.cta-section .btn-row {
  justify-content: center;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  height: 68px;
  background: rgba(5, 26, 51, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 243, 239, 0.07);
}
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img {
  height: 62px;
  width: auto;
}
.nav-links {
  display: flex;
  gap: 12px;
  list-style: none;
}
.nav-links a {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links > li > a::before,
.nav-links > li > a::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}
.nav-links > li > a::before {
  top: 0;
  left: 0;
  border-top: 3px solid var(--orange);
  border-left: 3px solid var(--orange);
}
.nav-links > li > a::after {
  bottom: 0;
  right: 0;
  border-bottom: 3px solid var(--orange);
  border-right: 3px solid var(--orange);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links > li > a:hover::before,
.nav-links > li > a:hover::after {
  opacity: 1;
}
.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.has-dropdown {
  position: relative;
}
.has-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 26px;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 200px;
  margin: 20px 30px;
  padding: 8px 0;
  list-style: none;
  background: rgba(5, 26, 51, 0.98);
  border: 2px solid var(--orange-dim);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    transform 0.2s,
    visibility 0.2s;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
}

/* FOOTER */
footer {
  padding: 20px 80px;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  order: 1;
  flex: 1 1 0;
  display: flex;
  align-items: center;
}
.footer-brand img {
  height: 62px;
  width: auto;
  margin-left: -10px;
}
.footer-contact {
  order: 3;
  flex: 1 1 0;
  display: flex;
  justify-content: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-dim);
  flex-flow: row-reverse;
  text-align: right;
}
.footer-address {
  line-height: 1.5;
}
.footer-contact a {
  color: var(--ink-dim);
  text-decoration: none;
}
.footer-contact a:hover {
  color: var(--ink);
}
.footer-copy {
  order: 2;
  flex: 1 1 0;
  text-align: center;
  font-size: 12px;
  color: var(--ink-dimmer);
}

@media (max-width: 1700px) {
  footer {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand contact"
      "copy contact";
    align-items: center;
    row-gap: 0;
    column-gap: 24px;
  }
  .footer-brand {
    grid-area: brand;
  }
  .footer-copy {
    grid-area: copy;
    text-align: left;
  }
  .footer-contact {
    grid-area: contact;
    flex-direction: column;
    gap: 6px;
  }
}

/* RESPONSIVE (shared) */
@media (max-width: 1400px) {
  nav {
    padding: 0 32px;
  }
  .nav-links {
    gap: 10px;
  }
  .nav-links a {
    font-size: 11.5px;
    letter-spacing: 0.04em;
  }
  .nav-right {
    gap: 16px;
  }
  .nav-cta {
    font-size: 11px;
    padding: 12px 20px;
  }
}
@media (max-width: 1200px) {
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    font-size: 10.5px;
    letter-spacing: 0.02em;
  }
  .nav-right {
    gap: 12px;
  }
  .nav-cta {
    font-size: 10px;
    padding: 10px 16px;
  }
}
@media (max-width: 1024px) {
  nav {
    padding: 0 24px;
  }
  section {
    padding: 56px 40px;
  }
  .detail-hero-product {
    display: none;
  }
  .detail-hero-gradient {
    background: linear-gradient(
      100deg,
      rgba(5, 26, 51, 0.94) 0%,
      rgba(5, 26, 51, 0.88) 60%,
      rgba(5, 26, 51, 0.8) 100%
    );
  }
  .detail-hero-inner {
    padding: 96px 40px 40px;
    max-width: 100%;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .spec-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .detail-img-bleed {
    margin-right: 0;
    width: auto;
    border-radius: 8px;
    border-right: 1px solid var(--line);
  }
  .more-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1070px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(5, 26, 51, 0.98);
    flex-direction: column;
    gap: 0;
    display: none;
    border-bottom: 1px solid rgba(245, 243, 239, 0.07);
  }
  nav.nav-open .nav-links {
    display: flex;
  }
  .nav-links a {
    font-size: 13px;
    letter-spacing: 0.06em;
    padding: 16px 24px;
    width: 100%;
    border-top: 1px solid rgba(245, 243, 239, 0.06);
  }
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .has-dropdown::after {
    display: none;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.15);
    padding: 0;
  }
  .dropdown-menu a {
    padding: 14px 24px 14px 40px;
    border-top: 1px solid rgba(245, 243, 239, 0.06);
  }
}
@media (max-width: 640px) {
  footer {
    padding: 40px 24px;
  }
  section {
    padding: 48px 24px;
  }
  .detail-hero {
    min-height: 460px;
  }
  .detail-hero-inner {
    padding: 88px 24px 32px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
