/* ═══════════════════════════════
   MATIVYX — SHARED STYLES
   Default theme: violet
   ═══════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@400;600;700&display=swap');

:root,
[data-theme="violet"] {
  --bg: #0d0b14;
  --bg2: #151221;
  --bg3: #1c182c;
  --text: #f0ebfa;
  --text2: #8a83a5;
  --text3: #4a4365;
  --border: rgba(139, 92, 246, .15);
  --border2: rgba(139, 92, 246, .08);
  --accent: #8b5cf6;
  --accent2: #a78bfa;
  --accent-fg: #ffffff;
  --glow: rgba(139, 92, 246, .25);
}

[data-theme="slate"] {
  --bg: #fff;
  --bg2: #f4f4f2;
  --bg3: #eaeae6;
  --text: #1c1c1a;
  --text2: #5c5b56;
  --text3: #9b9990;
  --border: rgba(0, 0, 0, .09);
  --border2: rgba(0, 0, 0, .05);
  --accent: #1c1c1a;
  --accent2: #3a3a36;
  --accent-fg: #fff;
  --glow: rgba(0, 0, 0, .08);
}

[data-theme="ocean"] {
  --bg: #060d1a;
  --bg2: #0a1428;
  --bg3: #0e1c36;
  --text: #e8f4ff;
  --text2: #7aaed4;
  --text3: #3a6080;
  --border: rgba(100, 180, 255, .10);
  --border2: rgba(100, 180, 255, .06);
  --accent: #2280ff;
  --accent2: #60a8ff;
  --accent-fg: #fff;
  --glow: rgba(34, 128, 255, .25);
}

[data-theme="obsidian"] {
  --bg: #0a0a09;
  --bg2: #141412;
  --bg3: #1e1e1c;
  --text: #e8e6de;
  --text2: #9c9a92;
  --text3: #4a4840;
  --border: rgba(255, 255, 255, .08);
  --border2: rgba(255, 255, 255, .04);
  --accent: #d4c89a;
  --accent2: #e8ddb8;
  --accent-fg: #0a0a09;
  --glow: rgba(212, 200, 154, .15);
}




*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
  overflow-x: hidden;
  /* Safe Area Support for mobile */
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}


/* WebGL Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

/* Layout wrapper above canvas */
.site-wrap {
  position: relative;
  z-index: 1
}

/* ── THEME BAR ── */
.theme-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 32px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border2);
  font-size: 10px;
  color: var(--text3);
  transition: background .3s;
}

.theme-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 4px
}

.sw {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  outline: none;
  appearance: none;
  transition: transform .15s, border-color .2s;
}

.sw:hover {
  transform: scale(1.2)
}

.sw.on {
  border-color: var(--text2)
}

.sw[data-t="violet"] {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa)
}

.sw[data-t="slate"] {
  background: #d4d4d0
}

.sw[data-t="ocean"] {
  background: #2280ff
}

.sw[data-t="obsidian"] {
  background: #6a6860
}



.sw-name {
  margin-left: 4px;
  font-size: 10px
}

/* ── NAV ── */
.nav {
  height: 80px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 11, 20, .8);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background .3s, border-color .3s;
  /* Support for iPhone notch */
  padding-top: env(safe-area-inset-top);
}


.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  z-index: 1100;
  padding: 8px;
  background: transparent;
  border: none;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: .2s;
}


.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.05em;
  margin-right: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 32px;
  height: auto;
  filter: drop-shadow(0 0 5px var(--glow));
}



