/* ==========================================================================
   EventGrid — Design System & Landing Page Styles
   Tokens (colors, type, spacing, radius) are defined once on :root and are
   intended to seed the rest of the product UI, not just this page.
   ========================================================================== */

:root {
  /* Color — surfaces */
  --bg: #ffffff;
  --bg-elevated: #f5f7fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border: #e3e8f0;
  --border-strong: #cad3e0;

  /* Color — text */
  --text-primary: #10151f;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;

  /* Color — accents */
  --accent: #2554eb;
  --accent-hover: #1d3fc4;
  --accent-soft: rgba(37, 84, 235, 0.08);
  --signal: #059669;
  --signal-soft: rgba(5, 150, 105, 0.1);

  /* Gradients */
  --gradient-accent: linear-gradient(135deg, #2554eb 0%, #4f46e5 100%);

  /* Typography */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Spacing scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-glow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 24px rgba(37, 84, 235, 0.22);

  /* Layout */
  --container-w: 1180px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 100%; height: 100%; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---------- Decorative grid overlay ---------- */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, black 0%, transparent 75%);
}

main, header, footer { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.4rem, 4.2vw, 3.8rem); }
h2 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); }
h3 { font-size: 1.15rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--signal);
  background: var(--signal-soft);
  border: 1px solid rgba(5, 150, 105, 0.22);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
}
.eyebrow-static { margin-bottom: var(--space-4); }
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.45);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.section-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.88rem; }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: var(--accent); background: var(--bg-card-hover); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-hover); background: var(--accent-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 1.05rem;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  gap: 3px;
}
.brand-mark span { background: var(--accent); border-radius: 2px; }
.brand-mark span.signal { background: var(--signal); }

.main-nav { display: flex; align-items: center; gap: var(--space-6); }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text-primary); }

.header-cta { display: flex; align-items: center; gap: var(--space-3); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.nav-toggle span { display: block; height: 2px; width: 16px; margin: 0 auto; background: var(--text-primary); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: var(--space-9) 0 var(--space-8); }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}
.hero-lead {
  margin-top: var(--space-5);
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
}
.hero-actions { display: flex; gap: var(--space-4); margin-top: var(--space-7); flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }

.hero-trust {
  display: flex;
  gap: var(--space-7);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.hero-trust li { display: flex; flex-direction: column; gap: 2px; }
.hero-trust strong { font-family: var(--font-mono); font-size: 1.3rem; color: var(--text-primary); }
.hero-trust span { font-size: 0.82rem; color: var(--text-tertiary); }

/* Hero visual mockup */
.hero-visual { display: flex; justify-content: center; }
.mock-window {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.mock-titlebar span:not(.mock-title) { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.mock-title {
  margin-left: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
}
.mock-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); }
.mock-row { display: flex; gap: var(--space-4); }
.mock-stat {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-label { font-size: 0.72rem; color: var(--text-tertiary); }
.mock-value { font-family: var(--font-mono); font-size: 1.35rem; font-weight: 600; }
.mock-delta { font-size: 0.75rem; font-weight: 600; }
.mock-delta.up { color: var(--signal); }

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 90px;
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.mock-chart div {
  flex: 1;
  height: var(--h);
  background: var(--border-strong);
  border-radius: 3px 3px 0 0;
}
.mock-chart div.accent { background: var(--gradient-accent); }

.mock-feed { display: flex; flex-direction: column; gap: var(--space-3); }
.mock-feed-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.mock-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.45);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

/* ---------- Strip ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-elevated); padding: var(--space-7) 0; }
.strip-label { text-align: center; color: var(--text-tertiary); font-size: 0.85rem; margin-bottom: var(--space-6); }
.strip-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.strip-stats div { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.strip-stats strong { font-size: 1rem; }
.strip-stats span { font-size: 0.82rem; color: var(--text-tertiary); }

/* ---------- Sections ---------- */
.section { padding: var(--space-10) 0; }
.section-alt { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 auto var(--space-8); text-align: left; }

/* ---------- Card grid (platform) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-hover);
  margin-bottom: var(--space-5);
}
.feature-card h3 { margin-bottom: var(--space-3); }
.feature-card > p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: var(--space-4); }
.feature-list { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.feature-list li { font-size: 0.85rem; color: var(--text-tertiary); padding-left: var(--space-4); position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 1px; background: var(--signal); }

/* ---------- Benefits ---------- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6) var(--space-5);
}
.benefit-icon {
  width: 40px; height: 40px;
  padding: 9px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--signal);
  margin-bottom: var(--space-4);
}
.benefit h3 { margin-bottom: var(--space-2); font-size: 1.05rem; }
.benefit p { color: var(--text-secondary); font-size: 0.92rem; }

/* ---------- Industries ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.industry-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.industry-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.industry-icon {
  width: 42px; height: 42px;
  padding: 9px;
  border-radius: var(--radius-md);
  background: var(--signal-soft);
  color: var(--signal);
  margin-bottom: var(--space-5);
}
.industry-card h3 { margin-bottom: var(--space-2); }
.industry-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ---------- About ---------- */
.about-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: center; }
.about-copy p { color: var(--text-secondary); margin-bottom: var(--space-4); max-width: 560px; }
.about-stats { display: flex; gap: var(--space-7); margin-top: var(--space-6); }
.about-stats div { display: flex; flex-direction: column; gap: 4px; }
.about-stats strong { font-family: var(--font-mono); font-size: 1.2rem; }
.about-stats span { font-size: 0.8rem; color: var(--text-tertiary); }

