/* ─────────────────────────────────────────────
   OMNITYCA GROUP  —  v4.3 Stylesheet
   Dark obsidian base · Amber gold primary
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=Space+Mono:wght@400;700&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  --bg-0:  #08090D;
  --bg-1:  #0C0E14;
  --bg-2:  #11141C;
  --bg-3:  #181C26;
  --bg-4:  #1F2330;

  --amber:   #C9A96E;
  --amber-2: #E8C88C;
  --amber-3: #A07840;

  --slate:   #6B8CAE;
  --slate-2: #8CAECE;
  --slate-3: #4A6A8C;

  --sage:    #5A8C78;
  --sage-2:  #7AAE94;

  --rose:    #B87060;
  --rose-2:  #D89078;

  /* Text — boosted for readability */
  --t1: #F5F2EE;
  --t2: #D4D0CA;
  --t3: #9A9690;
  --t4: #5A5650;

  --b1: rgba(201,169,110, 0.18);
  --b2: rgba(107,140,174, 0.14);
  --b3: rgba(240,237,232, 0.08);

  --nav-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg-0);
  color: var(--t1);
  font-family: 'DM Sans', system-ui, sans-serif;
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  cursor: default;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
canvas { display: block; }
img, svg { max-width: 100%; }
ul { list-style: none; }

/* ── LOADING ── */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-0);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 32px;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo { width: 280px; opacity: 0.95; }
.loading-bar-wrap { width: 180px; height: 1px; background: var(--b3); position: relative; overflow: hidden; }
.loading-bar-fill {
  position: absolute; inset: 0 100% 0 0;
  background: linear-gradient(90deg, var(--amber-3), var(--amber), var(--amber-2));
  animation: loadFill 1.4s var(--ease-out) forwards;
}
@keyframes loadFill { to { right: 0; } }

/* ── NAV ── */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 32px;
  background: linear-gradient(to bottom, rgba(8,9,13,0.97) 0%, rgba(8,9,13,0) 100%);
}
.nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo-btn {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; cursor: pointer; padding: 4px 0; flex-shrink: 0;
}
/* Logo: 52px height on desktop for good presence */
.nav-logo-img { height: 52px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-item {
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--t3);
  padding: 7px 12px; border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  background: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.nav-item:hover { color: var(--t1); background: rgba(240,237,232,0.05); }
.nav-item.active { color: var(--amber); }

.nav-contact {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bg-0);
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-2) 100%);
  padding: 9px 22px; border-radius: 4px;
  border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 2px 16px rgba(201,169,110,0.25), 0 0 0 1px rgba(201,169,110,0.2);
  white-space: nowrap;
}
.nav-contact:hover { opacity: 0.88; transform: translateY(-1px); }

/* Nav dots */
.nav-dots {
  display: flex; flex-direction: column; gap: 6px;
  position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
  z-index: 99;
}
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(240,237,232,0.15); border: none;
  cursor: pointer; transition: background 0.3s, transform 0.3s;
}
.nav-dot.active { background: var(--amber); transform: scale(1.5); }
.nav-dot:hover:not(.active) { background: rgba(240,237,232,0.35); }

/* ── PAGE SYSTEM ── */
#page-container { position: fixed; inset: 0; overflow: hidden; }
.page {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), visibility 0s 0.7s;
  transform: translateY(40px);
  will-change: opacity, transform;
}
.page.active {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), visibility 0s 0s;
}
.page.exit-up {
  opacity: 0; transform: translateY(-30px);
  transition: opacity 0.5s var(--ease-in-out), transform 0.5s var(--ease-in-out);
  pointer-events: none; visibility: visible;
}
.page.exit-down {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.5s var(--ease-in-out), transform 0.5s var(--ease-in-out);
  pointer-events: none; visibility: visible;
}
.page > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}

/* ── SHARED ── */
.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--amber); opacity: 0.85;
  margin-bottom: 2px;
}
.headline-accent { color: var(--amber); font-style: normal; }

