/* Parsing X — shared styles */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f8fafc;
  color: #334155;
  line-height: 1.6;
  overflow-x: hidden;
  min-width: 320px;
}

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

a { color: #8b5cf6; }
a:hover { color: #7c3aed; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.main-content {
  padding-top: calc(64px + env(safe-area-inset-top));
  min-height: 100vh;
}

/* Header */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #8b5cf6;
  border-bottom: 2px solid #00ffff;
  padding-top: env(safe-area-inset-top);
}

.page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 16px;
}

.page-header__logo {
  color: #00ffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

.page-header__nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.page-header__nav a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.page-header__nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.page-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}

.page-header__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.page-header__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.page-header__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.page-header__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.page-header__drawer {
  display: none;
  position: fixed;
  top: calc(56px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  background: #8b5cf6;
  border-bottom: 2px solid #00ffff;
  padding: 16px 0 24px;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.page-header__drawer.is-open {
  display: block;
}

.page-header__drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 20px;
}

.page-header__drawer-nav a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 8px;
}

.page-header__drawer-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page-header__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
}

.page-header__backdrop.is-open {
  display: block;
}

@media (max-width: 768px) {
  .page-header__nav { display: none; }
  .page-header__burger { display: flex; }
}

/* Footer */
.site-footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}

.footer-column h4 {
  color: #00ffff;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

.footer-column a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-column a:hover { color: #00ffff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
}

.footer-copyright p {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1.2;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #8b5cf6;
  border-color: #8b5cf6;
}

.btn-outline:hover {
  background: #8b5cf6;
  color: #fff;
}

.btn-phone {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border-color: transparent;
}

.btn-telegram {
  background: linear-gradient(135deg, #0088cc, #006ba3);
  color: #fff;
  border-color: transparent;
}

/* Sections */
.section {
  padding: 80px 0;
  position: relative;
}

.section h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 16px;
  text-align: center;
}

.section > .container > p {
  text-align: center;
  color: #64748b;
  max-width: 720px;
  margin: 0 auto 40px;
}

/* Hero (shared) */
.hero-glass {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(0, 255, 255, 0.04)),
    radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%);
  position: relative;
  overflow: hidden;
}

.hero-glass h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-glass .lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #64748b;
  max-width: 720px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-item {
  display: block;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(139, 92, 246, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.15);
  text-decoration: none;
  color: inherit;
}

.service-item h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 16px 0 8px;
}

.service-item p {
  color: #64748b;
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.service-link {
  color: #8b5cf6;
  font-weight: 600;
  font-size: 0.9rem;
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 12px;
  color: #8b5cf6;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1e293b;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 4px 8px;
  line-height: 1;
}

.contact-form .form-row { margin-bottom: 16px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  display: block;
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(139, 92, 246, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.12);
  color: inherit;
}

.blog-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.blog-card p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.article-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 4px 4px 4px 0;
  text-decoration: none;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
