/* Дивоурок — сайт-вітрина. Той самий світ, що й у застосунку: папір, калина, вишиті зірки. */
@font-face { font-family: 'Nunito'; src: url('../fonts/Nunito-VF.woff2?v=361d3613') format('woff2'), url('../fonts/Nunito.ttf') format('truetype'); font-weight: 200 1000; font-display: swap; }

:root {
  --paper: #FBF6EC;
  --paper-2: #F3EADA;
  --paper-3: #EADFCB;
  --ink: #2A1714;
  --ink-2: #4B3A33;
  --muted: #7A6A60;
  --line: #E6DAC7;
  --red: #C8341F;
  --red-dark: #A92A18;
  --yellow: #F2B530;
  --night: #1B2D52;
  --night-2: #243B69;
  --green: #2E7D4F;
  --radius: 22px;
  --shadow: 0 2px 0 rgba(42, 23, 20, .06), 0 18px 40px -22px rgba(42, 23, 20, .35);
  --wrap: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; font-size: 18px; line-height: 1.55; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

/* ---------- вишита лінія: головний декоративний елемент бренду ---------- */
.stitch { height: 12px; background:
  linear-gradient(45deg, var(--red) 25%, transparent 25%, transparent 75%, var(--red) 75%) 0 0 / 12px 12px,
  linear-gradient(45deg, var(--red) 25%, transparent 25%, transparent 75%, var(--red) 75%) 6px 6px / 12px 12px;
  opacity: .9; }
.stitch.gold { background:
  linear-gradient(45deg, var(--yellow) 25%, transparent 25%, transparent 75%, var(--yellow) 75%) 0 0 / 12px 12px,
  linear-gradient(45deg, var(--yellow) 25%, transparent 25%, transparent 75%, var(--yellow) 75%) 6px 6px / 12px 12px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 900; font-size: 1.02em; text-decoration: none; padding: 16px 28px; border-radius: 16px; border: none; cursor: pointer; background: var(--red); color: #fff; box-shadow: 0 5px 0 var(--red-dark); transition: transform .1s, box-shadow .1s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--red-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--red-dark); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.btn.ghost:hover { box-shadow: 0 7px 0 var(--line); }
.btn.gold { background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 #C68E14; }
.btn.small { padding: 10px 18px; font-size: .9em; border-radius: 12px; box-shadow: 0 4px 0 var(--red-dark); }
.btn.small.ghost { box-shadow: 0 4px 0 var(--line); }
.btn svg { width: 1.2em; height: 1.2em; }

.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: .78em; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.kicker::before { content: ''; width: 10px; height: 10px; background: var(--red); box-shadow: 14px 0 0 var(--yellow); margin-right: 14px; }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section-head { max-width: 720px; display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; align-items: center; }
.h2 { font-weight: 900; font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -.01em; }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-2); max-width: 60ch; }

/* ---------- шапка ---------- */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: rgba(251, 246, 236, .9); backdrop-filter: blur(10px); transition: box-shadow .2s; }
.header.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(42, 23, 20, .4); }
.header .wrap { display: flex; align-items: center; gap: 28px; height: 76px; }
.header .logo img { height: 38px; width: auto; }
.nav { display: flex; gap: 26px; flex: 1; }
.nav a { text-decoration: none; font-weight: 800; color: var(--ink-2); font-size: .95em; white-space: nowrap; }
@media (min-width: 921px) and (max-width: 1120px) { .header .wrap { gap: 18px; } .nav { gap: 16px; } .nav a { font-size: .88em; } .header .actions .btn.small { padding: 9px 14px; } }
.nav a:hover { color: var(--red); }
.header .actions { display: flex; gap: 10px; }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: none; background: var(--paper-2); cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2.5px; background: var(--ink); margin: 0 auto; position: relative; border-radius: 2px; transition: transform .2s; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; }
.burger span::before { top: -7px; } .burger span::after { top: 7px; }
@media (max-width: 920px) {
  .burger { display: block; }
  .nav, .header .actions { display: none; }
  .header.open .nav, .header.open .actions { display: flex; }
  .header.open .wrap { flex-wrap: wrap; height: auto; padding-block: 14px; }
  .header.open .nav { order: 3; flex-basis: 100%; flex-direction: column; gap: 14px; padding: 8px 0; }
  .header.open .actions { order: 4; flex-basis: 100%; padding-bottom: 8px; }
  .header.open .actions .btn { flex: 1; }
}

