:root {
  --brand: #6366f1;
  --bg: #f6f7fb;
  --text: #0f172a;
  --muted: #64748b;

  --card-radius: 28px;
  --card-w: min(88vw, 380px);
  --card-h: clamp(440px, 62vh, 520px); /* ✅ главное: норм высота на телефоне */
}

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

body{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* ================= HEADER ================= */


.header{
  height: 64px;
  padding: 0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  opacity: 0.85;
  background: rgba(99,102,241,0.12);
  color: var(--brand);
}

.logo{
  font-weight: 800;
  letter-spacing: .3px;
}

.actions{ display:flex; gap:12px; }

.link{
  text-decoration:none;
  color: var(--muted);
  font-weight: 500;
}
.btn {
  background: transparent;
  color: var(--brand);
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1.5px solid rgba(99,102,241,0.4);
}


/* ================= LAYOUT ================= */

.landing{
  height: calc(100vh - 64px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 14px;
  padding: 10px 0 18px;
}

/* ✅ убираем “кривые” отрицательные отступы и делаем контролируемый подъем */
.cards-wrapper{
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  transform: translateY(-18px); /* поднимает карточку без поломки геометрии */
}

/* ================= CARD ================= */

.card{
  position:absolute;
  inset:0;

  padding: 22px 20px;
  border-radius: var(--card-radius);

  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.985));
  backdrop-filter: blur(6px);

  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 0 0 1px rgba(99,102,241,0.06);

  opacity: 0;
  pointer-events: none;

  display: flex;
  flex-direction: column;
  gap: 10px;

  /* ✅ важно: чтобы ничего не вылезало и не “перекрывало точки” */
  overflow: hidden;
}

.card.active{
  opacity:1;
  pointer-events:auto;
}

/* мягкое свечение только у активной */
.card::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius: calc(var(--card-radius) + 8px);
  background: radial-gradient(circle at top, rgba(99,102,241,0.10), transparent 60%);
  opacity:0;
  transition: opacity .25s ease;
  z-index:-1;
}

.card.active::after{ opacity:1; }

/* ================= FOX ================= */

.fox-mascot.big{
  width: 240px;
  height: auto;
  display:block;
  margin: 12px auto 6px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.12));
}

/* анимация только на активной карточке */
.card.active .fox-mascot.big{
  animation: fox-float 3.5s ease-in-out infinite;
}
.card:not(.active) .fox-mascot.big{ animation: none; }

@keyframes fox-float{
  0% { transform: translateY(0); }
  50%{ transform: translateY(-6px); }
  100%{ transform: translateY(0); }
}

/* ================= TEXT ================= */

.card h2{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.card p{
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);

  /* ✅ чтобы длинный текст не “убивал” кнопку */
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= CTA ================= */

.cta{
  margin-top: auto;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;

  background: linear-gradient(180deg, #6366f1, #4f46e5);
  color:#fff;
  font-size:16px;
  font-weight: 800;

  box-shadow: 0 12px 24px rgba(99,102,241,0.35);
  cursor:pointer;
}

.cta:active{ transform: translateY(1px); }

@media (hover:hover){
  .cta:hover{
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(99,102,241,0.40);
  }
}

/* ================= DOTS ================= */

.dots{
  display:flex;
  gap: 8px;
  margin-top: 2px;

  /* ✅ чтобы точки ВСЕГДА были под карточкой, не “внутри” */
  transform: translateY(-6px);
}

.dot{
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 50%;
  transition: .25s ease;
}

.dot.active{
  background: var(--brand);
  transform: scale(1.5);
}

/* ================= SWIPE ANIMATIONS (НЕ ЛОМАТЬ) ================= */
/* ✅ строго горизонтально — без scale/translateY */
@keyframes swipe-left{
  from{ transform: translateX(0); opacity: 1; }
  to  { transform: translateX(-120px); opacity: 0; }
}

@keyframes swipe-right{
  from{ transform: translateX(0); opacity: 1; }
  to  { transform: translateX(120px); opacity: 0; }
}

/* ✅ enter можно чуть “поп” (без падения вниз) */
@keyframes enter{
  from{ transform: translateX(24px); opacity: 0; }
  to  { transform: translateX(0); opacity: 1; }
}

.card.swipe-left{ animation: swipe-left .32s ease-out forwards; }
.card.swipe-right{ animation: swipe-right .32s ease-out forwards; }
.card.enter{ animation: enter .30s ease-out; }

/* ================= SMALL SCREENS ================= */

@media (max-height: 700px){
  :root{
    --card-h: clamp(400px, 66vh, 480px);
  }
  .cards-wrapper{ transform: translateY(-22px); }
  .fox-mascot.big{ width: 180px; margin-top: 10px; }
  .card h2{ font-size: 20px; }
  .card p{ -webkit-line-clamp: 5; }
}

/* ================= DESKTOP ================= */

@media (min-width: 1024px){
  :root{
    --card-w: 720px;
    --card-h: 520px;
  }

  .cards-wrapper{ transform: translateY(-10px); }

  .card{ padding: 40px 36px; }
  .fox-mascot.big{ width: 240px; margin-top: 6px; }

  .card h2{ font-size: 28px; }
  .card p{ font-size: 17px; -webkit-line-clamp: 7; }
}
