:root {
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #07080d;
  --section-bg: rgba(7, 8, 13, 0.79);
  --section-border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.82);
  --accent: #667eea;
  --accent-deep: #764ba2;
  --accent-soft: rgba(102, 126, 234, 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-stack);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}

.video-background video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.video-background .background-video-loop {
  opacity: 0;
}

.video-background.is-looping .background-video-primary {
  opacity: 0;
}

.video-background.is-looping .background-video-loop {
  opacity: 1;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(102, 126, 234, 0.18), transparent 34%),
    radial-gradient(circle at 82% 74%, rgba(0, 194, 179, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(7, 8, 13, 0.28), rgba(7, 8, 13, 0.78) 58%, rgba(7, 8, 13, 0.92));
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.15);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  gap: 1.5rem;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo {
  display: block;
  width: auto;
  height: 60px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
}

.nav-link,
.language-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-link {
  color: var(--text);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.25s ease;
}

.language-button {
  min-width: 52px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.hero,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 6rem 2rem 2rem;
  text-align: center;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--section-bg));
  content: "";
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
}

.hero p {
  max-width: 800px;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Bad Script", var(--font-stack);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  line-height: 1.6;
}

.primary-button,
.submit-button {
  border: 0;
  background: var(--accent);
  color: var(--text);
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.primary-button {
  padding: 1rem 3rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  font-size: 1.1rem;
}

.section {
  display: flex;
  min-height: 100vh;
  align-items: center;
  padding: 7rem 2rem;
  background:
    linear-gradient(180deg, var(--section-bg), var(--section-bg)),
    radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.055), transparent 34rem);
  overflow: hidden;
}

.section::before,
.footer::before {
  position: absolute;
  right: 0;
  left: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--section-border), transparent);
  content: "";
}

.section-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  position: relative;
  margin-bottom: 4rem;
  margin-right: auto;
  margin-left: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 42%, rgba(255, 255, 255, 0.72) 100%);
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.12));
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-align: center;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-text {
  max-width: 920px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  line-height: 1.8;
  text-align: center;
  white-space: pre-line;
}

.about-team-memoji {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}

.memoji-group {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem;
}

.memoji-item {
  width: 106px;
  height: 106px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.34));
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.memoji-item + .memoji-item {
  margin-left: 0;
}

.memoji-group.is-visible .memoji-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.memoji-group.is-visible .memoji-item:nth-child(1) {
  transition-delay: 0ms;
}

.memoji-group.is-visible .memoji-item:nth-child(2) {
  transition-delay: 100ms;
}

.memoji-group.is-visible .memoji-item:nth-child(3) {
  transition-delay: 200ms;
}

.memoji-group.is-visible .memoji-item:nth-child(4) {
  transition-delay: 300ms;
}

.cases-grid {
  display: grid;
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.25rem;
}

.case-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: default;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.case-icon {
  width: 82px;
  height: 82px;
  margin-bottom: 1.5rem;
  object-fit: contain;
}

.case-title {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.25;
}

.case-description {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

.form-wrap {
  max-width: 420px;
  margin: 0 auto;
}

.form-subtitle {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.1rem;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form input {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.submit-button {
  align-self: center;
  min-width: 190px;
  padding: 1rem 3rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  font-size: 1.1rem;
  font-weight: 500;
}

.success-message {
  padding: 2rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 1.1rem;
  text-align: center;
}

.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2rem 1.5rem;
  border-top: 0;
  background:
    linear-gradient(180deg, var(--section-bg), var(--section-bg)),
    radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.055), transparent 34rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 2.5rem;
  gap: 3rem;
}

.footer h3 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 650;
}

.footer p {
  margin: 0.5rem 0;
  font-size: 1rem;
  line-height: 1.8;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}

.social-links a {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.social-links img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.copyright {
  display: flex;
  width: 100%;
  justify-content: center;
  margin: 0;
  padding: 2rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  text-align: center;
}

.primary-button:focus-visible,
.submit-button:focus-visible,
.language-button:focus-visible,
.nav-link:focus-visible,
.social-links a:focus-visible,
.contact-form input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

@media (hover: hover) {
  .nav-link:hover {
    color: var(--accent);
  }

  .primary-button:hover,
  .submit-button:hover,
  .language-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  }

  .case-card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    transform: translateY(-5px);
  }

  .social-links a:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.075);
    opacity: 0.9;
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .memoji-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    justify-content: center;
    gap: 1rem 1.5rem;
  }

  .hero {
    padding-top: 9rem;
  }

  .section {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .footer {
    padding-top: 5rem;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  .about-team-memoji {
    margin-top: 3.25rem;
  }

  .memoji-item {
    width: 91px;
    height: 91px;
  }

  .memoji-group {
    gap: 0.55rem;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0.5rem 1rem;
  }

  .logo {
    height: 52px;
  }

  .section,
  .footer {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

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

  .about-team-memoji {
    margin-top: 2.75rem;
  }

  .memoji-item {
    width: 74px;
    height: 74px;
  }

  .memoji-group {
    gap: 0.35rem;
  }

  .primary-button {
    width: 100%;
    max-width: 320px;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
}
