/* ========================================================================
   RABIMAIL CORPORATE WEBSITE — DESIGN SYSTEM
   Inspired by Webex by Cisco / Atlassian Jira corporate aesthetic
   ======================================================================== */

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

:root {
  /* Brand palette — derived from the logo (deep navy #042C53, electric blue #1F7BFF) */
  --brand-900: #021A33;
  --brand-800: #042C53;
  --brand-700: #073F7A;
  --brand-600: #0B58A8;
  --brand-500: #1F7BFF;
  --brand-400: #4A95FF;
  --brand-300: #82B5FF;
  --brand-200: #B8D4FF;
  --brand-100: #E0EBFF;
  --brand-50:  #F2F7FF;

  /* Neutrals */
  --ink-900: #0A1628;
  --ink-800: #1B2940;
  --ink-700: #324159;
  --ink-600: #4E5D75;
  --ink-500: #6B7A91;
  --ink-400: #909AAE;
  --ink-300: #B8C0D0;
  --ink-200: #DCE1EB;
  --ink-100: #EEF1F7;
  --ink-50:  #F7F9FC;
  --white:   #FFFFFF;

  /* Semantic */
  --success: #0CAA6E;
  --success-bg: #E8F7F0;
  --warning: #E89F2B;
  --warning-bg: #FDF5E6;
  --danger: #E0395C;
  --danger-bg: #FCE9EE;
  --info: #1F7BFF;
  --info-bg: #E0EBFF;

  /* Layout */
  --container: 1280px;
  --container-wide: 1440px;
  --nav-height: 72px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Type */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Shadows — soft, corporate */
  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.04), 0 1px 1px rgba(10, 22, 40, 0.03);
  --shadow: 0 2px 8px rgba(10, 22, 40, 0.06), 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(10, 22, 40, 0.08), 0 4px 12px rgba(10, 22, 40, 0.04);
  --shadow-xl: 0 24px 56px rgba(10, 22, 40, 0.12), 0 8px 24px rgba(10, 22, 40, 0.06);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t: 240ms;
  --t-slow: 420ms;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-800);
  background: var(--white);
  font-feature-settings: 'ss01', 'cv01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  width: 100%;
}
img, svg, video, iframe { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-600); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--brand-500); }
ul, ol { list-style: none; }

/* ============ TYPOGRAPHY ============ */
.h-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}
.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink-900);
}
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-600);
}
.lede {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-600);
}
.kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--ink-100);
  border: 1px solid var(--ink-200);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ============ LAYOUT ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-lg { padding: 128px 0; }

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-sm { padding: 48px 0; }
  .section-lg { padding: 80px 0; }
}

/* ============ TOP UTILITY BAR ============ */
.utility-bar {
  background: var(--brand-900);
  color: var(--ink-300);
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.utility-bar .container-wide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}
.utility-bar a { color: var(--ink-300); }
.utility-bar a:hover { color: var(--white); }
.utility-links { display: flex; gap: 22px; }
.utility-meta { display: flex; gap: 18px; align-items: center; }
.utility-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(12,170,110,0.2); }

@media (max-width: 768px) {
  .utility-bar { display: none; }
}

