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

:root {
  --color-primary: #E63946;
  --color-primary-light: #FF6B6B;
  --color-primary-dark: #C1121F;
  --color-accent: #007AFF;
  --color-bg: #FFFFFF;
  --color-bg-gray: #F5F5F7;
  --color-text: #1D1D1F;
  --color-text-secondary: #6E6E73;
  --color-border: #E5E5EA;
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --container-max: 1120px;
  --section-padding: 100px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-phone: 40px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  transition: var(--transition);
}

.nav__logo:hover {
  transform: scale(1.03);
}

.nav__logo-img {
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ===== LANGUAGE SELECTOR ===== */
.lang-selector {
  position: relative;
}

.lang-selector__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 99px;
  background: transparent;
  font-family: var(--font-family);
  font-size: 0.85rem;
  color: var(--color-text);
  cursor: pointer;
  transition: var(--transition);
}

.lang-selector__btn:hover {
  background: var(--color-bg-gray);
  border-color: #CCC;
}

.lang-selector__icon {
  flex-shrink: 0;
}

.lang-selector__chevron {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.lang-selector.open .lang-selector__chevron {
  transform: rotate(180deg);
}

.lang-selector__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: var(--transition);
  overflow: hidden;
}

.lang-selector.open .lang-selector__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  border: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition);
}

.lang-option:hover {
  background: var(--color-bg-gray);
}

.lang-option.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.3);
}

/* Nav download button: no shadow */
.btn--nav {
  padding: 8px 20px;
  font-size: 0.9rem;
  box-shadow: none;
}

.btn--nav:hover {
  box-shadow: 0 4px 12px rgba(230,57,70,0.25);
}

/* Newsletter button: no glow shadow */
.btn--newsletter {
  box-shadow: none;
}

.btn--newsletter:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.btn--appstore {
  background: var(--color-text);
  color: white;
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn--appstore:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1.15rem;
}

.btn__apple-icon {
  flex-shrink: 0;
}

/* ===== HERO ===== */
.hero {
  padding: 130px 0 70px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFF 0%, rgba(230,57,70,0.08) 100%);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  max-width: 480px;
}

.hero__phones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}

/* ===== PHONE FRAMES ===== */
.phone-frame {
  background: white;
  border-radius: var(--radius-phone);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 6px solid #E8E8ED;
  transition: transform 0.5s ease, box-shadow var(--transition);
  flex-shrink: 0;
}

.phone-frame img {
  width: 100%;
  display: block;
}

/* Hero phone sizes */
.phone-frame--main {
  width: 240px;
  z-index: 2;
}

.phone-frame--side {
  width: 200px;
  opacity: 0.9;
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

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

.section--compact {
  padding: 60px 0;
}

.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

/* ===== FEATURES (text + visual layout) ===== */
.feature {
  display: flex;
  align-items: center;
  gap: 48px;
}

.feature--reverse {
  flex-direction: row-reverse;
}

.feature__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature__text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.feature__text p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.feature__visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* ===== SECTION IMAGES (Sections 1–4 + Features) ===== */
.section-img {
  width: 400px;
  max-width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}

.section-img img {
  width: 100%;
  display: block;
}

/* Feature preview crossfade transition */
.section-img {
  position: relative;
}

.section-img .crossfade-clone {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none;
}

.section-img .crossfade-clone.fade-out {
  opacity: 0;
}

/* Cycling variant (Section 1) */
.section-img--cycle {
  position: relative;
}

.section-img__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.section-img__img:first-child {
  position: relative;
}

.section-img__img.active {
  opacity: 1;
}

/* ===== FEATURES LIST (And way more!) ===== */
.features-list {
  margin-top: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.features-list__item {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.4s ease, font-weight 0.4s ease;
  -webkit-text-fill-color: var(--color-text-secondary);
}

.features-list__item:hover {
  color: var(--color-text);
  -webkit-text-fill-color: var(--color-text);
}

.features-list__item.active {
  font-weight: 700;
  color: var(--color-primary);
  -webkit-text-fill-color: transparent;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.features-list__dot {
  color: var(--color-text-secondary);
  user-select: none;
}

.features-list__more {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Features language notice capsule (overlay) */
.features-lang-notice {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
}

.features-lang-notice.visible {
  display: block;
}

.features-lang-notice__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
  white-space: nowrap;
}

.features-lang-notice__flag {
  font-size: 1rem;
  line-height: 1;
}

/* Features section spacing */
.section--features {
  padding: 60px 0 100px;
}

/* ===== REVIEWS ===== */
.section--reviews-bg {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(230,57,70,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(255,107,107,0.07) 0%, transparent 60%),
    linear-gradient(180deg, rgba(230,57,70,0.03) 0%, rgba(230,57,70,0.06) 50%, rgba(230,57,70,0.03) 100%);
}

.reviews-carousel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.reviews-arrows {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.reviews-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--color-text);
}

.reviews-arrow:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-color: var(--color-primary);
  color: white;
}

.reviews-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.reviews-track-wrapper {
  overflow: hidden;
  width: 100%;
}

.reviews-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 10px 0;
  /* Align first card with container content, right side extends to viewport edge */
  padding-left: max(40px, calc((100vw - var(--container-max)) / 2 + 40px));
}

