:root {
  --primary: #6c2cff;
  --primary-dark: #3a168f;
  --dark: #0d0d14;
  --dark-soft: #171725;
  --text: #f5f5f7;
  --muted: #b7b7c9;
  --card: #ffffff;
  --card-text: #242434;
  --accent: #00d1ff;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  --page-bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #ffffff;
  --body-text: #242434;
  --body-muted: #55566a;
  --card-border: rgba(108, 44, 255, 0.08);
  --card-shadow: 0 10px 30px rgba(20, 20, 40, 0.08);
  --content-width: 1200px;
  --page-gutter: 7%;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #0d0d14;
  --surface: #171725;
  --surface-soft: #202033;
  --body-text: #f5f5f7;
  --body-muted: #b7b7c9;
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 125px;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page-bg);
  color: var(--body-text);
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

a {
  text-decoration: none;
}

.header {
  min-height: auto;
  background: var(--page-bg);
  color: var(--body-text);
  padding: 150px max(var(--page-gutter), calc((100% - var(--content-width)) / 2)) 80px;
}

html[data-theme="dark"] .header {
  background:
    linear-gradient(135deg, rgba(13, 13, 20, 0.96), rgba(75, 24, 180, 0.92)),
    radial-gradient(circle at top right, rgba(0, 209, 255, 0.4), transparent 30%);
  color: var(--text);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 105px;
  padding: 18px max(var(--page-gutter), calc((100% - var(--content-width)) / 2));
  background: linear-gradient(100deg, rgba(13, 13, 20, 0.97), rgba(58, 22, 143, 0.97));
  color: var(--text);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 16px;
  background: #fff;
}

.brand strong {
  display: block;
  font-size: 1.1rem;
}

.brand span {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  opacity: 0.9;
}

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

html[data-theme="dark"] .theme-icon-sun {
  display: inline;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 50px;
}

.hero-content {
  text-align: center;
}

