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

:root {
  --bg: #0a0b0f;
  --bg-elevated: #12141c;
  --bg-card: #161922;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f2f5;
  --text-muted: #9ca3af;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.btn-nav {
  background: var(--accent);
  color: white;
  padding: 0.55rem 1.2rem;
  font-size: 0.875rem;
}

.btn-nav:hover {
  background: var(--accent-hover);
}

.btn-full { width: 100%; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: white;
}

.logo-text span { color: var(--accent-hover); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a:not(.btn) {
  font-size: 0.925rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(168, 85, 247, 0.12), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.hero-sub {
  margin-top: 1.25rem;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.25rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Sections ===== */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-hover);
  margin-bottom: 0.75rem;
}

.section-header p {
  margin-top: 0.85rem;
  color: var(--text-muted);
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: var(--shadow);
}

.service-icon {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 { margin-bottom: 0.6rem; }

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== About ===== */
.about {
  background: var(--bg-elevated);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.about-content .section-label { margin-bottom: 0.75rem; }

.about-content h2 { margin-bottom: 1.25rem; }

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.95rem;
}

.about-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.about-card.accent {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.1));
  border-color: rgba(99, 102, 241, 0.3);
}

.about-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-hover);
}

.about-card h3 {
  margin: 0.5rem 0 0.4rem;
}

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

/* ===== Portfolio ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.portfolio-image {
  height: 200px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.portfolio-image.p1 { background: linear-gradient(135deg, #1e3a5f, #0f172a); }
.portfolio-image.p2 { background: linear-gradient(135deg, #312e81, #1e1b4b); }
.portfolio-image.p3 { background: linear-gradient(135deg, #4c1d95, #1e1033); }
.portfolio-image.p4 { background: linear-gradient(135deg, #164e63, #0c2a35); }

.portfolio-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 999px;
}

.portfolio-info {
  padding: 1.35rem 1.5rem 1.5rem;
}

.portfolio-info h3 { margin-bottom: 0.4rem; }

.portfolio-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Process ===== */
.process {
  background: var(--bg-elevated);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.step {
  text-align: center;
  padding: 1.5rem 1rem;
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.85rem;
}

.step h3 { margin-bottom: 0.5rem; }

.step p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== CTA Banner ===== */
.cta-banner {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.12));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-banner h2 { margin-bottom: 0.75rem; }

.cta-banner p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info .section-label { margin-bottom: 0.75rem; }

.contact-info h2 { margin-bottom: 1rem; }

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-details {
  display: grid;
  gap: 1.25rem;
}

.contact-item strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-item a {
  color: var(--accent-hover);
}

.contact-item a:hover { text-decoration: underline; }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

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

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-links h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer-links a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 1.5rem; }
}

@media (max-width: 700px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(10, 11, 15, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle { display: flex; }

  .services-grid,
  .portfolio-grid,
  .process-steps { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.25rem;
  }

  .section { padding: 4rem 0; }
}
