/* ============================================
   TILDA STYLE — общие блоки для всех страниц
   Огромная типографика, воздух, grid, overlay
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* Hero блок */
.tilda-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  will-change: transform;
}

.tilda-hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(12rem, 35vw, 30rem);
  font-weight: 900;
  color: rgba(255, 94, 0, 0.03);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.tilda-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.tilda-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.tilda-label::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--neon);
  border-radius: 50%;
  flex-shrink: 0;
}

.tilda-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.tilda-hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto;
}

/* Секция */
.tilda-section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  background: var(--bg-dark);
}

.tilda-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.tilda-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  max-width: 800px;
}

/* Сетка карточек (3 колонки) */
.tilda-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .tilda-grid {
    grid-template-columns: 1fr;
  }
}

.tilda-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tilda-card:hover {
  border-color: rgba(255, 94, 0, 0.2);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tilda-card-inner {
  padding: clamp(2rem, 4vw, 3rem);
}

.tilda-card-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--neon);
}

.tilda-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.tilda-card p {
  font-size: 0.9375rem;
  color: var(--text-light);
  line-height: 1.65;
  margin: 0;
}

/* CTA секция с большим фоновым текстом */
.tilda-cta-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0e00 100%);
  padding: clamp(6rem, 12vw, 10rem) 0;
}

.tilda-cta-bg-text {
  position: absolute;
  top: 50%;
  right: -5%;
  transform: translateY(-50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(8rem, 30vw, 25rem);
  font-weight: 900;
  color: rgba(255, 94, 0, 0.04);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.tilda-cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}

.tilda-cta-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 2.5rem;
  text-transform: uppercase;
}

.tilda-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  background: var(--neon);
  color: var(--bg-dark);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.3s ease;
}

.tilda-cta-btn:hover {
  background: #ff7620;
  box-shadow: 0 20px 60px rgba(255, 94, 0, 0.4);
  transform: translateY(-4px);
  color: var(--bg-dark);
}

/* Контейнер */
.tilda-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}

/* Текст по центру секции */
.tilda-section--center .tilda-section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.tilda-section--center .tilda-section-label {
  text-align: center;
}

/* ================================================
   MOBILE — агрессивное уменьшение ≤768px
   ================================================ */
@media (max-width: 768px) {
  .tilda-hero {
    min-height: 45vh;
    padding: 3rem 1.25rem;
  }

  .tilda-hero-content {
    padding: 0 1rem;
  }

  .tilda-hero-title {
    font-size: clamp(2.5rem, 11vw, 4.5rem);
    margin-bottom: 0.75rem;
  }

  .tilda-hero-subtitle {
    font-size: clamp(0.875rem, 3.5vw, 1.1rem);
  }

  .tilda-label {
    margin-bottom: 0.75rem;
    font-size: 0.625rem;
  }

  .tilda-section {
    padding: clamp(2rem, 7vw, 3.5rem) 0;
  }

  .tilda-section-title {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    margin-bottom: 1.5rem;
  }

  .tilda-card-inner {
    padding: 1.5rem;
  }

  .tilda-cta-section {
    min-height: auto;
    padding: 3.5rem 0;
  }

  .tilda-cta-title {
    font-size: clamp(2rem, 9vw, 3.5rem);
    margin-bottom: 1.5rem;
  }

  .tilda-cta-btn {
    padding: 1rem 2rem;
    font-size: 0.8125rem;
  }

  .tilda-container {
    padding: 0 1.25rem;
  }
}

/* ================================================
   SMALL PHONES ≤480px — ещё агрессивнее
   ================================================ */
@media (max-width: 480px) {
  .tilda-hero {
    min-height: 35vh;
    padding: 2.5rem 1rem;
  }

  .tilda-hero-title {
    font-size: clamp(2rem, 13vw, 3.5rem);
    line-height: 0.92;
  }

  .tilda-hero-subtitle {
    font-size: 0.8125rem;
  }

  .tilda-hero-bg-text {
    font-size: clamp(8rem, 40vw, 14rem);
  }

  .tilda-section {
    padding: 2rem 0;
  }

  .tilda-section-title {
    font-size: clamp(1.375rem, 8vw, 2rem);
    margin-bottom: 1.25rem;
  }

  .tilda-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .tilda-card-inner {
    padding: 1.25rem;
  }

  .tilda-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }

  .tilda-card p {
    font-size: 0.875rem;
  }

  .tilda-cta-section {
    padding: 2.5rem 0;
  }

  .tilda-cta-content {
    padding: 0 1rem;
  }

  .tilda-cta-title {
    font-size: clamp(1.75rem, 11vw, 3rem);
  }

  .tilda-cta-bg-text {
    font-size: clamp(5rem, 35vw, 10rem);
  }

  .tilda-cta-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.8125rem;
    width: 100%;
    justify-content: center;
  }

  .tilda-container {
    padding: 0 1rem;
  }
}

/* ================================================
   ОЧЕНЬ МАЛЕНЬКИЕ ≤360px
   ================================================ */
@media (max-width: 360px) {
  .tilda-hero-title {
    font-size: clamp(1.75rem, 14vw, 2.75rem);
  }

  .tilda-section-title {
    font-size: clamp(1.25rem, 9vw, 1.75rem);
  }

  .tilda-container {
    padding: 0 0.875rem;
  }
}

/* ================================================
   iPhone UNIVERSAL — iOS UX fixes
   ================================================ */

/* Предотвращаем горизонтальный скролл от overflow элементов */
.tilda-hero,
.tilda-section,
.tilda-cta-section {
  overflow-x: hidden;
}

/* 48px tap-target для всех Tilda-кнопок */
.tilda-btn,
.tilda-cta-btn {
  min-height: 48px;
  touch-action: manipulation;
}

/* На мобильных CTA-кнопки — в столбик */
@media (max-width: 480px) {
  .tilda-cta-buttons {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  .tilda-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  /* Hero hero с safe-area */
  .tilda-hero {
    padding-top: calc(2.5rem + env(safe-area-inset-top, 0px));
  }
}

/* Скрытый фоновый текст на очень маленьких — он вызывает горизонтальный скролл */
@media (max-width: 390px) {
  .tilda-hero-bg-text,
  .tilda-cta-bg-text {
    display: none;
  }
}