.logo em {
  font-style: normal;
  color: #ffffff
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* Dropdown trigger */
.nd {
  position: relative;
  height: 56px;
  display: flex;
  align-items: center
}

.nl {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  height: 56px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  opacity: 0.7;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: opacity .15s, color .15s, border-color .15s;
  text-decoration: none;
  /* Improve touch target */
  min-width: 44px;
  min-height: 44px;
}


.nd:hover>.nl,
.nl:hover,
.nl.act {
  color: var(--text);
  opacity: 1;
  border-bottom-color: var(--accent)
}

.nl svg {
  width: 10px;
  height: 10px;
  opacity: .4;
  transition: transform .2s
}

.nd:hover>.nl svg {
  transform: rotate(180deg);
  opacity: .7
}

/* Dropdowns */
.dd {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 10px 10px 10px;
  z-index: 200;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
  animation: ddIn .15s ease;
}

.nd:hover>.dd {
  display: block
}

/* Mobile: show dropdown via .open class (JS-toggled) */
.nd.open>.dd {
  display: block;
  animation: ddIn .15s ease;
}

/* Smooth chevron rotation */
.nl svg {
  transition: transform .2s ease;
}

@keyframes ddIn {
  from {
    opacity: 0;
    transform: translateY(-4px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* Simple dropdown */
.dd-s {
  min-width: 220px;
  padding: 6px 0
}

.dl {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  transition: background .1s, color .1s;
  white-space: nowrap;
}

.dl:hover {
  background: var(--bg3);
  color: var(--text)
}

.dl-icon {
  font-size: 14px;
  opacity: .45;
  width: 16px;
  text-align: center;
  flex-shrink: 0
}

.dd-div {
  height: 1px;
  background: var(--border2);
  margin: 4px 0
}

/* Mega menu */
.dd-mega {
  width: 680px;
  border-radius: 0 10px 10px 10px;
}

/* Desktop: show two-column wrap, hide mobile accordion */
.mega-wrap  { display: flex; background: var(--bg2); }
.mega-mob   { display: none; }

/* ── Left sidebar container ── */
.mega-side {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg3);
  border-radius: 0 0 0 10px;
}

/* ── Left sidebar categories ── */
.mc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .2s ease;
  border-bottom: 1px solid var(--border2);
}

.mc::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--text3);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all .2s ease;
}

.mc:last-child { border-bottom: none; border-radius: 0 0 0 10px; }

.mc:hover,
.mc.on {
  background: var(--bg2);
  color: var(--text);
  border-left-color: var(--accent);
}

.mc:hover::before,
.mc.on::before {
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

/* ── Right panel container ── */
.mega-right {
  flex: 1;
  position: relative;
}

/* ── Right panel (individual) ── */
.mp {
  display: none;
  padding: 20px 24px;
  animation: mpIn .2s ease;
}

.mp.on {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

@keyframes mpIn {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border2);
}

.mp-icon {
  font-size: 20px;
  line-height: 1;
}

.mp-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.mp-desc {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* ── Content wrapper (just passes through for non-spotlight panels) ── */
.mp-content {
  display: block;
}

/* ── Links grid ── */
.mp-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 16px;
}

.pl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  padding: 6px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, color .15s;
}

.pl:hover {
  background: var(--bg3);
  color: var(--text);
}

.pl::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .25;
  flex-shrink: 0;
  transition: opacity .15s;
}

.pl:hover::before {
  opacity: .9;
}

/* ── Footer ── */
.mp-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border2);
}

.mp-more {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mp-more:hover {
  opacity: .7;
}

/* ────────────────────────────
   Mobile Capabilities Accordion
   (.mega-mob — hidden on desktop)
   ──────────────────────────── */
.mab {
  border-bottom: 1px solid var(--border2);
}

.mab-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  user-select: none;
  transition: color .15s, background .15s;
}

.mab-trigger:hover,
.mab.open .mab-trigger {
  color: var(--text);
  background: rgba(139,92,246,.05);
}

.mab-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.mab-arrow {
  width: 12px;
  height: 7px;
  margin-left: auto;
  flex-shrink: 0;
  stroke: var(--text3);
  transition: transform .25s ease, stroke .15s;
}

.mab.open .mab-arrow {
  transform: rotate(180deg);
  stroke: var(--accent);
}

.mab-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg3);
  display: flex;
  flex-direction: column;
  padding: 0 16px 0 24px;
}

.mab.open .mab-panel {
  padding: 4px 16px 12px 24px;
}

.mab-panel .pl {
  padding: 8px 4px;
  border-bottom: 1px solid var(--border2);
  border-radius: 0;
  font-size: 13px;
}

.mab-panel .pl:last-of-type {
  border-bottom: none;
}

.mab-more {
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0
}

.btn {
  padding: 7px 15px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.btn-g {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border)
}

.btn-g:hover {
  background: var(--bg3);
  color: var(--text)
}

