/* ==========================================================================
   Дивопринт — сайт-заглушка
   ========================================================================== */

:root {
  --bg: #0F0E13;
  --card: rgba(26, 25, 32, .88);
  --field: #121117;
  --line: #34333D;
  --line-2: #2E2D36;
  --text: #fff;
  --text-2: #C9C8D3;
  --text-3: #A09FAC;
  --muted: #8E8D9C;
  --cyan: #00A8E8;
  --violet: #7B2FBE;
  --pink: #E5177B;
  --orange: #FF6B00;
  --ok: #3DD68C;
  --bad: #FF5C7A;
  --grad: linear-gradient(90deg, var(--pink), var(--orange));
  --grad-4: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink), var(--orange));
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--body); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 16px;
  background: #fff; color: #111; border-radius: 10px; font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── Каркас ─────────────────────────────────────────────────────────── */

.page { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

.topbar {
  position: relative; z-index: 3; padding: 9px 16px; text-align: center;
  background: var(--grad-4); font-size: 14px; font-weight: 700;
}
.topbar a { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

.blobs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; opacity: .55;
  animation: float 14s ease-in-out infinite; will-change: transform;
}
.blob--pink   { width: 640px; height: 640px; top: 60px; right: -220px; background: radial-gradient(circle, #C0126A 0%, transparent 68%); }
.blob--blue   { width: 560px; height: 560px; bottom: -200px; left: -220px; background: radial-gradient(circle, #0077B6 0%, transparent 68%); animation-duration: 12s; animation-direction: reverse; }
.blob--violet { width: 380px; height: 380px; top: 45%; left: 40%; background: radial-gradient(circle, #5B1F9E 0%, transparent 68%); animation-duration: 17s; }

.main {
  position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: clamp(28px, 6vw, 90px) clamp(16px, 4vw, 20px) 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(40px, 5vw, 72px); align-items: start;
}

/* ── Левая колонка ──────────────────────────────────────────────────── */

.hero { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px); min-width: 0; container-type: inline-size; }

.brand { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 18px); }
.brand__emblem { width: clamp(64px, 11vw, 96px); height: auto; flex: 0 0 auto; }
.brand__name { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 3.4vw, 32px); letter-spacing: .08em; line-height: 1; }
.brand__tag { margin-top: 8px; font-size: clamp(13px, 1.5vw, 15px); color: var(--text-2); }
.brand__for { margin-top: 2px; font-size: clamp(12px, 1.4vw, 14px); color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.brand__for i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.c1 { background: var(--cyan); } .c2 { background: var(--violet); } .c3 { background: var(--pink); } .c4 { background: var(--orange); }

.status {
  display: flex; align-items: center; gap: 10px; color: #FF8A1F;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: #FF8A1F; animation: pulse 1.6s ease-in-out infinite; }

.title {
  margin: 0; font-family: var(--display); font-weight: 900;
  font-size: clamp(26px, 9.6cqi, 68px); line-height: 1.08; letter-spacing: -.01em;
  text-wrap: balance; hyphens: none; overflow-wrap: normal; word-break: keep-all;
}
.grad {
  background: linear-gradient(90deg, #00A8E8, #7B2FBE, #E5177B, #FF6B00, #E5177B, #7B2FBE, #00A8E8);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shift 6s linear infinite;
}

.lead { margin: 0; max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--text-2); text-wrap: pretty; }

.cta, .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; max-width: 600px; }
.cta .btn--vk:nth-child(3) { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 14px 20px; border-radius: 999px; border: 0; cursor: pointer; white-space: nowrap;
  font-weight: 800; font-size: 17px; text-decoration: none; color: #fff;
  transition: filter .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn--grad { background: var(--grad); }
.btn--grad:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(229, 23, 123, .35); }
.btn--line { border: 2px solid #4A4955; background: transparent; }
.btn--tg:hover { border-color: var(--cyan); }
.btn--vk:hover { border-color: #4C8BF5; }
.btn--sm { min-height: 48px; padding: 12px 24px; font-size: 15px; }
.btn--line.btn--sm:hover { border-color: var(--orange); }

/* Режим работы и адрес — две одинаковые карточки по ширине кнопок */
.fact {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 18px;
  border-radius: 18px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
  text-decoration: none; transition: border-color .2s, background .2s;
}
a.fact:hover { border-color: #4A4955; background: rgba(255, 255, 255, .06); }
.fact__icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad-4) border-box;
  border: 2px solid transparent;
}
.fact__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fact__label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fact__value { font-size: 16px; font-weight: 700; line-height: 1.35; color: #fff; }

/* ── Форма ──────────────────────────────────────────────────────────── */

.card {
  min-width: 0; padding: clamp(20px, 3vw, 32px); border-radius: 24px;
  background: var(--card); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  scroll-margin-top: 16px;
}

.form { display: flex; flex-direction: column; gap: 20px; }
.form__title { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 22px; }
.form__sub { margin: 0; font-size: 15px; color: var(--text-3); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

/* Переключатель «Вопрос / Просчёт» — работает и без JS */
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px;
}
.seg input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px;
  border-radius: 999px; font-weight: 800; font-size: 14.5px; color: var(--text-3); cursor: pointer;
  transition: background .25s, color .25s;
}
.seg input:checked + label { background: #fff; color: #111; }
.seg input:focus-visible + label, .chips input:focus-visible + label { outline: 3px solid var(--cyan); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 8px; }
.chips label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 2px solid var(--line); color: var(--text-2);
  font-weight: 700; font-size: 14.5px; cursor: pointer; transition: all .2s;
}
.chips label::before { content: '+'; font-weight: 800; }
.chips input:checked + label { background: #fff; border-color: #fff; color: #111; }
.chips input:checked + label::before { content: '✓'; }

.label { font-size: 13px; font-weight: 800; color: var(--text-2); }
.label b { color: var(--pink); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field input, .field select, .field textarea, .link-input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--field); color: #fff; font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; line-height: 1.5; min-height: 110px; }
.field select option { background: #1A1920; }
.field input:focus, .field select:focus, .field textarea:focus, .link-input:focus-within {
  outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(229, 23, 123, .2);
}
::placeholder { color: #75747F; opacity: 1; }

.link-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--muted); }
.link-input svg { flex: 0 0 auto; }
.link-input input { flex: 1; min-width: 0; border: 0; outline: none; padding: 12px 0; background: transparent; color: #fff; font-size: 16px; }
.link-input.is-ok { border-color: #00B86B; }
.hint { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.hint.is-ok { color: var(--ok); }

.is-invalid, .field .is-invalid, .link-input.is-invalid { border-color: var(--bad) !important; }
.field-error { font-size: 13px; font-weight: 700; color: var(--bad); }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--text-3); cursor: pointer; }
.consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pink); cursor: pointer; }
.consent a { color: var(--text-2); text-underline-offset: 2px; }
.consent.is-invalid { color: var(--bad); }

.alert { padding: 12px 16px; border-radius: 12px; background: rgba(255, 92, 122, .12); border: 1px solid rgba(255, 92, 122, .4); color: #FFB3C1; font-size: 14.5px; font-weight: 600; }

.btn--submit { width: 100%; min-height: 56px; font-size: 16px; }
.btn--submit[disabled] { opacity: .7; cursor: progress; }
.btn--submit.is-loading::after {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite;
}

/* Поля «Просчёта»: показываются при выбранном режиме (CSS :has, а без него — через data-mode из JS) */
.calc-only, .calc-only-inline { display: none; }
.form:has(#mode-c:checked) .calc-only, .form[data-mode="calc"] .calc-only { display: flex; flex-direction: column; gap: 18px; }
.form:has(#mode-c:checked) .field.calc-only, .form[data-mode="calc"] .field.calc-only { gap: 6px; }
.form:has(#mode-c:checked) .calc-only-inline, .form[data-mode="calc"] .calc-only-inline { display: inline; }
.form:has(#mode-c:checked) .q-only, .form[data-mode="calc"] .q-only { display: none; }
.calc-only { animation: rise .35s ease both; }

/* Успешная отправка */
.done { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px 0; animation: rise .5s ease both; }
.done__icon {
  width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--orange));
  display: flex; align-items: center; justify-content: center; animation: drop .6s cubic-bezier(.3, 1.6, .5, 1) both;
}
.done__title { font-family: var(--display); font-weight: 700; font-size: 24px; }
.done__text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-2); }

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

.footer { position: relative; z-index: 2; border-top: 1px solid #24232B; }
.footer__in {
  max-width: 1200px; margin: 0 auto; padding: 22px 20px; display: flex; flex-wrap: wrap; gap: 12px 24px;
  justify-content: space-between; font-size: 13px; color: var(--muted);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { color: var(--text-2); text-decoration: none; }
.footer a:hover { color: var(--orange); }

/* ── Появление элементов ────────────────────────────────────────────── */

.reveal { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }

/* ==========================================================================
   Заставка: капля → взрыв краски → логотип → круг раскрывает страницу
   ========================================================================== */

.intro-screen { display: none; }

html.intro { overflow: hidden; }
html.intro .intro-screen {
  display: flex; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #17151F 0%, var(--bg) 70%);
}
html.intro .page {
  position: relative; z-index: 1001;
  clip-path: circle(0% at var(--cx, 50%) var(--cy, 50%));
  transition: clip-path 1.05s cubic-bezier(.7, 0, .25, 1);
}
html.intro.is-revealing .page { clip-path: circle(150% at var(--cx, 50%) var(--cy, 50%)); }
html.intro:not(.is-revealing) .reveal { animation-name: none; opacity: 0; }
html.intro.is-revealing .reveal { animation-delay: calc(var(--d, 0) * 90ms + 380ms); }

.intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.intro-logo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; pointer-events: none; }
.intro-emblem {
  width: clamp(150px, 30vmin, 240px); opacity: 0; transform: scale(.2) rotate(-25deg); filter: blur(10px);
}
.intro-screen.show-emblem .intro-emblem { animation: emblemIn .8s cubic-bezier(.2, 1.3, .35, 1) forwards; }
.intro-word {
  padding: 2px 4px;
  font-family: var(--display); font-weight: 500; font-size: clamp(22px, 5vmin, 38px);
  letter-spacing: .6em; margin-right: -.6em; opacity: 0;
  /* блик пробегает по буквам: градиент, обрезанный по тексту */
  background: linear-gradient(100deg, #fff 42%, #FFC38A 48%, #FF7BB8 52%, #fff 58%) 100% 0 / 300% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-screen.show-word .intro-word { animation: wordIn .9s cubic-bezier(.2, .8, .2, 1) forwards, shine 1.2s .3s ease-in-out forwards; }

.intro-skip {
  position: absolute; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: var(--text-3);
  font-size: 13px; font-weight: 700; cursor: pointer; opacity: 0; animation: fadeIn .4s .6s forwards;
}
.intro-skip:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* Кольцо цвета по краю раскрывающегося круга */
.intro-ring {
  position: fixed; z-index: 1002; left: var(--cx, 50%); top: var(--cy, 50%); width: 10px; height: 10px;
  margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, var(--cyan), var(--violet), var(--pink), var(--orange), var(--cyan));
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 66%, #000 70%, transparent 72%);
          mask: radial-gradient(circle, transparent 64%, #000 66%, #000 70%, transparent 72%);
  animation: ring 1.05s cubic-bezier(.7, 0, .25, 1) forwards;
}

/* ── Keyframes ──────────────────────────────────────────────────────── */

@keyframes float  { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(24px, -28px) scale(1.1); } }
@keyframes shift  { to { background-position: 200% 50%; } }
@keyframes pulse  { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes rise   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes drop   { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes emblemIn {
  0%   { opacity: 0; transform: scale(.2) rotate(-25deg); filter: blur(10px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
}
@keyframes wordIn {
  from { opacity: 0; letter-spacing: .6em; margin-right: -.6em; filter: blur(6px) drop-shadow(0 2px 12px rgba(15, 14, 19, .9)); }
  to   { opacity: 1; letter-spacing: .14em; margin-right: -.14em; filter: blur(0) drop-shadow(0 2px 12px rgba(15, 14, 19, .9)); }
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes ring  { 0% { transform: scale(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: scale(var(--ring-scale, 400)); opacity: 0; } }

/* ── Адаптив и доступность ─────────────────────────────────────────── */

@media (max-width: 560px) {
  .blob--pink { width: 420px; height: 420px; right: -200px; }
  .blob--blue { width: 380px; height: 380px; }
  .blob--violet { display: none; }
  .card { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(26, 25, 32, .96); }
  .btn { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