/* ── HERO ── */
#page-hero { justify-content: center; align-items: flex-start; }
.hero-content {
  position: relative; z-index: 2;
  padding: 0 0 0 10vw;
  max-width: 700px;
  display: flex; flex-direction: column; gap: 28px;
}
.hero-headline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(40px, 5vw, 74px);
  font-weight: 400; line-height: 1.08;
  color: var(--t1); letter-spacing: -0.02em;
  white-space: nowrap;
}
.hero-sub {
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 300; line-height: 1.75;
  color: var(--t2); max-width: 500px;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bg-0);
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-2) 100%);
  padding: 13px 30px; border-radius: 4px; border: none; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(201,169,110,0.3);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(201,169,110,0.4); }
.btn-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--t2);
  padding: 12px 26px; border-radius: 4px;
  border: 1px solid var(--b3); cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.15s; background: none;
}
.btn-ghost:hover { color: var(--t1); border-color: rgba(240,237,232,0.22); transform: translateY(-1px); }

.hero-hint {
  position: absolute; bottom: 32px; right: 48px; z-index: 2;
  display: flex; align-items: center; gap: 10px; color: var(--t4);
}
.hero-hint-line { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--amber-3)); }
.hero-hint-text { font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; }

.hero-scroll-track {
  position: absolute; left: 40px; bottom: 32px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll-label {
  font-family: 'Space Mono', monospace; font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--t4); writing-mode: vertical-rl;
}
.hero-scroll-bar { width: 1px; height: 48px; background: linear-gradient(to bottom, var(--amber-3), transparent); }

/* ── PROBLEM ──
   Desktop: canvas fills left half (absolute), text sits in right portion
   The canvas fade-mask in ProblemCanvas handles the right-side fade.
*/
#page-problem {
  position: relative;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}
.problem-content {
  position: relative; z-index: 2;
  /* Right side — clear of canvas animation on left */
  margin-left: auto;
  margin-right: 7vw;
  /* Push down from nav so headline has clear breathing room */
  margin-top: 48px;
  max-width: 500px;
  width: 42%;
  display: flex; flex-direction: column; gap: 18px;
}
.problem-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 2.8vw, 40px);
  line-height: 1.12; color: var(--t1); letter-spacing: -0.02em;
}
.problem-headline span { color: var(--amber); }
.problem-body {
  font-size: 13.5px; font-weight: 300; line-height: 1.7;
  color: var(--t2); max-width: 420px;
}
.problem-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; gap: 3px; }
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 28px; color: var(--amber); letter-spacing: -0.03em;
}
.stat-label { font-size: 10px; font-weight: 500; letter-spacing: 0.11em; text-transform: uppercase; color: var(--t3); }

