/*
 * Заглушка корня forms.smartics.ru (01.10.2026): раскладка карточки,
 * мини-анкета, поле ссылки. Стиль (стекло, бегущая рамка, заголовок,
 * кнопка, логотип) — общий, в chrome.css. Подключается после chrome.css.
 */

:root {
  --sheet: #ffffff;
  --sheet-line: #e6e7ee;
  --check: #22c55e;
}
:root[data-theme="dark"] {
  --sheet: #2c2f35;
  --sheet-line: #3e424c;
  --check: #4ade80;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow-x: hidden;
}


/* ── карточка (стекло и рамка — chrome.css) ── */
.home {
  width: 100%;
  max-width: 500px;
  padding: 40px 36px 30px;
  text-align: center;
  border-radius: 24px;
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

/* ── бренд ── */
.home-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.home-logo {
  height: 40px;
}

/* ── мини-анкета: строки «заполняются», галочки дорисовываются ── */
.sheet {
  width: 210px;
  margin: 0 auto 26px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--sheet);
  border: 1px solid var(--sheet-line);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.25);
  /* наклон и покачивание — отдельными свойствами rotate/translate: transform
     занят анимацией появления (.home > *), и одно перебивало бы другое */
  rotate: -2.5deg;
}
.sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 22px;
}
.sheet-row + .sheet-row { margin-top: 8px; }
.sheet-box {
  flex: 0 0 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--sheet-line);
  display: grid;
  place-items: center;
}
.sheet-box svg { width: 12px; height: 12px; }
.sheet-box path {
  fill: none;
  stroke: var(--check);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: tick 6s ease-in-out infinite;
}
.sheet-line {
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--ring-1), var(--ring-3));
  opacity: 0.85;
  transform-origin: left;
  transform: scaleX(0);
  animation: fill 6s ease-in-out infinite;
}
.sheet-row:nth-child(1) .sheet-line { width: 100%; }
.sheet-row:nth-child(2) .sheet-line { width: 78%; }
.sheet-row:nth-child(3) .sheet-line { width: 90%; }
.sheet-row:nth-child(2) * { animation-delay: 0.7s; }
.sheet-row:nth-child(3) * { animation-delay: 1.4s; }
@keyframes fill { 0%, 8% { transform: scaleX(0); } 25%, 85% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes tick { 0%, 20% { stroke-dashoffset: 20; } 32%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 20; } }

/* ── текст и поле ── */
.home h1 {
  font-size: 26px;
  margin: 0 0 12px;
}
.home p { margin: 0 0 10px; color: var(--muted); }
.home-form { display: flex; gap: 8px; margin: 22px 0 6px; }
.home-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-form button {
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
}
.home-error { min-height: 1.5em; margin: 0 !important; font-size: 14px; color: var(--danger) !important; }
.home-note { margin-top: 16px !important; font-size: 13px; }

/* появление по очереди */
.home > * { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
/* логотип и мини-анкета стоят на месте (01.10.2026): двигаются только строки и галочки внутри */
.home > :nth-child(2) { animation-delay: 0.08s; }
.home > :nth-child(3) { animation-delay: 0.16s; }
.home > :nth-child(4) { animation-delay: 0.24s; }
.home > :nth-child(5) { animation-delay: 0.32s; }
.home > :nth-child(6) { animation-delay: 0.40s; }
.home > :nth-child(7) { animation-delay: 0.48s; }

/* ── шапка: на компьютере — только кнопка темы в углу экрана ── */
/* шапка не занимает строку сетки body — карточка остаётся по центру */
.home-head { display: contents; }
.home-head-logo { display: none; }
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  box-shadow: var(--shadow);
}

@media (max-width: 440px) {
  .home { padding: 32px 20px 24px; border-radius: 20px; }
  .home-form { flex-direction: column; }
}

/* ── телефон (02.10.2026): логотип и тема — шапкой над карточкой, как в анкете;
   в карточке логотипа нет, бегущей рамки нет ── */
@media (max-width: 600px) {
  body { display: block; place-items: normal; padding: 0 16px 24px; }
  .home-head {
    /* во всю ширину: логотип слева, тема справа (justify-self — на случай сетки body) */
    width: 100%; justify-self: stretch;
    max-width: 500px; margin: 0 auto;
    padding: 14px 0 0;
    display: flex; align-items: center; justify-content: space-between;
  }
  .home-head-logo { display: block; height: 26px; }
  .theme-toggle { position: static; width: 40px; height: 40px; box-shadow: none; }
  .home { margin: 20px auto 0; }
  .home-brand { display: none; }
  .home::before { content: none; }
}

/* Движение — только если человек не просил его убрать. */
@media (prefers-reduced-motion: reduce) {
  .sheet-line { transform: scaleX(1); }
  .sheet-box path { stroke-dashoffset: 0; }
}
