/* ============================================================================
   FaceLearn.io — Master Stylesheet (Light Mode)
   ----------------------------------------------------------------------------
   Sections:
     1.  Design tokens
     2.  Reset & base
     3.  Layout primitives
     4.  Typography
     5.  Buttons
     6.  Header & navigation
     7.  Hero
     8.  Sections (bento, products, workflow, API, FAQ, CTA)
     9.  Footer
     10. Forms
     11. Status page
     12. Utilities
     13. Responsive breakpoints
     14. Accessibility
   ============================================================================ */

/* ============================================================================
   1. DESIGN TOKENS
   ============================================================================ */

:root {
  /* --- Brand palette (light) --- */
  --brand-50:  #eef4ff;
  --brand-100: #dbe6fe;
  --brand-200: #bfd3fe;
  --brand-300: #93b4fd;
  --brand-400: #6090fa;
  --brand-500: #3b6ef5;      /* primary */
  --brand-600: #2554e8;      /* hover */
  --brand-700: #1d43c4;
  --brand-800: #1e3a9c;
  --brand-900: #1e347a;

  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;

  --cyan-400:   #22d3ee;
  --cyan-500:   #06b6d4;

  --green-50:   #ecfdf5;
  --green-500:  #10b981;
  --green-600:  #059669;
  --green-700:  #047857;

  --amber-50:   #fffbeb;
  --amber-500:  #f59e0b;
  --amber-600:  #d97706;

  --red-50:     #fef2f2;
  --red-500:    #ef4444;
  --red-600:    #dc2626;

  /* --- Neutrals (light) --- */
  --gray-0:   #ffffff;
  --gray-25:  #fcfcfd;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-150: #eceef2;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #0a0f1c;

  /* --- Semantic --- */
  --bg:            var(--gray-0);
  --bg-subtle:     var(--gray-50);
  --bg-muted:      var(--gray-100);
  --surface:       var(--gray-0);
  --surface-hover: var(--gray-50);
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);
  --border-subtle: var(--gray-150);

  --text:          var(--gray-900);
  --text-2:        var(--gray-600);
  --text-3:        var(--gray-500);
  --text-4:        var(--gray-400);
  --text-inverse:  var(--gray-0);

  /* --- Elevation (subtle, industry-grade) --- */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 20px -4px rgba(16, 24, 40, 0.08), 0 4px 8px -4px rgba(16, 24, 40, 0.04);
  --shadow-xl: 0 20px 32px -8px rgba(16, 24, 40, 0.12), 0 8px 16px -8px rgba(16, 24, 40, 0.06);
  --shadow-brand: 0 8px 20px -8px rgba(59, 110, 245, 0.4);

  /* --- Radius --- */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* --- Spacing (fluid) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  --section-y: clamp(64px, 9vw, 128px);
  --container-pad: clamp(16px, 4vw, 32px);
  --container-max: 1200px;

  /* --- Typography --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, Menlo, Consolas, monospace;

  --fs-xs:   clamp(0.72rem, 0.68rem + 0.2vw, 0.78rem);
  --fs-sm:   clamp(0.82rem, 0.78rem + 0.2vw, 0.88rem);
  --fs-base: clamp(0.95rem, 0.9rem + 0.25vw, 1rem);
  --fs-lg:   clamp(1rem, 0.95rem + 0.3vw, 1.1rem);
  --fs-xl:   clamp(1.15rem, 1rem + 0.5vw, 1.3rem);
  --fs-2xl:  clamp(1.4rem, 1.2rem + 1vw, 1.75rem);
  --fs-3xl:  clamp(1.75rem, 1.4rem + 1.6vw, 2.4rem);
  --fs-4xl:  clamp(2rem, 1.5rem + 2.5vw, 3.2rem);
  --fs-5xl:  clamp(2.4rem, 1.8rem + 3.5vw, 4rem);

  /* --- Transitions --- */
  --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* --- Z-index scale --- */
  --z-base: 1;
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ============================================================================
   2. RESET & BASE
   ============================================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--brand-100);
  color: var(--brand-900);
}

