:root {
  --bg:           #0b0b14;
  --bg-2:         #11111e;
  --bg-3:         #17172a;
  --bg-4:         #1e1e36;
  --bg-card:      #141425;

  --border:       rgba(120, 90, 210, 0.14);
  --border-md:    rgba(120, 90, 210, 0.28);
  --border-hi:    rgba(120, 90, 210, 0.55);

  --purple:       #7c3aed;
  --purple-mid:   #8b5cf6;
  --purple-lite:  #a78bfa;
  --purple-pale:  #c4b5fd;
  --purple-dim:   rgba(124, 58, 237, 0.15);
  --purple-glow:  rgba(124, 58, 237, 0.07);

  --text:         #ddd8f0;
  --text-muted:   #9d98b8;
  --text-dim:     #57526e;
  --white:        #f4f2ff;

  --ai-from:      #7c3aed;
  --ai-to:        #af0ee9;

  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --ease:       0.22s ease;

  --font-display: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Prevent descender clipping on all text elements */
h1, h2, h3, h4, h5, h6, p, span, a, li, label, button, input, textarea {
  overflow: visible;
}
/* Ensure enough vertical space for descenders in inline/single-line contexts */
.nav-links a,
.btn-primary,
.btn-ghost,
.nav-cta,
.lang-toggle,
.section-label,
.service-link,
.footer-col a,
.mobile-link {
  padding-top: 0.55em;
  padding-bottom: 0.55em;
  line-height: 1.5;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.35); border-radius: 3px; }

/* ---- LAYOUT ---- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- SECTION HEADER ---- */
.section-header { margin-bottom: 48px; }

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-pale);
  background: var(--purple-dim);
  border: 1px solid rgba(167,139,250,0.22);
  padding: 5px 16px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; overflow: visible; }
p { color: var(--text-muted); line-height: 1.85; overflow: visible; }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 16px 30px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
  overflow: visible;
}
.btn-primary:hover {
  background: var(--purple-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.35);
}
.btn-primary.btn-full { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 16px 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border-md);
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), transform var(--ease);
  white-space: nowrap;
  line-height: 1.4;
  overflow: visible;
}
.btn-ghost:hover {
  border-color: var(--purple-lite);
  color: var(--purple-pale);
  transform: translateY(-2px);
}

/* ========================
   HEADER / NAV
   ======================== */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--ease), border-bottom var(--ease), backdrop-filter var(--ease);
}
#header.scrolled {
  background: rgba(11, 11, 20, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo — bigger */
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 64px; width: auto; }

/* Nav links */
.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 7px 15px;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}
.nav-links a:hover { color: var(--white); background: rgba(124,58,237,0.12); }

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.lang-toggle {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--ease), border-color var(--ease);
}
.lang-toggle:hover { color: var(--purple-pale); border-color: var(--purple-mid); }

.nav-cta {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  background: var(--purple);
  padding: 9px 22px;
  border-radius: var(--radius);
  transition: background var(--ease), transform var(--ease);
}
.nav-cta:hover { background: var(--purple-mid); transform: translateY(-1px); }

/* Mobile toggle */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 8px 28px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-link {
  display: block;
  padding: 15px 0;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--ease);
}
.mobile-link:hover { color: var(--white); }
.lang-mobile { color: var(--purple-lite); font-weight: 600; }

/* ========================
   HERO
   ======================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 144px 0 90px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Dot grid */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(124,58,237,0.2) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, black 10%, transparent 100%);
}

/* Central glow */
.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(124,58,237,0.1) 0%,
    rgba(175,14,233,0.05) 45%,
    transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 44px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================
   ABOUT
   ======================== */
.about {
  padding: 110px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.about-text {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
}
.about-text p + p { margin-top: 20px; }

/* ========================
   SERVICES
   ======================== */
.services {
  padding: 110px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* 2-col grid, last card spans full width */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto auto;
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
  overflow: hidden;
}
.service-card:hover {
  border-color: var(--border-md);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
}

/* Featured card — purple accent */
.service-card--featured {
  border-color: rgba(124,58,237,0.32);
  background: linear-gradient(145deg, var(--bg-card) 55%, rgba(124,58,237,0.08) 100%);
}
.service-card--featured:hover {
  border-color: rgba(124,58,237,0.6);
  box-shadow: 0 16px 48px rgba(124,58,237,0.12);
}

/* AI card — blue/purple gradient accent */
.service-card--ai {
  border-color: rgba(14,165,233,0.25);
  background: linear-gradient(145deg, var(--bg-card) 55%, rgba(14,165,233,0.06) 100%);
}
.service-card--ai:hover {
  border-color: rgba(14,165,233,0.5);
  box-shadow: 0 16px 48px rgba(14,165,233,0.1);
}
.service-card--ai .service-icon { color: #38bdf8; border-color: rgba(14,165,233,0.25); background: rgba(14,165,233,0.1); }
.service-card--ai .service-link { color: #38bdf8; }

/* Wide card — spans 2 cols */
.service-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: 28px;
}
.service-card--wide .service-icon { flex-shrink: 0; margin-top: 4px; }
.service-card--wide > div, .service-card--wide > p, .service-card--wide > h3, .service-card--wide > a {
  /* let flex handle it */
}

.service-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-lite);
  flex-shrink: 0;
}