/* ============ MAIN NAVBAR ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ink-100);
}
.navbar .container-wide {
  display: flex;
  align-items: center;
  height: 72px;
  gap: 40px;
}
.nav-logo { display: flex; align-items: center; gap: 0; }
.nav-logo img { height: 28px; width: auto; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-item {
  position: relative;
  padding: 10px 14px;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  display: flex; align-items: center; gap: 6px;
}
.nav-item:hover { background: var(--ink-50); color: var(--ink-900); }
.nav-item.has-dropdown::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 4px;
  opacity: 0.6;
  transition: transform var(--t-fast) var(--ease);
}
.nav-item:hover.has-dropdown::after { transform: rotate(225deg) translateY(2px); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  min-width: 640px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-item:hover .nav-dropdown,
.nav-dropdown:hover { display: grid; }
.nav-dropdown-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  transition: background var(--t-fast) var(--ease);
}
.nav-dropdown-item:hover { background: var(--ink-50); }
.nav-dropdown-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-dropdown-text strong { display: block; color: var(--ink-900); font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.nav-dropdown-text span { color: var(--ink-500); font-size: 13px; line-height: 1.4; }

.nav-cta { display: flex; gap: 10px; align-items: center; }

.mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
}
.mobile-toggle:hover { background: var(--ink-50); }
.mobile-toggle span {
  width: 20px; height: 2px;
  background: var(--ink-800);
  position: relative;
}
.mobile-toggle span::before, .mobile-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 20px; height: 2px; background: var(--ink-800);
}
.mobile-toggle span::before { top: -6px; }
.mobile-toggle span::after { top: 6px; }

@media (max-width: 1024px) {
  :root { --nav-height: 60px; }
  .nav-menu { display: none; }
  .nav-cta { display: none; }
  .mobile-toggle { display: flex; }
  .navbar .container-wide {
    justify-content: space-between;
    gap: 16px;
    height: 60px;
  }
  .nav-logo img { height: 24px; }
}

/* ===== Mobile drawer content (rendered inside Ant Design Drawer) ===== */
.mobile-drawer-section { border-bottom: 1px solid var(--ink-100); padding: 14px 0; }
.mobile-drawer-section:last-of-type { border-bottom: none; }
.mobile-drawer-section-title {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.mobile-drawer-section a {
  display: block;
  padding: 10px 0;
  color: var(--ink-800);
  font-weight: 500;
  font-size: 15px;
}
.mobile-drawer-section a:hover { color: var(--brand-600); }
.rabi-mobile-drawer .ant-drawer-body { padding: 16px 20px; }
.rabi-mobile-drawer .ant-drawer-header { padding: 16px 20px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-500);
  color: var(--white);
  border-color: var(--brand-500);
  box-shadow: 0 1px 2px rgba(31,123,255,0.2);
}
.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31,123,255,0.32);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-800);
  border-color: var(--ink-200);
}
.btn-ghost:hover {
  background: var(--ink-50);
  border-color: var(--ink-300);
  color: var(--ink-900);
}
.btn-dark {
  background: var(--ink-900);
  color: var(--white);
  border-color: var(--ink-900);
}
.btn-dark:hover { background: var(--ink-800); border-color: var(--ink-800); color: var(--white); }
.btn-link {
  background: transparent;
  color: var(--brand-600);
  padding: 11px 0;
}
.btn-link:hover { color: var(--brand-500); }
.btn-link::after {
  content: '→';
  margin-left: 6px;
  transition: transform var(--t-fast) var(--ease);
}
.btn-link:hover::after { transform: translateX(3px); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ============ HERO PATTERNS ============ */
.hero {
  position: relative;
  padding: 96px 0 64px;
  background: linear-gradient(180deg, var(--brand-50) 0%, var(--white) 100%);
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31,123,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,123,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }

/* ============ CARDS ============ */
.card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--t) var(--ease);
}
.card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-title { font-size: 18px; font-weight: 600; color: var(--ink-900); margin-bottom: 8px; }
.card-body { color: var(--ink-600); font-size: 15px; line-height: 1.55; }

/* ============ BADGES / PILLS ============ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}
.pill .pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-500); }
.pill-success { background: var(--success-bg); color: var(--success); border-color: rgba(12,170,110,0.2); }
.pill-success .pill-dot { background: var(--success); }
.pill-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(232,159,43,0.2); }

/* ============ FORMS ============ */
.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  transition: all var(--t-fast) var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(31,123,255,0.12);
}
.input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.input-hint { font-size: 12px; color: var(--ink-500); margin-top: 4px; }
.input-group { margin-bottom: 18px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--brand-900);
  color: var(--ink-300);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand img { height: 32px; margin-bottom: 20px; }
.footer-brand p { color: var(--ink-400); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-300);
  transition: all var(--t-fast) var(--ease);
}
.footer-social a:hover { background: var(--brand-500); color: var(--white); }
.footer-col h5 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: var(--ink-300); font-size: 14px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px;
  color: var(--ink-400);
}
.footer-bottom-links { display: flex; gap: 24px; }

@media (max-width: 968px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============ TABS / SEGMENTED ============ */
.tabs {
  display: inline-flex;
  background: var(--ink-100);
  border-radius: var(--radius);
  padding: 4px;
  gap: 2px;
}
.tab {
  padding: 8px 16px;
  border-radius: 7px;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-600);
  transition: all var(--t-fast) var(--ease);
}
.tab.active {
  background: var(--white);
  color: var(--ink-900);
  box-shadow: var(--shadow-sm);
}
.tab:hover:not(.active) { color: var(--ink-900); }

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.reveal { animation: fadeUp 0.8s var(--ease) both; }
.reveal.in { animation: fadeUp 0.8s var(--ease) forwards; }
.reveal-2 { animation-delay: 0.1s; }
.reveal-3 { animation-delay: 0.2s; }
.reveal-4 { animation-delay: 0.3s; }
.reveal-5 { animation-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
}

/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.text-brand { color: var(--brand-600); }
.text-muted { color: var(--ink-500); }
.text-ink { color: var(--ink-900); }
.bg-ink { background: var(--ink-900); color: var(--white); }
.bg-brand { background: var(--brand-500); color: var(--white); }
.bg-soft { background: var(--ink-50); }
.bg-brand-soft { background: var(--brand-50); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 968px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; } .mb-12 { margin-bottom: 48px; }

/* ============ STATS BAR ============ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ink-100);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: var(--white);
  padding: 32px 24px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 48px);
  color: var(--brand-700);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 13px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ============ LOGO CLOUD ============ */
.logo-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 56px;
  opacity: 0.6;
}
.logo-cloud span {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink-500);
  letter-spacing: -0.01em;
}

