/* ===== CSS Variables & Theme ===== */
:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 72px;

  /* Light theme */
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-muted: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --gradient-start: #2563eb;
  --gradient-end: #7c3aed;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.1);
  --orb-opacity: 0.35;
  --loader-bg: #f8fafc;
  --logo-color: #0f172a;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-elevated: #131c2e;
  --bg-muted: #1a2540;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --gradient-start: #3b82f6;
  --gradient-end: #a78bfa;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.45);
  --orb-opacity: 0.2;
  --loader-bg: #0b1120;
  --logo-color: #f1f5f9;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

body.loading {
  overflow: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

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

/* Logo color via CSS */
.nav__logo,
.footer__logo,
.loader__logo {
  color: var(--logo-color);
  height: auto;
  object-fit: contain;
}

.nav__logo {
  width: 180px;
  height: 33px;
}

.footer__logo {
  width: 160px;
  height: 30px;
}

.loader__logo {
  width: 260px;
  height: 48px;
}

/* ===== Loader ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--loader-bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.loader__logo {
  animation: loaderPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 4px 20px color-mix(in srgb, var(--accent) 20%, transparent));
}

.loader__bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.loader__progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 99px;
  animation: loaderProgress 2s ease-in-out forwards;
}

.loader__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  animation: loaderFade 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.98); }
}

@keyframes loaderProgress {
  0% { width: 0%; }
  60% { width: 75%; }
  100% { width: 100%; }
}

@keyframes loaderFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg-elevated) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}

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

.nav__brand {
  flex-shrink: 0;
}

.nav__menu {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 2px;
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), transform 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-muted);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
}

.nav__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__burger.open span:nth-child(2) {
  opacity: 0;
}

.nav__burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow var(--transition), background var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn--primary:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent);
}

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

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

.btn--full {
  width: 100%;
}

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

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

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--orb-opacity);
  animation: orbFloat 12s ease-in-out infinite;
}

.hero__orb--1 {
  width: 500px;
  height: 500px;
  background: var(--gradient-start);
  top: -10%;
  right: -5%;
}

.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: var(--gradient-end);
  bottom: 10%;
  left: -10%;
  animation-delay: -4s;
}

.hero__orb--3 {
  width: 300px;
  height: 300px;
  background: #06b6d4;
  top: 40%;
  left: 40%;
  animation-delay: -8s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat__number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

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

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.about__card {
  padding: 36px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.about__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}

.about__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 14px;
  color: var(--accent);
  margin-bottom: 20px;
}

.about__icon svg {
  width: 26px;
  height: 26px;
}

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

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

/* ===== Services ===== */
.services {
  background: var(--bg-muted);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  padding: 36px 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.service-card__num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 12px 0 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.65;
}

.service-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}

.service-card__link:hover {
  text-decoration: underline;
}

/* ===== Solutions ===== */
.solutions__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.solutions__content p {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.solutions__list {
  margin-bottom: 32px;
}

.solutions__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-weight: 500;
  font-size: 0.95rem;
}

.solutions__list svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.solutions__panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.panel__header {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
}

.panel__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.panel__dot:nth-child(1) { background: #ef4444; }
.panel__dot:nth-child(2) { background: #f59e0b; }
.panel__dot:nth-child(3) { background: #22c55e; }

.panel__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel__metric-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.panel__metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.panel__bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: 99px;
  margin-top: 10px;
  overflow: hidden;
}

.panel__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 99px;
  transition: width 1.2s ease;
}

/* ===== Contact ===== */
.contact__wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact__info p {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact__item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact__form {
  padding: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form__group {
  margin-bottom: 20px;
}

.form__group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form__group input:focus,
.form__group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form__group input::placeholder,
.form__group textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer__brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 280px;
  line-height: 1.6;
}

.footer__domain {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--transition);
}

.footer__domain:hover {
  opacity: 0.8;
}

.footer__email {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer__email:hover {
  color: var(--accent);
}

.contact__item a {
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.footer__bottom a {
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.footer__links {
  display: flex;
  gap: 64px;
  justify-content: flex-end;
}

.footer__col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.footer__col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color var(--transition);
}

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

.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

/* ===== Social Icons ===== */
.social-icons {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition), transform 0.2s, border-color var(--transition);
}

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

.social-icon:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  transform: translateY(-3px);
}

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
  }

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

  .solutions__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact__wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

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

  .nav__link {
    display: block;
    padding: 14px 24px;
  }

  .nav__burger {
    display: flex;
  }

  .hero__stats {
    gap: 32px;
  }

  .footer__bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}