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

:root {
  --bg: #0a0a0a;
  --bg-2: #0f0f0f;
  --surface: #181818;
  --surface-2: #202020;
  --accent: #9333ea;
  --accent-dim: rgba(147, 51, 234, 0.12);
  --accent-glow: rgba(147, 51, 234, 0.25);
  --text: #f0f0f0;
  --text-2: #777;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(147, 51, 234, 0.3);
  --radius: 14px;
  --tr: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

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

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

/* ── Nav ─────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  height: 64px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo img {
  display: block;
  height: 72px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  flex: 1;
}

.nav-links a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--tr);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--tr), color var(--tr);
  margin-left: auto;
}

.nav-cta:hover {
  background: var(--accent);
  color: #000;
}

/* ── Hero ────────────────────────────── */

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(147, 51, 234, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 51, 234, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 20px;
  padding-bottom: 0.12em;
  background: linear-gradient(140deg, #ffffff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--text-2);
  margin-bottom: 44px;
  font-weight: 400;
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 100px;
  transition: transform var(--tr), box-shadow var(--tr);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

/* ── Sections ────────────────────────── */

.section {
  padding: 96px 24px;
  scroll-margin-top: 64px;
}

.section-alt {
  background: var(--bg-2);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 52px;
}

.section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 14px;
}

/* ── Service Cards ───────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: border-color var(--tr), transform var(--tr);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 72px;
  background: var(--accent-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ── Tabs ────────────────────────────── */

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tab-btn {
  padding: 9px 22px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--tr);
}

.tab-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.tab-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

/* ── Gallery ─────────────────────────── */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  opacity: 0;
  transform: translateY(8px);
  animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-item.hidden {
  display: none;
}

/* ── Contacts ────────────────────────── */

.contacts-wrap {
  text-align: center;
}

.contacts-wrap .section-title::after {
  width: 160px;
  margin: 14px auto 0;
}

.contacts-desc {
  color: var(--text-2);
  font-size: 1.05rem;
  margin-top: -28px;
  margin-bottom: 52px;
}

.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  min-width: 190px;
  transition: border-color var(--tr), transform var(--tr), background var(--tr);
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-icon svg {
  width: 22px;
  height: 22px;
}

/* ── Lightbox ────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.hidden {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  backdrop-filter: blur(10px);
}

.lightbox-img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--tr);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

/* ── Footer ──────────────────────────── */

.footer {
  padding: 32px 24px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ── Mobile ──────────────────────────── */

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav { padding: 0 20px; }
  .section { padding: 72px 16px; }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .social-link {
    min-width: calc(50% - 8px);
    flex: 1;
    justify-content: center;
  }

  .social-links {
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .social-link {
    min-width: 100%;
  }
}