/* ============================================================================
   3. LAYOUT PRIMITIVES
   ============================================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-y);
}

.section-subtle { background: var(--bg-subtle); }
.section-bordered { border-top: 1px solid var(--border-subtle); }

/* Grid helper — 3 breakpoints */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Flex helpers */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2       { gap: var(--space-2); }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }

/* ============================================================================
   4. TYPOGRAPHY
   ============================================================================ */

.display-1 {
  font-size: var(--fs-5xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.display-2 {
  font-size: var(--fs-4xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.heading-1 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.heading-2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.heading-3 {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.text-lg    { font-size: var(--fs-lg); line-height: 1.65; }
.text-base  { font-size: var(--fs-base); line-height: 1.6; }
.text-sm    { font-size: var(--fs-sm); line-height: 1.55; }
.text-xs    { font-size: var(--fs-xs); line-height: 1.5; }

.text-muted { color: var(--text-2); }
.text-subtle { color: var(--text-3); }
.text-faint { color: var(--text-4); }

.text-brand { color: var(--brand-600); }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'calt' 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-600);
  margin-bottom: var(--space-3);
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--violet-600) 50%, var(--cyan-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================================
   5. BUTTONS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1;
  min-height: 40px;
  white-space: nowrap;
  transition: all var(--t-base);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.btn-lg {
  padding: 14px 26px;
  font-size: var(--fs-base);
  min-height: 48px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 7px 13px;
  font-size: var(--fs-xs);
  min-height: 32px;
}

/* Primary */
.btn-primary {
  color: var(--text-inverse);
  background: var(--brand-600);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  background: var(--brand-700);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(59, 110, 245, 0.5);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary (outline) */
.btn-outline {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--gray-400);
}

/* Ghost */
.btn-ghost {
  color: var(--text-2);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--gray-100);
}

/* Success */
.btn-success {
  color: var(--text-inverse);
  background: var(--green-600);
}
.btn-success:hover { background: var(--green-700); }

/* Danger */
.btn-danger {
  color: var(--text-inverse);
  background: var(--red-600);
}
.btn-danger:hover { background: var(--red-600); filter: brightness(0.92); }

/* Button size + full width */
.btn-block { width: 100%; }

/* Disabled */
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================================================
   6. HEADER & NAVIGATION
   ============================================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  color: var(--text);
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-600), var(--violet-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -3px rgba(59, 110, 245, 0.5);
}

.brand-env {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  margin-left: 2px;
}

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

.nav a.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav a.nav-link:hover { color: var(--text); background: var(--gray-100); }
.nav a.nav-link.active { color: var(--brand-700); background: var(--brand-50); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: var(--space-3);
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.menu-btn:hover { background: var(--gray-100); }

@media (max-width: 991px) {
  .menu-btn { display: inline-flex; }

  .nav {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: var(--space-5) var(--container-pad) var(--space-8);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-130%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--t-slow), opacity var(--t-slow), visibility var(--t-slow);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
  .nav.open { transform: translateY(0); opacity: 1; visibility: visible; }

  .nav a.nav-link {
    padding: 14px 12px;
    font-size: var(--fs-base);
    border-radius: var(--radius-sm);
  }

  .nav-actions {
    flex-direction: column;
    margin: var(--space-3) 0 0;
    gap: var(--space-2);
  }
  .nav-actions .btn { width: 100%; }
}

/* ============================================================================
   7. HERO
   ============================================================================ */

.hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(72px, 10vw, 128px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--brand-50) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    var(--gray-0);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 80px; }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--space-6);
}

.hero-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.hero h1 {
  font-size: var(--fs-5xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
  color: var(--gray-950);
}

.hero h1 .mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.7em;
  color: var(--text-3);
  letter-spacing: -0.02em;
}

