:root {
  --bg: #07111f;
  --surface: #0d1b2e;
  --surface-soft: #13263f;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.13);
  --ink: #eef6ff;
  --muted: #a8b8cc;
  --line: #263b59;
  --accent: #2dd4bf;
  --accent-dark: #14b8a6;
  --warm: #f4b63d;
  --danger: #ff7474;
  --success: #61e6c5;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --glow: 0 18px 48px rgba(45, 212, 191, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.08), transparent 34%),
    linear-gradient(180deg, #07111f 0%, #0a1728 48%, #07111f 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  transition: background 420ms ease, color 420ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 999;
  background:
    radial-gradient(
      circle at var(--theme-x, 92%) var(--theme-y, 8%),
      rgba(45, 212, 191, 0.26),
      rgba(244, 182, 61, 0.12) 24%,
      transparent 58%
    );
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  mix-blend-mode: screen;
}

body.light-mode {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --ink: #132238;
  --muted: #65758b;
  --line: #dfe6ef;
  --accent: #0b8f78;
  --accent-dark: #08705f;
  --danger: #c63d3d;
  --success: #08705f;
  --shadow: 0 18px 45px rgba(19, 34, 56, 0.12);
  --glow: 0 18px 48px rgba(11, 143, 120, 0.16);
  background: #f7f8fb;
}

body.light-mode::before {
  background:
    radial-gradient(
      circle at var(--theme-x, 92%) var(--theme-y, 8%),
      rgba(255, 255, 255, 0.62),
      rgba(11, 143, 120, 0.18) 24%,
      transparent 58%
    );
  mix-blend-mode: normal;
}

body.theme-switching::before {
  animation: theme-ripple 720ms ease both;
}

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

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

button,
input,
textarea {
  font: inherit;
}

::selection {
  background: rgba(45, 212, 191, 0.34);
  color: #ffffff;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 17, 31, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

body.light-mode header {
  background: rgba(247, 248, 251, 0.9);
  border-bottom-color: rgba(223, 230, 239, 0.9);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  gap: 18px;
}

.logo {
  flex: 0 0 auto;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0;
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.logo:hover {
  color: var(--accent);
  text-shadow: 0 0 22px rgba(45, 212, 191, 0.38);
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: capitalize;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-links a:hover {
  color: var(--accent);
  text-shadow: 0 0 16px rgba(45, 212, 191, 0.32);
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.42);
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-links a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

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

.theme-btn,
.menu-btn,
.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  color: var(--ink);
  backdrop-filter: blur(14px);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.theme-btn:hover,
.menu-btn:hover,
.back-to-top:hover {
  border-color: var(--accent);
  background: var(--glass-strong);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.theme-btn {
  width: 42px;
  height: 42px;
  font-weight: 900;
}

.theme-btn.is-animating {
  animation: theme-icon-pop 520ms ease both;
}

.menu-btn {
  display: none;
  flex-direction: column;
  width: 42px;
  height: 42px;
  gap: 4px;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.hero {
  display: flex;
  align-items: center;
  min-height: calc(100svh - 112px);
  padding: 76px 0;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(4, 12, 25, 0.92), rgba(7, 17, 31, 0.66), rgba(7, 17, 31, 0.18)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.hero-content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--warm);
}

.hero h1 {
  max-width: 820px;
  margin-top: 12px;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  box-shadow: var(--glow);
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--accent);
  color: #04111f;
  box-shadow: 0 16px 34px rgba(45, 212, 191, 0.22);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.44);
  color: #ffffff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn-nav {
  min-height: 42px;
  padding: 0 16px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.88rem;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 34px;
}

.section h2 {
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-text {
  max-width: 780px;
  margin-left: auto;
  color: var(--muted);
  font-size: 1.08rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.about-grid article {
  padding: 24px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.about-grid article:hover {
  background: var(--glass-strong);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

.about-grid h3 {
  margin-bottom: 8px;
}

.about-grid p,
.card p,
.service-item p,
.testimonial-card p,
.contact p,
.faq-item p,
footer,
footer span {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 10px;
}

.stat-item {
  padding: 30px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.stat-item:hover {
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

.stat-item strong {
  display: block;
  color: var(--accent);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
}

.stat-item span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 18px;
}

.three-columns {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.service-item,
.testimonial-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  cursor: default;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.card::before,
.service-item::before,
.testimonial-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 44%, transparent 62%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
  transition: opacity 220ms ease, transform 520ms ease;
}

.card:hover::before,
.service-item:hover::before,
.testimonial-card:hover::before {
  opacity: 1;
  transform: translateX(100%);
}

.card:hover,
.service-item:hover,
.testimonial-card:hover {
  background: var(--glass-strong);
  box-shadow: var(--glow);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card-number {
  display: inline-flex;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 900;
  margin-bottom: 42px;
}

.card h3,
.service-item h3,
.testimonial-card h3 {
  margin-bottom: 12px;
  font-size: 1.18rem;
}

.services,
.gallery {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.service-item {
  min-height: 170px;
}

.testimonial-card img {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-card p {
  margin-bottom: 22px;
}

.testimonial-card span {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
}

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

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  cursor: zoom-in;
  filter: saturate(0.95) brightness(0.9);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

.gallery-grid img:hover {
  transform: scale(1.025) translateY(-3px);
  filter: saturate(1.15) brightness(1.04);
  box-shadow: var(--glow);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.faq-item:hover,
.faq-item.is-open {
  border-color: var(--accent);
  background: var(--glass-strong);
  box-shadow: var(--glow);
}

.faq-item button {
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.faq-item p {
  display: none;
  padding: 0 20px 20px;
}

.faq-item.is-open p {
  display: block;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 40px;
  align-items: start;
}

.contact-copy h2 {
  margin: 10px 0 14px;
}

.contact-form {
  display: grid;
  gap: 8px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.contact-form:hover {
  border-color: var(--accent);
  background: var(--glass-strong);
  box-shadow: var(--glow);
}

.contact-form label {
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.46);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
  background: #f7f8fb;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 143, 120, 0.16);
}

.error-message {
  min-height: 18px;
  color: var(--danger);
  font-size: 0.84rem;
}

.form-status {
  min-height: 22px;
  font-weight: 800;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--danger);
}

footer {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr auto;
  gap: 22px;
  align-items: start;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 38px;
  border-top: 1px solid var(--line);
}

footer p {
  color: var(--ink);
  font-weight: 900;
}

footer address {
  font-style: normal;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links a {
  color: var(--accent);
  font-weight: 800;
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.social-links a:hover {
  color: var(--warm);
  text-shadow: 0 0 16px rgba(244, 182, 61, 0.34);
  transform: translateY(-1px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.34);
  outline-offset: 3px;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 44px;
  height: 44px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 580ms ease, transform 580ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body,
header,
.nav-links,
.theme-btn,
.menu-btn,
.back-to-top,
.btn,
.logo,
.nav-links a,
.about-grid article,
.stat-item,
.card,
.service-item,
.testimonial-card,
.faq-item,
.contact-form,
.contact-form input,
.contact-form textarea,
.gallery-grid img,
footer {
  transition-property: background, background-color, color, border-color, box-shadow, transform, filter, opacity, text-shadow;
  transition-duration: 320ms;
  transition-timing-function: ease;
}

@keyframes theme-ripple {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes theme-icon-pop {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  45% {
    transform: translateY(-2px) rotate(180deg) scale(1.16);
  }

  100% {
    transform: translateY(0) rotate(360deg) scale(1);
  }
}

@media (max-width: 980px) {
  .navbar {
    width: min(1120px, calc(100% - 24px));
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(13, 27, 46, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
  }

  body.light-mode .nav-links {
    background: rgba(255, 255, 255, 0.92);
  }

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

  .nav-links a {
    display: block;
    padding: 13px 12px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .section-heading,
  .about-grid,
  .three-columns,
  .service-list,
  .stats,
  .gallery-grid,
  .contact,
  footer {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 10px;
  }

  .section-text {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .navbar {
    min-height: 66px;
  }

  .btn-nav {
    display: none;
  }

  .nav-links {
    top: 66px;
  }

  .hero {
    min-height: calc(100svh - 96px);
    padding: 58px 0;
    background:
      linear-gradient(90deg, rgba(10, 20, 34, 0.9), rgba(10, 20, 34, 0.58)),
      url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1100&q=80") center / cover;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 1rem;
  }

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

  .section {
    padding: 62px 0;
  }

  .card,
  .service-item,
  .testimonial-card,
  .contact-form {
    min-height: auto;
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
