:root {
  --night: #1a1540; --night-2: #231d4a; --night-3: #2c2560; --ink: #1c1733;
  --cream: #fff3dc; --cream-2: #efd6ac; --yellow: #ffd66b; --pink: #ff8fab; --teal: #6fd0c2;
  --muted: #a9a0dc; --line: #3a3178; --bad: #ff8f8f;
  --disp: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--cream); font: 500 17px/1.6 var(--body);
  background: var(--night) linear-gradient(180deg, #17123a 0, #231d4a 60%, #1a1540 100%) fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--disp); margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

/* nav */
.nav { display: flex; align-items: center; gap: 24px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px var(--disp); letter-spacing: .04em; }
.brand img { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); }
.nav nav { display: flex; gap: 24px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 700; }
.nav nav a:hover { color: var(--cream); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  font: 600 18px var(--disp); text-decoration: none; padding: 14px 26px; border-radius: 999px;
  border: 4px solid var(--ink); box-shadow: 0 5px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.sm { font-size: 15px; padding: 9px 18px; border-width: 3px; box-shadow: 0 4px 0 var(--ink); }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-dark { background: var(--night-3); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; border-color: var(--muted); }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 40px; padding-bottom: 80px; }
.tag { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin-bottom: 20px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 14px var(--yellow); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
h1 { font-size: clamp(46px, 6.6vw, 84px); font-weight: 700; letter-spacing: -.01em; }
h1 em { font-style: normal; color: var(--yellow); }
.lead { margin-top: 22px; color: var(--muted); font-size: 19px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.stats { display: flex; gap: 36px; margin: 40px 0 0; }
.stats dt { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stats dd { margin: 2px 0 0; font: 600 26px var(--disp); }

.building { max-width: 520px; margin: 0 auto; }
.roof { height: 30px; margin: 0 -14px; background: #4a3f9c; border: 5px solid var(--ink); border-radius: 12px; position: relative; z-index: 1; }
.wall {
  margin-top: -6px; padding: 26px 18px 14px; border: 5px solid var(--ink); border-radius: 0 0 18px 18px;
  background-color: #2e2766;
  background-image: linear-gradient(#383079 2px, transparent 2px), linear-gradient(90deg, #383079 2px, transparent 2px), linear-gradient(90deg, #383079 2px, transparent 2px);
  background-size: 60px 30px, 60px 60px, 60px 60px; background-position: 0 0, 0 0, 30px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.windows { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 2px; }
.win { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; transition: transform .12s; }
.win::before { content: ''; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 207, 122, .42), transparent); opacity: 0; transition: opacity .25s; }
.win.on::before { opacity: 1; }
.win:hover { transform: scale(1.05); }
.win:active { transform: scale(.97); }
.win svg { position: relative; display: block; width: 100%; height: 100%; }
.wall-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 3px dashed #453c8c; font: 600 15px var(--disp); color: var(--muted); }
.wall-foot b { color: var(--yellow); font-size: 20px; }
.wall-btns { display: flex; gap: 8px; }
.wall-btns button { font: 600 13px var(--disp); color: var(--cream); background: var(--ink); border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.wall-btns button:hover { background: #0f0c22; }
.hint { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; font-weight: 700; }

/* sections */
.sec-head { max-width: 640px; margin-bottom: 36px; }
.kicker { font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); }
h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; margin: 8px 0 12px; }
.sec-head p { color: var(--muted); }
.how, .apply, .faq { padding-top: 40px; padding-bottom: 80px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--night-2); border: 4px solid var(--ink); border-radius: 22px; padding: 26px; box-shadow: 0 6px 0 var(--ink); }
.steps .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); color: var(--ink); font: 700 22px var(--disp); border: 3px solid var(--ink); margin-bottom: 16px; }
.steps h3 { font-size: 24px; margin-bottom: 8px; }
.steps p { color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { font: 600 15px var(--disp); padding: 8px 16px; border-radius: 999px; border: 3px solid var(--line); color: var(--cream); }

/* form */
.form-card, .result { background: var(--cream); color: var(--ink); border: 5px solid var(--ink); border-radius: 26px; padding: 30px; max-width: 760px; box-shadow: 0 8px 0 var(--ink), 0 40px 90px rgba(0, 0, 0, .4); }
.tasks { display: grid; gap: 12px; margin-bottom: 26px; }
.task { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; }
.task > div { flex: 1; min-width: 0; }
.task h4 { font-size: 18px; }
.task p { font-size: 14px; color: #6a628f; }
.box { flex: none; width: 26px; height: 26px; border: 3px solid var(--ink); border-radius: 8px; background: #fff; }
.task.done { background: #eafaf3; }
.task.done .box { background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%231c1733' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.inp { display: flex; align-items: center; border: 3px solid var(--ink); border-radius: 14px; background: #fff; overflow: hidden; }
.inp b { padding: 0 2px 0 14px; color: #6a628f; }
.inp input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 13px 14px; font: 700 16px var(--body); color: var(--ink); }
.inp:focus-within { box-shadow: 0 0 0 4px var(--yellow); }
.field.bad .inp { border-color: #d6455d; box-shadow: 0 0 0 4px #ffd0d8; }
.ref-line { font-size: 14px; margin-bottom: 12px; color: #6a628f; }
.err { min-height: 22px; color: #c22d49; font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.fine { font-size: 13px; color: #6a628f; margin-top: 14px; text-align: center; }

/* result */
.result { max-width: 900px; }
.result-head h3 { font-size: 30px; margin-bottom: 6px; overflow-wrap: anywhere; }
.result-head p { color: #5b5382; }
.card-frame { margin: 22px 0; border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--night); }
.card-frame canvas { display: block; width: 100%; height: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.result .btn-ghost { color: var(--ink); border-color: var(--ink); }
.btn-switch { background: var(--yellow); color: var(--ink); padding-left: 16px; }
.btn-switch i { width: 40px; height: 24px; border-radius: 999px; background: var(--ink); position: relative; }
.btn-switch i::after { content: ''; position: absolute; top: 4px; left: 20px; width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); transition: left .15s; }
.btn-switch[aria-pressed="false"] { background: var(--night-3); color: var(--cream); }
.btn-switch[aria-pressed="false"] i::after { left: 4px; background: var(--muted); }
.ref-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; padding: 18px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; }
.ref-panel small { display: block; font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6a628f; }
.ref-panel strong { font: 600 24px var(--disp); }
.pips { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.pips i { aspect-ratio: 1; max-height: 34px; border: 3px solid var(--ink); border-radius: 7px; background: #15112e; }
.pips i.on { background: var(--yellow); box-shadow: 0 0 12px rgba(255, 190, 60, .8); }
.link-btn { margin-top: 16px; background: none; border: 0; color: #5b5382; font: 700 15px var(--body); text-decoration: underline; cursor: pointer; }

/* faq */
.faq details { max-width: 760px; border: 4px solid var(--ink); border-radius: 18px; background: var(--night-2); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 22px; font: 600 19px var(--disp); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; color: var(--yellow); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 28px; padding-bottom: 40px; border-top: 3px solid var(--line); color: var(--muted); font-size: 15px; }
.foot p { flex: 1; min-width: 240px; }
.foot a { font-weight: 800; color: var(--yellow); text-decoration: none; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 40px); background: var(--yellow); color: var(--ink); font: 600 16px var(--disp); padding: 12px 22px; border-radius: 999px; border: 3px solid var(--ink); opacity: 0; pointer-events: none; transition: .25s; z-index: 10; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 20px; padding-bottom: 56px; }
  .steps { grid-template-columns: 1fr; }
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; }
  .stats { gap: 24px; }
  .windows { grid-template-columns: repeat(3, 1fr); }
  .win:nth-child(n+10) { display: none; }
  .form-card, .result { padding: 20px 16px; border-radius: 22px; }
  .task { flex-wrap: wrap; }
  .task .btn { width: 100%; }
  .actions .btn { flex: 1 1 100%; }
  .ref-panel strong { font-size: 19px; }
  .pips { gap: 4px; }
  .pips i { border-width: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
