:root {
  --bg: #ffffff;
  --fg: #101114;
  --muted: #5b616e;
  --border: #e7e9ee;
  --card: #f7f8fb;
  --link: #111827;
  --btn: #111827;
  --btnfg: #ffffff;
  --btn2: #ffffff;
  --btn2fg: #111827;
  --focus: #2563eb;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(16, 17, 20, 0.08);
  --max: min(1120px, 92vw);

  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --success: #10b981;
  --warning: #f59e0b;
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-subtle: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 2.5rem;
  --space-3xl: 3rem;
}

* { box-sizing: border-box; }

html {
  height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(var(--space-md), 4vw, var(--space-xl));
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: clamp(var(--space-md), 2vw, 14px) 0;
  flex-wrap: wrap;
  min-height: 3.5rem;
}

@media (min-width: 769px) and (max-width: 960px) {
  .topbar-inner {
    min-height: 5rem;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-size: clamp(0.9375rem, 0.85rem + 0.4vw, 1.125rem);
}

.brand-logo {
  width: clamp(24px, 5vw, 28px);
  height: clamp(24px, 5vw, 28px);
  min-width: 24px;
  min-height: 24px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  margin: 0;
}

.nav-toggle:hover {
  background: #f2f3f7;
  text-decoration: none;
}

.nav-toggle-icon {
  display: none;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
  flex-shrink: 0;
}

.nav-toggle-text {
  display: inline;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-sm), 1.2vw, 18px);
  flex-wrap: wrap;
}

.nav a {
  font-size: clamp(0.8125rem, 0.8rem + 0.2vw, 0.875rem);
  color: var(--muted);
  padding: 0.5rem 0.625rem;
  border-radius: 10px;
  text-decoration: none;
}

.nav a span {
  display: inline-block;
  border-bottom: 2px solid transparent;
  transition: border-color 0.18s ease;
}

.nav a.active {
  color: var(--fg);
}

.nav a.active span {
  border-bottom-color: var(--primary);
}

.nav a:hover {
  color: var(--fg);
  background: #f2f3f7;
}

.nav a:hover span {
  border-bottom-color: transparent;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.nav-login {
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.nav-login:hover {
  text-decoration: none;
  background: #f2f3f7;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    order: 2;
    padding: 0.625rem;
  }

  .nav-toggle-icon {
    display: block;
  }

  .nav-toggle-text {
    display: none;
  }

  .nav {
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }

  .topbar-inner.nav-open .nav {
    max-height: 360px;
    opacity: 1;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    margin-top: var(--space-sm);
  }

  .nav a {
    padding: 0.75rem var(--space-md);
    border-radius: 8px;
  }

  .nav-cta {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    padding-top: var(--space-sm);
  }

  .topbar-inner.nav-open .nav-cta {
    padding-top: var(--space-md);
  }
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.625rem 0.875rem;
  font-weight: 700;
  font-size: clamp(0.8125rem, 0.8rem + 0.15vw, 0.875rem);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: transform 0.04s ease, box-shadow 0.12s ease, background 0.12s ease;
  user-select: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--gradient-primary);
  color: var(--btnfg);
  box-shadow: var(--shadow);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  background: var(--btn2);
  color: var(--btn2fg);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #f7f7fb;
  text-decoration: none;
}

.hero {
  padding: clamp(var(--space-2xl), 6vw, 56px) 0 clamp(var(--space-lg), 3vw, 20px);
  position: relative;
  margin-bottom: 0;
  min-height: 10rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

@keyframes hero-flow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(0.4%); }
}