/* ── PLATFORM ── */
#page-platform { justify-content: flex-end; align-items: flex-start; }
.platform-content {
  position: relative; z-index: 2;
  width: 100%; padding: 0 5vw 4vh 5vw;
  display: flex; flex-direction: column; gap: 24px;
}
.platform-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.platform-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 1.1; color: var(--t1); letter-spacing: -0.02em;
}
.platform-sub {
  font-size: 13.5px; font-weight: 300; color: var(--t2);
  max-width: 260px; text-align: right; line-height: 1.55;
}
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.pillar {
  background: rgba(15,18,26,0.82);
  border: 1px solid var(--b3); border-radius: 8px;
  padding: 22px 18px;
  display: flex; flex-direction: column; gap: 12px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.pillar:hover { border-color: var(--b1); background: rgba(22,26,38,0.9); transform: translateY(-4px); }
.pillar-num { font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: var(--amber); }
.pillar-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.pillar-icon svg { width: 100%; height: 100%; }
.pillar-title {
  font-family: 'DM Serif Display', serif;
  font-size: 17px; color: var(--t1); line-height: 1.2;
}
.pillar-text {
  font-size: 12px; font-weight: 400; color: var(--t2);
  line-height: 1.65;
}

/* ── TECHNOLOGY ──
   Content occupies the available space below nav (64px) 
   with justify-content: center to vertically centre all 5 rows.
*/
#page-tech { justify-content: flex-start; align-items: flex-start; }
.tech-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  padding: 0 9vw;
  max-width: 620px;
  /* Full height minus nav, then justify-content centres everything.
     Use padding-bottom to ensure last row never touches screen edge. */
  height: calc(100dvh - var(--nav-h));
  margin-top: var(--nav-h);
  justify-content: center;
  gap: 10px;
  padding-bottom: 24px;
}
.tech-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.1; color: var(--t1); letter-spacing: -0.02em;
  flex-shrink: 0; margin-bottom: 6px;
}
.tech-pillars { display: flex; flex-direction: column; gap: 0; }
.tech-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid var(--b3);
}
.tech-row:first-child { border-top: 1px solid var(--b3); }
.tech-row-num {
  font-family: 'Space Mono', monospace;
  font-size: 9px; color: var(--amber); opacity: 0.75;
  min-width: 20px; margin-top: 2px; flex-shrink: 0;
}
.tech-row-body { display: flex; flex-direction: column; gap: 3px; }
.tech-row-title { font-size: 12.5px; font-weight: 600; color: var(--t1); letter-spacing: 0.01em; }
.tech-row-desc { font-size: 11px; font-weight: 400; color: var(--t2); line-height: 1.52; }

/* ── VERTICALS ──
   Sidebar on left, stage on right.
   Canvas fills entire stage (inset:0), info overlay sits at bottom with gradient.
*/
#page-verticals { display: flex; flex-direction: row; overflow: hidden; }

.verticals-sidebar {
  width: 240px; flex-shrink: 0;
  background: rgba(8,9,13,0.96);
  border-right: 1px solid var(--b3);
  display: flex; flex-direction: column;
  /* Clear nav bar at top */
  padding: var(--nav-h) 0 12px;
  z-index: 10; backdrop-filter: blur(20px);
  overflow-y: auto;
}
.verticals-sidebar::-webkit-scrollbar { width: 0; }

.vert-btn {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 18px;
  background: none; border: none; cursor: pointer; text-align: left;
  border-left: 2px solid transparent;
  transition: background 0.25s, border-color 0.25s;
  position: relative; flex-shrink: 0;
}
.vert-btn.active { background: rgba(201,169,110,0.08); border-left-color: var(--amber); }
.vert-btn:hover:not(.active) { background: rgba(240,237,232,0.03); }
.vert-icon {
  width: 32px; height: 32px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); flex-shrink: 0; font-size: 14px;
  border: 1px solid var(--b3);
  transition: background 0.25s, border-color 0.25s;
}
.vert-btn.active .vert-icon { background: rgba(201,169,110,0.12); border-color: var(--b1); }
.vert-btn-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vert-name { font-size: 13px; font-weight: 600; color: var(--t2); transition: color 0.25s; }
.vert-btn.active .vert-name { color: var(--t1); }
.vert-sector { font-size: 9.5px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t4); transition: color 0.25s; }
.vert-btn.active .vert-sector { color: var(--amber); opacity: 0.85; }

.vert-progress-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: rgba(201,169,110,0.2); overflow: hidden; }
.vert-progress-fill { height: 100%; width: 0%; background: var(--amber); transition: width 0.1s linear; }

/* Stage area */
.verticals-stage { flex: 1; position: relative; overflow: hidden; }
.vert-panel {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
  /* Stack canvas + info vertically */
  display: flex; flex-direction: column; justify-content: flex-end;
}
.vert-panel.active { opacity: 1; pointer-events: all; }

/* Canvas: fills full stage area */
.vert-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}