.about-visual { display: flex; justify-content: center; }
.grid-swatch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
}
.grid-swatch span { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.grid-swatch span.hl { background: var(--gradient-accent); border-color: transparent; }

/* ---------- Demo / CTA form ---------- */
.demo-section { }
.demo-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}
.demo-points { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.demo-points li { font-size: 0.92rem; color: var(--text-secondary); padding-left: var(--space-5); position: relative; }
.demo-points li::before { content: "→"; position: absolute; left: 0; color: var(--signal); font-family: var(--font-mono); }

.demo-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.form-row { display: flex; flex-direction: column; gap: var(--space-2); }
.form-row label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 500; }
.form-row input, .form-row select {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 0.92rem;
}
.form-row input:focus, .form-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-note { min-height: 1.2em; font-size: 0.85rem; color: var(--signal); text-align: center; }

/* ---------- Final CTA ---------- */
.final-cta {
  padding: var(--space-9) 0;
  text-align: center;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, var(--accent-soft), transparent 70%), var(--bg-elevated);
  border-top: 1px solid var(--border);
}
.final-cta p { color: var(--text-secondary); margin-top: var(--space-4); font-size: 1.05rem; }
.final-cta-inner { max-width: 640px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-top: var(--space-8); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
}
.footer-brand p { color: var(--text-tertiary); font-size: 0.88rem; margin-top: var(--space-4); max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col h4 { font-size: 0.82rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-1); }
.footer-col a { font-size: 0.9rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: var(--space-5) var(--space-6);
    gap: var(--space-4);
  }
  .site-header.open .header-cta {
    display: flex;
    position: absolute;
    top: calc(var(--header-h) + 170px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    padding: 0 var(--space-6) var(--space-5);
    border-bottom: 1px solid var(--border);
  }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-trust { gap: var(--space-6); flex-wrap: wrap; }

  .about-inner { grid-template-columns: 1fr; }
  .about-visual { order: -1; max-width: 320px; margin: 0 auto; }

  .demo-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 var(--space-5); }
  .card-grid, .benefit-grid, .industry-grid { grid-template-columns: 1fr; }
  .strip-stats { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { justify-content: space-between; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-2); }
  h1 { font-size: 2.2rem; }
}