@media (min-width: 769px) {
  .hero-bg {
    animation: hero-flow 24s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg {
    animation: none;
  }
}

@media (max-width: 768px) {
  .hero-bg {
    animation: none;
  }
  .hero-bg img {
    opacity: 0.45;
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(105deg, rgba(11, 12, 16, 0.92) 0%, rgba(11, 12, 16, 0.75) 45%, rgba(11, 12, 16, 0.4) 70%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero .hero-badge {
  background: rgba(30, 58, 95, 0.4);
  border-color: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
}

.hero-badge-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.hero .hero-badge-icon {
  filter: brightness(1.15);
}

.hero h1 {
  color: #f8fafc;
}

.hero .lead {
  color: #cbd5e1;
}

.hero .card {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(51, 65, 85, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero .card h3 {
  color: #93c5fd;
}

.hero .card p {
  color: #94a3b8;
}

.hero .callout {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(51, 65, 85, 0.5);
}

.hero .callout strong {
  color: #e2e8f0;
}

.hero .callout span {
  color: #94a3b8 !important;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(var(--space-md), 2vw, 18px);
  align-items: start;
}

@media (max-width: 1024px) {
  .hero-grid {
    gap: var(--space-lg);
  }
}

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1.75rem, 4vw + 1rem, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 var(--space-lg);
  font-size: clamp(1rem, 1.5vw + 0.75rem, 1.125rem);
  color: var(--muted);
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: clamp(var(--space-md), 2vw, 18px);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  min-width: 0;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(16, 17, 20, 0.12);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin: 0 0 var(--space-xs);
  font-size: clamp(0.8125rem, 0.8rem + 0.15vw, 0.875rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.8125rem, 0.8rem + 0.15vw, 0.875rem);
}

section {
  padding: clamp(var(--space-lg), 3vw, 26px) 0;
}

.section-eyebrow {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.375rem;
}

.section-title {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.125rem);
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
}

.section-text {
  margin: 0;
  color: var(--muted);
  max-width: min(80ch, 100%);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-md), 2vw, 16px);
  margin-top: var(--space-lg);
  min-width: 0;
}

@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.list {
  margin: var(--space-md) 0 0;
  padding-left: var(--space-lg);
  color: var(--muted);
}

.list li { margin: 0.375rem 0; }

.callout {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: var(--space-lg);
  margin-top: var(--space-md);
}

.callout strong { color: var(--fg); }

/* Contact page: email-first CTA (no form) */
.contact-email-callout {
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
}

.contact-email-callout__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-email-callout__note {
  margin: 0 0 1rem !important;
  max-width: 62ch;
}

.contact-email-callout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.contact-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.contact {
  padding: clamp(var(--space-lg), 3vw, 26px) 0 clamp(var(--space-3xl), 8vw, 64px);
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

@media (max-width: 720px) {
  form {
    grid-template-columns: 1fr;
  }
}

label {
  display: block;
  font-size: clamp(0.8125rem, 0.8rem + 0.1vw, 0.8125rem);
  color: #374151;
  margin: 0 0 0.375rem;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  background: #ffffff;
  color: var(--fg);
  box-sizing: border-box;
}

textarea {
  min-height: 120px;
  resize: vertical;
  grid-column: 1 / -1;
}

input:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

.status {
  font-size: 0.875rem;
  color: var(--muted);
  min-height: 1.25rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: clamp(var(--space-lg), 2.5vw, 22px) 0;
  color: var(--muted);
  font-size: clamp(0.8125rem, 0.8rem + 0.1vw, 0.8125rem);
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--fg); }

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 20px;
  font-size: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-md);
}

.icon-placeholder {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 4px;
  opacity: 0.8;
  flex-shrink: 0;
}

.feature-icon {
  width: clamp(40px, 8vw, 48px);
  height: clamp(40px, 8vw, 48px);
  border-radius: 12px;
  background: var(--gradient-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.feature-icon::before {
  content: '';
  width: 24px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 6px;
  opacity: 0.6;
}

.feature-icon-img {
  width: clamp(40px, 8vw, 48px);
  height: clamp(40px, 8vw, 48px);
  display: block;
  margin-bottom: var(--space-md);
  flex-shrink: 0;
  object-fit: contain;
}

.diagram-container {
  margin: clamp(var(--space-xl), 4vw, 32px) 0;
  padding: clamp(var(--space-lg), 3vw, 24px);
  background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
  min-width: 0;
}

.diagram-container svg,
.diagram-container img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.illustration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: clamp(var(--space-md), 2.5vw, 20px);
  margin: clamp(var(--space-lg), 3vw, 24px) 0;
  min-width: 0;
}

.illustration-card {
  text-align: center;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.illustration-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(16, 17, 20, 0.12);
}

.illustration-card svg {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  display: block;
}

.illustration-card h4 {
  margin: 0 0 var(--space-xs);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.illustration-card p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.visual-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.visual-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: var(--primary);
}

.section-with-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-xl), 4vw, 32px);
  align-items: center;
  margin: clamp(var(--space-xl), 5vw, 40px) 0;
  min-width: 0;
}

@media (max-width: 860px) {
  .section-with-visual {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .section-with-visual .diagram-container {
    order: -1;
  }
}

.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: var(--space-lg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.login-modal[aria-hidden="false"],
.login-modal.login-modal-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.login-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.login-modal-content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.3);
  padding: var(--space-lg);
  width: 100%;
  max-width: 320px;
  margin-top: var(--space-xl);
  z-index: 1;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
  box-sizing: border-box;
}

.login-modal-open .login-modal-content {
  transform: translateY(0);
}

.login-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: var(--space-xs);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.login-modal-close:hover {
  background: var(--card);
  color: var(--fg);
}

.login-modal-content h2 {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  font-weight: 700;
  color: var(--fg);
}

.login-modal-content form#login-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

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

.login-form-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.login-form-group input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.login-form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-modal-error {
  margin-top: var(--space-md);
  padding: 0.625rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.8125rem;
  display: none;
}

.login-modal-error.login-modal-error-visible {
  display: block;
}

@media (max-width: 430px) {
  .login-modal {
    padding: 0;
    align-items: flex-end;
  }

  .login-modal-content {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    margin-top: 0;
  }
}

@media (max-width: 375px) {
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}