/* Info overlay — bottom portion with strong gradient backdrop so canvas shows above */
.vert-info {
  position: relative; z-index: 2;
  padding: 20px 32px 22px;
  /* Gradient that covers bottom ~46% — strong at base, fades up */
  background: linear-gradient(to top,
    rgba(8,9,13,1.00)  0%,
    rgba(8,9,13,0.97) 30%,
    rgba(8,9,13,0.88) 60%,
    rgba(8,9,13,0.55) 80%,
    transparent       100%);
  max-height: 48%;
  overflow: hidden;
}
.vert-tag {
  font-family: 'Space Mono', monospace;
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber); opacity: 0.85; margin-bottom: 6px;
}
.vert-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(17px, 2vw, 28px);
  color: var(--t1); line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 7px;
}
.vert-desc {
  font-size: 12px; font-weight: 400; color: var(--t2);
  line-height: 1.62; max-width: 480px; margin-bottom: 12px;
}
.vert-bullets { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.vert-bullet {
  font-size: 9.5px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--t2);
  padding: 4px 9px; border-radius: 3px;
  border: 1px solid rgba(240,237,232,0.12);
  background: rgba(240,237,232,0.04);
}
.vert-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amber);
  transition: gap 0.2s;
}
.vert-link:hover { gap: 14px; }
.vert-link svg { width: 13px; height: 13px; }

/* ── VISION ── */
#page-vision { justify-content: center; align-items: center; }
.vision-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 26px; padding: 0 5vw;
  max-width: 800px;
}
.vision-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--amber); opacity: 0.9;
}
.vision-headline {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(34px, 4.5vw, 66px);
  color: var(--t1); line-height: 1.06; letter-spacing: -0.025em;
}
.vision-body {
  font-size: 15.5px; font-weight: 300; color: var(--t2);
  line-height: 1.78; max-width: 540px;
}
.vision-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.vision-footer {
  position: absolute; bottom: 28px; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 28px;
}
.vision-footer-link {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--t4);
  transition: color 0.2s; cursor: pointer;
  background: none; border: none; font-family: 'DM Sans', sans-serif;
}
.vision-footer-link:hover { color: var(--t2); }
.vision-footer-sep { width: 1px; height: 12px; background: var(--b3); }

/* ── CONTACT MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(8,9,13,0.85); backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s, visibility 0s 0.35s;
}
.modal-overlay.open { opacity: 1; visibility: visible; transition: opacity 0.35s, visibility 0s 0s; }
.modal-box {
  position: relative;
  background: var(--bg-2); border: 1px solid var(--b1); border-radius: 12px;
  padding: 44px 40px; width: min(500px, 92vw);
  display: flex; flex-direction: column; gap: 24px;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s var(--ease-out);
}
.modal-overlay.open .modal-box { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  font-size: 20px; color: var(--t3); cursor: pointer;
  padding: 6px 10px; line-height: 1; background: none; border: none;
}
.modal-title { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--t1); letter-spacing: -0.02em; }
.modal-form { display: flex; flex-direction: column; gap: 13px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 10.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t3); }
.form-input {
  background: var(--bg-3); border: 1px solid var(--b3); border-radius: 5px;
  padding: 11px 13px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: var(--t1); outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--b1); }
.form-input::placeholder { color: var(--t4); }
textarea.form-input { min-height: 90px; resize: vertical; }

/* ── HAMBURGER BUTTON ── */
.nav-burger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 8px; background: none; border: none; cursor: pointer;
  z-index: 200;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--t1); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(8,9,13,0.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s var(--ease-out), visibility 0s 0.3s;
}
.mobile-menu.open {
  opacity: 1; visibility: visible; pointer-events: all;
  transition: opacity 0.3s var(--ease-out), visibility 0s 0s;
}
.mobile-menu-links {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%; padding: 0 32px;
}
.mobile-nav-item {
  font-family: 'DM Serif Display', serif;
  font-size: 28px; color: var(--t2); letter-spacing: -0.01em;
  background: none; border: none; cursor: pointer;
  padding: 12px 0; width: 100%; text-align: center;
  transition: color 0.2s;
}
.mobile-nav-item:hover { color: var(--amber); }

