/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --bg:           #09090b;
  --bg-card:      #111115;
  --bg-card-hover:#18181c;
  --border:       #27272a;
  --border-light: #3f3f46;
  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-dim:   rgba(99, 102, 241, 0.12);
  --text:         #fafafa;
  --text-muted:   #a1a1aa;
  --text-dim:     #52525b;
  --gradient:     linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --radius:       10px;
}

/* ─── Base ───────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Typography ─────────────────────────────────────── */
h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

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

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s, box-shadow 0.18s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.38);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 0.875rem;
  font-size: 0.9375rem;
}

/* ─── Nav ────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(9, 9, 11, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s;
}

#nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 1.5rem;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.125rem;
  margin-left: auto;
}
.nav-links a {
  display: block;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav-cta {
  margin-left: 0.25rem;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

/* ─── Hero ───────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(99, 102, 241, 0.18), transparent 70%),
    linear-gradient(rgba(99, 102, 241, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  background-position: 0 0, -1px -1px, -1px -1px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}

.badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero-inner h1 { margin-bottom: 1.25rem; }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Section Shared ─────────────────────────────────── */
section { padding: 6rem 0; }

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 520px;
  margin-bottom: 3rem;
  line-height: 1.75;
}

/* ─── Services ───────────────────────────────────────── */
#services { border-top: 1px solid var(--border); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1.125rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 36px;
  height: 36px;
  color: var(--accent-light);
  margin-bottom: 1.125rem;
}
.card-icon svg { width: 100%; height: 100%; }

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ─── Stack Strip ────────────────────────────────────── */
#stack {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04) 0%, transparent 100%);
}

.stack-strip {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.stack-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 100px;
}
.stack-item img {
  opacity: 0.8;
  transition: opacity 0.18s;
}
.stack-item:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--bg-card-hover);
}
.stack-item:hover img {
  opacity: 1;
}

/* ─── Contact ────────────────────────────────────────── */
#contact { border-top: 1px solid var(--border); }

.contact-form {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.125rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

input,
textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.875rem;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  resize: vertical;
}
input::placeholder,
textarea::placeholder { color: var(--text-dim); }
input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.form-success {
  display: none;
  text-align: center;
  color: #4ade80;
  font-size: 0.9rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  background: rgba(74, 222, 128, 0.06);
}
.form-success.visible { display: block; }

/* ─── Footer ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

footer p { font-size: 0.8125rem; color: var(--text-dim); }
footer a:not(.logo) { font-size: 0.8125rem; color: var(--text-dim); text-decoration: none; transition: color 0.18s; }
footer a:not(.logo):hover { color: var(--accent-light); }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .form-row { grid-template-columns: 1fr; }
  .hero-inner { padding: 4rem 1.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  section { padding: 4rem 0; }
  #stack { padding: 3rem 0; }
}
