/* ---------- Tokens ---------- */
:root {
  --navy-950: #070d1c;
  --navy-900: #0b1428;
  --navy-800: #121e3a;
  --navy-700: #1c2b4f;
  --ink: #0f172a;
  --ink-soft: #475569;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-tint: #f4f7fb;
  --accent: #14d3b4;
  --accent-strong: #0ea58c;
  --accent-2: #5b8cff;
  --on-dark: #e6edf7;
  --on-dark-soft: #9fb0cc;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--navy-950); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 24px; border-radius: 999px; border: 2px solid var(--accent);
  background: var(--accent); color: var(--navy-950);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: #3fe3c8; transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(20, 211, 180, .6); }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(230, 237, 247, .35); }
.btn-ghost:hover { background: rgba(230, 237, 247, .08); box-shadow: none; }
.btn-small { padding: 9px 18px; font-size: .95rem; }
.btn-full { width: 100%; }

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 1rem;
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--accent); }
.accent { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 13, 28, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--navy-950); font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: -.03em;
}
.logo-text { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; letter-spacing: -.01em; }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a:not(.btn) { color: var(--on-dark-soft); text-decoration: none; font-weight: 500; font-size: .97rem; transition: color .15s; }
.nav-menu a:not(.btn):hover { color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(91, 140, 255, .25), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(20, 211, 180, .18), transparent 60%),
              var(--navy-950);
  color: var(--on-dark);
  padding: 96px 0 112px;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { color: #fff; }
.lead { font-size: 1.2rem; color: var(--on-dark-soft); max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 36px; }
.hero-points { display: grid; gap: 10px; color: var(--on-dark-soft); font-size: .97rem; }
.hero-points li { display: flex; align-items: center; gap: 10px; }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: rgba(20, 211, 180, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314d3b4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Dashboard card */
.dash-card {
  background: linear-gradient(180deg, rgba(28, 43, 79, .85), rgba(18, 30, 58, .9));
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 20px;
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(0); }
  50% { transform: perspective(1200px) rotateY(-6deg) rotateX(3deg) translateY(-10px); }
}
.dash-head { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.dash-head .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.dash-title { margin-left: 10px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .78rem; color: var(--on-dark-soft); }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: rgba(7, 13, 28, .5); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 12px; min-width: 0; }
.kpi-label { display: block; font-size: .72rem; color: var(--on-dark-soft); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: #fff; font-variant-numeric: tabular-nums; }
.kpi-value.good { color: var(--accent); }
.dash-chart { color: var(--accent); background: rgba(7, 13, 28, .5); border-radius: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.06); }
.dash-chart svg { width: 100%; height: 150px; }
.dash-chart .gridlines line { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.dash-chart .line {
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 500; stroke-dashoffset: 500; animation: draw 2.2s .3s ease-out forwards;
  vector-effect: non-scaling-stroke;
}
.dash-chart .area { opacity: 0; animation: fade 1s 1.4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.dash-flow { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.stage {
  flex: none; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--on-dark-soft); border: 1px solid rgba(255,255,255,.08);
}
.stage-on { background: rgba(20, 211, 180, .15); color: var(--accent); border-color: rgba(20, 211, 180, .4); }
.arrow { flex: 1; height: 2px; position: relative; background: rgba(255,255,255,.1); overflow: hidden; border-radius: 2px; }
.arrow::after {
  content: ""; position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: flow 1.8s linear infinite;
}
@keyframes flow { to { left: 100%; } }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--navy-900); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-sub { font-size: 1.12rem; color: var(--ink-soft); }
.section-dark .section-sub { color: var(--on-dark-soft); }

/* Services cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cbd5e1; }
.card p { color: var(--ink-soft); font-size: .97rem; flex: 1; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(20, 211, 180, .15), rgba(91, 140, 255, .15));
}
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags li { font-size: .78rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-soft); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step {
  position: relative; padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(28, 43, 79, .6), rgba(18, 30, 58, .3));
  border: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column;
}
.step p { color: var(--on-dark-soft); flex: 1; }
.step-num {
  font-family: var(--font-head); font-weight: 700; font-size: 3rem; line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 20px; display: block;
}
.step h3 { font-size: 1.6rem; }
.step-out { font-size: .88rem; font-weight: 600; color: var(--accent); padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }

/* Industries */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.industry { background: #fff; padding: 32px; transition: background .2s; }
.industry:hover { background: var(--bg-tint); }
.industry h3 { font-size: 1.12rem; }
.industry p { color: var(--ink-soft); font-size: .97rem; margin: 0; }

.stack { margin-top: 64px; text-align: center; }
.stack-label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 20px; }
.stack-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.stack-list li {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--ink);
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}

/* About */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.about-copy p { color: var(--ink-soft); font-size: 1.07rem; }
.principles { display: grid; gap: 14px; }
.principles li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 20px 56px;
  position: relative; color: var(--ink-soft);
}
.principles li::before {
  content: ""; position: absolute; left: 20px; top: 22px; width: 20px; height: 20px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.principles strong { color: var(--ink); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s; }
.faq details[open] { border-color: #cbd5e1; box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 24px 20px; margin: 0; color: var(--ink-soft); }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact-email { color: var(--on-dark-soft); }
.contact-email a { color: var(--accent); font-weight: 600; text-decoration: none; }
.contact-email a:hover { text-decoration: underline; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: var(--navy-800); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-lg); padding: 32px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full, .contact-form .btn, .form-status { grid-column: 1 / -1; }
.field label { font-size: .9rem; font-weight: 500; color: var(--on-dark); }
.optional { color: var(--on-dark-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: #fff; width: 100%;
  background: var(--navy-950); border: 1px solid var(--navy-700); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 211, 180, .2);
}
.field.invalid input, .field.invalid textarea { border-color: #f87171; }
.form-status { margin: 0; font-size: .95rem; min-height: 1.5em; color: var(--on-dark-soft); }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #fca5a5; }

/* Footer */
.site-footer { background: var(--navy-950); color: var(--on-dark-soft); padding: 40px 0; border-top: 1px solid rgba(255,255,255,.06); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.copyright { margin: 0; font-size: .9rem; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 40px; }
}

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-950); border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
  }
  .nav-menu.open { transform: none; opacity: 1; visibility: visible; }
  .nav-menu a:not(.btn) { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-menu .btn { margin-top: 16px; }

  .hero { padding: 64px 0 80px; }
  .hero-inner, .about, .contact { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .dash-card { transform: none; animation: none; }
  .steps { grid-template-columns: 1fr; }
  .industries { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .cards, .industries { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; padding: 22px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-kpis .kpi:first-child { grid-column: 1 / -1; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .dash-chart .line { stroke-dashoffset: 0; }
  .dash-chart .area { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
}
