/* ─── ORDANA SITE — LIGHT THEME ─── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7ff;
  --bg-deep: #0c1424;       /* dark sections — CTAs, footer */
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #f0f2fc;
  --border: rgba(0, 0, 0, 0.08);
  --border-bright: rgba(0, 0, 0, 0.16);
  --border-dark: rgba(255,255,255,0.08);
  --text: #0d0d1f;
  --text-muted: #5a5a78;
  --text-dim: #9090b0;
  --accent: #2563eb;
  --accent-2: #6d28d9;
  --accent-warm: #d97706;
  --accent-green: #059669;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 48px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: 17px;
  color: var(--text); text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-logo-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  font-family: 'JetBrains Mono', monospace;
}
.nav-logo-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
}

.nav-links > li { position: relative; }

.nav-links > li > a {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 400;
  padding: 8px 14px;
  border-radius: 8px;
  display: flex; align-items: center; gap: 5px;
  transition: color 0.2s, background 0.2s;
}
.nav-links > li > a:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-links > li > a.active { color: var(--text); font-weight: 500; }

.nav-chevron { width: 12px; height: 12px; opacity: 0.4; transition: transform 0.2s; }
.nav-links > li:hover .nav-chevron { transform: rotate(180deg); }

/* Dropdown — hover bridge fixes the gap-disappear bug */
.nav-links > li { position: relative; }
.nav-dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 215px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  opacity: 0; pointer-events: none;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: var(--shadow-lg);
  /* extend hover zone upward — eliminates the gap the cursor has to jump */
  margin-top: 0;
}
/* Transparent pseudo-element bridge between trigger and panel */
.nav-dropdown::before {
  content: '';
  position: absolute;
  bottom: 100%; left: 0; right: 0;
  height: 12px;
}
.nav-links > li:hover .nav-dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }

.nav-dropdown a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px;
  text-decoration: none; transition: background 0.15s;
}
.nav-dropdown a:hover { background: rgba(0,0,0,0.04); }
.nav-dropdown-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.nav-dropdown-text strong { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
.nav-dropdown-text span { display: block; font-size: 11px; color: var(--text-dim); margin-top: 1px; }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 8px;
  font-size: 14px !important;
  font-weight: 500 !important;
  margin-left: 8px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
}
.nav-cta:hover { background: #1d4ed8 !important; transform: translateY(-1px) !important; box-shadow: 0 4px 12px rgba(37,99,235,0.3) !important; }

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
  border: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-primary:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,0.35); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 15px; font-weight: 400;
  text-decoration: none;
  border: 1px solid var(--border-bright);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(0,0,0,0.25); background: rgba(0,0,0,0.03); }

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(37,99,235,0.3);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.btn-outline-accent:hover { background: rgba(37,99,235,0.06); border-color: rgba(37,99,235,0.5); }

.btn-ghost-light {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 15px; font-weight: 400;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.28); color: #fff; }

/* ─── TYPOGRAPHY ─── */
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 20px;
}

.display-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
}
.display-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.display-title .grad {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.body-large { font-size: 18px; font-weight: 300; color: var(--text-muted); line-height: 1.7; }
.body-base { font-size: 15px; font-weight: 300; color: var(--text-muted); line-height: 1.7; }

/* ─── LAYOUT ─── */
.container { max-width: 1100px; margin: 0 auto; }
.page-section { padding: 120px 48px; }
.page-section-sm { padding: 80px 48px; }

/* ─── SECTION BG ─── */
.bg-surface { background: var(--bg-alt); }
.bg-ink { background: var(--bg); }

/* ─── HERO ─── */
.page-hero {
  padding: 140px 48px 80px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37,99,235,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 60%, rgba(109,40,217,0.04) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
  opacity: 0.5;
}

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-bright); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card-sm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.card-sm:hover { border-color: var(--border-bright); }

/* ─── CHIPS ─── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
}
.chip-blue { background: rgba(37,99,235,0.08); color: var(--accent); border: 1px solid rgba(37,99,235,0.2); }
.chip-purple { background: rgba(109,40,217,0.08); color: var(--accent-2); border: 1px solid rgba(109,40,217,0.2); }
.chip-green { background: rgba(5,150,105,0.08); color: var(--accent-green); border: 1px solid rgba(5,150,105,0.2); }
.chip-orange { background: rgba(217,119,6,0.08); color: var(--accent-warm); border: 1px solid rgba(217,119,6,0.2); }
.chip-dim { background: rgba(0,0,0,0.04); color: var(--text-muted); border: 1px solid var(--border); }

/* ─── CHECK LIST ─── */
.check-list { display: flex; flex-direction: column; gap: 10px; list-style: none; }
.check-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; color: var(--text-muted); line-height: 1.5;
}
.check-list li::before {
  content: '✓';
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(37,99,235,0.08);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; margin-top: 1px;
}

