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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: #1A202C;
  background: #FFFFFF;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ===== Variables ===== */
:root {
  --primary: #0052CC;
  --primary-dark: #003D99;
  --accent: #00B8D9;
  --dark: #1A202C;
  --grey: #718096;
  --grey-light: #A0AEC0;
  --grey-bg: #F0F4F8;
  --border: #E2E8F0;
  --white: #FFFFFF;
  --nav-height: 72px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 82, 204, 0.25);
}

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

.btn-outline:hover {
  background: var(--dark);
  color: var(--white);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 14px;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
}

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

.logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #0052CC, #00B8D9);
  border-radius: 4px;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--grey);
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.mobile-menu.active a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active a:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active a:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active a:nth-child(5) { transition-delay: 0.3s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 0 48px;
  padding-left: 10vw;
  overflow: hidden;
}

.hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--dark);
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.9);
}

.hero-title span {
  display: block;
}

.hero-subtitle {
  margin-top: 24px;
  font-size: 16px;
  color: var(--grey);
  max-width: 480px;
  line-height: 1.65;
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.8);
}

.hero-buttons {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-diamond {
  position: absolute;
  bottom: 48px;
  right: 48px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #0052CC, #00B8D9);
  border-radius: 4px;
  transform: rotate(45deg);
  opacity: 0.12;
  z-index: 1;
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 2;
  padding: 120px 48px;
}

.section-white {
  background: var(--white);
}

.section-grey {
  background: var(--grey-bg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.625rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--dark);
}

.section-subtitle {
  font-size: 16px;
  color: var(--grey);
  margin-top: 16px;
}

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

.text-muted {
  color: var(--grey);
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.7;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stat-card {
  background: var(--grey-bg);
  border-radius: 12px;
  padding: 32px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 82, 204, 0.08);
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--grey);
}

/* ===== Services ===== */
.section-header {
  margin-bottom: 64px;
}

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

.service-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--border);
  transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 82, 204, 0.1);
  border-color: var(--primary);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grey-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.service-card h3 {
  margin-top: 24px;
  font-size: 20px;
  font-weight: 500;
  color: var(--dark);
}

.service-card p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--grey);
  line-height: 1.65;
}

/* ===== Process ===== */
.process-timeline {
  position: relative;
}

.timeline-line {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 0;
}

.timeline-line.animated {
  animation: drawLine 1.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes drawLine {
  to { transform: scaleX(1); }
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.process-step {
  text-align: center;
  padding-top: 8px;
}

.step-number {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(0, 82, 204, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.step-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--primary);
  margin: 0 auto 16px;
}

.process-step h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--dark);
}

.process-step p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--grey);
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.form-input {
  flex: 1;
  min-width: 280px;
  max-width: 320px;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-input::placeholder {
  color: var(--grey-light);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.form-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--grey);
  text-align: center;
}

.form-note a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-note a:hover {
  text-decoration: none;
}

.form-success {
  display: none;
  margin-top: 48px;
  background: var(--grey-bg);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.form-success.show {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.success-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
}

.success-text {
  margin-top: 8px;
  font-size: 14px;
  color: var(--grey);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 2;
  background: var(--dark);
  padding: 64px 48px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1fr;
  gap: 48px;
}

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

.footer-brand .logo-text {
  color: var(--white);
}

.footer-brand p {
  font-size: 13px;
  color: var(--grey-light);
  line-height: 1.6;
  max-width: 280px;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-column h4,
.footer-contacts h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li + li {
  margin-top: 10px;
}

.footer-column a,
.footer-contacts a,
.footer-contacts p {
  font-size: 14px;
  color: var(--grey-light);
  transition: color 0.2s ease;
}

.footer-column a:hover,
.footer-contacts a:hover {
  color: var(--white);
}

.footer-contacts a {
  display: block;
  color: var(--white);
}

.footer-contacts p {
  margin-top: 8px;
}

.footer-contacts .address {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.5;
  margin-top: 12px;
}

.footer-divider {
  margin: 48px 0 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 12px;
  color: var(--grey);
}

.footer-legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 12px;
  color: var(--grey);
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--white);
}

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.33, 1, 0.68, 1), transform 0.9s cubic-bezier(0.33, 1, 0.68, 1);
}

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

/* Stagger delays */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.24s; }
.reveal:nth-child(4) { transition-delay: 0.36s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero entrance animation */
.hero-title {
  opacity: 0;
  transform: translateY(40px);
  animation: heroIn 1s cubic-bezier(0.33, 1, 0.68, 1) 0.3s forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(40px);
  animation: heroIn 1s cubic-bezier(0.33, 1, 0.68, 1) 0.6s forwards;
}

.hero-buttons {
  opacity: 0;
  transform: translateY(40px);
  animation: heroIn 1s cubic-bezier(0.33, 1, 0.68, 1) 0.9s forwards;
}

@keyframes heroIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .nav-container {
    padding: 0 24px;
  }

  .section {
    padding: 80px 24px;
  }

  .hero {
    padding: 0 24px;
    padding-left: 24px;
  }

  .about-grid {
    gap: 40px;
  }

  .footer {
    padding: 48px 24px 24px;
  }

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

@media (max-width: 768px) {
  .nav-links,
  .nav .btn {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 0 24px;
    align-items: center;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-diamond {
    display: none;
  }

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

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

  .timeline-line {
    display: none;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .process-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-align: left;
    padding-top: 0;
  }

  .process-step > div:first-child {
    flex-shrink: 0;
  }

  .step-dot {
    display: none;
  }

  .contact-form {
    flex-direction: column;
    align-items: center;
  }

  .form-input {
    max-width: 100%;
    width: 100%;
  }

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

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

  .footer-legal {
    justify-content: center;
  }
}

/* ===== Legal Pages ===== */
.legal-page {
  padding-top: var(--nav-height);
}

.legal-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 48px;
}

.legal-header .nav-container {
  justify-content: flex-start;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 48px 80px;
}

.legal-content h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 48px;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--dark);
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--dark);
  margin-bottom: 16px;
}

.legal-footer {
  margin-top: 64px;
  text-align: center;
  font-size: 13px;
  color: var(--grey);
}

.legal-footer a {
  color: var(--primary);
}

.back-link {
  display: inline-block;
  margin-top: 32px;
  background: var(--grey-bg);
  color: var(--dark);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-link:hover {
  background: var(--primary);
  color: var(--white);
}

@media (max-width: 768px) {
  .legal-header {
    padding: 16px 24px;
  }

  .legal-content {
    padding: 40px 24px 60px;
  }
}
