/* Утренние привычки — сайт. Мобильная вёрстка в первую очередь, палитра как в Mini App. */

:root {
  --bg: #e8f0fe;
  --orange: #f5a623;
  --orange-soft: #fdebc8;
  --navy: #1b2436;
  --ink: #1b2436;
  --muted: rgba(27, 36, 54, 0.72);
  --card: #ffffff;
  --green: #4caf7d;
  --wait: #c9d6e8;
  --radius: 24px;
  --gutter: clamp(16px, 5vw, 32px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

svg {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Шапка --- */

.topbar {
  padding-block: 14px;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  text-decoration: none;
}

.brand__logo {
  width: 36px;
  height: 36px;
  flex: none;
}

/* --- Кнопки --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--navy);
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(245, 166, 35, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(245, 166, 35, 0.45);
}

.btn:active {
  transform: scale(0.98);
}

.btn--small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.95rem;
  box-shadow: none;
}

.btn--big {
  width: 100%;
  min-height: 66px;
  padding: 0 28px;
  font-size: 1.25rem;
}

.btn__icon {
  width: 26px;
  height: 26px;
  flex: none;
}

/* --- Главная: первый экран --- */

.hero {
  padding-block: 20px 44px;
  overflow-x: clip; /* только по горизонтали: тень макета внизу не должна обрезаться */
}

.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 8vw, 3.75rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 16px;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  line-height: 1.3;
  font-weight: 700;
}

.hero__intro {
  margin: 0 0 28px;
  color: var(--muted);
}

/* Макет экрана ритуала — тот же вид, что в Mini App */

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 8px;
}

.phone {
  position: relative;
  width: min(270px, 74vw);
  padding: 10px;
  border-radius: 38px;
  background: var(--navy);
  box-shadow: 0 26px 60px rgba(27, 36, 54, 0.28);
  transform: rotate(-3deg);
}

.phone__screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 26px 14px 28px;
  border-radius: 29px;
  background: var(--bg);
}

.phone__frame {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1336 / 720;
  border: 8px solid var(--orange);
  border-radius: 20px;
  background: var(--navy);
  font-size: 46px;
  line-height: 1;
}

.phone__dots {
  display: flex;
  align-items: center;
  gap: 12px;
}

.d {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px #cfd4de;
}

.d--done {
  background: var(--orange);
  box-shadow: none;
}

.d--cur {
  background: var(--orange);
  transform: scale(1.3);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--orange);
  margin-inline: 3px;
}

.phone__buttons {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  transform: translateX(6px);
}

.phone__ok,
.phone__wait {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.phone__ok {
  width: 84px;
  height: 84px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(76, 175, 125, 0.35);
}

.phone__ok svg {
  width: 58%;
  height: 58%;
}

.phone__wait {
  width: 54px;
  height: 54px;
  background: var(--wait);
  color: #4b5563;
}

.phone__wait svg {
  width: 58%;
  height: 58%;
}

/* Конфетти вокруг макета — статичное украшение */

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  width: 12px;
  height: 18px;
  border-radius: 3px;
  background: var(--orange);
}

