/* DeepBrain — deep neural intelligence */
:root {
  --bg: #0A0A0B;
  --purple: #9333EA;
  --blue: #3B82F6;
  --cream: #FAFAF9;
  --muted: #A1A1AA;
  --card: #141416;
  --border: rgba(147, 51, 234, 0.35);
  --glow: rgba(147, 51, 234, 0.25);
  --fade-duration: 0.65s;
  --font-display: "Bitter", Georgia, serif;
  --font-body: "PT Sans", system-ui, sans-serif;
  --max: 1180px;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--cream);
  background: var(--bg);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--purple);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.35rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

ul { margin: 0 0 1rem; padding-left: 1.25rem; }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Neural background layers */
.neural-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(147, 51, 234, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 70%, rgba(59, 130, 246, 0.08), transparent 50%),
    var(--bg);
}

.neural-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(250, 250, 249, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 250, 249, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(147, 51, 234, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--cream);
  text-decoration: none;
}

.logo-mark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark span {
  color: var(--purple);
}

.logo-tag {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-main a {
  color: var(--cream);
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--cream);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
}

/* Fade depth animation — progressive enhancement */
.fade-depth {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--fade-duration) ease,
    transform var(--fade-duration) cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .fade-depth {
  opacity: 0;
  transform: translateY(28px);
}

html.js .fade-depth.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 32ch;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.1),
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 80px var(--glow);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), transparent 50%, rgba(59, 130, 246, 0.15));
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

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

.section-alt {
  background: linear-gradient(180deg, rgba(20, 20, 22, 0.6), transparent);
  border-block: 1px solid rgba(147, 51, 234, 0.08);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-head p {
  color: var(--muted);
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

/* Modules grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
}

.module-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.module-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Pipeline */
.pipeline-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.pipeline-visual {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.pipeline-visual img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.pipeline-steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  counter-reset: step;
}

.pipeline-steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.25rem;
  counter-increment: step;
}

.pipeline-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--purple), var(--blue));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 12px var(--glow);
}

.timeline-year {
  font-family: var(--font-display);
  color: var(--blue);
  font-size: 0.9rem;
}

.timeline-with-img {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
}

.timeline-img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.timeline-img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Service blocks */
.services-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.service-block {
  background: var(--card);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

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

.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  opacity: 0.9;
}

.service-block h3 {
  font-size: 1rem;
}

.service-block p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Certifications */
.cert-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 3rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cert-item {
  text-align: center;
  min-width: 140px;
}

.cert-item strong {
  display: block;
  font-family: var(--font-display);
  color: var(--cream);
  font-size: 1rem;
}

.cert-item span {
  font-size: 0.8rem;
  color: var(--muted);
}

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

.testimonial {
  background: var(--card);
  border-left: 3px solid var(--purple);
  padding: 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.testimonial blockquote {
  margin: 0 0 1rem;
  font-style: italic;
  color: var(--cream);
}

.testimonial cite {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: normal;
}

/* Purple CTA */
.cta-purple {
  background: linear-gradient(135deg, #7c22ce, var(--purple) 40%, #6d28d9);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
  margin: 2rem 0;
  box-shadow: 0 20px 50px rgba(147, 51, 234, 0.35);
}

.cta-purple h2 {
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.cta-purple p {
  color: rgba(250, 250, 249, 0.85);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(147, 51, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: var(--cream);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(250, 250, 249, 0.4);
}

.btn-outline:hover {
  border-color: var(--cream);
  color: var(--cream);
}

.btn-light {
  background: var(--cream);
  color: var(--bg);
}

.btn-light:hover {
  color: var(--bg);
  transform: translateY(-2px);
}

/* Collection cards */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.solution-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: box-shadow 0.3s ease;
}

.solution-card:hover {
  box-shadow: 0 0 30px var(--glow);
}

.solution-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.solution-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.solution-ref {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--purple);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.solution-body p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* Services page */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(147, 51, 234, 0.1);
}

.service-detail:nth-child(even) .service-detail-text {
  order: 2;
}

.service-detail:nth-child(even) .service-detail-visual {
  order: 1;
}

.service-detail-visual {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 200px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.neural-icon-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--purple), var(--blue), var(--purple));
  opacity: 0.8;
}

/* Page hero */
.page-hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.page-hero .hero-lead {
  margin: 0 auto;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

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

.contact-card h3 {
  color: var(--purple);
  margin-bottom: 1rem;
}

.contact-img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.contact-img img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 0.75rem;
  padding-left: 0;
}

/* Legal */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

.legal-content h3 {
  margin-top: 1.5rem;
  color: var(--purple);
}

.legal-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(147, 51, 234, 0.2);
  background: rgba(20, 20, 22, 0.5);
}

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

.footer-infobox {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: 0.9rem;
}

.footer-infobox strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.75rem;
  color: var(--purple);
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--cream);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(250, 250, 249, 0.08);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #121214;
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
}

.cookie-banner.is-active {
  transform: translateY(0);
}

.cookie-inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-inner p {
  margin: 0;
  flex: 1;
  min-width: 240px;
  font-size: 0.9rem;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

.cookie-actions .btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

/* About stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat-box {
  text-align: center;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--purple);
}

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

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .pipeline-wrap,
  .timeline-with-img,
  .service-detail,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

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

  .testimonials-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 11, 0.98);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-main.is-open {
    display: flex;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .modules-grid,
  .collection-grid,
  .stats-row {
    grid-template-columns: 1fr;
  }

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

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

  .service-detail:nth-child(even) .service-detail-text,
  .service-detail:nth-child(even) .service-detail-visual {
    order: unset;
  }
}

/* Contact form */
.contact-form .form-group { margin-bottom: 1.25rem; }
.contact-form label { display: block; margin-bottom: 0.35rem; font-weight: 700; color: var(--cream); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f0f11;
  color: var(--cream);
  font-family: var(--font-body);
}
.contact-form .field-error { color: #f87171; font-size: 0.875rem; margin-top: 0.35rem; min-height: 1.2em; }
.form-success { display: none; padding: 1.25rem; border-left: 3px solid var(--purple); background: rgba(147,51,234,0.12); border-radius: 8px; }
.form-success.visible { display: block; }