.service-new-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.25);
  padding: 3px 12px;
  border-radius: 99px;
  align-self: flex-start;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
  line-height: 1.3;
}

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

.service-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple-lite);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap var(--ease), color var(--ease);
  align-self: flex-start;
  margin-top: auto;
}
.service-link:hover { gap: 10px; color: var(--purple-pale); }

/* ========================
   TEAM
   ======================== */
.team {
  padding: 110px 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.team .section-header { margin-bottom: 24px; }

.team-text {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* ========================
   FAQ
   ======================== */
.faq {
  padding: 110px 0;
  border-bottom: 1px solid var(--border);
}

.faq-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
  align-items: start;
}

.faq-header { position: sticky; top: 104px; }

.faq-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
}

.faq-list { display: flex; flex-direction: column; }

.faq-item { border-bottom: 1px solid var(--border); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: color var(--ease);
  line-height: 1.4;
}
.faq-question:hover { color: var(--white); }
.faq-question[aria-expanded="true"] { color: var(--purple-pale); }

.faq-icon {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-dim);
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--ease), color var(--ease);
  margin-top: 2px;
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  color: var(--purple-lite);
}

.faq-answer { display: none; padding: 0 0 22px; }
.faq-answer.open { display: block; }
.faq-answer p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.85; }

/* ========================
   CONTACT
   ======================== */
.contact { padding: 110px 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 72px;
  align-items: start;
}

.contact-subtitle {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.8;
  margin-bottom: 28px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}
.contact-detail svg { color: var(--purple-lite); flex-shrink: 0; }
.contact-detail a:hover { color: var(--purple-pale); }

/* Form */
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 18px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  resize: none;
  width: 100%;
  line-height: 1.6;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}

/* ========================
   FOOTER
   ======================== */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
}

.footer-brand .logo img { height: 58px; margin-bottom: 16px; }

.footer-email {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.footer-email a { color: var(--purple-lite); }
.footer-email a:hover { color: var(--purple-pale); }

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-dim);
  transition: color var(--ease);
}
.footer-col a:hover { color: var(--purple-lite); }

.footer-coming {
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* ========================
   BACK TO TOP
   ======================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--bg-3);
  border: 1px solid var(--border-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  z-index: 100;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease), color var(--ease), border-color var(--ease);
  text-decoration: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.back-to-top:hover { color: var(--purple-lite); border-color: var(--purple-mid); }

/* ========================
   SUCCESS PAGE
   ======================== */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.success-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  text-align: center;
  max-width: 460px;
  width: 100%;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--purple-dim);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  color: var(--purple-lite);
}

.success-card h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--white);
  margin-bottom: 12px;
}
.success-card p { color: var(--text-muted); margin-bottom: 36px; line-height: 1.7; }

/* ========================
   RESPONSIVE — Tablet (≤960px)
   ======================== */
@media (max-width: 960px) {
  /* Hide desktop nav, show hamburger */
  .nav-links, .nav-cta { display: none; }
  .mobile-menu-btn { display: flex; }

  /* Logo slightly smaller on tablet */
  .logo img { height: 54px; }
  .footer-brand .logo img { height: 48px; }

  /* Services: single col */
  .services-grid { grid-template-columns: 1fr; }
  .service-card--wide { flex-direction: column; gap: 14px; }

  /* Testimonials: single col */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* FAQ: stack */
  .faq-inner { grid-template-columns: 1fr; gap: 40px; }
  .faq-header { position: static; }

  /* Contact: stack */
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }

  /* Footer: 2-col */
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ========================
   RESPONSIVE — Mobile (≤640px)
   ======================== */
@media (max-width: 640px) {
  .container { padding: 0 18px; }

  .nav-container { padding: 0 18px; }
  .logo img { height: 44px; }

  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions a { text-align: center; justify-content: center; }

  .section-title { font-size: 1.6rem; }

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

  .contact-form-wrap { padding: 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-brand .logo img { height: 44px; }

  .success-card { padding: 40px 24px; }
}
