/* ---------- tokens ---------- */
:root {
  --brand: #5b52f0;
  --brand-2: #8c7bf7;
  --brand-glow: #c9c4ff;

  --bg: #0d0b26;
  --surface: #15122f;
  --surface-2: #1b1740;
  --ink: #f3f1ff;
  --muted: #b3ade0;
  --line: rgba(243, 241, 255, 0.12);
  --shadow: 0 30px 60px -30px rgba(20, 15, 60, 0.6);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --max: 1120px;
  --radius: 20px;
}

html[data-theme="light"] {
  --bg: #f6f4fc;
  --surface: #ffffff;
  --surface-2: #eeebfb;
  --ink: #171331;
  --muted: #5c5680;
  --line: rgba(23, 19, 49, 0.1);
  --shadow: 0 30px 60px -34px rgba(60, 50, 130, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--muted); max-width: 62ch; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

section { padding: 88px 0; border-bottom: 1px solid var(--line); }
.industries { padding: 64px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 16px 30px -14px rgba(91, 82, 240, 0.65);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--brand-2); }
.btn-small { padding: 10px 18px; font-size: .85rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.logo-mark svg { display: block; }
.logo-mark--nav { width: 34px; height: 34px; }
.logo-chip { fill: var(--brand); }
.logo-fill { fill: #fff; stroke: #fff; }
.main-nav {
  display: flex;
  gap: 30px;
  font-size: .93rem;
  color: var(--muted);
}
.main-nav a { transition: color .2s ease; }
.main-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span { width: 18px; height: 1.6px; background: var(--ink); }

/* ---------- hero ---------- */
.hero { padding-top: 72px; padding-bottom: 0; border-bottom: none; position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 60px;
}
.eyebrow {
  font-family: var(--font-display);
  color: var(--brand-2);
  font-size: .95rem;
  margin-bottom: 18px;
}
.hero-sub { font-size: 1.08rem; }
.hero-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }

.hero-copy > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.is-loaded .hero-copy > *:nth-child(1) { transition-delay: .05s; }
.is-loaded .hero-copy > *:nth-child(2) { transition-delay: .15s; }
.is-loaded .hero-copy > *:nth-child(3) { transition-delay: .28s; }
.is-loaded .hero-copy > *:nth-child(4) { transition-delay: .4s; }
.is-loaded .hero-copy > * { opacity: 1; transform: translateY(0); }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
}
.logo-mark--hero { width: min(280px, 60vw); position: relative; z-index: 2; }
.logo-mark--hero .logo-crescent { transform-origin: 100px 100px; animation: breathe 7s ease-in-out infinite; }
.logo-mark--hero .logo-ring {
  transform-origin: 100px 100px;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s cubic-bezier(.5,0,.2,1) .3s;
}
.is-loaded .logo-mark--hero .logo-ring {
  stroke-dashoffset: 0;
  animation: spin 22s linear 1.6s infinite;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--line);
  opacity: 0;
  transition: opacity 1s ease .6s;
}
.is-loaded .orbit-ring { opacity: 1; }
.orbit-ring--outer { width: 420px; height: 420px; animation: spin 60s linear infinite; }
.orbit-ring--inner { width: 340px; height: 340px; animation: spin 40s linear infinite reverse; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding: 34px 0 24px;
}
.stat {
  padding: 0 24px;
  border-left: 1px solid var(--line);
  position: relative;
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
}
.stat-label { color: var(--muted); font-size: .9rem; }

/* ---------- services ---------- */
.section-lede { font-size: 1.05rem; margin-top: -6px; margin-bottom: 42px; }

.service-list { display: flex; flex-direction: column; }
.service-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  align-items: flex-start;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 32% 50%, transparent 0 55%, var(--brand-2) 56% 100%) content-box;
  -webkit-mask: radial-gradient(circle at 62% 50%, transparent 0 40%, #000 41%);
  mask: radial-gradient(circle at 62% 50%, transparent 0 40%, #000 41%);
  background-color: var(--brand-2);
}
.service-row h3 { margin-bottom: 6px; }
.service-row p { margin: 0; }

/* ---------- process ---------- */
.process-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}
.process-list li {
  counter-increment: step;
  padding: 26px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.process-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: -18px;
  right: -10px;
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 700;
  color: var(--brand);
  opacity: .12;
}
.process-list h3 { position: relative; z-index: 1; }
.process-list p { position: relative; z-index: 1; font-size: .95rem; margin: 0; }

/* ---------- industries ---------- */
.industry-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0; margin: 0;
}
.industry-tags li {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 40px;
  align-items: center;
}
.about-mark { color: var(--brand-2); opacity: .8; }
.about-mark svg { width: 100%; height: auto; }

/* ---------- contact ---------- */
.contact { border-bottom: none; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}
.contact-info dl { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.contact-info dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 2px; }
.contact-info dd { margin: 0; font-family: var(--font-display); font-size: 1.05rem; }
.contact-info dd a:hover { color: var(--brand-2); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body);
  font-size: .96rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--brand-2);
  outline-offset: 1px;
}
.form-note { font-size: .8rem; margin: 0; }

/* ---------- footer ---------- */
.site-footer { padding: 48px 0 30px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.footer-nav { display: flex; gap: 22px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.footer-nav a:hover { color: var(--ink); }
.footer-meta { color: var(--muted); font-size: .85rem; }
.footer-copy { text-align: center; color: var(--muted); font-size: .8rem; margin: 20px 0 0; }

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-copy > * { opacity: 1; transform: none; }
  .logo-mark--hero .logo-ring { stroke-dashoffset: 0; }
  .orbit-ring { opacity: 1; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 240px; }
  .orbit-ring--outer, .orbit-ring--inner { display: none; }
  .stats-row { grid-template-columns: 1fr; gap: 18px; }
  .stat { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .stat:first-child { border-top: none; padding-top: 0; }
  .process-list { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-mark { max-width: 220px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  section { padding: 60px 0; }
  .process-list { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
}

/* mobile nav panel */
@media (max-width: 920px) {
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 78px;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 20px 28px 28px;
    gap: 18px;
  }
}
