/* Світлячок — сайт. Цвета из логотипа: ночь без света и тёплый жёлтый огонёк. */
:root {
  --night: #0F1B3D;
  --dusk: #22356E;
  --glow: #FFD23F;
  --ember: #FF9F1C;
  --wing: #9FD1FF;
  --day: #FFFBEF;
  --ink: #13204A;
  --ink-soft: #4A5578;
  --line: #E8E1C8;
  --ok: #2E9E5B;
  --bad: #D9483B;
  --display: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --text: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: var(--text); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--day); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 600; font-family: var(--text); letter-spacing: 0; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 34em; }

/* --- кнопки --- */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .95em 1.5em; border-radius: 999px; font: 700 1rem/1 var(--text); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-glow { background: var(--glow); color: var(--night); box-shadow: 0 0 0 6px rgba(255, 210, 63, .18), 0 10px 30px -8px rgba(255, 180, 32, .7); }
.btn-glow:hover { background: #FFDC63; }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--dusk); }

/* --- шапка --- */
.top { position: absolute; inset: 0 0 auto; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font: 700 1.15rem var(--display); }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.top nav { display: flex; gap: 22px; align-items: center; }
.top nav a { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 600; font-size: .95rem; }
.top nav a:hover { color: #fff; }
@media (max-width: 720px) { .top nav a:not(.btn) { display: none; } .top .btn { padding: .7em 1.1em; } }

/* --- первый экран: вечер без света --- */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(180deg, transparent 75%, var(--night) 100%), radial-gradient(120% 90% at 70% 30%, #2E4E8F 0%, #16285A 45%, var(--night) 100%); padding: 120px 0 90px; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 30% 70%, #ffffffb0 50%, transparent 51%), radial-gradient(1.6px 1.6px at 55% 14%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 82% 80%, #ffffffa0 50%, transparent 51%), radial-gradient(1.4px 1.4px at 92% 30%, #fff 50%, transparent 51%), radial-gradient(1.1px 1.1px at 45% 88%, #ffffff90 50%, transparent 51%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { color: #D6E2FF; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.price-note { margin-top: 18px; color: #AFC0EE; font-size: .95rem; }
.price-note strong { color: var(--glow); font-size: 1.1rem; }
@media (max-width: 900px) { .hero { padding-top: 96px; } .hero .wrap { grid-template-columns: 1fr; gap: 28px; } }

.scene { position: relative; }
.scene svg { width: 100%; height: auto; }
.bubbles { position: relative; z-index: 1; margin: 0 0 -6% auto; width: min(320px, 82%); display: grid; gap: 10px; }
.bubble { background: #fff; color: var(--ink); border-radius: 18px 18px 18px 6px; padding: 10px 14px 8px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); font-size: .92rem; line-height: 1.35; }
.bubble b { display: block; font-size: .78rem; color: #3A7BD5; margin-bottom: 2px; }
.bubble time { display: block; text-align: right; font-size: .72rem; color: #8A93AD; margin-top: 2px; }
.bubble.late { opacity: 0; transform: translateY(10px); animation: arrive .6s ease 1.6s forwards; }
@keyframes arrive { to { opacity: 1; transform: none; } }
.glow-pulse { animation: pulse 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes pulse { 50% { opacity: .55; } }

/* --- разделы --- */
section { padding: clamp(64px, 9vw, 110px) 0; }
.section-dusk { background: linear-gradient(180deg, var(--night) 0%, var(--dusk) 100%); color: #fff; }
.section-dusk .lead, .section-dusk p { color: #D6E2FF; }
.section-glow { background: var(--glow); }
.section-day { background: var(--day); }

/* шаги — это действительно последовательность, поэтому с номерами */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 1.2rem var(--display); color: var(--night); background: var(--glow); box-shadow: 0 0 24px rgba(255, 210, 63, .55); }
.steps h3 { color: #fff; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 26px; } }

/* умения — список с маленькими значками, не карточки */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 56px; margin-top: 36px; }
.skill { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.skill .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--night); display: grid; place-items: center; font-size: 26px; }
.skill p { margin: 0; color: #3B3A1F; }
.skill h3 { margin-bottom: .25em; }
@media (max-width: 760px) { .skills { grid-template-columns: 1fr; } }

/* размер */
.size { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.size svg { width: 100%; height: auto; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts li span:last-child { font-weight: 700; text-align: right; }
.small { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 860px) { .size { grid-template-columns: 1fr; } }

/* почему */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 24px; overflow: hidden; border: 2px solid var(--ink); margin-top: 32px; }
.why > div { padding: 28px; }
.why > div:first-child { background: #fff; }
.why > div:last-child { background: var(--night); color: #fff; }
.why ul { margin: 0; padding-left: 1.2em; }
.why li { margin-bottom: .5em; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }

/* вопросы */
.faq { max-width: 780px; margin-top: 28px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font: 400 1.6rem var(--display); color: var(--ember); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin: 0 0 18px; max-width: 64ch; }

/* заказ */
.order { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.order-side p { max-width: 30em; }
.order-side .alt { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .2); }
form { background: #fff; color: var(--ink); border-radius: 28px; padding: clamp(22px, 4vw, 36px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field textarea, .field select { width: 100%; font: inherit; color: var(--ink); padding: 12px 14px; border: 2px solid #D8DCEA; border-radius: 14px; background: #FBFCFF; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--dusk); background: #fff; }
.field textarea { min-height: 84px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); margin: 6px 0 20px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--dusk); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-top: 14px; font-weight: 600; }
.form-msg.ok { color: var(--ok); }
.form-msg.bad { color: var(--bad); }
.done { text-align: center; padding: 30px 10px; }
.done .big { font-size: 56px; }
@media (max-width: 900px) { .order { grid-template-columns: 1fr; gap: 32px; } }

/* подвал */
footer { background: var(--night); color: #AFC0EE; padding: 40px 0; font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: #fff; text-decoration: none; }
footer a:hover { text-decoration: underline; }

[hidden] { display: none !important; }

/* --- страница инструкции --- */
.doc-hero { background: radial-gradient(120% 120% at 80% 0%, #2E4E8F 0%, var(--night) 70%); color: #fff; padding: 120px 0 56px; }
.doc-hero .lead { color: #D6E2FF; }
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 56px 0 90px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: .95rem; }
.toc ol { padding-left: 1.2em; margin: 0; }
.toc li { margin-bottom: .55em; }
.toc a { text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--ink); }
.doc article { max-width: 70ch; }
.doc article h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 1.6em; scroll-margin-top: 20px; }
.doc article h2:first-child { margin-top: 0; }
.doc article ol, .doc article ul { padding-left: 1.3em; }
.doc article li { margin-bottom: .6em; }
.note { background: #FFF3C4; border-left: 5px solid var(--ember); padding: 14px 18px; border-radius: 0 14px 14px 0; margin: 1.2em 0; }
.leds { width: 100%; border-collapse: collapse; margin: 1em 0; }
.leds td, .leds th { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 8px; }
.dot.blue { background: #3A7BFF; box-shadow: 0 0 10px #3A7BFF; }
.dot.blink { background: #3A7BFF; animation: blink .5s steps(2) infinite; }
.dot.off { background: #C9CEDC; }
.dot.red { background: #E5483B; box-shadow: 0 0 8px #E5483B; }
@keyframes blink { 50% { opacity: .15; } }
kbd { font: 600 .9em var(--text); background: #EEF1FA; border: 1px solid #CBD2E6; border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; } }
.section-day.flush { padding-top: 0; }
