/* EBS product landing: marketing surface (presentation pass) */

:root {
  --color-primary: #3b82f6;
  --color-primary-bright: #60a5fa;
  --color-primary-deep: #2563eb;
  --color-background: #070b14;
  --color-background-mid: #0a1220;
  --color-surface: rgba(17, 24, 39, 0.72);
  --color-surface-solid: #111827;
  --color-surface-elevated: rgba(26, 35, 50, 0.85);
  --color-border: rgba(148, 163, 184, 0.12);
  --color-border-strong: rgba(148, 163, 184, 0.22);
  --color-text-primary: #e8eef7;
  --color-text-secondary: #9aa8bc;
  --color-text-muted: #5b6b82;
  --color-glow: rgba(59, 130, 246, 0.35);
  --max-width: 72rem;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 50px -28px rgba(0, 0, 0, 0.75);
  --shadow-btn: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 10px 28px -12px rgba(37, 99, 235, 0.7);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}

/* Layered atmosphere: radial glow + faint grid + film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(37, 99, 235, 0.1), transparent 50%),
    radial-gradient(ellipse 45% 35% at 10% 60%, rgba(14, 165, 233, 0.07), transparent 55%),
    linear-gradient(180deg, var(--color-background-mid) 0%, var(--color-background) 42%, #05080f 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 64px 64px, 64px 64px, 180px 180px;
  mix-blend-mode: soft-light;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary-bright);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--color-text-primary);
}

.site-logo__mark {
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  border-radius: 0.4rem;
}

.site-logo__text {
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    transform 0.2s var(--ease-out),
    color 0.2s var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary-bright);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(180deg, #4b8fff 0%, var(--color-primary) 48%, var(--color-primary-deep) 100%);
  color: #fff;
  box-shadow: var(--shadow-btn);
  border-color: rgba(147, 197, 253, 0.28);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 14px 36px -12px rgba(37, 99, 235, 0.85);
  background: linear-gradient(180deg, #5b99ff 0%, #4589f7 48%, #1d4ed8 100%);
}

.btn--primary:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 4px 14px -6px rgba(37, 99, 235, 0.55);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.btn--ghost:hover {
  border-color: rgba(96, 165, 250, 0.45);
  color: #fff;
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-1px);
}

.btn--ghost:active {
  transform: translateY(1px);
}

.site-header .btn--primary {
  padding: 0.5rem 1.05rem;
  font-size: 0.875rem;
}

/* Layout */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

section {
  padding: 4rem 0;
  position: relative;
}

section + section {
  border-top: 1px solid transparent;
  border-image: linear-gradient(
      90deg,
      transparent,
      rgba(148, 163, 184, 0.16) 20%,
      rgba(148, 163, 184, 0.16) 80%,
      transparent
    )
    1;
}

/* Hero */
.hero {
  padding-top: 5.5rem;
  padding-bottom: 4rem;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary-bright);
  margin: 0 0 1.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.22);
}

.hero__eyebrow::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-primary-bright);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 5.4vw, 3.35rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 0 auto 1.35rem;
  max-width: 12.5em;
  background: linear-gradient(180deg, #ffffff 10%, #c5d4ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: clamp(1.0625rem, 2.2vw, 1.2rem);
  color: var(--color-text-secondary);
  max-width: 36rem;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* Sections */
.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  color: var(--color-text-primary);
}

.section-heading p {
  margin: 0 auto;
  color: var(--color-text-secondary);
  max-width: 34rem;
  font-size: 1.02rem;
}

.screenshot-grid {
  display: grid;
  gap: 1.5rem;
}

.screenshot-grid--primary {
  margin-bottom: 1.5rem;
}

.screenshot-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  transition:
    transform 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.screenshot-card:hover {
  border-color: var(--color-border-strong);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 28px 60px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(59, 130, 246, 0.08);
  transform: translateY(-3px);
}

.screenshot-card img {
  width: 100%;
  background: var(--color-surface-solid);
}

.screenshot-card__caption {
  padding: 1rem 1.15rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  border-top: 1px solid var(--color-border);
  background: rgba(7, 11, 20, 0.35);
}

.screenshot-card__caption strong {
  color: var(--color-text-primary);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.capabilities {
  display: grid;
  gap: 1.15rem;
}

.capability {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.55rem 1.4rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
  transition:
    border-color 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.capability:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 22px 40px -28px rgba(0, 0, 0, 0.8);
}

.capability h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.capability p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* How it works: copy + topology diagram */
.how-it-works {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: stretch;
}

.how-it-works__copy {
  max-width: 36rem;
}

.how-it-works__copy p {
  margin: 0 0 1.1rem;
  color: var(--color-text-secondary);
  font-size: 1.02rem;
  line-height: 1.7;
}

.how-it-works__copy p:last-child {
  margin-bottom: 0;
}

.how-it-works__diagram {
  width: 100%;
  max-width: 100%;
}

.how-it-works__diagram .ebs-topo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

@media (min-width: 1100px) {
  .how-it-works {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    gap: 2.25rem;
    align-items: center;
  }

  .how-it-works__copy {
    max-width: none;
  }
}

.cta {
  text-align: center;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(59, 130, 246, 0.16), transparent 60%),
    var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 3rem 1.75rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-soft);
}

.cta h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.cta > p {
  margin: 0 auto 1.75rem;
  color: var(--color-text-secondary);
  max-width: 32rem;
}

.cta__note {
  margin-top: 1.35rem !important;
  margin-bottom: 0 !important;
  font-size: 0.9rem;
}

.cta__note a {
  font-weight: 600;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.site-footer a {
  color: var(--color-text-secondary);
}

.site-footer a:hover {
  color: var(--color-primary-bright);
}

/* Progressive scroll reveals: content stays visible without JS */
html[data-motion="on"] .reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

html[data-motion="on"] .reveal.is-visible {
  opacity: 1;
  transform: none;
}

html[data-motion="on"] .reveal-stagger > .reveal:nth-child(1) {
  --reveal-delay: 0ms;
}
html[data-motion="on"] .reveal-stagger > .reveal:nth-child(2) {
  --reveal-delay: 70ms;
}
html[data-motion="on"] .reveal-stagger > .reveal:nth-child(3) {
  --reveal-delay: 140ms;
}
html[data-motion="on"] .reveal-stagger > .reveal:nth-child(4) {
  --reveal-delay: 210ms;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn--primary,
  .btn--ghost,
  .screenshot-card,
  .capability {
    transition: none;
  }

  .btn--primary:hover,
  .btn--ghost:hover,
  .screenshot-card:hover,
  .capability:hover {
    transform: none;
  }

  html[data-motion="on"] .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

  .capabilities {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  section {
    padding: 5rem 0;
  }

  .hero {
    padding-top: 6.5rem;
  }

  .capabilities {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .site-logo__text {
    font-size: 0.95rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }
}