.btn-p {
  background: var(--accent);
  color: var(--accent-fg);
  border: none;
  box-shadow: 0 0 20px var(--glow)
}

.btn-p:hover {
  opacity: .85
}

/* ── PAGE SECTIONS ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding: 100px 32px 80px;
  gap: 32px;
  min-height: 70vh;
  max-width: 1440px;
  margin: 0 auto;
}



.hero-content {
  max-width: 768px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}


.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(48px, 8vw, 100px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 0.9;
  color: var(--text);
  position: relative;
}

.hero h1::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.5), transparent);
}

@media(max-width:768px) {
  .hero h1::before {
    display: none;
  }
}

.hero h1 em {
  font-style: normal;
  color: var(--accent)
}

.gradient-text {
  background: linear-gradient(to right, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text2);
  max-width: 672px
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 0;
  flex-wrap: wrap;
  justify-content: flex-start
}

/* Stats row */
.stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 40px 32px;
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2)
}

.stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1
}

.stat-lbl {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px
}

/* Section */
.section {
  padding: 72px 32px;
  max-width: 1160px;
  margin: 0 auto
}

.sec-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px
}

.sec-h {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 12px
}

.sec-sub {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 36px
}

/* Cards grid - Bento Design System */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-decoration: none;
  color: inherit;
  transition: all 0.5s ease;
  min-height: 160px;
}

.card:hover {
  border-color: var(--accent);
}

.card-pillar {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 16px;
  transition: color 0.3s;
}

.card:hover .card-pillar {
  color: var(--accent);
}

.card-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.3s;
}

.card:hover .card-icon-wrap {
  transform: scale(1.1);
}

.card-icon {
  font-size: 20px;
  color: var(--accent);
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  transition: color 0.3s;
}

.card:hover .card-title {
  color: var(--accent);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.card-head .card-icon-wrap,
.card-head .card-icon,
.card-head .card-title {
  margin-bottom: 0 !important;
}

.card-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  transition: color 0.3s;
}

.card:hover .card-desc {
  color: var(--text);
}

.card-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 16px;
}

.card-arrow {
  font-size: 14px;
  color: var(--text3);
  transition: all 0.3s;
}

.card:hover .card-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

/* Page hero (interior pages) */
.page-hero {
  padding: 80px 32px 60px;
  border-bottom: 1px solid var(--border2)
}

.page-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 14px
}

.page-hero p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 600px
}

/* Value cards */
.val-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 36px
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 36px
}

@media(max-width:700px) {
  .contact-grid {
    grid-template-columns: 1fr
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

@media(max-width:500px) {
  .form-row {
    grid-template-columns: 1fr
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px
}

.field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em
}

.field input,
.field textarea,
.field select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .15s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent)
}

.field textarea {
  min-height: 120px;
  resize: vertical
}

.office-list {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.office {
  border-left: 2px solid var(--accent);
  padding-left: 16px
}

.office-city {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px
}

.office-addr {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6
}

/* Footer */
/* Footer */
.footer-main {
  border-top: 1px solid var(--border2);
  padding: 80px 32px 48px;
  background: var(--bg);
}

.footer-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 64px;
}

