/* =========================================
   SynapseHealthTech – Global & Responsive CSS
   ========================================= */

/* ----- CSS Variables ----- */
:root {
  --bg: #0F0E0B;
  --bg2: #161410;
  --bg3: #1D1A14;
  --fg: #EFEBE2;
  --sub: #706960;
  --faint: #252219;
  --a: #BEFC42;
  --adim: rgba(190, 252, 66, 0.10);
  --ln: rgba(239, 235, 226, 0.07);
  --lnh: rgba(239, 235, 226, 0.14);
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  cursor: none;
  opacity: 0;
  animation: pi .45s .1s ease forwards;
}
@keyframes pi {
  to { opacity: 1; }
}

/* ----- Custom Cursor ----- */
#dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--a);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: exclusion;
  transition: width .2s, height .2s;
}
body.lh #dot {
  width: 30px;
  height: 30px;
}

/* ----- Typography Utilities ----- */
.mono {
  font-family: 'Chivo Mono', monospace;
}
.ct {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5%;
}
.sl {
  font-family: 'Chivo Mono', monospace;
  font-size: .67rem;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sub);
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.sl::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ln);
}
.h-label {
  font-family: 'Chivo Mono', monospace;
  font-size: .67rem;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sub);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.h-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--a);
  flex-shrink: 0;
}

/* ----- Fade Animation (JS triggered) ----- */
.fade {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade.on {
  opacity: 1;
  transform: none;
}
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }



/* ========== NAVIGATION (FIXED) ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 5%;
  transition: background .4s;
}
nav.dim {
  background: rgba(15, 14, 11, .88);
  backdrop-filter: blur(16px);
}
.logo img {
  height: 44px;
  mix-blend-mode: screen;
  display: block;
}
.nl {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nl a {
  font-family: 'Chivo Mono', monospace;
  font-size: .66rem;
  font-weight: 300;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sub);
  text-decoration: none;
  transition: color .2s;
  cursor: none;
}
.nl a:hover,
.nl a.act {
  color: var(--fg);
}



/* Desktop dropdown */
.nl-drop {
  position: relative;
}
.nl-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg2);
  border: 1px solid var(--ln);
  backdrop-filter: blur(12px);
  min-width: 200px;
  padding: 0.8rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 201;
}
.nl-drop.open .nl-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nl-menu-item {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  cursor: none;
}
.nl-menu-item-n {
  font-family: 'DM Serif Display', serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--fg);
}
.nl-menu-item-t {
  font-family: 'Chivo Mono', monospace;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sub);
}
.nl-menu-item:hover .nl-menu-item-n,
.nl-menu-item:hover .nl-menu-item-t {
  color: var(--a);
}
.nav-demo {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem 1rem;
  background: var(--a);
  color: #0F0E0B;
  font-family: 'Chivo Mono', monospace;
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--a);
  transition: background .2s, color .2s;
  white-space: nowrap;
  cursor: none;
  flex-shrink: 0;
}
.nav-demo:hover {
  background: transparent;
  color: var(--a);
}
#menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  padding: 0;
  z-index: 210;
}
#menu-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--fg);
  transition: all .2s;
}

/* ========== FOOTER ========== */
footer {
  border-top: 1px solid var(--ln);
  padding: 0 2%;
}
.ft-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--ln);
  flex-wrap: wrap;
}
.ft-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  flex-wrap: wrap;
}
.fc {
  font-family: 'Chivo Mono', monospace;
  font-size: .67rem;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sub);
}
.fc-link {
  font-family: 'Chivo Mono', monospace;
  font-size: .67rem;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sub);
  text-decoration: none;
  transition: color .2s;
}
.fc-link:hover {
  color: var(--fg);
}
.fl {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
}
.fl a {
  font-family: 'Chivo Mono', monospace;
  font-size: .62rem;
  font-weight: 300;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sub);
  text-decoration: none;
  cursor: none;
  transition: color .2s;
}
.fl a:hover {
  color: var(--fg);
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  flex-shrink: 0;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--sub);
  border: 1px solid var(--ln);
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
  transition: color .22s, border-color .22s, background .22s;
  cursor: none;
}
.footer-social a svg {
  width: 14px;
  height: 14px;
  display: block;
}
.footer-social a:hover {
  color: var(--a);
  border-color: var(--a);
  background: rgba(190, 252, 66, .06);
}

