/* stepart.app — the app's own look: its fonts, pastel backdrop, white rounded cards,
   lime call to action, blue accents (composeApp theme/Palette.kt). */
@font-face { font-family: "Crooker"; src: url("/assets/fonts/the_crooker.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Lato"; src: url("/assets/fonts/lato_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/assets/fonts/lato_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/assets/fonts/lato_black.ttf") format("truetype"); font-weight: 900; font-display: swap; }

:root {
  --navy: #1F3B5C;
  --slate: #36577A;
  --pewter: #6B7C93;
  --royal: #2E7BF6;
  --royal-soft: #D6E8FF;
  --lime: #7EE33F;
  --lime-deep: #4CC93A;
  --orange: #FF8A00;
  --card: #FFFFFF;
  --line: #E2E8F2;
  --shadow: 0 10px 30px rgba(31, 59, 92, .10);
  --radius: 28px;
  --display: "Crooker", "Lato", system-ui, sans-serif;
  --body: "Lato", system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--navy);
  line-height: 1.55;
  background: linear-gradient(135deg, #F7E3F0 0%, #EEF0FA 50%, #E6EEFB 100%) fixed;
}
img { max-width: 100%; display: block; }
a { color: var(--royal); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--royal); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
/* Grid children may shrink below their content (a 1200 px screenshot must not widen a column). */
.hero .wrap > *, .features > *, .feature > *, .steps > *, .gallery > *, .screens > * { min-width: 0; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: rgba(247, 241, 250, .72); border-bottom: 1px solid rgba(226, 232, 242, .7); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-family: var(--display); font-size: 30px; line-height: 1; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav a:hover { color: var(--royal); }
.lang { display: flex; gap: 4px; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.lang a { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 900; color: var(--pewter); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--royal-soft); color: var(--royal); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-weight: 900; font-size: 17px; text-decoration: none; border: none; cursor: pointer; }
.btn.lime { background: linear-gradient(180deg, var(--lime), var(--lime-deep)); color: #10240A; box-shadow: 0 8px 20px rgba(76, 201, 58, .35); }
.btn.lime:hover { transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.soon { display: inline-flex; flex-direction: column; line-height: 1.15; }
.soon small { font-weight: 700; font-size: 12px; opacity: .75; }

/* ---- hero ---- */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.tag { display: inline-block; background: #fff; color: var(--royal); font-weight: 900; font-size: 14px; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(40px, 4.6vw, 64px); margin: 18px 0 18px; }
h2 { font-size: clamp(34px, 4.2vw, 52px); }
h3 { font-size: 28px; }
.lead { font-size: 19px; color: var(--slate); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.phone { background: #1B1B1F; border-radius: 34px; padding: 12px; box-shadow: 0 24px 60px rgba(31, 59, 92, .25); transform: rotate(-2deg); }
.phone img { border-radius: 24px; width: 100%; height: auto; }

/* ---- sections ---- */
section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head p { color: var(--slate); font-size: 18px; margin: 12px auto 0; max-width: 36em; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 190px; gap: 18px; align-items: center; }
.feature p { margin: 10px 0 0; color: var(--slate); }
.feature .art { display: flex; gap: 6px; justify-content: center; }
.feature .art img { width: 190px; height: 150px; object-fit: contain; }
.badge { display: inline-block; font-weight: 900; font-size: 13px; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.badge.blue { background: var(--royal-soft); color: var(--royal); }
.badge.orange { background: #FFE9CC; color: #B35F00; }
.badge.green { background: #DFF7CF; color: #2E7D17; }
.badge.pink { background: #FBE0EE; color: #B0377A; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; left: 24px; width: 44px; height: 44px; border-radius: 22px; background: linear-gradient(135deg, #FFB347, #FF6A3D); color: #fff; font-family: var(--display); font-size: 28px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(255, 106, 61, .35); }
.step h3 { margin-top: 12px; }
.step p { color: var(--slate); margin: 10px 0 0; }

.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.lesson { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 14px 10px 12px; text-align: center; }
.lesson img { width: 100%; aspect-ratio: 512 / 400; object-fit: contain; }
.lesson span { display: block; font-family: var(--display); font-size: 19px; margin-top: 6px; line-height: 1.1; }

.screens { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.screens figure { margin: 0; background: #1B1B1F; border-radius: 28px; padding: 10px; box-shadow: var(--shadow); }
.screens img { border-radius: 20px; }
.screens figcaption { color: #CBD3DD; font-size: 14px; text-align: center; padding: 8px 0 2px; }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 24px; }
.faq summary { cursor: pointer; font-weight: 900; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--royal); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--slate); margin: 12px 0 0; }

.final { text-align: center; background: var(--card); border-radius: 36px; box-shadow: var(--shadow); padding: 48px 24px; }
.final p { color: var(--slate); font-size: 18px; margin: 12px 0 26px; }

/* ---- legal / text pages ---- */
.doc { background: var(--card); border-radius: 32px; box-shadow: var(--shadow); padding: clamp(24px, 4vw, 56px); margin: 40px auto 56px; max-width: 860px; }
.doc h1 { font-size: clamp(40px, 5vw, 60px); margin: 0 0 8px; }
.doc .updated { color: var(--pewter); font-size: 14px; margin: 0 0 28px; }
.doc h2 { font-size: 32px; margin: 34px 0 10px; }
.doc p, .doc li { color: #2B4766; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.doc th { color: var(--pewter); font-weight: 900; font-size: 13px; }
.note { background: #F3F7FF; border-radius: 18px; padding: 14px 18px; color: var(--slate); }

/* ---- footer ---- */
footer { padding: 40px 0 56px; color: var(--pewter); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--slate); text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--royal); }

/* ---- small screens ---- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .features, .screens { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .nav > a { display: none; }
}
@media (max-width: 520px) {
  .feature { grid-template-columns: 1fr; }
  .feature .art { justify-content: flex-start; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .brand { font-size: 26px; }
}

/* ===================== motion ===================== */
/* Grid children may shrink below their content: a 1200 px screenshot must not widen a column. */
.hero .wrap > *, .features > *, .feature > *, .steps > *, .screens > * { min-width: 0; }
body { overflow-x: hidden; }

/* Soft colour blobs drifting behind everything. */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blobs span { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(70px); opacity: .45; animation: drift 26s ease-in-out infinite alternate; }
.blobs span:nth-child(1) { background: #FFC6E2; top: -18vmax; left: -12vmax; }
.blobs span:nth-child(2) { background: #C9DDFF; top: 20vh; right: -20vmax; animation-duration: 32s; animation-delay: -8s; }
.blobs span:nth-child(3) { background: #D8F7C4; bottom: -24vmax; left: 20vw; animation-duration: 38s; animation-delay: -16s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 8vmax) scale(.95); }
}

/* The headline's key words get a hand-drawn underline that draws itself in. */
.scribble { position: relative; white-space: nowrap; display: inline-block; }
.scribble svg { position: absolute; left: -4%; bottom: -.16em; width: 108%; height: .42em; overflow: visible; }
.scribble path { fill: none; stroke: var(--orange); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s .5s cubic-bezier(.6, .1, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Hero entrance. */
.hero .wrap > div:first-child > * { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero .wrap > div:first-child > *:nth-child(2) { animation-delay: .1s; }
.hero .wrap > div:first-child > *:nth-child(3) { animation-delay: .2s; }
.hero .wrap > div:first-child > *:nth-child(4) { animation-delay: .3s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* The phone floats, lesson pictures orbit around it. */
.hero-art { position: relative; padding: 40px 30px; }
.hero-art .phone { animation: phone-in 1s .2s cubic-bezier(.2, .7, .2, 1) both, bob 7s 1.2s ease-in-out infinite; }
@keyframes phone-in { from { opacity: 0; transform: rotate(-8deg) translateY(40px) scale(.94); } }
@keyframes bob { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-12px); } }
.float { position: absolute; width: 120px; height: 96px; object-fit: contain; background: #fff; border-radius: 24px; padding: 10px; box-shadow: var(--shadow); animation: pop .7s cubic-bezier(.3, 1.6, .5, 1) both, hover 6s ease-in-out infinite; }
.float.f1 { top: -6px; left: -18px; --r: -8deg; animation-delay: .7s, 1.4s; }
.float.f2 { top: -24px; right: 8%; --r: 7deg; animation-delay: .85s, 0s; width: 104px; }
.float.f3 { bottom: -10px; left: 10%; --r: 6deg; animation-delay: 1s, .8s; }
.float.f4 { bottom: 6px; right: -16px; --r: -6deg; animation-delay: 1.15s, 2s; width: 110px; }
@keyframes pop { from { opacity: 0; transform: scale(.3) rotate(var(--r)); } to { opacity: 1; transform: scale(1) rotate(var(--r)); } }
@keyframes hover { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.sparkle { position: absolute; width: 34px; height: 34px; color: var(--orange); animation: twinkle 2.6s ease-in-out infinite; }
.sparkle.s1 { top: 18%; left: -4%; }
.sparkle.s2 { top: 6%; right: 38%; color: var(--royal); animation-delay: -1s; width: 24px; height: 24px; }
.sparkle.s3 { bottom: 14%; right: 30%; color: #E14C9A; animation-delay: -1.8s; }
@keyframes twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .4; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }

/* Call to action shine. */
.btn.lime { position: relative; overflow: hidden; transition: transform .2s; }
.btn.lime::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); transform: skewX(-20deg); animation: shine 3.6s 2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn.ghost { transition: transform .2s, box-shadow .2s; }
.btn.ghost:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(31, 59, 92, .16); }

/* Reveal on scroll (site.js adds .in; without JS everything simply shows). */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* Cards come alive on hover. */
.feature, .step { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.feature:hover, .step:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(31, 59, 92, .16); }
.feature .art img { transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); }
.feature:hover .art img { transform: rotate(-6deg) scale(1.08); }
.step::before { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.step:hover::before { transform: rotate(-12deg) scale(1.15); }

/* Lessons: two endless strips moving in opposite directions. */
.marquee { overflow: hidden; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee + .marquee { margin-top: 4px; }
.track { display: flex; gap: 18px; width: max-content; animation: slide 60s linear infinite; }
.marquee.rev .track { animation-direction: reverse; animation-duration: 70s; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.track .lesson { width: 170px; flex: none; transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.track .lesson:nth-child(3n) { transform: rotate(-2deg); }
.track .lesson:nth-child(3n+1) { transform: rotate(1.5deg); }
.track .lesson:hover { transform: translateY(-10px) rotate(0) scale(1.06); }

/* The final card gets a slow rainbow border. */
.final { position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 3px; background: conic-gradient(from var(--a, 0deg), #FF8A00, #E14C9A, #2E7BF6, #7EE33F, #FF8A00); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 8s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }

@media (max-width: 900px) {
  .hero-art { padding: 30px 12px; }
  .float { width: 86px; height: 70px; border-radius: 18px; padding: 6px; }
  .float.f2, .float.f4 { width: 80px; }
  .track .lesson { width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero .wrap > div:first-child > *, .js .reveal { opacity: 1 !important; transform: none !important; }
  .scribble path { stroke-dashoffset: 0; }
  .track { transform: none; }
}
