/* ===== VARIABLES ===== */
:root {
  --bg: #0a0f14;
  --bg-gradient: linear-gradient(135deg, #0a0f14 0%, #1a2332 50%, #0a0f14 100%);
  --surface: rgba(22, 32, 45, 0.8);
  --surface-light: rgba(35, 50, 70, 0.6);
  --border: rgba(79, 209, 197, 0.2);
  --accent: #4fd1c5;
  --accent-strong: #38b2ac;
  --accent-glow: rgba(79, 209, 197, 0.4);
  --text: #f1fbfb;
  --text-muted: rgba(241, 251, 251, 0.6);
  --white: #ffffff;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 10px 40px rgba(79, 209, 197, 0.2);
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

/* ===== UTILITIES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #63e6be 50%, var(--accent-strong) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent {
  color: var(--accent);
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #0a0f14;
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(79, 209, 197, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn--outline:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.btn--white {
  background: var(--white);
  color: #0a0f14;
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(255, 255, 255, 0.2);
}

.btn--large {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: 14px;
}

.btn--full {
  width: 100%;
}

.btn__icon {
  transition: transform 0.3s ease;
}

.btn:hover .btn__icon {
  transform: translateX(4px);
}

/* ===== NAVIGATION ===== */
/* Отступ для Telegram WebApp - применяется через JS переменную --safe-top только на мобильных */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.nav--scrolled {
  background: rgba(10, 15, 20, 0.9);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

/* Safe area только на мобильных */
@media (max-width: 768px) {
  .nav {
    padding-top: calc(16px + var(--safe-top, 0px));
  }
  
  .nav--scrolled {
    padding-top: calc(12px + var(--safe-top, 0px));
  }
}

.nav__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__logo-img {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: cover;
  display: block;
}

.nav__badge {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #0a0f14;
}

.nav__title {
  font-size: 20px;
  font-weight: 700;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav__link:hover {
  color: var(--accent);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 209, 197, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(56, 178, 172, 0.1), transparent),
    var(--bg-gradient);
}

.hero__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 5s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.5); opacity: 0.6; }
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  margin-bottom: 48px;
}

.hero__trial {
  margin-top: 16px;
  font-size: 14px;
  color: var(--accent);
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.hero__stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

.hero__mockup {
  display: none;
}

/* ===== SECTIONS ===== */
section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(79, 209, 197, 0.1);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
}

/* ===== FEATURES ===== */
.features {
  background: linear-gradient(180deg, transparent 0%, rgba(79, 209, 197, 0.03) 50%, transparent 100%);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.feature-card__icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.feature-card__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.feature-card__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card__list li {
  color: var(--text-muted);
  font-size: 15px;
  padding-left: 24px;
  position: relative;
}

.feature-card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

/* ===== FUNCTIONS ===== */
.functions {
  background: var(--bg);
}

.function-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.function-row:last-child {
  margin-bottom: 0;
}

.function-row--reverse {
  direction: rtl;
}

.function-row--reverse > * {
  direction: ltr;
}

.function-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(79, 209, 197, 0.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.function-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

.function-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

.function-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.function-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 600;
}

.function-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.badge--green {
  background: rgba(79, 209, 197, 0.15);
  color: var(--accent);
}

/* Estimate preview */
.estimate-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.estimate-row-preview {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.estimate-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  padding-top: 8px;
}

/* Chat preview */
.chat-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
}

.chat-message--other {
  background: var(--surface-light);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message--own {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #0a0f14;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Photos preview */
.photo-grid-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.photo-item-preview {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface-light), var(--surface));
  border-radius: 12px;
}

/* ===== BENEFITS ===== */
.benefits {
  background: linear-gradient(180deg, transparent 0%, rgba(79, 209, 197, 0.03) 100%);
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}

.benefit-item {
  text-align: center;
}

.benefit-item__icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.benefit-item__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.benefit-item__text {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== PRICING ===== */
.pricing {
  background: var(--bg);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: all 0.4s ease;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: rgba(79, 209, 197, 0.4);
}

.pricing-card--popular {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(79, 209, 197, 0.08) 0%, var(--surface) 100%);
}

.pricing-card--popular:hover {
  box-shadow: var(--shadow-accent);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: #0a0f14;
  white-space: nowrap;
}

.pricing-card__header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pricing-card__name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.pricing-card__amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--accent);
}

.pricing-card__period {
  font-size: 16px;
  color: var(--text-muted);
}

.pricing-card__savings {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pricing-card__savings span {
  font-size: 13px;
  color: var(--text-muted);
}

.pricing-card__savings small {
  color: var(--accent);
  font-weight: 600;
}

.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.pricing-card__features li {
  font-size: 15px;
  color: var(--text-muted);
}

.pricing__note {
  text-align: center;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  padding: 80px 0;
}

.cta__content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #0a0f14;
  margin-bottom: 16px;
}

.cta__subtitle {
  font-size: 17px;
  color: rgba(10, 15, 20, 0.7);
  margin-bottom: 32px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg);
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__badge {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #0a0f14;
}

.footer__logo-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  display: block;
}

.footer__title {
  font-size: 18px;
  font-weight: 600;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__link:hover {
  color: var(--accent);
}

.footer__copy {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== ANIMATIONS ===== */
.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .function-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .function-row--reverse {
    direction: ltr;
  }

  .hero__stats {
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .nav__container {
    padding: 0 10px;
  }

  .nav__logo {
    gap: 6px;
    flex-shrink: 0;
  }

  .nav__badge {
    width: 28px;
    height: 28px;
    font-size: 10px;
    border-radius: 6px;
  }

  .nav__logo-img {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
  }

  .nav__title {
    font-size: 12px;
  }

  .nav__actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .nav__actions .btn {
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 6px;
    white-space: nowrap;
  }

  .nav__link {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero__title {
    font-size: 32px;
  }

  .hero__stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .hero__stat-value {
    font-size: 24px;
  }

  section {
    padding: 60px 0;
  }

  .features__grid,
  .pricing__grid {
    grid-template-columns: 1fr;
  }

  .benefits__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer__content {
    flex-direction: column;
    text-align: center;
  }
}