.review-card {
  flex: 0 0 340px;
  background: white;
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.review-card__stars {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
}

.review-card__star {
  color: #FFB800;
  font-size: 1.1rem;
}

.review-card__text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 16px;
  font-weight: 500;
}

.review-card__author {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.review-card__source {
  font-size: 0.75rem;
  color: var(--color-border);
}

/* ===== CTA ===== */
.section--cta {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,107,107,0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(193,18,31,0.4) 0%, transparent 50%),
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  text-align: center;
}

.cta__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.cta__subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.section--cta .btn--appstore {
  background: white;
  color: var(--color-text);
}

.section--cta .btn--appstore:hover {
  background: #F0F0F0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(-3px) scale(1.02);
}

/* ===== NEWSLETTER ===== */
.newsletter {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.newsletter p {
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.newsletter__form {
  display: flex;
  gap: 8px;
}

.newsletter__input {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--color-border);
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: 1rem;
  background: white;
  outline: none;
  transition: var(--transition);
}

.newsletter__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

.newsletter__thanks {
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 16px;
}

/* Newsletter button success state */
.btn--newsletter {
  transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn--newsletter.btn--success {
  background: #34C759;
  pointer-events: none;
}

/* ===== CONTACT ===== */
.contact {
  text-align: center;
}

.contact h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.contact p {
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-bg-gray);
  color: var(--color-text);
  transition: var(--transition-bounce);
}

.social-link:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 6px 20px rgba(230,57,70,0.3);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.6);
  padding: 40px 0;
  font-size: 0.8rem;
  line-height: 1.7;
}

.footer__disclaimer {
  margin-bottom: 20px;
  max-width: 800px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}

.footer__link {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer__link:hover {
  color: white;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-up {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s ease, transform 0.6s var(--transition-bounce);
}

.scale-up.visible {
  opacity: 1;
  transform: scale(1);
}

.stagger-children .stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible .stagger-item {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children.visible .stagger-item:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible .stagger-item:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible .stagger-item:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible .stagger-item:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible .stagger-item:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible .stagger-item:nth-child(6) { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  :root {
    --section-padding: 70px;
  }

  .hero__phones {
    gap: 14px;
  }

  .phone-frame--main {
    width: 200px;
  }

  .phone-frame--side {
    width: 160px;
  }

  .container {
    padding: 0 24px;
  }

  .feature {
    flex-direction: column !important;
    text-align: center;
    gap: 32px;
  }

  .feature__text p {
    max-width: none;
    margin: 0 auto;
  }

  .section-img {
    width: min(400px, calc(100vw - 48px));
  }

  .section--compact {
    padding: 40px 0;
  }

  .section--features {
    padding: 40px 0 70px;
  }

  #section-catch {
    padding-top: 60px;
  }

  .reviews-track {
    padding-left: 24px;
  }

  .review-card {
    flex: 0 0 280px;
  }

  .slide-in-left, .slide-in-right {
    transform: translateY(40px);
  }

  .slide-in-left.visible, .slide-in-right.visible {
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  :root {
    --section-padding: 50px;
  }

  .container {
    padding: 0 20px;
  }

  .nav__logo-text {
    display: none;
  }

  #currentLangLabel {
    display: none;
  }

  .hero {
    padding: 110px 0 50px;
  }

  #section-catch {
    padding-top: 50px;
  }

  .hero__phones {
    gap: 8px;
  }

  .phone-frame--main {
    width: 160px;
    border-radius: 28px;
    border-width: 4px;
  }

  .phone-frame--side {
    width: 120px;
    border-radius: 24px;
    border-width: 4px;
  }

  .section-img {
    width: min(400px, calc(100vw - 48px));
  }

  .section--compact {
    padding: 30px 0;
  }

  .section--features {
    padding: 30px 0 60px;
  }

  .reviews-track {
    padding-left: 20px;
  }

  .review-card {
    flex: 0 0 260px;
  }

  .reviews-arrow {
    width: 36px;
    height: 36px;
  }

  .reviews-arrow svg {
    width: 18px;
    height: 18px;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