/* ---------- перший екран ---------- */
.hero { position: relative; padding-block: clamp(36px, 6vw, 84px) clamp(56px, 8vw, 110px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-weight: 900; font-size: clamp(40px, 6vw, 76px); letter-spacing: -.02em; margin: 16px 0 20px; }
.hero h1 .accent { color: var(--red); position: relative; white-space: nowrap; }
.hero h1 .accent::after { content: ''; position: absolute; left: 0; right: 0; bottom: .04em; height: .16em; background: var(--yellow); z-index: -1; border-radius: 3px; opacity: .8; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 28px; font-weight: 800; font-size: .88em; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust span::before { content: ''; width: 8px; height: 8px; background: var(--green); transform: rotate(45deg); }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } }


/* паперові прикраси */
.deco { position: absolute; pointer-events: none; z-index: 0; filter: drop-shadow(0 6px 8px rgba(42, 23, 20, .15)); animation: float 7s ease-in-out infinite; }
.deco.d2 { animation-duration: 9s; animation-delay: -2s; } .deco.d3 { animation-duration: 11s; animation-delay: -5s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }
.hero .wrap > * { position: relative; z-index: 1; }
@media (max-width: 720px) {
  .deco { display: none; }
  .hero .deco.d3 { display: block; width: 58px !important; right: 3% !important; top: 14px !important; }
}

