/* Elevate Solutions — Marketing
   Tokens match docs/front-end/design-system.md and WebUI _tokens.css.
   Light / white only. Borders over shadows. No gradients. */

:root {
  --es-bg: #ffffff;
  --es-surface: #ffffff;
  --es-surface-muted: #f9fafb;
  --es-surface-hover: #f3f4f6;
  --es-band: #f4f5f7;

  --es-border: #e5e7eb;
  --es-border-strong: #d1d5db;

  --es-text: #111827;
  --es-text-secondary: #4b5563;
  --es-text-muted: #6b7280;
  --es-text-disabled: #9ca3af;
  --es-text-inverse: #ffffff;

  --es-primary: #1e2430;
  --es-primary-hover: #2d343f;
  --es-primary-active: #151a22;

  --es-success: #15803d;
  --es-success-bg: #f0fdf4;
  --es-success-border: #bbf7d0;
  --es-warning: #b45309;
  --es-warning-bg: #fffbeb;
  --es-warning-border: #fde68a;
  --es-danger: #dc2626;
  --es-danger-bg: #fef2f2;
  --es-danger-border: #fecaca;
  --es-info: #1d4ed8;
  --es-info-bg: #eff6ff;
  --es-info-border: #bfdbfe;

  --es-focus-ring: 0 0 0 3px rgba(30, 36, 48, 0.16);

  --es-radius-sm: 0.375rem;
  --es-radius-md: 0.5rem;
  --es-radius-lg: 0.625rem;

  --es-space-1: 0.25rem;
  --es-space-2: 0.5rem;
  --es-space-3: 0.75rem;
  --es-space-4: 1rem;
  --es-space-5: 1.25rem;
  --es-space-6: 1.5rem;
  --es-space-8: 2rem;

  --es-control-h: 2.5rem;
  --es-control-h-sm: 2.25rem;

  --es-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --es-text-xs: 0.75rem;
  --es-text-sm: 0.8125rem;
  --es-text-base: 0.875rem;
  --es-text-md: 1rem;
  --es-text-lg: 1.125rem;
  --es-text-xl: 1.25rem;
  --es-text-display: 2rem;
  --es-weight-normal: 400;
  --es-weight-medium: 500;
  --es-weight-semibold: 600;
  --es-weight-bold: 700;
  --es-leading: 1.5;

  --es-header-h: 3.5rem;
  --es-content: 72rem;
  --es-z-header: 100;
  --es-transition: 0.15s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--es-bg);
  color: var(--es-text);
  font-family: var(--es-font);
  font-size: var(--es-text-base);
  font-weight: var(--es-weight-normal);
  line-height: var(--es-leading);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

.es-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;
}

.es-skip-link {
  position: absolute;
  left: var(--es-space-4);
  top: -6rem;
  z-index: 2000;
  padding: var(--es-space-2) var(--es-space-4);
  background: var(--es-primary);
  color: var(--es-text-inverse);
  border-radius: var(--es-radius-md);
  font-size: var(--es-text-sm);
  font-weight: var(--es-weight-semibold);
  text-decoration: none;
}

.es-skip-link:focus {
  top: var(--es-space-2);
  outline: none;
  box-shadow: var(--es-focus-ring);
}

.es-wrap {
  width: 100%;
  max-width: var(--es-content);
  margin: 0 auto;
  padding: 0 var(--es-space-6);
}

:focus-visible {
  outline: none;
  box-shadow: var(--es-focus-ring);
  border-radius: var(--es-radius-sm);
}

/* Header */
.es-header {
  position: sticky;
  top: 0;
  z-index: var(--es-z-header);
  height: var(--es-header-h);
  background: var(--es-surface);
  border-bottom: 1px solid var(--es-border);
}

.es-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--es-space-4);
  height: var(--es-header-h);
}

.es-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--es-space-2);
  font-size: var(--es-text-md);
  font-weight: var(--es-weight-semibold);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--es-text);
}

.es-brand-mark {
  color: var(--es-primary);
  flex-shrink: 0;
}

.es-nav {
  display: flex;
  align-items: center;
  gap: var(--es-space-6);
}

.es-nav a {
  color: var(--es-text-secondary);
  font-size: var(--es-text-sm);
  font-weight: var(--es-weight-medium);
  text-decoration: none;
}

.es-nav a:hover {
  color: var(--es-text);
}

.es-header-actions {
  display: flex;
  align-items: center;
  gap: var(--es-space-2);
}

.es-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--es-control-h-sm);
  height: var(--es-control-h-sm);
  padding: 0;
  border: 1px solid var(--es-border-strong);
  border-radius: var(--es-radius-md);
  background: var(--es-surface);
  cursor: pointer;
}

.es-nav-toggle-bars,
.es-nav-toggle-bars::before,
.es-nav-toggle-bars::after {
  display: block;
  width: 0.875rem;
  height: 1.5px;
  background: var(--es-text);
}

.es-nav-toggle-bars {
  position: relative;
}

.es-nav-toggle-bars::before,
.es-nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.es-nav-toggle-bars::before {
  top: -4px;
}