.tag {
  color: var(--primary);
  max-width: 760px;
  margin: 0 auto 20px;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

html[data-theme="dark"] .tag {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1.05;
  margin-bottom: 22px;
}

.hero-text {
  color: var(--body-muted);
  max-width: 650px;
  font-size: 1.1rem;
  margin-bottom: 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  border: 1px solid rgba(36, 36, 52, 0.3);
  color: var(--body-text);
  background: #fff;
}

.hero-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 30px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.hero-card img {
  border-radius: 22px;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.section {
  padding: 90px max(var(--page-gutter), calc((100% - var(--content-width)) / 2));
}

.section-title {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.section-title p {
  color: var(--primary);
  font-weight: 800;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.35;
  text-align: center;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  color: var(--body-text);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: start;
  text-align: center;
}

.intro-grid p {
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.stats-card {
  background: var(--dark);
  color: var(--text);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.stats-card div {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.stats-card div:last-child {
  border-bottom: none;
}

.stats-card strong {
  display: block;
  color: var(--accent);
  font-size: 1.2rem;
}

.stats-card span {
  color: var(--muted);
}

.services {
  background: var(--surface);
}

.services-grid,
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card,
.why-item {
  background: var(--surface-soft);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  text-align: center;
}

.service-card .icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.service-card .icon svg {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="dark"] .service-card .icon svg {
  stroke: var(--accent);
}

.service-card h3,
.why-item h3 {
  color: var(--body-text);
  margin-bottom: 12px;
}

.service-card p,
.why-item p {
  color: var(--body-muted);
}

.why {
  background: var(--page-bg);
}

.why .section-title h2,
.why .why-item h3 {
  color: var(--body-text);
}

.why .section-title p {
  color: var(--primary);
}

.why-item {
  background: #fff;
  color: var(--body-text);
  border: 1px solid var(--card-border);
}

.why-item p {
  color: var(--body-muted);
}

.gallery {
  background: var(--page-bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery-grid img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(20, 20, 40, 0.12);
}

.gallery-grid img[hidden] {
  display: none;
}

.cta {
  width: 100%;
  margin: 0;
  padding: 72px max(var(--page-gutter), calc((100% - var(--content-width)) / 2));
  background: linear-gradient(135deg, rgba(108, 44, 255, 0.96), rgba(13, 13, 20, 0.96));
  color: var(--text);
  text-align: center;
}

.cta-inner {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.cta p {
  color: var(--accent);
  font-weight: 800;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  line-height: 1.35;
  text-align: center;
  margin: 0 auto 12px;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.1;
  margin-bottom: 10px;
}

.cta span {
  color: var(--muted);
}

.footer {
  background: #fff;
  color: var(--body-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px max(var(--page-gutter), calc((100% - var(--content-width)) / 2));
}

.footer-content {
  flex: 1;
  text-align: center;
}

.footer p:first-child {
  color: var(--body-text);
  font-weight: 700;
}

.footer-logo {
  width: 90px;
  height: 90px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 18px;
  background: #fff;
}

html[data-theme="dark"] .hero-text {
  color: var(--muted);
}

html[data-theme="dark"] .btn-secondary {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .why-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

html[data-theme="dark"] .why {
  background: linear-gradient(135deg, rgba(13, 13, 20, 0.96), rgba(58, 22, 143, 0.92));
}

html[data-theme="dark"] .why .section-title h2,
html[data-theme="dark"] .why .why-item h3 {
  color: var(--text);
}

html[data-theme="dark"] .why .section-title p {
  color: var(--accent);
}

html[data-theme="dark"] .why-item p {
  color: var(--muted);
}

html[data-theme="dark"] .cta {
  background: linear-gradient(135deg, rgba(108, 44, 255, 0.96), rgba(13, 13, 20, 0.96));
  color: var(--text);
}

html[data-theme="dark"] .cta span,
html[data-theme="dark"] .footer {
  color: var(--muted);
}

html[data-theme="dark"] .footer {
  background: var(--dark);
}

html[data-theme="dark"] .footer p:first-child {
  color: var(--text);
}

@media (max-width: 1100px) {
  .navbar,
  .header,
  .section {
    padding-left: 5%;
    padding-right: 5%;
  }

  .nav-links,
  .nav-actions {
    gap: 16px;
  }

  .hero {
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 160px;
  }

  .header {
    min-height: auto;
    padding-top: 180px;
    padding-bottom: 70px;
  }

  .navbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand brand"
      "links theme";
    align-items: center;
    gap: 14px;
    min-height: auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .brand {
    grid-area: brand;
    justify-self: start;
  }

  .nav-links {
    grid-area: links;
    flex-wrap: wrap;
    gap: 14px;
    justify-self: start;
  }

  .nav-actions {
    display: contents;
  }

  .theme-toggle {
    grid-area: theme;
    justify-self: end;
  }

  .hero,
  .intro-grid,
  .cta-inner {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    display: flex;
  }

  .hero-card {
    max-width: 720px;
  }

  .services-grid,
  .why-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-inner {
    display: flex;
    align-items: center;
  }

  .cta-inner > div {
    width: 100%;
  }
}

@media (max-width: 600px) {
  html {
    scroll-padding-top: 150px;
  }

  .header,
  .section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .header {
    padding-top: 165px;
    padding-bottom: 54px;
  }

  .navbar {
    padding-left: 22px;
    padding-right: 22px;
  }

  .brand {
    gap: 10px;
  }

  .brand strong {
    font-size: 1rem;
  }

  .brand span {
    font-size: 0.8rem;
  }

  .nav-actions {
    gap: 12px;
  }

  .nav-links {
    gap: 10px 14px;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .theme-toggle {
    min-height: 38px;
    padding: 7px 10px;
  }

  .theme-label {
    display: none;
  }

  .hero {
    gap: 36px;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .hero-text {
    font-size: 1rem;
  }

  .services-grid,
  .why-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid img {
    height: auto;
  }

  .cta {
    padding: 54px 22px;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

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

  .footer-logo {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 420px) {
  html {
    scroll-padding-top: 175px;
  }

  .header {
    padding-top: 190px;
  }

  .nav-links {
    max-width: calc(100% - 52px);
  }

  .hero-buttons .btn,
  .contact-buttons .btn {
    width: 100%;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