/* ============ PAGE HEADER (Sub-pages) ============ */
.page-header {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
  color: var(--white);
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(31,123,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(74,149,255,0.2) 0%, transparent 50%);
}
.page-header .container-wide { position: relative; z-index: 1; }
.page-header h1, .page-header h2 { color: var(--white); }
.page-header .lede { color: var(--brand-200); }
.page-header .eyebrow { color: var(--brand-300); }
.breadcrumb { display: flex; gap: 8px; font-size: 13px; color: var(--brand-200); margin-bottom: 16px; }
.breadcrumb a { color: var(--brand-200); }
.breadcrumb a:hover { color: var(--white); }

/* ============ CTA STRIP ============ */
.cta-strip {
  background: linear-gradient(135deg, var(--ink-900) 0%, var(--brand-800) 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 100%, rgba(31,123,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(31,123,255,0.2) 0%, transparent 50%);
}
.cta-strip > * { position: relative; z-index: 1; }
.cta-strip h2 { color: var(--white); margin-bottom: 16px; }
.cta-strip p { color: var(--brand-200); margin-bottom: 32px; font-size: 18px; }

@media (max-width: 768px) {
  .cta-strip { padding: 40px 24px; }
}

/* ============ WEBHOOK 3-STEP FLOW ============ */
.webhook-flow-card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 1024px) {
  .webhook-flow-card { padding: 32px 20px; }
}
.webhook-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
@media (max-width: 1024px) {
  .webhook-flow {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    justify-items: center;
  }
  .webhook-flow > svg {
    display: none !important;
  }
  .webhook-flow > div {
    width: 100%;
    max-width: 320px;
  }
}

/* ============ MOBILE OVERRIDES FOR INLINE-STYLED BLOCKS ============ */
@media (max-width: 768px) {
  /* Hide the desktop-only product preview mock — fixed 540px grid won't fit */
  .hero-preview { display: none; }

  /* Stack ANY inline-styled grid that lives inside a page container.
     Scoped to .container so the demo app shell (which lives inside
     .container-wide and manages its own breakpoints) isn't affected. */
  .container [style*="grid-template-columns"],
  .container [style*="gridTemplateColumns"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Stats bar 4 → 2 columns already handled above, ensure padding */
  .stats-bar .stat { padding: 24px 16px; }

  /* Wide tables / pre / code → scroll horizontally inside their box,
     never push the page sideways */
  table, pre, code { max-width: 100%; }
  pre, code { white-space: pre-wrap; word-break: break-word; }
  .compare-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Any element that hardcodes a wide pixel width in an inline style
     (legacy HTML pages had width: 760px / 968px etc.) — cap to viewport */
  [style*="width: 4"], [style*="width: 5"], [style*="width: 6"],
  [style*="width: 7"], [style*="width: 8"], [style*="width: 9"],
  [style*="width: 10"], [style*="width: 11"], [style*="width: 12"],
  [style*="width:4"], [style*="width:5"], [style*="width:6"],
  [style*="width:7"], [style*="width:8"], [style*="width:9"],
  [style*="width:10"], [style*="width:11"], [style*="width:12"] {
    max-width: 100% !important;
  }
  /* Same for min-width — never force the page wider than the viewport */
  .container [style*="min-width"] { min-width: 0 !important; }

  /* Page header (sub-pages) — tighter padding on mobile */
  .page-header { padding: 56px 0 40px; }
  .page-header h1, .page-header .h1, .page-header .h-display { font-size: clamp(32px, 8vw, 44px) !important; }

  /* Inline flex rows that lay out side-by-side with big gaps → wrap */
  .container [style*="display: flex"][style*="gap"]:not(.btn):not(.pill) {
    flex-wrap: wrap;
  }

  /* Section padding compactness */
  .section { padding: 56px 0; }
  .section-sm { padding: 40px 0; }
  .section-lg { padding: 72px 0; }
}

@media (max-width: 480px) {
  /* Reduce inline padding on hero-style large cards on small phones */
  .container [style*="padding: 48px"],
  .container [style*="padding:48px"] { padding: 24px !important; }
  .container [style*="padding: 32px"],
  .container [style*="padding:32px"] { padding: 20px !important; }
  /* Tame display-size headings */
  .h-display { font-size: clamp(30px, 8.5vw, 40px) !important; line-height: 1.15 !important; }
  .h1 { font-size: clamp(28px, 7.5vw, 36px) !important; }
  .h2 { font-size: clamp(24px, 6.5vw, 32px) !important; }
  .h3 { font-size: clamp(20px, 5.5vw, 26px) !important; }
}
@media (max-width: 480px) {
  .h-display { font-size: clamp(34px, 9vw, 48px) !important; }
  .h2 { font-size: clamp(26px, 7vw, 36px) !important; }
  .lede { font-size: 16px !important; }
  .container, .container-wide { padding: 0 18px; }
  .navbar .container-wide { gap: 8px; }
  .nav-cta .btn-sm { padding: 7px 10px; font-size: 12px; }
  .logo-cloud { gap: 28px; }
  .logo-cloud span { font-size: 18px; }
}
