:root {
  --primary: #1a5fb4;
  --primary-soft: #3b7fc4;
  --primary-dark: #0f4080;
  --primary-foreground: #fff;
  --secondary: #e8f1f8;
  --secondary-foreground: #184878;
  --background: #fff;
  --foreground: #111827;
  --muted: #f8fafc;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --card: #fff;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 1rem;
  --header: 92px;
  --font: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  --glow: 0 12px 32px rgba(26, 95, 180, 0.28);
  --shadow-card: 0 20px 48px rgba(15, 23, 42, 0.07);
  --shadow-card-hover: 0 28px 64px rgba(26, 95, 180, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  max-width: 100%;
}

.code-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea {
  font: inherit;
  font-size: 16px;
  max-width: 100%;
}
button, a, summary, .tab, .chip, .stage-tab, .preset-btn, .btn-gen-action, .btn-mini, .cookie-footer-link, .cookie-close, .switch, .slider {
  -webkit-tap-highlight-color: rgba(26, 95, 180, 0.15);
  touch-action: manipulation;
  cursor: pointer;
}

h1, h2, h3, h4 {
  margin: 0 0 0.55em;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.75rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  z-index: 120;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  height: calc(var(--header) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}

main {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header) + env(safe-area-inset-top, 0px));
}

.site-footer {
  position: relative;
  z-index: 1;
}

[id] {
  scroll-margin-top: calc(var(--header) + 20px);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 64px;
  width: auto;
  max-width: min(420px, calc(100vw - 80px));
  object-fit: contain;
  transition: transform 0.2s ease;
}
.brand-logo:hover { transform: scale(1.02); }

.nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.nav a {
  transition: color 0.15s ease;
  padding: 6px 0;
}
.nav a:hover { color: var(--primary); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
  z-index: 10001;
}
.menu-toggle:active {
  background: var(--secondary);
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ═══ Buttons & Badges ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--glow);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 16px 36px rgba(26, 95, 180, 0.36);
}

.btn-white {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.btn-ghost {
  background: #fff;
  color: var(--foreground);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.badge.faint {
  background: #fff;
  margin-bottom: 14px;
  border-color: var(--border);
}

/* ═══ Hero Section ═══ */
.hero {
  padding: 64px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-copy {
  width: min(840px, calc(100% - 40px));
  text-align: center;
  animation: rise 0.7s ease both;
}

.hero h1 { margin-top: 24px; }
.hero h1 span {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary) 20%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  color: var(--muted-foreground);
  font-size: 1.12rem;
  max-width: 38rem;
  margin: 1.4rem auto 2.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.hero-3d-wrap {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto 8px;
  position: relative;
  z-index: 2;
}

.hero-3d-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 50px rgba(26, 95, 180, 0.22));
  animation: float3d 6s ease-in-out infinite;
}

@keyframes float3d {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.012); }
}

/* ═══ Stage Tabs (Mobile & Quick-jump) ═══ */
.stage-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 32px 0 16px;
  width: min(600px, calc(100% - 32px));
}

.stage-tab {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted-foreground);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.stage-tab.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(26, 95, 180, 0.3);
}