/* ========== BUTTONS ========== */
.btn-filled {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  background: var(--a);
  color: #0F0E0B;
  font-family: 'Chivo Mono', monospace;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--a);
  cursor: none;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.btn-filled:hover {
  background: transparent;
  color: var(--a);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  background: transparent;
  color: var(--fg);
  font-family: 'Chivo Mono', monospace;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ln);
  cursor: none;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: var(--a);
  color: var(--a);
}

/* ========== RESPONSIVE BREAKPOINTS ========== */
@media (max-width: 1024px) {
  /* General padding reduction */
  section {
    padding-left: 5%;
    padding-right: 5%;
  }
  /* Services header */
  .s-hdr {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  /* Ecosystem header */
  .eco-hdr {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ecol-inner {
    grid-template-columns: 180px 1fr;
    gap: 2.5rem;
  }
  .ecol-kpi {
    grid-column: 2;
    text-align: left;
  }
  /* Products intro */
  .p-intro {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .pd {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ph {
    grid-template-columns: 3rem 1fr auto auto;
  }
  /* Industries header */
  .ind-hdr {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .ind-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ind-item:nth-child(3n) {
    padding-right: 3rem;
  }
  .ind-item:nth-child(n+4) {
    border-bottom: 1px solid var(--ln);
  }
  .ind-item:nth-last-child(-n+2) {
    border-bottom: none;
  }
  /* Perspective */
  .pla {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .pres {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .pre {
    padding: 1.5rem 0;
    padding-right: 1rem;
  }
  .pre:not(:first-child) {
    padding-left: 1rem;
  }
  /* Numbers */
  .nums {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .ni {
    padding: 1.5rem 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--ln);
  }
  .ni:last-child {
    border-bottom: none;
  }
  /* Careers teaser */
  .ct-lay {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  /* Trust */
  .tr-i {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Connect */
  .c-foot {
    flex-direction: column;
    gap: 1rem;
  }
  /* Services page */
  .srv-lay {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .proc-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .proc-step {
    border-right: none;
    border-bottom: 1px solid var(--ln);
    padding: 2rem;
  }
  .proc-step:last-child {
    border-bottom: none;
  }
  /* Industries page (inside) */
  .ind-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Products page (inside) */
  .prod-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .prod-bot {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .int-lay {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Careers page */
  .abt-lay {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .val-lay {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .ben-lay {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  /* Contact page */
  #contact-main {
    grid-template-columns: 1fr;
  }
  .c-left {
    border-right: none;
    border-bottom: 1px solid var(--ln);
  }
  .c-left,
  .c-right {
    padding: 4rem 5%;
  }
}

@media (max-width: 767px) {
  /* Typography */
  body {
    font-size: 15px;
  }
  .sl {
    margin-bottom: 2rem;
  }
  /* Hero */
  #hero {
    padding: 6rem 5% 3rem;
    min-height: auto;
  }
  .h-foot {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .h-acts {
    align-items: flex-start;
  }
  /* Services accordion */
  .st {
    grid-template-columns: 3rem 1fr auto;
    gap: 0.5rem;
  }
  .sn {
    font-size: 0.6rem;
  }
  .sb {
    grid-template-columns: 1fr;
  }
  .sr.open .sb {
    max-height: 400px;
  }
  .sc {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  /* Ecosystem layer */
  .ecol-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1.5rem 2rem 2rem;
  }
  .ecol-kpi {
    text-align: left;
    grid-column: auto;
  }
  .eco-cta-row {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Products accordion */
  .ph {
    grid-template-columns: 2rem 1fr auto;
    gap: 0.5rem;
  }
  .ptag {
    display: none;
  }
  .parr {
    margin-right: 0;
  }
  .pr.open .pe {
    max-height: 500px;
  }
  .pd {
    gap: 1.5rem;
  }
  /* Industries grid */
  .ind-grid {
    grid-template-columns: 1fr;
  }
  .ind-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--ln);
  }
  .ind-item:nth-child(3n) {
    padding-right: 0;
  }
  .ind-item:last-child {
    border-bottom: none;
  }
  /* Perspective */
  .pres {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .pre {
    border-right: none;
    border-bottom: 1px solid var(--ln);
    padding: 1.5rem 0;
  }
  .pre:last-child {
    border-bottom: none;
  }
  /* Numbers */
  .nums {
    grid-template-columns: 1fr;
    gap: 0;
  }
  /* Process steps */
  .proc-steps {
    grid-template-columns: 1fr;
  }
  .proc-step {
    border-bottom: 1px solid var(--ln);
  }
  /* Values grid */
  .val-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ben-grid {
    grid-template-columns: 1fr;
  }
  /* Role items */
  .role-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .role-loc,
  .role-type {
    justify-self: start;
  }
  /* CTA row */
  .srv-cta-in,
  .ind-cta-in,
  .prod-cta-in {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Form row */
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  /* Footer */
  .ft-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-social {
    margin-left: 0;
  }
  .fl {
    justify-content: center;
  }
  /* Navigation mobile already handled */
  #menu-btn {
    display: flex;
  }
  .nl {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg2);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.8rem;
    transition: right .3s cubic-bezier(.16, 1, .3, 1);
    z-index: 200;
    border-left: 1px solid var(--ln);
  }
  body.menu-open .nl {
    right: 0;
  }
  .nl-drop .nl-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    padding-left: 1rem;
    margin: 0;
    box-shadow: none;
    transform: none;
  }
  .nl-drop.open .nl-menu {
    margin-top: 0;
  }
  .nl-menu-item {
    padding: 0.5rem 0;
  }
  .nav-demo {
    display: none;
  }
}

/* Small phones (<=480px) */
@media (max-width: 480px) {
  .ph-h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }
  .s-h2,
  .p-h2,
  .ind-h2,
  .ct-h2,
  .proc-h2 {
    font-size: 1.8rem;
  }
  .c-h2 {
    font-size: 2rem;
  }
  .ph-stat {
    padding-right: 1.5rem;
  }
  .case-item .case-left {
    margin-bottom: 1rem;
  }
  .case-metric {
    font-size: 2rem;
  }
  .case-results {
    flex-direction: column;
    gap: 1rem;
  }
  .cr {
    border-right: none;
    padding-right: 0;
  }
}

/* ===== FULL WIDTH MOBILE MENU + DARK OVERLAY ===== */

/* 1. Overlay to completely block background */
body.menu-open::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0F0E0B; /* solid background matching the menu panel */
  z-index: 199;
  pointer-events: auto;
}

/* 2. Navbar background when scrolled or menu open */
body.menu-open nav,
nav.dim {
  background: rgba(15, 14, 11, 0.98);
  backdrop-filter: blur(16px);
}

/* 3. Mobile menu adjustments – FULL WIDTH */
@media (max-width: 767px) {
  #menu-btn {
    display: flex;
  }

  .nl {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;          /* Full width – covers entire screen */
    max-width: 100%;
    height: 100vh;
    background: var(--bg2);
    backdrop-filter: blur(0); /* no blur, solid background */
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 1.8rem;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
    border-left: none;    /* no border when full width */
    overflow-y: auto;
    box-shadow: none;
  }

  body.menu-open .nl {
    right: 0;
  }

  /* Menu links – larger touch targets */
  .nl a {
    font-size: 0.85rem;
    padding: 0.6rem 0;
    display: block;
  }

  /* Dropdown submenu items */
  .nl-drop .nl-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    padding-left: 1rem;
    margin: 0.5rem 0 0 0;
    box-shadow: none;
  }

  .nl-menu-item {
    padding: 0.75rem 0;
  }

  .nl-menu-item-n {
    font-size: 1rem;
  }

  .nl-menu-item-t {
    font-size: 0.65rem;
  }

  /* Hide "Book a Demo" button on mobile */
  .nav-demo {
    display: none;
  }
}

/* 4. Animated hamburger → X */
#menu-btn span {
  transition: all 0.2s ease;
}
body.menu-open #menu-btn span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
body.menu-open #menu-btn span:nth-child(2) {
  opacity: 0;
}
body.menu-open #menu-btn span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Force all ecosystem layers to use green theme */
.ecol-2,
.ecol-3 {
  border-color: #BEFC42 !important;
}
.ecol-2::after,
.ecol-3::after {
  background: linear-gradient(to bottom, rgba(190, 252, 66, 0.07), transparent) !important;
}
.eco-conn-2 .eco-conn-dot {
  background: #BEFC42 !important;
}