/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Design tokens ---------- */
:root {
  --bg: #090c12;
  --bg-alt: #0d111a;
  --surface: #131a27;
  --surface-hover: #18202f;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #eef1f6;
  --text-muted: #96a1b3;
  --text-faint: #626d80;
  --accent-1: #6366f1;
  --accent-2: #22d3ee;
  --accent-3: #a855f7;
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  --header-h: 72px;
}

html, body {
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.icon { width: 20px; height: 20px; }
.icon-lg { width: 26px; height: 26px; }

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-1);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #05060a;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(99,102,241,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(99,102,241,0.75); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--accent-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(9,12,18,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(9,12,18,0.92);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  color: #05060a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-mark.small { width: 30px; height: 30px; font-size: 0.65rem; border-radius: 8px; }
.brand-name { font-size: 1rem; color: var(--text); }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--text); }
.nav .nav-cta {
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 8px 18px;
  border-radius: 999px;
}
.nav .nav-cta:hover { border-color: var(--accent-2); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 700px;
  background:
    radial-gradient(600px 400px at 20% 20%, rgba(99,102,241,0.25), transparent 60%),
    radial-gradient(500px 400px at 80% 10%, rgba(34,211,238,0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.eyebrow {
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-eyebrow {
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin-bottom: 20px;
}
.section-sub {
  color: var(--text-muted);
  max-width: 640px;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.12);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.service-card p { color: var(--text-muted); margin-bottom: 20px; font-size: 0.98rem; }
.service-list li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: all 0.15s ease;
}
.filter-btn:hover { color: var(--text); border-color: var(--accent-2); }
.filter-btn.is-active {
  background: var(--gradient);
  color: #05060a;
  font-weight: 600;
  border-color: transparent;
}

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.work-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.work-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-3px);
  background: var(--surface-hover);
}
.work-card.is-hidden { display: none; }
.work-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.work-card-top .icon {
  color: var(--text-faint);
  transition: color 0.15s ease, transform 0.15s ease;
}
.work-card:hover .work-card-top .icon { color: var(--accent-2); transform: translate(2px,-2px); }
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  background: rgba(34,211,238,0.1);
  padding: 5px 10px;
  border-radius: 999px;
}
.work-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.work-tagline { color: var(--text); font-size: 0.95rem; font-weight: 500; margin-bottom: 10px; }
.work-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 18px; flex-grow: 1; }
.work-link { color: var(--text-faint); font-size: 0.85rem; font-family: "Space Grotesk", monospace; }

/* ---------- About ---------- */
.about-inner { max-width: 760px; }
.about-text { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Contact ---------- */
.contact-inner { max-width: 620px; }
.contact-inner .section-sub { margin-bottom: 32px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-inner > div { display: flex; align-items: center; gap: 12px; }
.footer-legal { color: var(--text-faint); font-size: 0.85rem; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { color: var(--text-muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--text); }
.footer-note { color: var(--text-faint); font-size: 0.85rem; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }

  .nav.is-open {
    display: flex;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    gap: 24px;
    overflow-y: auto;
  }
  .nav.is-open a { font-size: 1.2rem; color: var(--text); }

  .hero { padding: 110px 0 70px; }
  .section { padding: 70px 0; }
}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