.footer-bottom {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px;
  border-top: 1px solid var(--border2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.foot-col h4 {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 20px
}

.foot-col a {
  display: block;
  font-size: 14px;
  color: var(--text2);
  text-decoration: none;
  padding: 5px 0;
  transition: color .2s
}

.foot-col a:hover {
  color: var(--accent);
}

.footer-main {
  border-top: 1px solid var(--border2);
  padding: 80px 32px 48px;
  background: var(--bg);
}

.footer-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 64px;
}

.footer-bottom {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px;
  border-top: 1px solid var(--border2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.foot-copy {
  font-size: 12px;
  color: var(--text3)
}

.foot-links {
  display: flex;
  gap: 20px
}

.foot-links a {
  font-size: 12px;
  color: var(--text3);
  text-decoration: none;
  transition: color .1s
}

.foot-links a:hover {
  color: var(--text2)
}

/* Lucide icon fallback - use SVG inline icons */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

/* Glow pill badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Theme Switcher */
.sw:hover { transform: scale(1.2); }
.sw.on { border-color: #fff !important; box-shadow: 0 0 10px var(--glow); }

/* Divider */

.div {
  height: 1px;
  background: var(--border2);
  margin: 0
}

/* ─────────────────────────────────
   Responsive Layout Utilities
   ───────────────────────────────── */

/* 2-column split — collapses to 1 on mobile */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* Flex space-between header row */
.flex-sb {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

/* Forced 2-col card grid */
.cards-2 {
  grid-template-columns: 1fr 1fr;
}

/* Responsive */
@media(max-width:1024px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg);
    flex-direction: column;
    padding: 32px;
    gap: 8px;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nd {
    width: 100%;
    height: auto;
    display: block;
  }

  .nl {
    width: 100%;
    padding: 16px 0;
    height: auto;
    border-bottom: 1px solid var(--border2);
    justify-content: space-between;
    font-size: 14px;
  }

  .nd:hover>.nl {
    border-bottom-color: var(--border2);
  }

  .dd {
    position: static;
    display: none;
    width: 100% !important;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 16px 16px;
    animation: none;
  }

  /* On mobile, only show dropdown via .open class — disable :hover */
  .nd:hover > .dd {
    display: none;
  }

  .nd.open > .dd {
    display: block;
  }

  .nd.open > .nl {
    color: var(--text);
    border-bottom-color: var(--accent);
  }

  .mega-wrap {
    display: none !important;    /* hide desktop layout on mobile */
  }

  .mega-mob {
    display: block;              /* show accordion on mobile */
  }

  .mc {
    width: 100%;
    background: var(--bg3);
    border-left: none;
    border-bottom: 1px solid var(--border2);
    border-radius: 0 !important;
    padding: 16px;
  }

  .mc.on {
    background: var(--bg2);
    border-bottom: none;
  }

  .mp {
    width: 100%;
    padding: 12px 0 24px 16px;
    background: var(--bg2);
    border-radius: 0;
  }

  .mp-head {
    display: none;
  }

  .mp-links {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .pl {
    padding: 8px 0;
  }

  .hamburger {
    display: flex;
  }

  .nav-actions {
    display: none;
  }

  .nav.open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav.open .hamburger span:nth-child(2) { opacity: 0; }
  .nav.open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

@media(max-width:768px) {
  /* Hard stop all horizontal overflow */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Nav */
  .nav {
    padding: 0;
    height: 60px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .theme-bar {
    padding: 4px 16px;
    overflow: hidden;
    white-space: nowrap;
  }

  .theme-label,
  .sw-name {
    display: none;
  }

  /* Hero */
  .hero {
    padding: 48px 20px 32px;
    text-align: center;
    align-items: center;
    min-height: 60vh;
    gap: 20px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.05;
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 15px;
    line-height: 1.65;
  }

  .hero-ctas {
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .hero-ctas .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* Stats */
  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    padding: 32px 16px;
    text-align: center;
  }

  .stat-val {
    font-size: 28px;
  }

  /* Sections */
  .section {
    padding: 48px 20px;
  }

  /* Collapse 2-col grids */
  .split-2 {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .split-2 > div:last-child {
    padding: 28px 20px !important;
    border-radius: 14px !important;
  }

  .cards-2 {
    grid-template-columns: 1fr;
  }

  /* Flex-sb stacks */
  .flex-sb {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
  }

  /* Cards */
  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    min-height: 200px;
    padding: 24px;
  }

  /* CTA band */
  [style*="padding:80px 32px"] {
    padding: 48px 20px !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 20px;
    text-align: left;
  }

  .footer-grid > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .foot-brand {
    grid-column: 1 / -1;
    margin-bottom: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 20px;
  }

  .footer-bottom div {
    justify-content: center;
  }

  .footer-main {
    padding: 36px 20px 0;
  }

  /* Page heroes */
  .page-hero {
    padding: 56px 20px 36px;
    text-align: center;
  }

  .page-hero h1 {
    font-size: clamp(26px, 8vw, 40px);
    line-height: 1.1;
  }

  .page-hero p {
    margin: 0 auto;
    font-size: 14px;
  }

  /* Val cards */
  .val-grid {
    grid-template-columns: 1fr;
  }

  /* Contact grid */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}