.es-nav-toggle-bars::after {
  top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--es-control-h);
  padding: 0 var(--es-space-4);
  border: 1px solid transparent;
  border-radius: var(--es-radius-md);
  font-family: inherit;
  font-size: var(--es-text-sm);
  font-weight: var(--es-weight-medium);
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--es-transition),
    border-color var(--es-transition),
    color var(--es-transition);
}

.btn-primary {
  background: var(--es-primary);
  color: var(--es-text-inverse);
}

.btn-primary:hover {
  background: var(--es-primary-hover);
}

.btn-secondary {
  background: var(--es-surface);
  border-color: var(--es-border-strong);
  color: var(--es-text);
}

.btn-secondary:hover {
  background: var(--es-surface-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--es-text-secondary);
}

.btn-ghost:hover {
  color: var(--es-text);
  background: var(--es-surface-hover);
}

.btn-sm {
  height: var(--es-control-h-sm);
}

/* Hero */
.es-hero {
  padding: var(--es-space-8) 0;
  border-bottom: 1px solid var(--es-border);
}

.es-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--es-space-8);
  align-items: center;
}

.es-hero-copy {
  max-width: 32rem;
}

.es-eyebrow {
  display: inline-block;
  margin: 0 0 var(--es-space-4);
  padding: var(--es-space-1) var(--es-space-3);
  border: 1px solid var(--es-border);
  border-radius: 999px;
  color: var(--es-text-secondary);
  font-size: var(--es-text-xs);
  font-weight: var(--es-weight-medium);
}

.es-title {
  margin: 0 0 var(--es-space-4);
  font-size: var(--es-text-display);
  font-weight: var(--es-weight-semibold);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.es-lede,
.es-section-lead {
  margin: 0 0 var(--es-space-6);
  color: var(--es-text-secondary);
  font-size: var(--es-text-md);
}

.es-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--es-space-3);
}

.es-hero-meta {
  margin: var(--es-space-4) 0 0;
  color: var(--es-text-muted);
  font-size: var(--es-text-sm);
}

/* Product preview — decorative, matches app chrome */
.es-preview {
  min-width: 0;
}

.es-preview-chrome {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  overflow: hidden;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
}

.es-preview-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--es-space-3);
  padding: var(--es-space-4) var(--es-space-2);
  background: var(--es-surface-muted);
  border-right: 1px solid var(--es-border);
}

.es-preview-side-mark {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: var(--es-space-2);
  border-radius: var(--es-radius-sm);
  background: var(--es-primary);
}

.es-preview-side-item {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--es-radius-sm);
  background: var(--es-border);
}

.es-preview-side-item.is-active {
  background: var(--es-primary);
}

.es-preview-body {
  padding: var(--es-space-4);
  background: var(--es-band);
  overflow-x: auto;
}

.es-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--es-space-4);
}

.es-preview-page {
  font-size: var(--es-text-sm);
  font-weight: var(--es-weight-semibold);
}

.es-preview-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--es-primary);
  color: var(--es-text-inverse);
  font-size: 0.625rem;
  font-weight: var(--es-weight-semibold);
}

.es-preview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--es-space-2);
  margin-bottom: var(--es-space-3);
}

.es-preview-kpi {
  padding: var(--es-space-3);
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-md);
}

.es-preview-kpi span {
  display: block;
  color: var(--es-text-muted);
  font-size: var(--es-text-xs);
}

.es-preview-kpi strong {
  display: block;
  margin-top: var(--es-space-1);
  font-size: var(--es-text-md);
  font-weight: var(--es-weight-semibold);
}

.es-preview-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-md);
  overflow: hidden;
  font-size: var(--es-text-xs);
}

.es-preview-table th,
.es-preview-table td {
  padding: 0.625rem var(--es-space-3);
  text-align: left;
  border-bottom: 1px solid var(--es-border);
}

.es-preview-table th {
  color: var(--es-text-muted);
  font-weight: var(--es-weight-medium);
  background: var(--es-surface-muted);
}

.es-preview-table tr:last-child td {
  border-bottom: 0;
}

.es-badge {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 var(--es-space-2);
  border: 1px solid transparent;
  border-radius: var(--es-radius-sm);
  font-size: 0.6875rem;
  font-weight: var(--es-weight-medium);
}

.es-badge-success {
  color: var(--es-success);
  background: var(--es-success-bg);
  border-color: var(--es-success-border);
}

.es-badge-warning {
  color: var(--es-warning);
  background: var(--es-warning-bg);
  border-color: var(--es-warning-border);
}

.es-badge-danger {
  color: var(--es-danger);
  background: var(--es-danger-bg);
  border-color: var(--es-danger-border);
}

.es-badge-info {
  color: var(--es-info);
  background: var(--es-info-bg);
  border-color: var(--es-info-border);
}

/* Sections */
.es-section {
  padding: 3.5rem 0;
}

.es-band {
  padding: 3.5rem 0;
  background: var(--es-band);
  border-top: 1px solid var(--es-border);
  border-bottom: 1px solid var(--es-border);
}