/* ---------- нічний блок: набір до 27 жовтня ---------- */
.night { background: var(--night); color: #F6EEDF; position: relative; overflow: hidden; }
.night::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 12% 20%, #F2B530 50%, transparent 51%), radial-gradient(1.5px 1.5px at 30% 70%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 55% 12%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 78% 40%, #F2B530 50%, transparent 51%), radial-gradient(2px 2px at 90% 85%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 42% 90%, #F2B530 50%, transparent 51%); opacity: .7; }
.night .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.night .kicker { color: var(--yellow); } .night .kicker::before { background: var(--yellow); box-shadow: 14px 0 0 #fff; }
.night .lead { color: #E3D6C2; }
.date-badge { display: inline-flex; flex-direction: column; align-items: center; background: var(--yellow); color: var(--ink); border-radius: 16px; padding: 10px 18px; font-weight: 900; line-height: 1; box-shadow: 0 5px 0 #C68E14; }
.date-badge b { font-size: 40px; } .date-badge span { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.epochs { list-style: none; padding: 0; margin: 28px 0 32px; display: flex; flex-direction: column; gap: 0; position: relative; }
.epochs::before { content: ''; position: absolute; left: 21px; top: 10px; bottom: 10px; border-left: 3px dashed rgba(242, 181, 48, .5); }
.epochs li { display: grid; grid-template-columns: 46px 90px 1fr; align-items: center; gap: 12px; padding: 7px 0; position: relative; }
.epochs .dot { width: 46px; height: 46px; border-radius: 12px; background: var(--night-2); border: 2px solid rgba(242, 181, 48, .6); display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--yellow); z-index: 1; }
.epochs .yr { font-weight: 900; color: var(--yellow); }
.epochs .who { font-weight: 800; }
.epochs li.final .dot { background: var(--yellow); color: var(--ink); }
.laptop { position: relative; }
.laptop .lid { background: #0e1424; border-radius: 16px 16px 6px 6px; padding: 12px; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .7); }
.laptop .lid img { border-radius: 6px; }
.laptop .base { height: 16px; background: linear-gradient(#cfc6b6, #9f968a); border-radius: 0 0 14px 14px; margin: 0 -4%; }
@media (max-width: 920px) { .night .wrap { grid-template-columns: 1fr; } }

/* ---------- що всередині ---------- */
.inside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.feature { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.feature .pic { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.feature .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s; }
.feature:hover .pic img { transform: scale(1.03); }
.feature .body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 8px; }
.feature h3 { font-weight: 900; font-size: 1.35em; display: flex; align-items: center; gap: 10px; }
.feature h3 .tag { width: 34px; height: 34px; border-radius: 10px; background: #fdebe7; color: var(--red); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.feature h3 .tag svg { width: 20px; height: 20px; }
.feature p { color: var(--ink-2); }
.feature ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: .95em; }
.feature li { padding-left: 20px; position: relative; }
.feature li::before { content: ''; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--red); }
@media (max-width: 760px) { .inside { grid-template-columns: 1fr; } }

/* ---------- як це працює ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { background: #fff; border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; gap: 10px; }
.step .n { width: 58px; height: 58px; border-radius: 16px; background: var(--red); color: #fff; font-weight: 900; font-size: 28px; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 0 var(--red-dark); margin-bottom: 8px; }
.step h3 { font-weight: 900; font-size: 1.3em; }
.step p { color: var(--ink-2); }
.step:not(:last-child)::after { content: ''; position: absolute; right: -24px; top: 58px; width: 24px; border-top: 3px dashed var(--line); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .step:not(:last-child)::after { display: none; } }

/* ---------- чому / безпечно ---------- */
.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.why .item { padding: 26px 24px; border-radius: var(--radius); background: var(--paper-2); display: flex; flex-direction: column; gap: 10px; }
.why .item img { width: 64px; height: 64px; object-fit: contain; }
.why h3 { font-weight: 900; font-size: 1.15em; }
.why p { color: var(--ink-2); font-size: .95em; }
.why .item.safe { background: #E6F1E9; }
.why .item.facts { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 22px; background: #E7ECF6; }
.why .item.facts > div { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.why .facts-link { flex-shrink: 0; font-weight: 900; color: var(--red); text-decoration: none; white-space: nowrap; }
.why .facts-link:hover { text-decoration: underline; }
@media (max-width: 1000px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .why { grid-template-columns: 1fr; } .why .item.facts { flex-direction: column; align-items: flex-start; } }

/* ---------- ціна ---------- */
.pricing { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.price-card { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: clamp(26px, 4vw, 44px); display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; border: 3px solid var(--red); }
.price-card .ribbon { position: absolute; top: 22px; right: -44px; transform: rotate(35deg); background: var(--yellow); font-weight: 900; font-size: .8em; padding: 6px 54px; }
.price-card h3 { font-weight: 900; font-size: 1.6em; }
.price { display: flex; align-items: baseline; gap: 10px; }
.price b { font-size: clamp(52px, 6vw, 72px); font-weight: 900; color: var(--red); line-height: 1; }
.price span { font-weight: 800; color: var(--muted); }
.price-card .early { background: #fff3d6; color: #6b4a00; border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: .95em; margin-top: -6px; }
.price-card .early b { color: var(--red); }
.checks[hidden] { display: none; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { padding-left: 34px; position: relative; font-weight: 700; }
.checks li::before { content: ''; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 7px; background: #E6F1E9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7D4F' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat; }
.price-card .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.price-note { font-size: .88em; color: var(--muted); }
.price-note a { color: inherit; }
.price-note.err { color: var(--red); font-weight: 800; }
.preorder { display: flex; flex-direction: column; gap: 14px; border-top: 2px dashed var(--line); padding-top: 20px; margin-top: 4px; }
.preorder-lead { font-weight: 700; }
.preorder label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: .92em; min-width: 0; }
.preorder label small { font-weight: 700; color: var(--muted); }
.preorder input:not([type=radio]), .preorder textarea { font: inherit; font-weight: 600; font-size: 1rem; padding: 13px 15px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); width: 100%; resize: vertical; }
.preorder input:focus, .preorder textarea:focus { outline: none; border-color: var(--red); background: #fff; }
.preorder input[aria-invalid=true] { border-color: var(--red); }
.preorder-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.preorder fieldset { border: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.preorder legend { font-weight: 800; font-size: .92em; padding: 0; margin-bottom: 6px; }
.preorder .chip { position: relative; }
.preorder .chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.preorder .chip span { display: block; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 800; }
.preorder .chip input:checked + span { border-color: var(--red); background: #FBE4DF; color: var(--red-dark); }
.preorder .chip input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.preorder .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.preorder .btn[disabled] { opacity: .6; cursor: wait; }
.preorder-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; border-top: 2px dashed var(--line); padding-top: 22px; }
.preorder[hidden], .preorder-done[hidden] { display: none; }
.preorder-done h4 { font-weight: 900; font-size: 1.4em; color: var(--green); }
@media (max-width: 560px) { .preorder-row { grid-template-columns: 1fr; } .preorder .cta .btn { flex: 1 1 100%; } }
.soon-card { background: var(--night); color: #F6EEDF; border-radius: 28px; padding: clamp(26px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.soon-card h3 { font-weight: 900; font-size: 1.5em; }
.soon-card p { color: #E3D6C2; }
.soon-list { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.soon-list div { display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 12px 14px; font-weight: 800; }
.soon-list img { width: 42px; height: 42px; object-fit: contain; }
.soon-list small { display: block; font-weight: 700; color: #cbbca6; font-size: .8em; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

/* ---------- питання ---------- */
.faq { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 4px 24px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 900; font-size: 1.08em; padding: 18px 40px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 4px; top: 50%; width: 14px; height: 14px; border-right: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-2); }

/* ---------- фінальний заклик ---------- */
.final-cta { background: var(--red); color: #fff; border-radius: 36px; padding: clamp(36px, 6vw, 70px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 48px); align-items: center; position: relative; overflow: hidden; }
.final-cta canvas { width: 150px; height: 150px; background: var(--paper); border-radius: 28px; padding: 10px; }
.final-cta h2 { font-weight: 900; font-size: clamp(30px, 3.6vw, 46px); }
.final-cta p { color: #FFE3D8; margin-top: 10px; font-size: 1.05em; }
.final-cta .btn.gold { box-shadow: 0 5px 0 #9A6A0F; }
@media (max-width: 860px) { .final-cta { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* ---------- підвал ---------- */
.footer { background: var(--ink); color: #E8DCCB; padding-block: 56px 36px; margin-top: clamp(64px, 9vw, 120px); }
.footer .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer img.logo { height: 40px; width: auto; }
.footer h4 { margin: 0 0 12px; font-size: .8em; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.footer a { color: #F6EEDF; text-decoration: none; font-weight: 700; }
.footer a:hover { color: var(--yellow); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer .small { font-size: .85em; color: #B9A995; margin-top: 14px; }
.footer .bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85em; color: #B9A995; }
@media (max-width: 760px) { .footer .grid { grid-template-columns: 1fr; } }

/* ---------- юридичні сторінки ---------- */
.doc { max-width: 820px; margin: 0 auto; padding-block: 48px 20px; }
.doc h1 { font-weight: 900; font-size: clamp(32px, 4vw, 46px); margin: 12px 0 10px; }
.doc h2 { font-weight: 900; font-size: 1.35em; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--ink-2); margin-bottom: 10px; }
.doc .fill { background: #fff3d6; border-radius: 6px; padding: 0 6px; font-weight: 800; color: #8a5a00; }
.doc .note { background: var(--paper-2); border-left: 5px solid var(--yellow); border-radius: 10px; padding: 14px 18px; margin: 18px 0; }

/* ---------- поява при прокрутці (лише якщо JS увімкнено; без JS усе видно одразу) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deco { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .feature .pic img { transition: none; }
}
