:root {
  --navy: #18181b;
  --brand-navy: #09090b;
  --brand-navy-light: #27272a;
  --teal: #0046e8;
  --teal-dark: #0036b3;
  --accent-text: #0046e8;
  --bg: #f4f4f5;
  --text: #18181b;
  --muted: #71717a;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --border: #d4d4d8;
  --divider: rgba(24, 24, 27, 0.06);
  --track: rgba(24, 24, 27, 0.1);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(24, 24, 27, 0.08);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --navy: #f4f4f5;
  --teal: #3d6bff;
  --accent-text: #6690ff;
  --bg: #09090b;
  --text: #e4e4e7;
  --muted: #a1a1aa;
  --surface: #18181b;
  --surface-rgb: 24, 24, 27;
  --border: #3f3f46;
  --divider: rgba(255, 255, 255, 0.08);
  --track: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulseOpacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@keyframes toggleSpin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  to { transform: rotate(360deg) scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }

  .cards .reveal:nth-child(2), .steps .reveal:nth-child(2), .price-cards .reveal:nth-child(2) { transition-delay: 90ms; }
  .cards .reveal:nth-child(3), .steps .reveal:nth-child(3), .price-cards .reveal:nth-child(3) { transition-delay: 180ms; }
  .cards .reveal:nth-child(4) { transition-delay: 270ms; }
  .cards .reveal:nth-child(5) { transition-delay: 360ms; }
  .cards .reveal:nth-child(6) { transition-delay: 450ms; }

  .hero h1, .hero-sub, .hero-actions, .hero-trust {
    animation: fadeInUp 0.7s ease both;
  }
  .hero-sub { animation-delay: 0.1s; }
  .hero-actions { animation-delay: 0.2s; }
  .hero-trust { animation-delay: 0.3s; }

  .form-status:not([hidden]) { animation: fadeInUp 0.4s ease; }
  .theme-toggle.spin { animation: toggleSpin 0.5s ease; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--muted); }

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(var(--surface-rgb), 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--divider);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  white-space: nowrap;
}
.logo-mark {
  height: 32px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 0 3px rgba(0, 70, 232, 0.25);
}
.logo span { color: var(--accent-text); }

.nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.nav a {
  position: relative;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--accent-text);
  transition: right 0.25s ease;
}
.nav a:hover { color: var(--accent-text); }
.nav a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--navy);
}

.theme-toggle {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { border-color: var(--teal); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.96); }
.btn-primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 70, 232, 0.35);
}
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-ghost:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }
.btn-small { padding: 8px 18px; font-size: 0.9rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.nav-cta { white-space: nowrap; }

/* Hero */
.hero {
  padding: 96px 0 64px;
  text-align: center;
  background: radial-gradient(circle at 50% -10%, rgba(0,70,232,0.12), transparent 60%);
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--navy);
}
.accent { color: var(--accent-text); }
.hero-sub {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-trust {
  list-style: none;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

/* Logos */
.logos { padding: 32px 0; }
.logos-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.logos-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.8;
}

/* Sections generic */
section h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
}
.section-sub {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* Services */
.services { padding: 72px 0; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(24, 24, 27, 0.14);
}
.card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: inline-block;
  transition: transform 0.3s ease;
}
.card:hover .card-icon { transform: scale(1.15) rotate(-6deg); }
.card h3 { color: var(--navy); font-size: 1.1rem; }
.card p { margin: 0; }

/* Portfolio */
.portfolio { padding: 72px 0; }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.portfolio-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(24, 24, 27, 0.14);
}
.portfolio-preview {
  overflow: hidden;
  border-bottom: 1px solid var(--divider);
}
.portfolio-preview img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}
.portfolio-card:hover .portfolio-preview img { transform: scale(1.06); }
.portfolio-info {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.portfolio-info h3 {
  color: var(--navy);
  font-size: 1.05rem;
  margin: 0;
}
.portfolio-link {
  color: var(--accent-text);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.portfolio-link span { display: inline-block; transition: transform 0.2s ease; }
.portfolio-card:hover .portfolio-link span { transform: translateX(4px); }

.portfolio-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  background: transparent;
  box-shadow: none;
  border: 2px dashed var(--border);
  color: var(--muted);
  text-align: center;
}
.portfolio-card-placeholder:hover { transform: none; box-shadow: none; }
.portfolio-placeholder-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
}
.portfolio-card-placeholder p { margin: 0; font-size: 0.9rem; }

/* Process */
.process { padding: 72px 0; background: var(--surface); }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.step { text-align: center; }
.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 16px;
  transition: transform 0.3s ease;
}
.step:hover .step-number { transform: scale(1.12); }
.step h3 { color: var(--navy); font-size: 1.05rem; }
.step p { margin: 0; }

/* Pricing */
.pricing { padding: 72px 0; }
.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}
.price-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  border: 2px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(24, 24, 27, 0.14);
}
.price-card.featured {
  border-color: var(--teal);
  transform: scale(1.03);
}
.price-card.featured:hover { transform: scale(1.03) translateY(-6px); }
.badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  margin: 0;
}
.price-card h3 { color: var(--navy); }
.price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  margin: 8px 0;
}
.price-desc { min-height: 48px; }
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
  color: var(--muted);
  font-size: 0.92rem;
}
.price-card ul li { padding: 6px 0; border-bottom: 1px solid var(--divider); }

/* CTA / Contact */
.cta-band {
  padding: 72px 0 96px;
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-light));
  color: var(--white);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.cta-copy h2 { color: var(--white); text-align: left; }
.cta-copy p { color: rgba(255,255,255,0.75); }
.contact-form {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 12px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.form-status {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--accent-text);
  text-align: center;
}

/* Footer */
.site-footer { padding: 32px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner p { margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-copy h2 { text-align: center; }
}

@media (max-width: 720px) {
  .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 0 24px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
  }
  .nav.mobile-open {
    max-height: 480px;
    opacity: 1;
    padding: 16px 24px;
  }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .form-row { flex-direction: column; }
  .price-card.featured { transform: none; }
}