.hero-lede {
  font-size: var(--fs-lg);
  color: var(--text-2);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  font-size: var(--fs-sm);
  color: var(--text-3);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust i {
  color: var(--brand-500);
  font-size: 0.85em;
}

/* --- Hero visual (code card) --- */
.code-card {
  background: var(--gray-950);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.code-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-card-dots { display: flex; gap: 6px; }
.code-card-dots span {
  width: 11px; height: 11px; border-radius: 50%;
}
.code-card-dots span:nth-child(1) { background: #ff5f57; }
.code-card-dots span:nth-child(2) { background: #febc2e; }
.code-card-dots span:nth-child(3) { background: #28c840; }

.code-card-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
}

.code-card-body {
  padding: clamp(16px, 2.5vw, 22px) clamp(16px, 3vw, 24px);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 0.65rem + 0.25vw, 0.82rem);
  line-height: 1.75;
  color: #cbd5e1;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.code-card-body .k { color: #c084fc; }
.code-card-body .s { color: #86efac; }
.code-card-body .n { color: #fbbf24; }
.code-card-body .c { color: #64748b; font-style: italic; }
.code-card-body .ok { color: #4ade80; font-weight: 600; }
.code-card-body .lbl { color: #f1f5f9; font-weight: 600; }

/* ============================================================================
   8. SECTIONS
   ============================================================================ */

/* --- Section header --- */
.sec-head {
  max-width: 680px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.sec-head h2 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  color: var(--gray-950);
}

.sec-head p {
  font-size: var(--fs-lg);
  color: var(--text-2);
  line-height: 1.6;
}

/* --- Bento grid --- */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 1.8vw, 20px);
}

@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }

@media (min-width: 992px) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(180px, auto);
  }
  .bento-item.lg { grid-column: span 4; grid-row: span 2; }
  .bento-item.md { grid-column: span 2; }
  .bento-item.sm { grid-column: span 2; }
}

.bento-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 2.5vw, 28px);
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
  position: relative;
}

.bento-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.bento-item .icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: var(--space-5);
  flex-shrink: 0;
}

.bento-item h3 {
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: var(--space-2);
  color: var(--gray-950);
}

.bento-item p {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.6;
}

.bento-item.lg h3 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.bento-item.lg p { font-size: var(--fs-base); max-width: 460px; }

.bento-visual {
  margin-top: auto;
  padding-top: var(--space-6);
  display: flex;
  gap: var(--space-2);
  align-items: flex-end;
  height: 120px;
}

.bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--brand-400), var(--brand-100));
  transform-origin: bottom;
  animation: bar-breathe 3s ease-in-out infinite;
}
.bar:nth-child(1) { height: 45%; animation-delay: 0s; }
.bar:nth-child(2) { height: 70%; animation-delay: 0.3s; }
.bar:nth-child(3) { height: 55%; animation-delay: 0.6s; }
.bar:nth-child(4) { height: 90%; animation-delay: 0.9s; }
.bar:nth-child(5) { height: 65%; animation-delay: 1.2s; }

@keyframes bar-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.08); }
}

/* --- Product cards --- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 2.5vw, 24px);
}

@media (min-width: 992px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}

.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: clamp(28px, 4vw, 40px);
  position: relative;
  overflow: hidden;
  transition: all var(--t-slow);
}

.product:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.product::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
}

.product.login::before  { background: radial-gradient(circle, var(--brand-500), transparent 70%); }
.product.attend::before { background: radial-gradient(circle, var(--green-500), transparent 70%); }

.product > * { position: relative; }

.product .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-5);
}

.chip-blue  { color: var(--brand-700);  background: var(--brand-50);  border: 1px solid var(--brand-100); }
.chip-green { color: var(--green-700);  background: var(--green-50);  border: 1px solid #c9f0d8; }

.product h3 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: var(--space-3);
  color: var(--gray-950);
}

.product > p {
  font-size: var(--fs-base);
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: var(--space-6);
  max-width: 460px;
}

.product-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: var(--space-6);
}

.product-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}

.product-list li i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  flex-shrink: 0;
  margin-top: 3px;
}

.product.login  .product-list li i { background: var(--brand-100); color: var(--brand-700); }
.product.attend .product-list li i { background: #d1fae5; color: var(--green-700); }

.product-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: gap var(--t-base);
}
.product-cta:hover { gap: 12px; }
.product.login  .product-cta { color: var(--brand-600); }
.product.attend .product-cta { color: var(--green-600); }

/* --- Stats band --- */
.stats-band {
  padding-block: clamp(40px, 5vw, 64px);
  border-block: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  text-align: center;
}

