:root {
  --bg: #0b0f17;
  --surface: #111827;
  --text: #e6edf4;
  --muted: #8a94a8;
  --accent: #2dd4bf;
  --accent-deep: #14b8a6;
  --line: rgba(255,255,255,0.08);
  --gutter: 2rem;
  --section: 6rem;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); }

/* Keyboard access */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus { top: 1rem; }

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.nav-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.nav-links, .nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.nav-links a, .nav-actions a:not(.btn-primary) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-actions a:not(.btn-primary):hover,
.nav-links a[aria-current="page"],
.nav-actions a[aria-current="page"]:not(.btn-primary) { color: var(--text); }

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.4em;
}

.nav-toggle {
  display: none;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Buttons */
.btn-primary, .btn-outline {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.2s;
}

.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--bg);
  box-shadow: 0 10px 30px rgba(45,212,191,0.25);
}

.btn-small.btn-primary { box-shadow: none; }

.btn-primary:hover { transform: translateY(-2px); }

.btn-outline {
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
}

.btn-outline:hover { background: rgba(255,255,255,0.05); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0b0f17 0%, #111827 60%, #0a3f3b 100%);
  padding: 9rem 0 7rem;
}

.hero-small { padding: 5rem 0 4rem; }

.hero-inner, .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
}

.hero-small h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.hero-small p:last-child { margin-bottom: 0; }

/* Metrics */
.stats {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem 1.5rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  line-height: 1.2;
  color: var(--accent);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.stat-label { color: var(--muted); margin-top: 0.25rem; }

/* Sections */
.section { padding: var(--section) 0; }

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.prose > * { max-width: 720px; }

.prose h2 { margin-top: 3rem; font-size: 1.6rem; }

.prose h2:first-child { margin-top: 0; }

.prose p, .prose ul { color: var(--muted); margin-bottom: 1rem; }

.prose ul { padding-left: 1.25rem; }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}

/* Four cards: one row on wide screens, two rows of two below that */
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  transition: border-color 0.2s;
}

.section-alt .card { background: var(--bg); }

.card:hover { border-color: rgba(45,212,191,0.3); }

.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.card p { color: var(--muted); }

