/* ===== Design tokens ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --fg: #0c0d10;
  --fg-soft: #4a4f5a;
  --muted: #757b87;
  --border: #e7e9ee;
  --brand: #5b5bf0;
  --brand-2: #0ea5e9;
  --ring: rgba(91, 91, 240, 0.35);
  --shadow: 0 1px 2px rgba(15, 18, 30, 0.04), 0 8px 24px rgba(15, 18, 30, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 18, 30, 0.10);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c10;
    --bg-alt: #101218;
    --surface: #14161d;
    --fg: #f3f5f9;
    --fg-soft: #c2c7d2;
    --muted: #8b93a3;
    --border: #232634;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 760px; }

::selection { background: var(--ring); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(91, 91, 240, 0.28);
}
.btn--primary:hover {
  box-shadow: 0 10px 26px rgba(91, 91, 240, 0.4);
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--fg);
  background: transparent;
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--fg-soft); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.logo__mark { display: inline-flex; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav__links a { color: var(--fg-soft); transition: color 0.2s ease; }
.nav__links a:hover { color: var(--fg); }
.nav__links .btn { color: var(--fg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 110px;
  text-align: center;
}
.hero__bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(closest-side at 30% 30%, rgba(91, 91, 240, 0.22), transparent 70%),
    radial-gradient(closest-side at 72% 40%, rgba(14, 165, 233, 0.18), transparent 70%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  border-radius: 999px;
}

.hero__title {
  margin: 0 auto;
  max-width: 18ch;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.grad {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  margin: 26px auto 0;
  max-width: 56ch;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--fg-soft);
}
.hero__cta {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section__kicker {
  display: block;
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}
.section__title {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.section__lede {
  margin: 20px 0 0;
  font-size: 1.12rem;
  color: var(--fg-soft);
}
.section__head { margin-bottom: 48px; max-width: 640px; }

/* ===== Service cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(91, 91, 240, 0.3);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--fg-soft); font-size: 0.98rem; }

/* ===== Contact ===== */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 52px;
  box-shadow: var(--shadow);
}
.contact__row {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact__row:first-of-type { padding-top: 0; }
.contact__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__value {
  font-size: 1.08rem;
  font-style: normal;
  color: var(--fg);
}
a.contact__value { font-weight: 600; transition: color 0.2s ease; }
a.contact__value:hover { color: var(--brand); }
.contact__btn { margin-top: 26px; width: 100%; }

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo--sm { font-size: 0.98rem; }
.footer__copy { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 28px; padding: 36px; }
}
@media (max-width: 560px) {
  .nav__links { gap: 16px; }
  .nav__links a:not(.btn) { display: none; }
  .hero { padding: 84px 0 76px; }
  .section { padding: 72px 0; }
  .contact { padding: 28px; }
}

/* ===== Motion preferences ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