@media (min-width: 768px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }

.stat-num {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--gray-950);
  margin-bottom: 6px;
}

.stat-lbl {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Workflow (numbered steps) --- */
.flow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 1.8vw, 20px);
  counter-reset: step;
}

@media (min-width: 640px) { .flow-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .flow-grid { grid-template-columns: repeat(4, 1fr); } }

.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 2.5vw, 28px);
  position: relative;
  counter-increment: step;
  transition: all var(--t-base);
}

.flow-step:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.flow-step::before {
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--brand-600);
  display: block;
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
}

.flow-step h4 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--gray-950);
  margin-bottom: var(--space-2);
  letter-spacing: -0.015em;
}

.flow-step p {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.6;
}

/* --- API section --- */
.api-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

@media (min-width: 992px) {
  .api-split { grid-template-columns: 1fr 1.15fr; gap: 64px; }
}

.api-copy h2 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  color: var(--gray-950);
}

.api-copy > p {
  font-size: var(--fs-lg);
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: var(--space-8);
}

.feature-row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.feature-row:last-child { border-bottom: none; }

.feature-row i {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.feature-row strong {
  display: block;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.feature-row span {
  font-size: var(--fs-sm);
  color: var(--text-3);
  line-height: 1.5;
}

/* --- FAQ --- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t-base);
}

.faq-item:hover { border-color: var(--border-strong); }
.faq-item[open] { border-color: var(--brand-300); box-shadow: var(--shadow-xs); }

.faq-item summary {
  padding: var(--space-5) var(--space-6);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--gray-950);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '\f067';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--brand-600);
  font-size: 0.75rem;
  transition: transform var(--t-base);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: '\f068'; }

.faq-item p {
  padding: 0 var(--space-6) var(--space-5);
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.65;
}

/* --- Final CTA panel --- */
.cta-panel {
  position: relative;
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--gray-0) 55%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  text-align: center;
  overflow: hidden;
}

.cta-panel h2 {
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  color: var(--gray-950);
}

.cta-panel p {
  font-size: var(--fs-lg);
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto var(--space-8);
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================================
   9. FOOTER
   ============================================================================ */

.site-footer {
  margin-top: auto;
  background: var(--gray-50);
  border-top: 1px solid var(--border-subtle);
  padding: clamp(48px, 6vw, 72px) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4vw, 56px);
  margin-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 2fr; gap: 64px; }
}

.footer-brand p {
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.65;
  margin: var(--space-4) 0 var(--space-5);
  max-width: 320px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--green-700);
  background: var(--green-50);
  border: 1px solid #c9f0d8;
  padding: 5px 11px;
  border-radius: var(--radius-full);
}

.status-pill .dot {
  width: 6px;
  height: 6px;
  background: var(--green-500);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

@media (min-width: 640px) {
  .footer-cols { grid-template-columns: repeat(4, 1fr); }
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}

.footer-col a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-2);
  padding: 5px 0;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--brand-600); }

.footer-credit {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.credit-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-600), var(--violet-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(59, 110, 245, 0.45);
}

.credit-text {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
  min-width: 200px;
}

.credit-text strong { color: var(--text); font-weight: 700; }

.credit-team {
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-600), var(--violet-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.credit-note {
  font-size: 0.75rem;
  color: var(--text-3);
  font-style: italic;
}

.footer-social { display: flex; gap: var(--space-2); }

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--t-fast);
}

