@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #f8f0e5;
  color: #111;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  position: sticky;
  top: 0;
  background: #efe3cb;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
  z-index: 1000;
}

header .logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #4f46e5;
  cursor: default;
}

nav a {
  margin-left: 32px;
  text-decoration: none;
  color: #4f46e5;
  font-weight: 600;
  transition: color 0.3s ease;
}
nav a:hover {
  color: #3730a3;
}
.btn-primary {
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block; /* 🔑 нужно для transform */
  text-decoration: none; /* убираем подчеркивание */
  margin-left: 0;
}

.btn-primary:hover {
  background-color: #4338ca;
  transform: scale(1.05);
  color: aliceblue;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  max-width: 600px;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 24px 0;
  color: #4f46e5;
}

.hero-text p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 32px;
  color: #333;
}

.hero-image img {
  max-width: 500px;
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgb(79 70 229 / 0.2);
  transition: transform 0.3s ease;
}
.hero-image img:hover {
  transform: scale(1.05);
}

.features {
  max-width: 1000px;
  margin: 80px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  padding: 0 24px;
}

.feature-card {
  background: #f9f3ee;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 20px rgb(79 70 229 / 0.1);
  transition: box-shadow 0.3s ease;
}

.feature-card:hover {
  box-shadow: 0 12px 32px rgb(79 70 229 / 0.25);
}

.feature-icon {
  font-size: 3rem;
  color: #4f46e5;
  margin-bottom: 16px;
}

.feature-title {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: #333;
}

.feature-desc {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}

footer {
  background: #4f46e5;
  color: white;
  text-align: center;
  padding: 24px 24px;
  font-size: 0.9rem;
  user-select: none;
}


footer a.contact-icon:hover {
  transform: scale(1.2);
  opacity: 0.85;
}

footer a.contact-icon {
  display: inline-block;
  margin: 0 12px;
  vertical-align: middle;
  transition: transform 0.2s ease, background-color 0.3s ease;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}

footer a.contact-icon svg {
  display: block;
  transition: fill 0.3s ease;
}

/* Фон иконки по умолчанию — прозрачный */
footer a.contact-icon {
  background-color: transparent;
}

/* При наведении — фон иконки и изменение цвета svg */
footer a.contact-icon:hover {
  transform: scale(1.2);
  background-color: rgba(255, 255, 255, 0.2);
}

footer a.contact-icon:hover svg {
  fill: #fff;
}


/* Адаптив */
@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-text {
    max-width: 100%;
    margin-top: 40px;
  }
  .hero-image img {
    max-width: 100%;
    box-shadow: 0 12px 30px rgb(79 70 229 / 0.15);
  }
}


/* Тёмная тема */
body.dark-theme {
  background: #121212;
  color: #eee;
}

body.dark-theme header {
  background: #1f1f1f;
  box-shadow: 0 2px 8px rgb(255 255 255 / 0.1);
}

body.dark-theme header .logo,
body.dark-theme nav a,
body.dark-theme .btn-primary {
  color: #a3a3ff;
}

body.dark-theme nav a:hover {
  color: #d0d0ff;
}

body.dark-theme .btn-primary {
  background: #6767ff;
  color: white;
}

body.dark-theme .btn-primary:hover {
  background-color: #5454cc;
  color: #e0e0ff;
  transform: scale(1.05);
}

body.dark-theme .hero-text h1 {
  color: #a3a3ff;
}

body.dark-theme .hero-text p {
  color: #ccc;
}

body.dark-theme .hero-image img {
  box-shadow: 0 20px 40px rgb(103 103 255 / 0.3);
}

body.dark-theme .features .feature-card {
  background: #1e1e2a;
  box-shadow: 0 8px 20px rgb(103 103 255 / 0.15);
  color: #ddd;
}

body.dark-theme .feature-icon {
  color: #6767ff;
}

body.dark-theme .feature-title {
  color: #ccc;
}

body.dark-theme .feature-desc {
  color: #bbb;
}

body.dark-theme footer {
  background: #2a2a8c;
  color: #ddd;
}

body.dark-theme footer a.contact-icon:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme footer a.contact-icon svg {
  fill: #ccc;
}

#theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  background-color: #4f46e5;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  z-index: 1100;
}

#theme-toggle:hover {
  background-color: #3730a3;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(55, 48, 163, 0.6);
}

#theme-toggle:focus {
  outline: 2px solid #a3a3ff;
  outline-offset: 3px;
}


#theme-toggle .icon {
  position: absolute;
  transition: transform 0.5s ease, opacity 0.5s ease;
  user-select: none;
  pointer-events: none;
}

/* По умолчанию показываем луну, солнце — скрыт */
#theme-toggle .moon {
  opacity: 1;
  transform: rotate(0deg);
}

#theme-toggle .sun {
  opacity: 0;
  transform: rotate(-90deg);
}

/* Когда тёмная тема — показываем солнце, луну скрываем */
body.dark-theme #theme-toggle .moon {
  opacity: 0;
  transform: rotate(90deg);
}

body.dark-theme #theme-toggle .sun {
  opacity: 1;
  transform: rotate(0deg);
}

body,
header,
nav a,
.hero-text h1,
.hero-text p,
.hero-image,
.feature-card,
.feature-icon,
.feature-title,
.feature-desc,
footer {
  transition: background-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%; /* делает изображение круглым */
}

/*вариант 3*/
.feature-showcase {
  display: flex;
  position: relative;
  gap: 60px;
  padding: 100px 20px;
  max-width: 1200px;
  margin: 0 auto;
}


.feature-showcase {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  padding: 100px 20px;
}

.iphone-container {
  position: sticky;
  top: 100px;
  width: 330px;
  height: 665px;     /* высота рамки айфона */
  background: url('/image/frame_iphone.png') no-repeat center center;
  background-size: cover;
  border-radius: 60px; /* если нужно */
  overflow: hidden;    /* чтобы скрин не выходил за рамки */
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  flex-shrink: 0;      /* не сжимается при маленьком экране */
  display: flex;
  justify-content: center;
  align-items: center;
  /*padding: 50px 24px;   отступы, чтобы скрин не налезал на рамку */
  box-sizing: border-box;
}

.iphone-screen {
    width: 96%;
    height: 101%;
    background-size: cover;
    user-select: none;
    pointer-events: none;
    border-radius: 40px;
    margin: 5px;
    border-radius: 50px;
    padding: 10px;
}

.text-sections {
  display: flex;
  flex-direction: column;
  gap: 300px; /* расстояние для появления по очереди */
  flex: 1;
  /* убираем overflow */
  overflow: visible; /* или просто не ставим overflow */
  height: auto; /* важен авто высота */
}



.feature-text {
  min-height: 80vh;
}



@media (max-width: 900px) {
  .feature-showcase {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 60px 20px;
  }

  .iphone-sticky {
    position: relative;
    width: 240px;
    height: 480px;
  }

  .text-sections {
    gap: 120px;
  }

  .feature-text {
    min-height: auto;
    text-align: center;
  }
}

.connect-title-section {
  text-align: center;
  margin-bottom: 40px;
}

.connect-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  color: #4f45e5;
}
h2 {
  color: #4f45e5;
}