.confetti i:nth-child(1) { top: 6%;  left: 14%; transform: rotate(24deg); }
.confetti i:nth-child(2) { top: 14%; right: 12%; background: var(--green); transform: rotate(-38deg); }
.confetti i:nth-child(3) { top: 40%; left: 4%;  background: #ff6b81; width: 14px; height: 14px; border-radius: 50%; }
.confetti i:nth-child(4) { top: 52%; right: 4%; background: #4dabf7; transform: rotate(52deg); }
.confetti i:nth-child(5) { bottom: 12%; left: 10%; background: #b388ff; transform: rotate(-20deg); }
.confetti i:nth-child(6) { bottom: 6%; right: 16%; background: #ffd43b; width: 14px; height: 14px; border-radius: 50%; }
.confetti i:nth-child(7) { top: 26%; left: 24%; background: #4dabf7; width: 10px; height: 10px; border-radius: 50%; }
.confetti i:nth-child(8) { bottom: 26%; right: 6%; background: var(--orange); transform: rotate(34deg); }

/* --- Разделы --- */

.section {
  padding-block: 28px;
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(1.65rem, 5.5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.steps,
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.steps {
  counter-reset: step;
}

.step,
.features li,
.price {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 6px 20px rgba(27, 36, 54, 0.07);
}

/* На телефоне номер слева, текст справа — карточка компактнее; на широком экране номер сверху */
.step {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
  padding: 20px;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--navy);
  font-weight: 900;
  font-size: 1.2rem;
}

.step__icon {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 30px;
  line-height: 1;
}

.step p {
  margin: 0;
  padding-right: 40px;
}

.features li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
}

.features li p {
  margin: 0;
  min-width: 0;
}

.features li::before {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.25L9.5 16.75L19 7.25' fill='none' stroke='%231b2436' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 62% no-repeat;
}

.prices {
  display: grid;
  gap: 16px;
}

.price {
  padding: 26px 24px;
  border-radius: 28px;
}

.price--trial {
  border: 4px solid var(--orange);
  padding: 22px 20px;
}

.price p {
  margin: 0;
}

.price__head {
  margin-bottom: 8px !important;
  font-size: 1.25rem;
  line-height: 1.3;
}

.num {
  font-size: 1.9em;
  font-weight: 900;
  line-height: 1;
}

.cta {
  margin: 32px 0 0;
  text-align: center;
}

/* --- Подвал --- */

.footer {
  margin-top: 32px;
  padding-block: 32px 40px;
  background: var(--navy);
  color: #dfe6f5;
  font-size: 0.95rem;
}

.footer p {
  margin: 0 0 10px;
}

.footer a {
  color: #fff;
  text-underline-offset: 3px;
}

.footer__req {
  color: #b9c3da;
}

/* --- Заглушки [..]: видны при заполнении реквизитов --- */

.ph {
  padding: 0 3px;
  border-bottom: 2px dashed var(--orange);
  border-radius: 4px;
  background: rgba(245, 166, 35, 0.2);
}

.footer .ph {
  color: #fff;
  background: rgba(245, 166, 35, 0.25);
}

/* --- Документы (оферта, политика) --- */

.doc {
  padding-block: 8px 24px;
}

.doc__body {
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(20px, 5vw, 52px);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 6px 20px rgba(27, 36, 54, 0.07);
}

.doc h1 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 5.6vw, 2.3rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.doc h2 {
  margin: 2em 0 0.6em;
  font-size: clamp(1.15rem, 3.8vw, 1.45rem);
  scroll-margin-top: 16px;
}

.doc p {
  margin: 0 0 0.9em;
}

.doc ul {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.doc li {
  margin-bottom: 0.35em;
}

.doc__meta {
  color: var(--muted);
  margin-bottom: 1.4em !important;
}

.n {
  margin-right: 0.15em;
  font-weight: 700;
  color: var(--muted);
}

.doc a {
  text-underline-offset: 3px;
}

.requisites {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--bg);
}

/* --- Широкие экраны --- */

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .features,
  .prices {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn--big {
    width: auto;
    min-width: 320px;
  }
}

@media (min-width: 860px) {
  body {
    font-size: 18px;
  }

  .hero {
    padding-block: 28px 64px;
  }

  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
  }

  .phone {
    width: 300px;
  }

  .section {
    padding-block: 40px;
  }
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .step {
    display: block;
    padding: 22px;
  }

  .step::before {
    margin-bottom: 14px;
  }

  .step__icon {
    top: 18px;
    right: 20px;
    font-size: 34px;
  }

  .step p {
    padding-right: 0;
  }
}

/* --- Узкие телефоны --- */

@media (max-width: 379px) {
  .brand__name {
    font-size: 0.95rem;
  }

  .brand {
    gap: 8px;
  }

  .btn--small {
    padding: 0 14px;
  }
}

@media (max-width: 339px) {
  .brand__name {
    display: none; /* остаётся логотип: название сразу под ним, в заголовке */
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .skip,
  .footer__links {
    display: none;
  }

  .doc__body {
    box-shadow: none;
    padding: 0;
  }
}