/* ═══════════════════════════════════════════════════════
   MOBILE BREAKPOINT — 768px
   Unified page-flip on all devices.
   Hamburger (top-right) → full-screen overlay → goTo().
   ONLY the .active page is visible. All others hidden.
   Problem: canvas absolute left half, text right half.
   Verticals: tabs horizontal at top, canvas upper 44%,
              solid info panel lower 56%.
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body { overflow: hidden !important; height: 100dvh !important; }

  /* Page container: fixed, clips everything */
  #page-container {
    position: fixed !important;
    inset: 0 !important;
    overflow: hidden !important;
    /* Prevent any scroll inside the container */
    display: block !important;
  }

  /* Every page: absolutely positioned, invisible by default.
     Only .active gets shown — this is the key to preventing scroll-all. */
  .page {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(32px) !important;
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), visibility 0s 0.55s !important;
    overflow: hidden !important;
  }
  .page.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
    transform: none !important;
    transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), visibility 0s 0s !important;
  }
  .page.exit-up {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
    visibility: visible !important;
    pointer-events: none !important;
  }
  .page.exit-down {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    visibility: visible !important;
    pointer-events: none !important;
  }

  /* Nav dots — hide on mobile */
  .nav-dots { display: none; }

  /* Nav bar — compact, fully opaque */
  #site-nav {
    background: rgba(8,9,13,0.98) !important;
    padding: 0 16px !important;
    height: 52px !important;
  }
  .nav-links { display: none !important; }
  .nav-contact { display: none !important; }
  /* Hamburger visible on mobile */
  .nav-burger { display: flex !important; }
  .nav-logo-img { height: 30px !important; }

  /* ── HERO mobile ── */
  #page-hero { justify-content: center; align-items: flex-start; }
  .hero-content { padding: 68px 20px 0; max-width: 100%; gap: 16px; }
  .hero-headline { font-size: clamp(18px, 5.2vw, 44px); }
  .hero-sub { font-size: 13.5px; max-width: 100%; }
  .hero-actions { gap: 10px; }
  .btn-primary, .btn-ghost { font-size: 11.5px; padding: 10px 18px; }
  .hero-scroll-track { display: none; }
  .hero-hint { right: 14px; bottom: 18px; }

  /* ── PROBLEM mobile ──
     Canvas stays absolute (covers full page).
     Its fade mask covers right half so text is clean.
     Text block sits in right 52%, vertically centred.
  */
  #page-problem {
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
  }
  #problem-canvas {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1;
  }
  .problem-content {
    position: relative;
    z-index: 2;
    margin-left: 0;
    margin-right: 0;
    width: 52%;
    max-width: 52%;
    padding: 64px 14px 20px 8px;
    gap: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
  }
  .problem-content::-webkit-scrollbar { width: 0; }
  .problem-headline { font-size: clamp(16px, 4.2vw, 24px); }
  .problem-body { font-size: 11.5px; line-height: 1.62; max-width: 100%; }
  .problem-stats { gap: 10px; flex-wrap: wrap; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 8.5px; }

  /* ── PLATFORM mobile ── */
  #page-platform { justify-content: flex-start; }
  .platform-content { padding: 58px 14px 18px; gap: 12px; }
  .platform-header { flex-direction: column; align-items: flex-start; gap: 5px; }
  .platform-sub { text-align: left; max-width: 100%; font-size: 12px; }
  .platform-headline { font-size: clamp(20px, 5.5vw, 30px); }
  .pillars {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    max-height: calc(100dvh - 185px);
    padding-bottom: 16px;
  }
  .pillars::-webkit-scrollbar { width: 0; }
  .pillar:nth-child(5) { grid-column: 1 / -1; }
  .pillar { padding: 12px 11px; gap: 8px; }
  .pillar-title { font-size: 14px; }
  .pillar-text { font-size: 11px; }

  /* ── TECHNOLOGY mobile ── */
  #page-tech { justify-content: flex-start; }
  .tech-content {
    padding: 0 16px 12px;
    max-width: 100%;
    width: 100%;
    height: calc(100dvh - 52px);
    margin-top: 52px;
    justify-content: center;
    gap: 10px;
  }
  .tech-headline { font-size: clamp(18px, 5vw, 28px); margin-bottom: 2px; }
  .tech-row { gap: 10px; padding: 8px 0; }
  .tech-row-title { font-size: 12px; }
  .tech-row-desc { font-size: 10.5px; line-height: 1.5; }

  /* ── VERTICALS mobile ──
     Horizontal tab bar at top (below nav),
     then canvas upper 42% of remaining space,
     then solid info panel lower 58% — zero canvas bleeding into text.
  */
  #page-verticals {
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .verticals-sidebar {
    width: 100% !important;
    flex-direction: row !important;
    /* Height of tab row: 52px (nav) + tab height */
    padding: 52px 0 0 !important;
    height: auto !important;
    flex-shrink: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: none !important;
    border-bottom: 1px solid var(--b3) !important;
  }
  .vert-btn {
    flex-direction: column !important;
    align-items: center !important;
    padding: 8px 10px 10px !important;
    min-width: 72px !important;
    border-left: none !important;
    border-bottom: 2px solid transparent !important;
    gap: 4px !important;
  }
  .vert-btn.active {
    border-left-color: transparent !important;
    border-bottom-color: var(--amber) !important;
  }
  .vert-btn-label { text-align: center !important; }
  .vert-name { font-size: 11px !important; }
  .vert-sector { font-size: 7.5px !important; }
  .vert-icon { width: 26px !important; height: 26px !important; font-size: 12px !important; }

  /* Stage: full remaining area */
  .verticals-stage {
    flex: 1 !important;
    position: relative !important;
    overflow: hidden !important;
  }
  .vert-panel {
    position: absolute !important;
    inset: 0 !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    display: flex !important;
  }

  /* Canvas: top 44% of stage */
  .vert-canvas {
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: auto !important;
    height: 44% !important;
    width: 100% !important;
  }

  /* Info: bottom 56%, fully opaque background — no canvas bleeding through */
  .vert-info {
    position: relative !important;
    z-index: 2 !important;
    flex-shrink: 0 !important;
    height: 56% !important;
    max-height: 56% !important;
    overflow-y: auto !important;
    background: var(--bg-1) !important;
    border-top: 1px solid var(--b3) !important;
    padding: 12px 14px 16px !important;
    /* Reset gradient */
    background-image: none !important;
  }
  .vert-info::-webkit-scrollbar { width: 0; }
  .vert-tag { font-size: 7.5px !important; margin-bottom: 3px !important; }
  .vert-title { font-size: clamp(14px, 4vw, 20px) !important; margin-bottom: 5px !important; }
  .vert-desc { font-size: 11px !important; line-height: 1.58 !important; max-width: 100% !important; margin-bottom: 8px !important; }
  .vert-bullets { gap: 4px !important; margin-bottom: 8px !important; }
  .vert-bullet { font-size: 9px !important; padding: 3px 7px !important; }
  .vert-link { font-size: 10px !important; }

  /* ── VISION mobile ── */
  #page-vision { justify-content: center; padding: 0; }
  .vision-content { padding: 0 18px; gap: 16px; }
  .vision-eyebrow { font-size: 9.5px; letter-spacing: 0.12em; }
  .vision-headline { font-size: clamp(24px, 7vw, 38px); }
  .vision-body { font-size: 13px; max-width: 100%; }
  .vision-cta { flex-direction: column; gap: 10px; }
  .vision-cta .btn-primary, .vision-cta .btn-ghost { width: 100%; text-align: center; }
  .vision-footer { flex-wrap: wrap; gap: 12px; bottom: 14px; }

  /* Modal */
  .modal-box { padding: 28px 20px; width: 95vw; }
  .modal-title { font-size: 22px; }
}

/* ── Extra small phones ── */
@media (max-width: 380px) {
  .hero-headline { font-size: 17px; }
  .problem-content { width: 54%; max-width: 54%; }
}