.card .eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.card-link {
  margin-top: auto;
  padding-top: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

/* Product sub-navigation */
.subnav { border-bottom: 1px solid var(--line); }

.subnav .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.subnav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

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

/* Tabs */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab-list [role="tab"] {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.tab-list [role="tab"][aria-selected="true"] {
  background: rgba(45,212,191,0.12);
  border-color: var(--accent);
  color: var(--text);
}

html:not(.js) .tab-list { display: none; }

html:not(.js) [role="tabpanel"] { margin-bottom: 2rem; }

[role="tabpanel"] > p { color: var(--muted); max-width: 720px; margin-bottom: 1.5rem; }

[role="tabpanel"] h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

/* Tables */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

tbody th { font-weight: 600; }

td { color: var(--muted); }

.price { color: var(--text); font-weight: 600; white-space: nowrap; }

.note { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }

/* Pricing calculator */
.calculator {
  max-width: 560px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
}

.calculator label {
  display: block;
  margin-top: 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.calculator label:first-of-type { margin-top: 0; }

.calculator-total {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.calculator output {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  overflow-wrap: anywhere;
}

/* FAQs */
details {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

summary {
  font-weight: 600;
  cursor: pointer;
}

details p { color: var(--muted); margin-top: 0.75rem; max-width: 720px; }

/* Forms */
.panel-form {
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
}

.panel-form label {
  display: block;
  margin-top: 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

.panel-form label:first-of-type { margin-top: 0; }

input, textarea, select {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.panel-form button {
  margin-top: 1.5rem;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
}

.panel-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status:empty { display: none; }

.form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.form-status[data-kind="success"] { color: var(--accent); }
.form-status[data-kind="error"] { color: #fca5a5; }

.contact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 3rem;
}

.contact-layout h2 { font-size: 1.5rem; }

.contact-layout p { color: var(--muted); margin-bottom: 1rem; }

.draft-notice {
  padding: 0.75rem var(--gutter);
  background: #7c2d12;
  color: #ffedd5;
  font-weight: 600;
  text-align: center;
}

/* Call to action */
.cta {
  padding: var(--section) var(--gutter);
  background: linear-gradient(135deg, #0b0f17, #0a3f3b);
  border-top: 1px solid var(--line);
  text-align: center;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.cta .actions { justify-content: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-columns, .footer-legal {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.site-footer h2 {
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.footer-columns a {
  display: block;
  padding: 0.2rem 0;
  overflow-wrap: anywhere;
}

.site-footer a { color: var(--muted); text-decoration: none; }

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

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  font-size: 0.85rem;
}

.footer-legal div { display: flex; gap: 1.5rem; }

/* ---------- Living background ---------- */
html { background: var(--bg); }

body {
  position: relative;
  background: transparent;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(38% 34% at 18% 20%, rgba(20,184,166,0.26), transparent 70%),
    radial-gradient(34% 32% at 84% 14%, rgba(56,189,248,0.17), transparent 70%),
    radial-gradient(42% 38% at 72% 82%, rgba(45,212,191,0.15), transparent 70%),
    radial-gradient(30% 30% at 22% 86%, rgba(99,102,241,0.13), transparent 70%);
  animation: aurora 26s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 25%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 70% at 50% 25%, #000 25%, transparent 78%);
}

@keyframes aurora {
  0% { transform: translate3d(-3%, -2%, 0) scale(1); }
  50% { transform: translate3d(3%, 2%, 0) scale(1.08) rotate(3deg); }
  100% { transform: translate3d(-1%, 4%, 0) scale(1.02) rotate(-3deg); }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms),
              transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) var(--reveal-delay, 0ms),
              border-color 0.25s;
}

.reveal.is-in { opacity: 1; transform: none; }

@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Navigation ---------- */
.navbar {
  background: rgba(11, 15, 23, 0.6);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: background 0.3s;
}

.navbar.is-scrolled { background: rgba(11, 15, 23, 0.88); }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-deep), #5eead4, #38bdf8);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Hero ---------- */
.hero {
  background: transparent;
  position: relative;
}

.hero-home {
  display: flex;
  align-items: center;
  min-height: min(calc(100vh - 72px), 860px);
  padding: 4rem 0;
}

.hero-home .hero-inner { width: 100%; }

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}

.hero-globe {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-height: 72vh;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(45,212,191,0.35);
  border-radius: 999px;
  background: rgba(45,212,191,0.08);
  color: #99f6e4 !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  margin-bottom: 1.5rem !important;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45,212,191,0.6); }
  100% { box-shadow: 0 0 0 11px rgba(45,212,191,0); }
}

.hero h1 span {
  background: linear-gradient(100deg, #2dd4bf, #5eead4 30%, #38bdf8 60%, #2dd4bf);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}

@keyframes shimmer {
  to { background-position: -240% 0; }
}

.hero-small h1,
.hero-small > .hero-inner > p {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-home h1,
.hero-home .hero-split p,
.hero-home .actions {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-home h1 { animation-delay: 0.08s; }
.hero-home .hero-split > div > p:not(.hero-pill) { animation-delay: 0.18s; }
.hero-home .actions { animation-delay: 0.28s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Scrolling list of services ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(17,24,39,0.45);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  list-style: none;
  animation: marquee 38s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee li {
  padding: 0 2.25rem;
  white-space: nowrap;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
}

.marquee li + li { border-left: 1px solid var(--line); }

@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* ---------- Glass surfaces ---------- */
.stats, .section-alt {
  background: rgba(17,24,39,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.stat-value {
  background: linear-gradient(180deg, #99f6e4, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card, .section-alt .card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: rgba(17,24,39,0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(320px circle at var(--glow-x, 50%) var(--glow-y, 0%), rgba(45,212,191,0.17), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.card.is-in:hover, .card:not(.reveal):hover {
  transform: translateY(-5px);
  transition: transform 0.3s, border-color 0.25s;
}

.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 1.25rem;
  padding: 9px;
  border: 1px solid rgba(45,212,191,0.3);
  border-radius: 12px;
  background: rgba(45,212,191,0.09);
  fill: none;
  stroke: #5eead4;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
}

.btn-primary:hover::after { left: 130%; }

.btn-primary:not(.btn-small):hover { box-shadow: 0 14px 44px rgba(45,212,191,0.45); }

.btn-outline {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.2s, border-color 0.2s;
}

.btn-outline:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Call to action ---------- */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgba(11,15,23,0.4);
}

.cta::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(760px, 130%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(45,212,191,0), rgba(45,212,191,0.32), rgba(56,189,248,0.22), rgba(45,212,191,0));
  filter: blur(60px);
  transform: translate(-50%, -50%);
  animation: spin 16s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Tablets and phones: collapse the menu */
@media (max-width: 1120px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

  .nav-menu {
    flex: 1 1 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .js .nav-menu { display: none; padding: 0.75rem 0 0.5rem; }

  .js .nav-menu.open { display: flex; }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-actions { gap: 1.25rem; }

  .hero-home { min-height: 0; }

  .hero-split { grid-template-columns: minmax(0, 1fr); }

  .hero-globe {
    max-width: 520px;
    max-height: none;
    margin: 0 auto;
  }
}

/* Three cards would leave one alone on a two-column row, so stack them instead */
@media (max-width: 960px) {
  .grid:has(> :nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); }
}

/* Phones */
@media (max-width: 600px) {
  :root { --gutter: 1.25rem; --section: 3.5rem; }

  .grid-4 { grid-template-columns: minmax(0, 1fr); }

  .hero { padding: 5rem 0 4rem; }
  .hero-small { padding: 3.5rem 0 3rem; }
  .card, .panel-form, .calculator { padding: 1.5rem; }
}

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

  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
