:root {
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border: #e5e7eb;
    --surface: #ffffff;
    --accent: #005FF9;
    --accent-glow: #7E22CE;
    --pulse: rgba(126, 34, 206, 0.12);
    --radius: 12px;
  }

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

  body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--surface);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
  }

  /* Мягкий фон из кружочков */
  .soft-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
  }

  .soft-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.18;
  }

  .c1 { top: 15%; left: 10%; width: 450px; height: 450px; background: #005FF9; animation: float 42s infinite ease-in-out; }
  .c2 { top: 60%; right: 12%; width: 550px; height: 550px; background: #7E22CE; animation: float 38s infinite reverse ease-in-out; animation-delay: -5s; }
  .c3 { bottom: 10%; left: 30%; width: 350px; height: 350px; background: #0D9488; animation: float 45s infinite ease-in-out; animation-delay: -12s; }
  .c4 { top: 40%; right: 40%; width: 250px; height: 250px; background: #EA580C; opacity: 0.12; animation: float 50s infinite reverse ease-in-out; }
  .c5 { top: 75%; left: 55%; width: 400px; height: 400px; background: #DC2626; opacity: 0.08; animation: float 47s infinite ease-in-out; animation-delay: -20s; }

  @keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 40px) scale(0.95); }
    75% { transform: translate(10px, -30px) scale(1.02); }
  }

  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
  }

  section {
    padding: 120px 0;
    position: relative;
  }

  .glow-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
    opacity: 0.3;
    z-index: 0;
  }

  /* Signature */
  .signature {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-weight: 600;
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
  }

  .signature-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--pulse);
    color: var(--accent-glow);
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
  }

  /* Hero */
  .hero {
    display: flex;
    gap: 80px;
    align-items: center;
  }

  .hero-content {
    flex: 1;
  }


  .hero h1 {
    font-weight: 700;
    font-size: 60px;
    line-height: 1.1;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
  }

  .typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.1em;
    background: var(--accent);
    margin-left: 4px;
    animation: blink 1s infinite;
  }

  @keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
  }

  .hero p {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
  }

  .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px 48px;
    margin-bottom: 40px;
    font-size: 18px;
    color: var(--text-tertiary);
  }

  .meta i {
    width: 1.2em;
    text-align: center;
    margin-right: 6px;
    color: var(--accent);
  }

  .countdown {
    font-family: 'SF Mono', monospace;
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(90deg, var(--accent), var(--accent-glow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pulseGlow 3s infinite alternate;
  }

  @keyframes pulseGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
  }

  /* Vibecoding explainer */
  .vibe-block {
    max-width: 800px;
    margin: 0 auto 70px;
  }

  .vibe-block h2 {
    font-weight: 600;
    font-size: 42px;
    margin-bottom: 28px;
    text-align: center;
  }

  .vibe-block p {
    font-size: 21px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.7;
  }

  .vibe-block p strong {
    color: var(--text);
    font-weight: 600;
  }

  .vibe-block .quote {
    font-style: italic;
    color: var(--accent-glow);
    margin: 24px 0;
    padding: 24px;
    background: rgba(126, 34, 206, 0.03);
    border-radius: var(--radius);
    border-left: 4px solid var(--accent-glow);
    font-size: 21px;
  }

  /* === AI Simulator — адаптивный === */
  .ai-simulator {
    background: #F8FAFC;
    border-radius: var(--radius);
    padding: 40px 24px; /* ← меньше горизонтальных отступов */
    max-width: 900px;
    margin: 70px auto;
  }

  .ai-simulator h2 {
    font-weight: 600;
    font-size: 32px;
    margin-bottom: 28px;
    text-align: center;
  }

  .chat-static {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  }

  .chat-lines {
    padding: 24px 16px; /* ← уменьшено */
    display: flex;
    flex-direction: column;
    gap: 18px; /* ← чуть меньше */
  }

  .chat-line {
    display: flex;
    gap: 12px; /* ← меньше отступ до аватара */
    align-items: flex-start;
  }

  .chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 14px;
    color: white;
  }

  .avatar-user { background: var(--accent); }
  .avatar-ai { background: #7E22CE; }

  .chat-bubble {
    padding: 16px 20px; /* ← чуть компактнее */
    border-radius: 14px;
    line-height: 1.5;
    font-size: 18px; /* ← читаемо на мобилке */
    flex: 1;
    word-break: break-word;
  }

  .bubble-user {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 6px;
    align-self: flex-end;   /* ← без !important */
    max-width: 75%;
  }

  .bubble-ai {
    background: #F3F4F6;
    color: var(--text);
    border-bottom-left-radius: 6px;
    align-self: flex-start; /* ← без !important */
    max-width: 75%;
  }

  .thinking {
    position: relative;
  }



  @keyframes pulseBar {
    0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
  }

  /* Mobile: переключаем аватары под пузыри */
  @media (max-width: 550px) {
    .chat-line {
      flex-direction: column;
      align-items: flex-start;
    }

    .chat-avatar {
      align-self: flex-end;
      margin-bottom: 6px;
    }

    .chat-bubble {
      max-width: 100% !important;
    }



    .ai-simulator {
      padding: 32px 16px;
    }

    .ai-simulator h2 {
      font-size: 28px;
      margin-bottom: 20px;
    }

    .chat-lines {
      padding: 16px;
      gap: 16px;
    }

    .chat-bubble {
      font-size: 17px;
      padding: 14px 18px;
    }
  }

  .thinking {
    position: relative;
  }
  .thinking::after {
    content: "";
    display: block;
    width: 60px;
    height: 6px;
    background: #D1D5DB;
    border-radius: 3px;
    margin-top: 10px;
    animation: pulseBar 1.8s infinite ease-in-out;
  }

  @keyframes pulseBar {
    0%, 100% { opacity: 0.3; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
  }

  /* Projects */
  .projects-title {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 70px;
  }

  .projects-title h2 {
    font-weight: 600;
    font-size: 42px;
    margin-bottom: 20px;
  }

  .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .project-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    transition: all 0.35s ease;
    position: relative;
  }

  .project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
  }

  .project-screenshot {
    height: 220px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .project-content {
    padding: 32px;
  }

  .project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .project-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
  }

  .project-badge {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
  }

  .badge-easy { background: #DCFCE7; color: #16A34A; }
  .badge-medium { background: #FEF3C7; color: #D97706; }
  .badge-hard { background: #FEE2E2; color: #DC2626; }

  .project-desc {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
  }

  .project-tech {
    font-size: 16px;
    color: var(--text-tertiary);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .tech-tag {
    background: #F3F4F6;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 500;
  }

  /* Full-width CTA */
  .full-cta {
    background: #F8FAFC;
    padding: 100px 0;
  }

  .full-cta-content {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
  }

  .full-cta h2 {
    font-weight: 600;
    font-size: 42px;
    margin-bottom: 20px;
  }

  .full-cta p {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 40px;
  }

  .form-wide {
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
  }

  .form-wide input {
    flex: 1;
    padding: 20px 28px;
    font-size: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.25s ease;
  }

  .form-wide input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--pulse);
  }

  .form-wide .btn {
    flex: 0 0 auto;
    padding: 20px 40px;
    font-size: 20px;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 48px;
    font-size: 20px;
    font-weight: 500;
    color: white;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
  }

  .btn:hover {
    background: #004ecc;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  }

  /* Footer */
  footer {
    background: #F9FAFB;
    padding: 50px 0 40px;
    border-top: 1px solid var(--border);
  }

  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
  }

  .footer-brand {
    flex: 1;
    min-width: 300px;
  }

  .footer-brand h3 {
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text);
  }

  .footer-brand p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
  }

  .footer-links {
    display: flex;
    gap: 80px;
  }

  .footer-col h4 {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text);
  }

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

  .footer-col li {
    margin-bottom: 12px;
  }

  .footer-col a {
    font-size: 18px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .footer-col a:hover {
    color: var(--accent);
  }

  .footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 16px;
    color: var(--text-tertiary);
  }

  /* Animations */
  [data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  [data-animate].visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Mobile */
  @media (max-width: 900px) {
    .hero {
      flex-direction: column;
      text-align: center;
    }

    .hero h1 {
      font-size: 44px;
    }

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

  @media (max-width: 768px) {
    .form-wide {
      flex-direction: column;
    }

    .chat-line {
      flex-direction: column;
      align-items: flex-start;
    }

    .chat-avatar {
      align-self: flex-end;
    }




    section {
      padding: 80px 0;
    }
  }


  /* === Pricing + Countdown Block === */
.pricing-block {
  max-width: 900px;
  margin: 80px auto 120px;
  text-align: center;
}

.pricing-block h2 {
  font-weight: 600;
  font-size: 42px;
  margin-bottom: 24px;
  color: var(--text);
}

.real-countdown {
  background: rgba(126, 34, 206, 0.06);
  border-radius: var(--radius);
  padding: 18px 32px;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  margin: 24px auto 48px;
  min-width: 280px;
}

.countdown-value {
  font-family: 'SF Mono', monospace;
  font-size: 36px;
  font-weight: 600;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.countdown-label {
  font-size: 18px;
  color: var(--text-tertiary);
}

.pricing-tiers {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.tier-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tier-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.tier-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 24px;
}

.tier-early {
  background: #DCFCE7;
  color: #16A34A;
}

.tier-late {
  background: #FEF3C7;
  color: #D97706;
}

.tier-price {
  margin-bottom: 20px;
}

.price-amount {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.tier-desc {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pricing-note {
  margin-top: 48px;
  padding: 20px 32px;
  background: #F8FAFC;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 18px;
  color: var(--text-secondary);
}

.pricing-note svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 4px;
}

/* Mobile */
@media (max-width: 768px) {
  .pricing-tiers {
    flex-direction: column;
    align-items: center;
  }

  .tier-card {
    max-width: 100%;
  }
}


/* === Flip Timer — адаптивный (до 3 цифр) === */
.flip-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 32px auto 48px;
  font-family: 'SF Mono', monospace;
  flex-wrap: wrap;
}

.flip-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 72px; /* ← достаточно для 3 цифр */
}

.flip-digit {
  display: block;
  width: 100%;
  height: 56px;
  line-height: 56px;
  font-size: 32px; /* ← чуть меньше, но крупнее текста */
  font-weight: 700;
  text-align: center;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  color: var(--text);
  font-feature-settings: "tnum"; /* tabular figures — цифры одинаковой ширины */
}

.flip-digit.top {
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.flip-digit.bottom {
display: none;
}

.flip-unit.flipping .flip-digit.top {
  transform: rotateX(-90deg);
}

.flip-label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flip-separator {
  font-size: 32px;
  color: var(--text-tertiary);
  margin: 0 4px;
  line-height: 1;
  align-self: center;
}

/* Mobile: компактнее */
@media (max-width: 768px) {
  .flip-timer {
    gap: 4px;
  }

  .flip-unit {
    min-width: 60px;
  }

  .flip-digit {
    height: 48px;
    line-height: 48px;
    font-size: 28px;
  }

  .flip-label {
    font-size: 12px;
  }

  .flip-separator {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .flip-unit {
    min-width: 52px;
  }

  .flip-digit {
    height: 44px;
    line-height: 44px;
    font-size: 26px;
  }

  .flip-label {
    font-size: 11px;
  }
}


.hero-photo {
  flex: 0 0 420px;
  height: 560px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.09);
  background: #f3f4f6; /* fallback, пока грузится */
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ← главное: обрезает, сохраняя пропорции */
  display: block;
  transition: opacity 0.4s ease;
  opacity: 0;
}

.hero-photo img.loaded {
  opacity: 1;
}

@media (max-width: 900px) {
  .hero-photo {
    flex: 0 0 280px;
    height: 370px;
    margin: 0 auto 32px;
  }
}

@media (max-width: 550px) {
  .hero-photo {
    flex: 0 0 240px;
    height: 320px;
  }
}


.flip-unit.flipping .flip-digit.top {
  transform: rotateX(-90deg);
}

.flip-unit.flipping .flip-digit.bottom {
  opacity: 1;
}

.flip-label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.flip-separator {
  font-size: 36px;
  color: var(--text-tertiary);
  margin: 0 4px;
  line-height: 1;
}

/* Mobile */
@media (max-width: 768px) {
  .flip-timer {
    flex-wrap: wrap;
    gap: 6px;
  }

  .flip-unit {
    width: 25%;
  }

  .flip-digit {
    width: 48px;
    height: 40px;
    font-size: 30px;
    line-height: 40px;
  }

  .flip-separator {
    font-size: 30px;
  }
}

/* === Typing без CLS и без наложения === */
.typing-wrapper {
  position: relative;
  /* Резервируем высоту под заголовок ДО появления текста */
  min-height: 72px; /* ← 60px font-size + 1.1 line-height + нижний отступ */
  margin-bottom: 28px; /* ← как у h1 в макете */
}

.typing-placeholder,
.typing-animated {
  font-weight: 700;
  font-size: 60px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
}

/* Placeholder: невидим, но физически присутствует */
.typing-placeholder {
  visibility: hidden; /* ← КЛЮЧЕВОЕ: резервирует место, но не рисуется */
  color: transparent; /* ← на случай, если visibility не сработает */
}

/* Анимированный заголовок: поверх placeholder'а */
.typing-animated {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--text);
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Mobile */
@media (max-width: 768px) {
  .typing-wrapper {
    min-height: 56px;
  }

  .typing-placeholder,
  .typing-animated {
    font-size: 44px;
  }
}


/* Анимация появления чата */
.chat-line-hidden {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chat-line-visible {
  opacity: 1;
  transform: none;
}

/* === Чат: анимация набора текста === */
.chat-bubble.typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  background: currentColor;
  margin-left: 4px;
  animation: blinkCursor 1s infinite;
}

@keyframes blinkCursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Thinking placeholder */
.chat-line[data-role="ai-thinking"] {
  height: 0;
}
.chat-line[data-role="ai-thinking"]::after {
  content: "";
  display: block;
  width: 60px;
  height: 6px;
  background: #D1D5DB;
  border-radius: 3px;
  margin: 12px 0 0 50px;
  animation: pulseBar 1.8s infinite ease-in-out;
}

/* Анимация появления строк чата */
.chat-line-hidden {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chat-line-visible {
  opacity: 1;
  transform: none;
}