/* ─── DIVIDER ─── */
.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ─── STATS BAR ─── */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.stat-cell {
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: 'Instrument Serif', serif;
  font-size: 48px; font-weight: 400;
  line-height: 1; letter-spacing: -0.02em;
  color: var(--text);
}
.stat-num.accent { color: var(--accent); }
.stat-num.green { color: var(--accent-green); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; font-weight: 300; }

/* ─── FEATURE GRID ─── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { border-color: var(--border-bright); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 20px;
  background: rgba(37,99,235,0.08); border: 1px solid rgba(37,99,235,0.15);
}
.feature-title { font-size: 15px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.feature-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ─── TERMINAL — STAYS DARK ─── */
.terminal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.terminal-bar {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 7px;
  background: #161b22;
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-red { background: #ff5f57; } .t-yellow { background: #febc2e; } .t-green { background: #28c840; }
.terminal-label { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.3); }
.terminal-body { padding: 24px; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.9; background: #0d1117; }
.t-time { color: rgba(255,255,255,0.2); }
.t-in { color: #79b8ff; }
.t-out { color: #85e89d; }
.t-warn { color: #ffab70; }
.t-muted { color: rgba(255,255,255,0.5); }

/* ─── CTA BAND — DARK NAVY ─── */
.cta-band {
  padding: 100px 48px;
  text-align: center;
  background: var(--bg-deep);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(37,99,235,0.15) 0%, transparent 70%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400; letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #ffffff;
}
.cta-band-sub { font-size: 17px; color: rgba(255,255,255,0.55); font-weight: 300; max-width: 480px; margin: 0 auto 36px; line-height: 1.6; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.eyebrow-light {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 20px;
}

/* ─── FOOTER — DARK NAVY ─── */
footer.site-footer {
  padding: 64px 48px 32px;
  background: var(--bg-deep);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.4); margin-top: 16px; line-height: 1.6; max-width: 260px; font-weight: 300; }
.footer-brand .nav-logo { color: #fff; }
.footer-brand .nav-logo-mark { background: rgba(255,255,255,0.12); }
.footer-brand .nav-logo-img { filter: none; }
.footer-logo-img { opacity: 0.92; }
.footer-col-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.25); margin-bottom: 18px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { text-decoration: none; color: rgba(255,255,255,0.45); font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.25); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,0.25); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: rgba(255,255,255,0.5); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── HERO BADGE ─── */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(37,99,235,0.07);
  border: 1px solid rgba(37,99,235,0.18);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeUp 0.7s ease both;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s ease infinite;
}

/* ─── LAYOUT HELPERS ─── */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.split-2-rev .col-visual { order: -1; }

/* ─── FORM ELEMENTS ─── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
input, textarea, select {
  background: #ffffff;
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px; color: var(--text);
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(37,99,235,0.4);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
textarea { resize: vertical; min-height: 120px; }
::placeholder { color: var(--text-dim); }
select option { background: #ffffff; color: var(--text); }

/* ─── SECTION DIVIDERS ─── */
.section-rule {
  width: 100%; border: none;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE & TABLET
   Breakpoints: 900px (tablet), 600px (mobile)
   ═══════════════════════════════════════════════ */

/* ─── HAMBURGER BUTTON ─── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: none; background: transparent; cursor: pointer;
  border-radius: 8px; padding: 6px;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger:hover { background: rgba(0,0,0,0.05); }
.nav-hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── MOBILE OVERLAY ─── */
.nav-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.2s;
}
.nav-overlay.visible { opacity: 1; }

/* ─── MOBILE MENU PANEL ─── */
.nav-mobile-panel {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 24px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  max-height: calc(100vh - 64px);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-mobile-panel.open {
  transform: translateY(0);
  opacity: 1;
}
.nav-mobile-section {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim); padding: 16px 4px 8px;
}
.nav-mobile-section:first-child { padding-top: 4px; }
.nav-mobile-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-radius: 10px;
  text-decoration: none; color: var(--text);
  font-size: 15px; font-weight: 400;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-mobile-link:hover, .nav-mobile-link:active { background: rgba(0,0,0,0.04); }
.nav-mobile-link .nav-dropdown-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.nav-mobile-link strong { display: block; font-size: 14px; font-weight: 500; }
.nav-mobile-link span { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.nav-mobile-cta {
  display: block; text-align: center;
  margin-top: 16px; padding: 14px;
  background: var(--accent); color: #fff;
  border-radius: 10px; text-decoration: none;
  font-size: 15px; font-weight: 500;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-mobile-cta:hover { background: #1d4ed8; }
.nav-mobile-divider { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.nav-mobile-plain {
  display: flex; align-items: center;
  padding: 12px 10px; border-radius: 10px;
  text-decoration: none; color: var(--text-muted);
  font-size: 15px; transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-mobile-plain:hover { background: rgba(0,0,0,0.04); color: var(--text); }

/* ─── TABLET (≤900px) ─── */
@media (max-width: 900px) {

  /* Nav */
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Sections */
  .page-section { padding: 80px 24px; }
  .page-section-sm { padding: 56px 24px; }
  .page-hero { padding: 100px 24px 60px; }
  .container { padding: 0; }

  /* Layouts → single column */
  .split-2 { grid-template-columns: 1fr; gap: 40px; }
  .split-2-rev .col-visual { order: 0; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .feature-grid-2 { grid-template-columns: 1fr; gap: 14px; }

  /* Stats */
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { border-bottom: 1px solid var(--border); }
  .stat-cell:nth-child(2) { border-right: none; }
  .stat-cell:nth-child(3), .stat-cell:nth-child(4) { border-bottom: none; }
  .stat-num { font-size: 40px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  /* CTA band */
  .cta-band { padding: 72px 24px; }
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions a { width: 100%; max-width: 320px; justify-content: center; }

  /* Hero actions */
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions a { width: 100%; max-width: 300px; justify-content: center; }
}

/* ─── MOBILE (≤600px) ─── */
@media (max-width: 600px) {

  /* Nav */
  nav { padding: 0 16px; height: 56px; }
  .nav-mobile-panel { top: 56px; }

  /* Global section padding */
  .page-section { padding: 60px 16px; }
  .page-section-sm { padding: 44px 16px; }
  .page-hero { padding: 90px 16px 48px; }
  .cta-band { padding: 60px 16px; }

  /* Typography scale-down */
  .display-title { font-size: clamp(32px, 8vw, 44px) !important; }
  .body-large { font-size: 16px; }
  .body-base { font-size: 14px; }
  .stat-num { font-size: 36px; }
  .cta-band-title { font-size: clamp(28px, 7vw, 42px); }

  /* Stats — 2 col on mobile too, just tighter */
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-cell { padding: 28px 16px; }

  /* Grids → full single column */
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid-2 { grid-template-columns: 1fr; }

  /* Footer → stacked */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  footer.site-footer { padding: 48px 16px 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-legal { justify-content: center; }

  /* Form */
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* Buttons */
  .btn-primary, .btn-ghost, .btn-ghost-light, .btn-outline-accent {
    width: 100%; justify-content: center;
    padding: 15px 20px; font-size: 15px;
  }
  .cta-actions a { max-width: 100%; }

  /* Chips */
  .chip { font-size: 9px; }
}

/* ─── INDEX-SPECIFIC MOBILE ─── */
@media (max-width: 900px) {
  /* Pipeline → 2-col on tablet */
  .pipeline {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 16px;
  }
  .p-arrow { display: none; }

  /* Timeline → 2-col */
  .tl { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .tl::before { display: none; }
  .tl-step { padding: 0; }

  /* Agents grid stays 2-col on tablet — just reduce gap */
  .agents-grid { gap: 14px; }

  /* diff grid → single column */
  .diff-grid { grid-template-columns: 1fr; gap: 14px; }
  .problem-split { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 600px) {
  /* Hero */
  .hero { padding: 100px 16px 60px; }
  .hero h1 { font-size: clamp(36px, 9vw, 52px); }
  .hero-sub { font-size: 15px; }

  /* Pipeline → vertical list */
  .pipeline {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 12px;
  }
  .p-step { flex-direction: row; align-items: center; gap: 12px; text-align: left; }
  .p-step { display: flex; }
  .p-icon { flex-shrink: 0; margin-bottom: 0; }
  .p-label { margin-bottom: 1px; }

  /* Agents grid → single column */
  .agents-grid { grid-template-columns: 1fr; }

  /* Timeline → single column */
  .tl { grid-template-columns: 1fr; gap: 20px; }
  .tl-step { display: flex; flex-direction: row; align-items: flex-start; gap: 16px; text-align: left; }
  .tl-node { flex-shrink: 0; margin: 0; }

  /* Problem split - hide inbox visual on very small screens */
  .pipeline-wrap { display: none; }

  /* Diff grid */
  .diff-grid { grid-template-columns: 1fr; }
}

/* ─── AGENT PAGES MOBILE ─── */
@media (max-width: 900px) {
  /* Agent hero grids */
  .voice-hero-inner,
  .agent-hero-inner,
  .predict-hero-inner,
  .chat-hero-inner { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Channel grid → 2-col */
  .channel-grid { grid-template-columns: repeat(2, 1fr); }

  /* Cart preview / call visual / chat widget — limit width */
  .call-visual, .cart-preview, .chat-widget { max-width: 480px; }

  /* ERP logos wrapping */
  .erp-logos { gap: 8px; }

  /* Team grid → 2-col */
  .team-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Values grid → 2-col */
  .values-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Delight grid stays 2-col on tablet */
  .delight-grid { grid-template-columns: repeat(2, 1fr); }

  /* Contact layout */
  .contact-inner { grid-template-columns: 1fr !important; gap: 40px !important; }
}

@media (max-width: 600px) {
  /* All hero inner grids */
  .voice-hero, .agent-hero, .predict-hero, .chat-hero, .about-hero, .contact-hero {
    padding: 90px 16px 48px;
  }

  /* Visuals center and full-width */
  .call-visual, .cart-preview, .chat-widget { max-width: 100%; }

  /* Channel grid → single col */
  .channel-grid { grid-template-columns: 1fr; }

  /* Team grid → 2-col on mobile */
  .team-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Values grid → single col */
  .values-grid { grid-template-columns: 1fr !important; }

  /* Delight grid → single col */
  .delight-grid { grid-template-columns: 1fr; }

  /* Why item grid in voice page */
  .why-grid { grid-template-columns: 1fr; }

  /* Founder quote */
  .founder-quote { padding: 28px 20px; }

  /* API docs sidebar → hidden on mobile */
  .docs-layout { grid-template-columns: 1fr !important; }
  .docs-sidebar { display: none; }

  /* News filter → wrapping */
  .filter-bar { flex-wrap: wrap; gap: 8px; }
}

/* ─── TOUCH-FRIENDLY TAP TARGETS ─── */
@media (max-width: 900px) {
  .nav-dropdown a { padding: 13px 12px; }
  .check-list li { font-size: 14px; line-height: 1.6; }
  .feature-card { padding: 24px; }
  .agent-card { padding: 28px; }
  .card { padding: 24px; }
}

/* ─── PREVENT BODY SCROLL WHEN MENU OPEN ─── */
body.menu-open { overflow: hidden; }

/* ─── AGENT HERO INNER GRIDS — unified mobile target ─── */
@media (max-width: 900px) {
  .voice-hero-inner,
  .agent-hero-inner,
  .predict-hero-inner,
  .chat-hero-inner,
  .contact-inner {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
  .voice-hero, .agent-hero, .predict-hero, .chat-hero, .contact-hero, .about-hero {
    padding: 100px 24px 56px;
  }
  /* team grid */
  .team-grid { grid-template-columns: repeat(3, 1fr) !important; }
  /* values grid */
  .values-grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* news/api specific */
  .docs-layout { gap: 32px; }
}

@media (max-width: 600px) {
  .voice-hero, .agent-hero, .predict-hero, .chat-hero, .contact-hero, .about-hero {
    padding: 86px 16px 44px;
  }
  .about-hero h1 { font-size: clamp(34px, 9vw, 52px) !important; }
  .team-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .values-grid { grid-template-columns: 1fr !important; }
  /* Inbox visual hidden on very small — avoid overflow */
  .inbox-visual { font-size: 12px; }
  .inbox-row { padding: 9px 10px; gap: 7px; }
  /* Remove pipeline entirely on very small — clutters */
  .pipeline-wrap { display: none; }
  /* Data stream — hide on mobile */
  .data-stream { display: none; }
  /* Stat num label wraps */
  .stat-label { font-size: 11px; }
  /* Agent cards full width */
  .agent-card { padding: 24px; }
  .agent-name { font-size: 22px; }
  /* Timeline node layout fix */
  .tl-node { width: 44px; height: 44px; font-size: 12px; }
  /* CTA band button stack */
  .cta-band .btn-primary, .cta-band .btn-ghost-light {
    width: 100%; max-width: 340px; justify-content: center;
  }
}