.footer-social a:hover {
  color: var(--brand-600);
  border-color: var(--brand-300);
  background: var(--brand-50);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.footer-legal { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.footer-legal a { transition: color var(--t-fast); }
.footer-legal a:hover { color: var(--brand-600); }

.heart { color: var(--red-500); }

/* ============================================================================
   10. FORMS
   ============================================================================ */

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: var(--space-5); }

.form-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.form-group label .req { color: var(--red-500); margin-left: 2px; }

.form-group .hint {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 6px;
  line-height: 1.5;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.4;
  min-height: 44px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(59, 110, 245, 0.12);
}

.form-control::placeholder { color: var(--text-4); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}
.form-actions .btn { flex: 1; min-width: 140px; }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}

.checkbox-group input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand-600);
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox-group a { color: var(--brand-600); font-weight: 500; }
.checkbox-group a:hover { text-decoration: underline; }

/* Inline alert messages */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-bottom: var(--space-5);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert i { flex-shrink: 0; margin-top: 2px; }

.alert-success { color: var(--green-700); background: var(--green-50); border: 1px solid #c9f0d8; }
.alert-error   { color: var(--red-600);   background: var(--red-50);   border: 1px solid #fecaca; }
.alert-warn    { color: var(--amber-600); background: var(--amber-50); border: 1px solid #fde68a; }
.alert-info    { color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100); }

/* ============================================================================
   11. STATUS PAGE
   ============================================================================ */

.status-banner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--green-50);
  border: 1px solid #c9f0d8;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.status-banner.warn {
  background: var(--amber-50);
  border-color: #fde68a;
}

.status-banner .icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-lg);
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.status-banner h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--gray-950);
  margin-bottom: 2px;
}

.status-banner p {
  font-size: var(--fs-sm);
  color: var(--text-2);
}

.status-banner .uptime {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--green-700);
}

.services-list { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-10); }

.service {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--t-fast);
  flex-wrap: wrap;
}

.service:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.service .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.service .dot.up   { background: var(--green-500); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.service .dot.warn { background: var(--amber-500); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.service .dot.down { background: var(--red-500);   box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }

.service .name {
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--gray-950);
  flex: 1;
  min-width: 160px;
}

.service .uptime-val {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.service .status-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.service .status-label.up   { color: var(--green-700); background: var(--green-50); }
.service .status-label.warn { color: var(--amber-600); background: var(--amber-50); }
.service .status-label.down { color: var(--red-600);   background: var(--red-50); }

/* Uptime bars */
.uptime-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 36px;
  margin-top: var(--space-4);
}

.uptime-bar {
  flex: 1;
  min-width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--green-500);
  opacity: 0.85;
  transition: opacity var(--t-fast);
  cursor: help;
}

.uptime-bar.warn { background: var(--amber-500); }
.uptime-bar.down { background: var(--red-500); }
.uptime-bar:hover { opacity: 1; }

.uptime-caption {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: var(--space-2);
}

/* Incidents */
.incident {
  padding: var(--space-5) var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-500);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.incident.minor { border-left-color: var(--amber-500); }
.incident.major { border-left-color: var(--red-500); }

.incident-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.incident-head strong {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gray-950);
  display: flex;
  align-items: center;
  gap: 8px;
}

.incident-head time {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.incident p {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.6;
}

/* ============================================================================
   12. UTILITIES
   ============================================================================ */

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.text-center { text-align: center; }

.rounded-full { border-radius: var(--radius-full); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }

.border       { border: 1px solid var(--border); }
.border-t     { border-top: 1px solid var(--border); }
.border-b     { border-bottom: 1px solid var(--border); }

/* ============================================================================
   13. RESPONSIVE — extra-fine tuning
   ============================================================================ */

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { width: 100%; }
  .footer-credit { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
}

@media (min-width: 1440px) {
  :root { --container-max: 1280px; }
}

/* ============================================================================
   14. ACCESSIBILITY
   ============================================================================ */

@media (prefers-contrast: more) {
  :root {
    --text-2: var(--gray-700);
    --text-3: var(--gray-600);
    --border: var(--gray-300);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}