.es-section-title {
  margin: 0 0 var(--es-space-2);
  font-size: var(--es-text-xl);
  font-weight: var(--es-weight-semibold);
  letter-spacing: -0.015em;
}

.es-split {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: var(--es-space-8);
  align-items: start;
}

.es-facts {
  margin: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  background: var(--es-surface);
}

.es-fact {
  padding: var(--es-space-5);
  border-bottom: 1px solid var(--es-border);
}

.es-fact:last-child {
  border-bottom: 0;
}

.es-fact dt {
  margin: 0 0 var(--es-space-1);
  font-size: var(--es-text-sm);
  font-weight: var(--es-weight-semibold);
}

.es-fact dd {
  margin: 0;
  color: var(--es-text-secondary);
  font-size: var(--es-text-sm);
}

.es-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125em;
  color: var(--es-text);
}

.es-modules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
  background: var(--es-surface);
  overflow: hidden;
}

.es-modules li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--es-space-3);
  padding: var(--es-space-6);
  border-right: 1px solid var(--es-border);
  border-bottom: 1px solid var(--es-border);
}

.es-modules li:nth-child(2n) {
  border-right: 0;
}

.es-modules li:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.es-module-index {
  color: var(--es-text-muted);
  font-size: var(--es-text-xs);
  font-weight: var(--es-weight-semibold);
  letter-spacing: 0.04em;
}

.es-modules h3 {
  margin: 0 0 var(--es-space-2);
  font-size: var(--es-text-md);
  font-weight: var(--es-weight-semibold);
}

.es-modules p {
  margin: 0;
  color: var(--es-text-secondary);
  font-size: var(--es-text-sm);
}

/* Access */
.es-access {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: var(--es-space-8);
  align-items: center;
}

.es-access-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--es-space-3);
}

.es-access-field {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 16rem;
  height: var(--es-control-h);
  padding: 0 var(--es-space-3);
  background: var(--es-surface);
  border: 1px solid var(--es-border-strong);
  border-radius: var(--es-radius-md);
}

.es-access-field:focus-within {
  border-color: var(--es-primary);
  box-shadow: var(--es-focus-ring);
}

.es-access-affix {
  color: var(--es-text-muted);
  font-size: var(--es-text-sm);
  white-space: nowrap;
}

.es-access-field input {
  min-width: 5rem;
  flex: 1;
  height: 100%;
  margin: 0 var(--es-space-1);
  border: 0;
  background: transparent;
  color: var(--es-text);
  font-family: inherit;
  font-size: var(--es-text-sm);
  font-weight: var(--es-weight-medium);
}

.es-access-field input:focus {
  outline: none;
  box-shadow: none;
}

.es-access-field input[aria-invalid="true"] {
  color: var(--es-danger);
}

.es-field-hint {
  flex-basis: 100%;
  margin: 0;
  color: var(--es-danger);
  font-size: var(--es-text-xs);
}

/* CTA */
.es-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--es-space-6);
  padding: var(--es-space-8);
  background: var(--es-surface);
  border: 1px solid var(--es-border);
  border-radius: var(--es-radius-lg);
}

.es-cta-lead {
  margin-bottom: 0;
  max-width: 32rem;
}

/* Footer */
.es-footer {
  border-top: 1px solid var(--es-border);
  padding: var(--es-space-6) 0;
}

.es-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--es-space-4);
}

.es-footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--es-space-1);
}

.es-footer-name {
  font-size: var(--es-text-sm);
  font-weight: var(--es-weight-semibold);
}

.es-footer-note,
.es-footer-nav {
  color: var(--es-text-muted);
  font-size: var(--es-text-sm);
}

.es-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--es-space-4);
}

.es-footer-nav a {
  text-decoration: none;
}

.es-footer-nav a:hover {
  color: var(--es-text);
}

@media (max-width: 960px) {
  .es-hero-grid,
  .es-split,
  .es-access {
    grid-template-columns: 1fr;
  }

  .es-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 720px) {
  .es-nav {
    display: none;
    position: absolute;
    top: var(--es-header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--es-space-2) var(--es-space-6) var(--es-space-4);
    background: var(--es-surface);
    border-bottom: 1px solid var(--es-border);
  }

  .es-header.is-nav-open .es-nav {
    display: flex;
  }

  .es-nav a {
    padding: var(--es-space-3) 0;
    border-bottom: 1px solid var(--es-border);
  }

  .es-header-actions .btn-ghost {
    display: none;
  }

  .es-nav-toggle {
    display: inline-flex;
  }

  .es-modules {
    grid-template-columns: 1fr;
  }

  .es-modules li,
  .es-modules li:nth-child(2n) {
    border-right: 0;
  }

  .es-modules li:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--es-border);
  }

  .es-modules li:last-child {
    border-bottom: 0;
  }

  .es-preview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .es-cta {
    padding: var(--es-space-6);
  }

  .es-wrap {
    padding: 0 var(--es-space-4);
  }
}
