:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #14161c;
  --muted: #5b6070;
  --line: #e6e3dc;
  --brand: #ff5a36;
  --brand-ink: #ffffff;
  --brand-soft: #fff0eb;
  --dark: #14161c;
  --dark-2: #1f2230;
  --radius: 14px;
  --header-h: 68px;
  --footer-h: 56px;
  --shadow: 0 10px 30px rgba(20, 22, 28, 0.08);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

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

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 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.8em;
}

.accent { color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font: 600 1rem var(--font-body);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(255, 90, 54, 0.3); }
.btn-primary:hover { background: #ef4a26; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 50;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 700 1.3rem var(--font-head);
}
.logo-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: var(--brand);
  font-size: 1.1rem;
}

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  text-decoration: none;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); background: rgba(20, 22, 28, 0.06); }
.site-nav a.nav-cta { background: var(--ink); color: #fff; margin-left: 6px; }
.site-nav a.nav-cta:hover, .site-nav a.nav-cta.active { background: var(--brand); color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent;
  padding: 10px; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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 {
  padding: calc(var(--header-h) + 72px) 0 88px;
  background:
    radial-gradient(900px 400px at 85% 10%, rgba(255, 90, 54, 0.12), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(80, 110, 255, 0.08), transparent 60%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }

.hero-stats {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 36px; flex-wrap: wrap;
}
.hero-stats strong { display: block; font: 700 1.8rem var(--font-head); }
.hero-stats span { color: var(--muted); font-size: 0.9rem; }

.code-card {
  background: var(--dark);
  color: #e6e8ef;
  border-radius: 18px;
  padding: 20px 24px 28px;
  box-shadow: 0 30px 60px rgba(20, 22, 28, 0.25);
  transform: rotate(1.5deg);
}
.code-dots { display: flex; gap: 7px; margin-bottom: 18px; }
.code-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }
.code-card pre { margin: 0; overflow-x: auto; }
.code-card code { font: 0.95rem/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.code-card .k { color: #ff8a6b; }
.code-card .f { color: #7cc4ff; }
.code-card .s { color: #a5e3a0; }
.code-card .c { color: #8a8fa3; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-sub { color: var(--muted); font-size: 1.1rem; }

.what-we-do { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service p { color: var(--muted); margin: 0; }
.service-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 18px;
}
.service-icon svg { width: 24px; height: 24px; }

.expertise {
  margin-top: 80px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.expertise-copy p:last-child { color: var(--muted); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 0.95rem;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.member {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.member img {
  width: 100%; height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  margin-bottom: 16px;
  background: var(--brand-soft);
}
.member h3 { margin-bottom: 2px; }
.member .role { color: var(--brand); font-weight: 600; font-size: 0.9rem; margin-bottom: 10px; }
.member p:last-child { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--dark); color: #fff; }
.testimonials .eyebrow { color: #ff8a6b; }

.carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.carousel-viewport { overflow: hidden; border-radius: 20px; touch-action: pan-y; }
.carousel-track {
  list-style: none; margin: 0; padding: 0;
  display: flex;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.slide { flex: 0 0 100%; padding: 4px; }
.slide blockquote {
  margin: 0;
  padding: 48px 56px;
  background: var(--dark-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  min-height: 260px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.slide blockquote p { font: 500 clamp(1.15rem, 2.2vw, 1.6rem)/1.45 var(--font-head); margin-bottom: 28px; }
.slide footer strong { display: block; font-size: 1.05rem; }
.slide footer span { color: #a3a8ba; font-size: 0.95rem; }

.carousel-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.carousel-btn:hover { background: var(--brand); border-color: var(--brand); }
.carousel-btn svg { width: 22px; height: 22px; }

.carousel-dots {
  grid-column: 1 / -1;
  display: flex; justify-content: center; gap: 10px;
  margin-top: 20px;
}
.carousel-dots button {
  width: 10px; height: 10px;
  padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.carousel-dots button[aria-selected="true"] { width: 28px; background: var(--brand); }

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-copy p:last-child { color: var(--muted); font-size: 1.1rem; }
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font: 1rem var(--font-body);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.18);
}
.contact-form .btn { width: 100%; }

/* ---------- Footer ---------- */
.sticky-footer {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--ink);
  height: var(--footer-h);
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-icons { display: flex; justify-content: center; gap: 14px; }
.footer-icons a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #e6e8ef;
  transition: background 0.15s ease, color 0.15s ease;
}
.footer-icons a:hover { background: var(--brand); color: #fff; }
.footer-icons svg { width: 22px; height: 22px; }

.legal {
  background: #0c0d11;
  color: #8a8fa3;
  font-size: 0.85rem;
  text-align: center;
  padding: 18px 0 22px;
}
.legal p { margin: 0; }
.legal .disclaimer { margin-top: 4px; font-style: italic; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 4px;
    padding: 12px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .site-nav.open { opacity: 1; transform: none; visibility: visible; }
  .site-nav a { padding: 12px 16px; font-size: 1.05rem; }
  .site-nav a.nav-cta { margin: 6px 0 0; text-align: center; }

  .hero { padding: calc(var(--header-h) + 40px) 0 64px; }
  .hero-inner, .expertise, .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .code-card { transform: none; }
  section { padding: 72px 0; }
  .expertise { margin-top: 56px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .services { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .member { padding: 12px 12px 16px; }
  .member p:last-child { font-size: 0.88rem; }
  .hero-stats { gap: 18px; flex-wrap: nowrap; }
  .hero-stats strong { font-size: 1.4rem; }
  .hero-stats span { font-size: 0.8rem; line-height: 1.3; display: block; }
  .code-card { padding: 16px 16px 20px; }
  .code-card code { font-size: 0.8rem; }

  .carousel { grid-template-columns: 1fr 1fr; gap: 12px; }
  .carousel-viewport { grid-column: 1 / -1; grid-row: 1; }
  .carousel-btn.prev { grid-row: 2; justify-self: end; }
  .carousel-btn.next { grid-row: 2; justify-self: start; }
  .carousel-dots { grid-row: 3; margin-top: 4px; }
  .slide blockquote { padding: 28px 24px; min-height: 300px; }

  .contact-form { padding: 22px; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
