/* css/landing.css - лендинг (первая версия), свои ответы в анкете, алмазы, разговор, живые персонажи.
   Порядок файлов в index.html важен: правила ниже перекрывают правила выше; карта файлов - obsidian/Pally/architecture/code-map.md */
/* ---------- Лендинг ---------- */

.app.landing { max-width: none; padding: 0; gap: 0; }
.l-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.l-head {
  position: sticky; top: 0; z-index: 5;
  background: rgba(251, 244, 230, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--line);
}
.l-head-in { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.l-nav { display: none; gap: 4px; margin-left: auto; }
.l-link {
  background: none; border: 0; padding: 10px 14px;
  border-radius: 999px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.l-link:hover { background: var(--sun-soft); }
.l-head .btn { width: auto; min-height: 44px; font-size: 16px; padding: 8px 20px; margin-left: auto; box-shadow: 0 3px 0 var(--brand-dark); }

.hero { display: grid; gap: 24px; padding-top: 36px; padding-bottom: 28px; align-items: center; }
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
}
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; margin: 16px 0 16px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.lead { font-size: clamp(18px, 1.7vw, 21px); color: #4d463c; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.hero-cta .btn { width: auto; padding: 14px 32px; font-size: 19px; }
.hero-art { width: 100%; height: auto; display: block; max-width: 560px; margin: 0 auto; }

.sec { padding-top: 56px; padding-bottom: 56px; }
.sec > h2, .see h2, .cta-final h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; }
.sec-lead { color: var(--muted); max-width: 38em; margin-top: 10px; font-size: 18px; }

.steps4 { display: grid; gap: 16px; margin-top: 28px; }
.step {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.step-ic {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  margin-bottom: 14px;
}
.c-sun { background: var(--sun-soft); color: #8a5d00; }
.c-brand { background: var(--brand-soft); color: var(--brand-dark); }
.c-green { background: var(--green-soft); color: var(--green); }
.c-sky { background: var(--sky-soft); color: #2d6470; }
.step-n { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.step h3 { font-size: 21px; margin: 4px 0 8px; }
.step p { color: #4d463c; }

.band { background: #f5e9d0; }
.see { display: grid; gap: 40px; }
.see-col > p { color: #4d463c; margin: 10px 0 22px; font-size: 18px; max-width: 30em; }
.mock {
  max-width: 400px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 26px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 14px 30px rgba(92, 66, 20, .14);
  transform: rotate(-1.5deg);
}
.mock.right { transform: rotate(1.5deg); }
.mock .entry { min-height: 56px; font-size: 28px; border-color: var(--bad); color: var(--bad); border-style: solid; background: var(--bad-soft); }
.mock-tag { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.principles { display: grid; gap: 22px 32px; margin-top: 28px; }
.principle { display: flex; gap: 16px; align-items: flex-start; }
.principle .step-ic { width: 56px; height: 56px; flex: none; margin: 0; }
.principle h3 { font-size: 20px; margin-bottom: 4px; }
.principle p { color: #4d463c; }

.path-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.path-pill {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  font-weight: 800; font-size: 18px;
  background: #efe2c8; color: #a8987a;
}
.path-pill.on { background: var(--green); color: #fff; }
.path-note { margin-top: 14px; color: var(--muted); font-size: 15px; }

.cta-final {
  margin: 0 auto 56px;
  max-width: 1080px;
  width: calc(100% - 40px);
  background: var(--green);
  color: #fff;
  border-radius: 32px;
  padding: 36px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
}
.cta-final .mascot { background: #3c7d6b; width: 112px; height: 112px; }
.cta-final p { color: #d4e8df; max-width: 30em; }
.cta-final .btn { width: auto; padding: 14px 36px; background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 #b98314; }
.cta-final .btn:hover { background: #f5c467; }

.l-foot { padding: 0 20px 36px; text-align: center; color: var(--muted); font-size: 14px; }

@media (min-width: 700px) {
  .steps4 { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .l-nav { display: flex; }
  .l-head .btn { margin-left: 8px; }
  .app:not(.landing) { padding-top: 28px; }
}
@media (min-width: 940px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 48px; }
  .steps4 { grid-template-columns: repeat(4, 1fr); }
  .see { grid-template-columns: 1fr 1fr; gap: 56px; }
  .sec { padding-top: 76px; padding-bottom: 76px; }
  .cta-final { padding: 52px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .progress > i { transition: none; }
}

.sec { scroll-margin-top: 72px; }

/* Свои ответы в анкете */
.field input[type=text], .form-card textarea { width: 100%; display: block; }
.form-card textarea {
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font: inherit;
  color: inherit;
  resize: vertical;
  min-height: 92px;
}
.form-card textarea:focus { outline: none; border-color: var(--green); }
.chip.add { border-style: dashed; color: var(--muted); }
.chip:disabled { opacity: .45; cursor: default; }
.own-row { display: flex; gap: 8px; align-items: stretch; }
.own-row input { flex: 1; min-width: 0; }
.own-row .btn { width: auto; flex: none; padding: 8px 18px; }
.sec-note { margin-top: 4px; }
.form-card h2 { font-size: 21px; }
.big .pic { display: block; font-size: 64px; line-height: 1.2; }
.note.thinking b { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .note.thinking b { animation: none; } }

/* Бриллианты и награды */
.badge.gem { background: var(--sky-soft); color: #23566a; }
.badge.gem.big { font-size: 18px; padding: 6px 14px; }
.topbar .spacer { flex: 1; }
.reward-row { display: flex; align-items: center; gap: 14px; }
.reward-emoji {
  width: 64px; height: 64px; flex: none;
  display: grid; place-items: center;
  font-size: 36px;
  background: var(--sun-soft);
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
}
.reward-emoji.sm { width: 44px; height: 44px; font-size: 24px; }
.reward-wait { background: var(--green-soft); border-color: #b9dccb; }
.gems-earned { font-family: var(--serif); font-size: 30px; font-weight: 700; color: #23566a; }
.chip.emoji-chip { padding: 6px 12px; font-size: 22px; }
.btn.inline { width: auto; flex: none; padding: 8px 16px; }
.topic .link { padding: 4px; }
.card .progress { flex: none; width: 100%; }
.combo { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--sun-soft); color: #8a5d00; letter-spacing: 0; text-transform: none; }
.record { font-weight: 800; color: #8a5d00; }

/* Разговор с персонажем */
.mascot.sm { width: 64px; height: 64px; }
.mascot.xl { width: 190px; height: 190px; }
.talk-card { background: var(--sun-soft); border-color: #f0dfae; }
.talk-card .mascot { background: #fff8e6; }
.talk-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; }
.talk-stage.speaking .mascot { animation: bob .5s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-6px) rotate(-2deg); } }
.bubble {
  position: relative;
  width: 100%;
  min-height: 72px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.bubble::before {
  content: "";
  position: absolute; top: -9px; left: 50%;
  width: 16px; height: 16px;
  background: var(--paper);
  border-left: 1.5px solid var(--line); border-top: 1.5px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.dots { display: inline-flex; gap: 6px; padding: 10px 0; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); animation: pulse 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
.talk-controls { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 6px; }
.talk-controls .own-row, .talk-controls .btn { width: 100%; }
.talk-controls .own-row .btn { width: auto; }
.talk-heard { min-height: 26px; color: var(--muted); text-align: center; font-size: 18px; }
.talk-status { font-weight: 700; text-align: center; }
.mic-btn {
  width: 112px; height: 112px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--brand); color: #fff;
  box-shadow: 0 6px 0 var(--brand-dark);
  cursor: pointer;
}
.mic-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--brand-dark); }
.mic-btn:disabled { background: #d9cdb6; box-shadow: 0 6px 0 #c3b59a; cursor: default; }
.mic-btn.listening { background: var(--green); box-shadow: 0 6px 0 #1f4d40; animation: ring 1.2s ease-out infinite; }
.mic-btn:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
/* Пока микрофон включается, кнопка приглушена: говорить ещё рано */
.mic-btn.listening:not(.ready) { animation: none; opacity: .6; }
@keyframes ring { 0% { outline: 0 solid rgba(47,107,90,.5); } 100% { outline: 18px solid rgba(47,107,90,0); } }
.talk-log { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.talk-log .child { color: var(--ink); }
.talk-log .pet { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .talk-stage.speaking .mascot, .mic-btn.listening, .dots i { animation: none; } }
.talk-controls input[type=text] {
  min-height: 52px;
  padding: 10px 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.talk-controls input[type=text]:focus { outline: none; border-color: var(--green); }

/* Живые персонажи: моргают, машут крыльями и антеннами, мигают лампочками */
.p-eyes, .p-sway, .p-tail, .p-wing-l, .p-wing-r, .p-glow { transform-box: fill-box; }
.p-eyes { transform-origin: center; animation: blink 4.2s infinite; }
.p-sway { transform-origin: center bottom; animation: sway 2.4s ease-in-out infinite alternate; }
.p-wing-l { transform-origin: right bottom; animation: flap-l .9s ease-in-out infinite alternate; }
.p-wing-r { transform-origin: left bottom; animation: flap-r .9s ease-in-out infinite alternate; }
.p-tail { transform-origin: left bottom; animation: wag 1.3s ease-in-out infinite alternate; }
.p-glow { animation: glow 1.4s ease-in-out infinite alternate; }
@keyframes blink { 0%, 91%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes sway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes flap-l { from { transform: rotate(8deg); } to { transform: rotate(-14deg); } }
@keyframes flap-r { from { transform: rotate(-8deg); } to { transform: rotate(14deg); } }
@keyframes wag { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }
@keyframes glow { from { opacity: .45; } to { opacity: 1; } }

/* Руки и рты персонажей */
.p-arm-l, .p-arm-r, .p-mouth-open { transform-box: fill-box; }
.p-arm-l, .p-arm-r { transform-origin: center top; }
.p-mouth-open { transform-origin: center; opacity: 0; }
.talking .p-mouth, .speaking .p-mouth { opacity: 0; }
.talking .p-mouth-open, .speaking .p-mouth-open { animation: yap .26s ease-in-out infinite alternate; }
.pet-card[aria-pressed=true] .p-arm-r, .pet-card:hover .p-arm-r, .home-hero .p-arm-r { animation: wave .45s ease-in-out infinite alternate; }
.talking .p-arm-l, .speaking .p-arm-l { animation: wave-l .5s ease-in-out infinite alternate; }
.talking .p-wing-l, .talking .p-wing-r, .speaking .p-wing-l, .speaking .p-wing-r { animation-duration: .35s; }
@keyframes yap { from { opacity: 1; transform: scaleY(.25); } to { opacity: 1; transform: scaleY(1.15); } }
@keyframes wave { from { transform: rotate(-105deg); } to { transform: rotate(-150deg); } }
@keyframes wave-l { from { transform: rotate(20deg); } to { transform: rotate(60deg); } }