/* ═══ Hero Stage & Product Cards ═══ */
.hero-stage {
  width: min(1200px, calc(100% - 32px));
  margin-top: 18px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 460px;
  animation: rise 0.8s ease 0.12s both;
  position: relative;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 24px;
  width: 35%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.product-card.is-side {
  transform: scale(0.93);
  opacity: 0.82;
  z-index: 1;
}

.product-card.is-center {
  z-index: 3;
  transform: scale(1.02);
  border-color: rgba(26, 95, 180, 0.4);
  box-shadow: 0 28px 72px rgba(26, 95, 180, 0.14);
}

.product-card[data-card="0"].is-side { margin-right: -36px; }
.product-card[data-card="2"].is-side { margin-left: -36px; }

.pc-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pc-head h3 { margin: 0; font-size: 1.15rem; }
.pc-head p { margin: 0; font-size: 0.78rem; color: var(--muted-foreground); }

.pc-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--secondary);
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.live-pill {
  margin-left: auto;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-pill.pulse {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover {
  border-color: var(--primary);
  background: var(--secondary);
}
.chip i { width: 7px; height: 7px; border-radius: 50%; }
.chip.on {
  border-color: var(--primary);
  background: var(--secondary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(26, 95, 180, 0.18);
}

.mini-chart, .orbit-chat, .dash, .ui-card {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.chart-title, .ui-top {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 12px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
}

.bars span {
  flex: 1;
  background: linear-gradient(180deg, var(--primary-soft), var(--primary));
  border-radius: 6px 6px 2px 2px;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gen-preview-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.45;
}
.preview-tag {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.gen-preview-box p { margin: 0; color: var(--foreground); }

.gen-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-gen-action {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(26, 95, 180, 0.28);
}
.btn-gen-action:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 95, 180, 0.35);
}

.ok-line {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--success);
}

.orbit-chat { display: flex; flex-direction: column; gap: 10px; min-height: 200px; }

.bubble {
  max-width: 94%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.bubble.user {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble.ai {
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.orbit-metrics-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted-foreground);
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.orbit-metrics-row b { color: var(--foreground); }

.stats-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stats-2 div, .kpi-row div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.stats-2 span, .kpi-row span, .mini-rows li {
  display: block;
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

.stats-2 b, .kpi-row b { font-size: 1.15rem; font-weight: 800; color: var(--foreground); }

.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.action-item:hover { border-color: var(--primary); }

.btn-mini {
  background: var(--secondary);
  border: 1px solid var(--primary-soft);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-mini:hover {
  background: var(--primary);
  color: #fff;
}
.badge-tag {
  color: var(--success);
  font-size: 0.68rem;
  font-weight: 700;
}
.btn-mini:hover .badge-tag { color: #fff; }

/* ═══ Stats Strip ═══ */
.stats-strip {
  border-block: 1px solid var(--border);
  background: #fff;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 28px 0;
}

.stats-row div { text-align: center; }
.stats-row b {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}
.stats-row span {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-top: 4px;
}

/* ═══ NEW FEATURE: Interactive Sandbox ═══ */
.sandbox-container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.sandbox-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sandbox-presets-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sandbox-presets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-btn {
  text-align: left;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}
.preset-btn:hover {
  background: #fff;
  border-color: var(--primary);
  transform: translateX(4px);
}
.preset-btn.on {
  background: var(--secondary);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(26, 95, 180, 0.15);
}

.sandbox-run-btn {
  width: 100%;
  margin-top: 10px;
}

.sandbox-display {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sandbox-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
}
.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.sandbox-latency {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 600;
}

.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pipe-step {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.25s ease;
}
.pipe-step.step-done {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}
.pipe-step.step-active {
  border-color: var(--primary);
  background: var(--secondary);
  box-shadow: 0 4px 16px rgba(26, 95, 180, 0.15);
}

.pipe-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
}
.pipe-info h4 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
}
.pipe-info p {
  margin: 4px 0 0;
  font-size: 0.68rem;
  color: var(--muted-foreground);
  line-height: 1.35;
}
.pipe-status {
  margin-top: auto;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.pipe-step.step-done .pipe-status { color: var(--success); }
.pipe-step.step-active .pipe-status { color: var(--primary); }

.sandbox-terminal {
  background: #0f172a;
  color: #38bdf8;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #1e293b;
}

.term-bar {
  background: #1e293b;
  color: #94a3b8;
  padding: 8px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.term-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}
.term-dot:nth-child(1) { background: #ef4444; }
.term-dot:nth-child(2) { background: #f59e0b; }
.term-dot:nth-child(3) { background: #10b981; }

.sandbox-terminal pre {
  margin: 0;
  padding: 16px;
  font-size: 0.76rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}
.sandbox-terminal code { font-family: var(--font); color: #cbd5e1; }

/* ═══ NEW FEATURE: ROI Calculator ═══ */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}

.calc-inputs-card, .calc-results-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.calc-group {
  margin-bottom: 22px;
}
.calc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--foreground);
}
.calc-val {
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 800;
}

.calc-slider {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 95, 180, 0.4);
  transition: transform 0.1s ease;
}
.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--foreground);
  outline: none;
}

.calc-results-card {
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  border-color: rgba(26, 95, 180, 0.2);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.calc-result-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  background: var(--secondary);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calc-kpi-main {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.calc-kpi-sub {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  font-weight: 600;
}
.calc-big-num {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-top: 6px;
}

.calc-kpis-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.calc-kpi-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.calc-kpi-box span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted-foreground);
  font-weight: 600;
}
.calc-kpi-box b {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--foreground);
  margin-top: 4px;
}

.calc-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.4;
  margin: 0;
}

/* ═══ The Balram Way ═══ */
.way {
  padding: 88px 0 40px;
  text-align: center;
}

.way-kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
}

.section-lead {
  color: var(--muted-foreground);
  max-width: 40rem;
  margin: 0 auto 2.2rem;
}

.center-head { text-align: center; margin-bottom: 36px; }

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 24px;
}

.tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  color: var(--muted-foreground);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.tab span { color: var(--primary); margin-right: 6px; }
.tab.on {
  background: var(--secondary);
  border-color: var(--primary);
  color: var(--foreground);
  box-shadow: 0 4px 16px rgba(26, 95, 180, 0.15);
}

.tab-panels-wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 100%;
  box-sizing: border-box;
}

.tab-panels {
  width: 100%;
  margin: 0 auto;
  text-align: left;
  box-sizing: border-box;
}

.tab-panel {
  display: none;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-card);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.tab-panel.on { display: grid; }

.check {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.check li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--muted-foreground);
  font-size: 0.92rem;
}
.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 800;
}

.ingest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.ingest-grid span {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
}

.progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--primary);
}

.fine { margin: 8px 0 0; font-size: 0.75rem; color: var(--muted-foreground); }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.rec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rec-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.rec-list span { color: var(--primary); font-size: 0.78rem; font-weight: 800; }
.rec-list small { display: block; color: var(--muted-foreground); font-size: 0.72rem; }

/* ═══ Sections & Feature Rows ═══ */
.section { padding: 88px 0; }
.muted-bg { background: var(--muted); }

.feature-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
}

.feature-row.reverse { grid-template-columns: 0.9fr 1.1fr; }
.feature-row.reverse .feature-copy { order: -1; }

.stack-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 56px;
}

.stack-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stack-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.stack-card img {
  width: 100%;
  height: 152px;
  object-fit: cover;
}
.stack-card div { padding: 16px 18px 20px; }
.stack-card h3 { margin: 0; font-size: 0.98rem; }

.feature-media {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background: var(--muted);
  box-shadow: var(--shadow-card);
}
.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feature-media.is-3d img {
  object-fit: contain;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
}

.stack-visual { margin-bottom: 48px; }
.stack-visual img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: #f8fbff;
}

.use-grid,
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.industry-grid { grid-template-columns: repeat(3, 1fr); }

.use-grid article,
.industry-grid article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.use-grid article:hover,
.industry-grid article:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.tool-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.tool-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ═══ Logo Marquee ═══ */
.logo-marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: #fff;
  padding: 20px 0;
  margin-bottom: 36px;
}

.logo-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 30s linear infinite;
  color: var(--muted-foreground);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.feature-3, .trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.trust-grid { grid-template-columns: repeat(4, 1fr); }

.feature-3 article, .trust-grid article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-3 p, .trust-grid p, .team-card p, .faq p {
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.team-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
}
.team-label {
  color: var(--primary);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.dots {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.dots li {
  padding: 6px 0 6px 16px;
  position: relative;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
.dots li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  left: 0;
  top: 13px;
}

.mini-rows {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mini-rows li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}
.mini-rows b { color: var(--success); font-weight: 700; }

/* ═══ FAQ ═══ */
.faq-wrap {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  content: "–";
}
.faq p { margin: 12px 0 0; font-size: 0.94rem; }

/* ═══ CTA Band ═══ */
.cta-band {
  background: linear-gradient(135deg, #103b70, var(--primary) 60%, #38bdf8);
  color: #fff;
  padding: 64px 0;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}

.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.cta-band h2 { margin: 0; max-width: 18ch; color: #fff; }

/* ═══ Contact Form ═══ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
}

.mail a {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
}

.form input[type="hidden"] {
  display: none !important;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
}

.form .full { grid-column: 1 / -1; }

.form input, .form select, .form textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  background: #fff;
  font-size: 16px;
  width: 100%;
  color: var(--foreground);
}

.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid rgba(26, 95, 180, 0.25);
  border-color: var(--primary);
}

.form-status { grid-column: 1 / -1; margin: 0; color: var(--primary); min-height: 1.2em; font-weight: 700; }

/* ═══ Footer ═══ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

.footer-grid h4 {
  color: var(--foreground);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.footer-grid a { display: block; margin: 8px 0; }
.footer-grid a:hover { color: var(--primary); }

.footer-cta-sub {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS & MOBILE VIEW POLISH
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 981px) {
  .stage-nav { display: none !important; }
  .hero-stage .product-card { display: flex !important; }
}

@media (max-width: 980px) {
  :root { --header: 78px; }
  .wrap { width: min(1180px, calc(100% - 32px)); }
  .hero { padding: 36px 0 24px; }
  
  /* ── Header & Mobile Nav under 980px ── */
  .header-inner { gap: 12px; position: relative; }
  .brand-logo {
    height: 52px;
    max-width: calc(100vw - 76px);
  }
  .header-cta { display: none !important; }
  .menu-toggle {
    display: flex !important;
    margin-left: auto;
    flex-shrink: 0;
  }

  .nav {
    display: none;
    position: fixed;
    top: calc(var(--header) + env(safe-area-inset-top, 0px) + 8px);
    left: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    flex-direction: column;
    padding: 10px 14px 14px;
    gap: 0;
    max-height: calc(85vh - var(--header));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 9999;
    animation: navDrop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .nav.open { display: flex !important; }
  
  .nav a {
    padding: 14px 12px;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--foreground);
  }
  .nav a:last-child { border-bottom: none; }
  .nav a:active { background: var(--secondary); color: var(--primary); }

  .stage-nav {
    display: flex;
    width: 100%;
    overflow-x: auto;
    padding: 6px 0;
    gap: 8px;
    margin: 20px 0 12px;
  }

  .hero-stage {
    flex-direction: column;
    min-height: 0;
    margin-top: 12px;
    width: 100%;
  }

  .hero-stage .product-card {
    display: none;
    width: 100%;
    margin: 0 0 16px !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .hero-stage .product-card.mobile-active,
  .hero-stage.show-all .product-card {
    display: flex !important;
  }

  .sandbox-container,
  .calculator-grid,
  .contact-grid,
  .faq-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pipeline-flow {
    grid-template-columns: 1fr 1fr;
  }

  .tab-panel.on,
  .team-grid,
  .feature-3,
  .trust-grid,
  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-copy { order: 0; }
  .stack-cards,
  .stats-row,
  .use-grid,
  .industry-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .hero-3d-wrap { width: min(640px, calc(100% - 24px)); margin: 16px auto 0; }
  .feature-row { gap: 20px; margin-bottom: 36px; }
  .section { padding: 56px 0; }
  .way { padding: 56px 0 24px; }
}

@media (max-width: 760px) {
  :root { --header: 76px; }
  
  h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  h2 { font-size: clamp(1.45rem, 6vw, 1.95rem); }
  .lead { font-size: 0.98rem; margin: 1rem auto 1.4rem; }
  .badge { font-size: 0.65rem; letter-spacing: 0.1em; padding: 6px 12px; }

  /* ── Hero on Mobile ── */
  .hero { padding: 24px 0 16px; text-align: center; }
  .hero-copy { width: calc(100% - 20px); text-align: center; }
  .hero h1 { margin-top: 16px; }
  .hero-actions { flex-direction: column; width: 100%; gap: 10px; }
  .hero-actions .btn { width: 100%; min-height: 52px; font-size: 1rem; }

  /* ── Stage Switcher on Mobile ── */
  .stage-nav {
    display: flex;
    width: 100%;
    overflow-x: auto;
    padding: 4px 0;
    gap: 8px;
    scrollbar-width: none;
  }
  .stage-nav::-webkit-scrollbar { display: none; }
  .stage-tab { font-size: 0.82rem; padding: 10px 16px; min-height: 42px; }

  /* ── Sandbox & Calculator on Mobile ── */
  .sandbox-container,
  .calc-inputs-card,
  .calc-results-card {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .pipeline-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .calc-big-num { font-size: 2.2rem; }
  .calc-kpis-row { grid-template-columns: 1fr; }

  /* ── Grids & The Balram Way on Mobile ── */
  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px 8px; padding: 18px 0; }
  .stack-cards { grid-template-columns: 1fr; }
  .stack-card img { height: 180px; }
  .feature-media { aspect-ratio: 16 / 11; border-radius: 18px; }
  
  /* The Balram Way Mobile Fix — prevent horizontal overflow */
  .tab-panels-wrap { width: 100% !important; max-width: 100% !important; padding: 0 !important; box-sizing: border-box !important; }
  .tab-panels { width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
  .tab-panel {
    grid-template-columns: 1fr !important;
    padding: 18px 14px !important;
    border-radius: 18px !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .panel-copy, .panel-ui, .ui-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .ingest-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  .ingest-grid span {
    padding: 8px 4px !important;
    font-size: 0.72rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }
  .kpi-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .kpi-row div {
    padding: 8px 4px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .kpi-row span { font-size: 0.62rem !important; }
  .kpi-row b { font-size: 0.95rem !important; }
  .rec-list li {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  .rec-list li span {
    align-self: flex-start !important;
    font-size: 0.72rem !important;
  }

  .tabs { gap: 6px; }
  .tab { padding: 9px 14px; min-height: 44px; font-size: 0.82rem; }
  .form { padding: 20px 16px; border-radius: 20px; grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 24px); }
  .logo-track { gap: 32px; font-size: 0.8rem; }
  
  .section { padding: 48px 0; }
  .btn { min-height: 52px; border-radius: 14px; }
  
  /* ── Center aligned footer for mobile view ── */
  .footer-grid {
    text-align: center !important;
    gap: 32px !important;
    justify-items: center !important;
  }
  .footer-grid > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }
  .footer-grid .brand-logo {
    margin: 0 auto 12px !important;
    display: block !important;
  }
  .footer-grid h4 {
    margin-bottom: 10px !important;
    width: 100% !important;
    text-align: center !important;
  }
  .footer-grid a {
    display: inline-block !important;
    margin: 6px auto !important;
    text-align: center !important;
  }
  .footer-cta-sub {
    text-align: center !important;
  }
  .footer-bottom {
    text-align: center !important;
  }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 1.72rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .use-grid, .industry-grid, .feature-3, .trust-grid { grid-template-columns: 1fr; }
  .stage-tab { font-size: 0.72rem; padding: 8px 10px; }
  .mail a { word-break: break-all; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo-track, .btn, .hero-3d-img { animation: none; transition: none; }
}

@media (hover: none) {
  .btn:hover,
  .stack-card:hover,
  .product-card:hover,
  .use-grid article:hover,
  .industry-grid article:hover {
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   COOKIE CONSENT & PRIVACY CONTROLS (GDPR / CCPA)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Footer Link ── */
.cookie-footer-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}
.cookie-footer-link:hover { opacity: 0.8; }

/* ── Floating Consent Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 940px;
  margin: 0 auto;
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(26, 95, 180, 0.12);
  padding: 22px 26px;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translateY(32px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cookie-banner.hidden {
  display: none !important;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-text {
  flex: 1;
  text-align: left;
}

.cookie-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--secondary);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.cookie-text h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--foreground);
}

.cookie-text p {
  font-size: 0.84rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.45;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie {
  padding: 10px 18px;
  font-size: 0.84rem;
  min-height: 42px;
  border-radius: 12px;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--muted);
  border-color: var(--primary-soft);
}

/* ── Customization Modal ── */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cookie-modal.show {
  display: flex;
  opacity: 1;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-modal-content {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 580px;
  width: 100%;
  max-height: min(90vh, 700px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  animation: modalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.96) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.cookie-modal-header h3 {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.cookie-close {
  background: var(--muted);
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted-foreground);
  transition: all 0.15s ease;
}
.cookie-close:hover {
  background: var(--foreground);
  color: #fff;
}

.cookie-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  text-align: left;
}

.cookie-modal-lead {
  font-size: 0.86rem;
  color: var(--muted-foreground);
  margin-bottom: 18px;
  line-height: 1.5;
}

.cookie-pref-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cookie-pref-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--muted);
}

.cookie-pref-info {
  flex: 1;
}

.cookie-pref-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.cookie-pref-title b {
  font-size: 0.92rem;
  color: var(--foreground);
}

.cookie-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e2e8f0;
  color: var(--muted-foreground);
}

.cookie-tag.required {
  background: rgba(16, 185, 129, 0.15);
  color: #065f46;
}

.cookie-pref-info p {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  margin: 0;
  line-height: 1.4;
}

/* ── Toggle Switch ── */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: var(--primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

input:disabled + .slider {
  background-color: #93c5fd;
  cursor: not-allowed;
  opacity: 0.7;
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}

/* ── Responsive Cookie Styles ── */
@media (max-width: 760px) {
  .cookie-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 16px;
    border-radius: 18px;
  }
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .cookie-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .cookie-actions .btn {
    width: 100%;
    min-height: 44px;
  }
  .cookie-modal-content {
    border-radius: 20px;
    max-height: 85vh;
  }
  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .cookie-modal-footer {
    flex-direction: column;
  }
  .cookie-modal-footer .btn {
    width: 100%;
  }
}
