/* ============================================================
   home.css — the landing page (/)
   Everything on the page is real markup (no images to download): product mock-ups are built from the
   same design tokens as the app, so they match it exactly and follow light/dark mode by themselves.
   ============================================================ */

/* ---------- hero ---------- */
.hm-hero { position: relative; overflow: hidden; isolation: isolate; }
.hm-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background-image: radial-gradient(color-mix(in srgb, var(--color-primary) 22%, transparent) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 68%);
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 68%);
}
.hm-trust { display: flex; flex-wrap: wrap; gap: .5rem .5rem; margin-top: 1.5rem; }
.hm-trust li {
  display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
}
.hm-trust li svg { width: .95rem; height: .95rem; color: var(--color-success); }

/* ---------- the product scene in the hero: a phone with a live flashcard + floating widgets ---------- */
.hm-scene { position: relative; display: grid; place-items: center; padding: 3.4rem 0 4.6rem; }
.hm-scene::before {
  content: ""; position: absolute; width: 24rem; height: 24rem; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-primary) 26%, transparent), transparent 68%);
}
.hm-phone {
  position: relative; width: 17.5rem; padding: .65rem; border-radius: 2.6rem; background: #17162b;
  box-shadow: 0 40px 70px -32px rgba(40, 30, 120, .75), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.hm-phone::before { /* the notch */
  content: ""; position: absolute; top: 1.05rem; left: 50%; transform: translateX(-50%); width: 4.2rem; height: 1.15rem; border-radius: 999px; background: #0b0a17; z-index: 3;
}
.hm-screen { position: relative; border-radius: 2rem; overflow: hidden; background: var(--bg); padding: 2.6rem .85rem 1rem; min-height: 27rem; }
.hm-screen .flashcard { height: 15.5rem; }
.hm-screen .flashcard-face { padding: 1.25rem; }
.hm-bar { display: flex; gap: 4px; margin-bottom: .75rem; }
.hm-bar span { flex: 1; height: 5px; border-radius: 4px; background: var(--surface-2); }
.hm-bar span.is-ok { background: var(--color-success); }
.hm-bar span.is-now { background: var(--color-primary); }
.hm-answers { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.hm-answers span { display: grid; place-items: center; padding: .55rem 0; border-radius: .9rem; font-size: .8rem; font-weight: 800; }

.hm-float {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: .6rem; padding: .6rem .85rem; border-radius: 1.1rem;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 36px -20px rgba(30, 20, 100, .5);
  animation: hmFloat 7s ease-in-out infinite;
}
.hm-float b { display: block; font-size: .95rem; font-weight: 900; line-height: 1.4; }
.hm-float small { display: block; font-size: .7rem; color: var(--text-muted); line-height: 1.3; }
.hm-float-icon { width: 2.2rem; height: 2.2rem; flex-shrink: 0; border-radius: .75rem; display: grid; place-items: center; }
@keyframes hmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hm-float.is-b { animation-delay: -2.3s; }
.hm-float.is-c { animation-delay: -4.6s; }
.hm-mini-ring { --size: 2.6rem; --thick: .28rem; font-size: .68rem; font-weight: 900; }

/* ---------- language strip ---------- */
.hm-lang {
  display: flex; align-items: center; gap: .85rem; padding: .95rem 1.1rem; border-radius: 1.3rem; background: var(--surface); border: 1px solid var(--border);
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.hm-lang:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--color-primary) 40%, var(--border)); box-shadow: 0 16px 30px -22px var(--color-primary); }

/* ---------- features ---------- */
.hm-feature { position: relative; padding: 1.4rem 1.3rem; border-radius: 1.5rem; background: var(--surface); border: 1px solid var(--border); transition: transform .15s ease, box-shadow .2s ease; }
.hm-feature:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -28px var(--tone, var(--color-primary)); }
.hm-feature-icon {
  width: 3rem; height: 3rem; border-radius: 1rem; display: grid; place-items: center; margin-bottom: .9rem; color: var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, var(--surface));
}
.hm-feature h3 { font-weight: 900; font-size: 1.02rem; line-height: 1.8; }
.hm-feature p { margin-top: .25rem; font-size: .875rem; line-height: 1.9; color: var(--text-muted); }

/* ---------- showcase rows ---------- */
.hm-show { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .hm-show { grid-template-columns: 1fr 1fr; gap: 4rem; } .hm-show.is-reverse > :first-child { order: 2; } }
.hm-bullets { display: grid; gap: .7rem; margin-top: 1.25rem; }
.hm-bullets li { display: flex; align-items: flex-start; gap: .65rem; font-size: .92rem; line-height: 1.9; }
.hm-bullets li > span:first-child {
  width: 1.5rem; height: 1.5rem; flex-shrink: 0; margin-top: .2rem; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--color-success);
}
.hm-bullets li svg { width: .85rem; height: .85rem; }

.hm-shot {
  position: relative; border-radius: 1.6rem; background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  box-shadow: 0 34px 60px -38px rgba(40, 30, 120, .6);
}
.hm-shot-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.hm-shot-bar i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--border); display: block; }
.hm-shot-bar i:nth-child(1) { background: #fb7185; } .hm-shot-bar i:nth-child(2) { background: #fbbf24; } .hm-shot-bar i:nth-child(3) { background: #34d399; }
.hm-shot-body { padding: 1.25rem; }
.hm-eg { padding: .65rem .85rem; border-radius: .95rem; background: var(--surface-2); border-inline-start: 3px solid var(--color-primary); }
.hm-eg mark { background: var(--color-accent-soft); color: inherit; border-radius: .3rem; padding: 0 .2em; font-weight: 800; }
.hm-opt { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-radius: .95rem; background: var(--surface-2); border: 2px solid transparent; font-weight: 700; font-size: .88rem; }
.hm-opt.is-right { border-color: var(--color-success); background: color-mix(in srgb, var(--color-success) 13%, var(--surface)); }
.hm-opt.is-wrong { border-color: var(--color-danger); background: color-mix(in srgb, var(--color-danger) 11%, var(--surface)); }
.hm-opt-key { width: 1.5rem; height: 1.5rem; border-radius: .5rem; display: grid; place-items: center; font-size: .72rem; font-weight: 900; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); flex-shrink: 0; }
.hm-opt.is-right .hm-opt-key { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.hm-opt.is-wrong .hm-opt-key { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.hm-verdict { padding: 1rem 1.1rem; border-radius: 1.2rem; color: #fff; background: linear-gradient(125deg, #7060ec, #4535b8); display: flex; align-items: center; gap: 1rem; }
.hm-verdict .ring { --size: 4.6rem; --thick: .45rem; --fill: #fff; --track: rgba(255, 255, 255, .25); --ring-bg: #5545cc; color: #fff; font-weight: 900; font-size: 1.05rem; }

/* ---------- Leitner shelves ---------- */
.hm-boxes { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .hm-boxes { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hm-box { padding: 1.25rem 1rem; border-radius: 1.5rem; text-align: center; background: var(--surface); border: 1px solid var(--border); transition: transform .15s ease; }
.hm-box:hover { transform: translateY(-3px); }
.hm-box-num {
  width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; border-radius: 1.1rem; display: grid; place-items: center; font-size: 1.3rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000));
}
.hm-stack { position: relative; height: 1.1rem; margin: 0 auto .9rem; width: 3.2rem; }
.hm-stack i { position: absolute; inset-inline: 0; height: .5rem; border-radius: .25rem; background: var(--c); opacity: .85; }
.hm-stack i:nth-child(1) { top: 0; opacity: 1; } .hm-stack i:nth-child(2) { top: .3rem; opacity: .6; transform: scaleX(.9); } .hm-stack i:nth-child(3) { top: .6rem; opacity: .35; transform: scaleX(.8); }

/* ---------- steps ---------- */
.hm-steps { display: grid; gap: 1.25rem; counter-reset: hm; }
@media (min-width: 768px) { .hm-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; } }
.hm-step { position: relative; padding: 1.6rem 1.4rem 1.4rem; border-radius: 1.6rem; background: var(--surface); border: 1px solid var(--border); }
.hm-step-num {
  position: absolute; top: -1rem; inset-inline-start: 1.25rem; width: 2.2rem; height: 2.2rem; border-radius: .8rem; display: grid; place-items: center;
  font-weight: 900; color: #fff; background: var(--color-primary); box-shadow: 0 10px 18px -10px var(--color-primary);
}

/* ---------- install the app ---------- */
.hm-install { position: relative; overflow: hidden; border-radius: 2rem; color: #fff; background: linear-gradient(125deg, #6a5cf0 0%, #4f40d0 55%, #392b9a 100%); }
.hm-install::before { content: ""; position: absolute; inset-inline-end: -5rem; top: -6rem; width: 20rem; height: 20rem; border-radius: 50%; background: radial-gradient(circle, rgba(245, 158, 11, .5), transparent 68%); }
.hm-install > * { position: relative; }
.hm-install-step { display: flex; align-items: flex-start; gap: .7rem; font-size: .9rem; line-height: 1.9; }
.hm-install-step b { width: 1.7rem; height: 1.7rem; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: rgba(255, 255, 255, .2); margin-top: .15rem; }

/* ---------- streak sample ---------- */
.hm-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.hm-cal span { aspect-ratio: 1; border-radius: .55rem; background: rgba(255, 255, 255, .18); }
.hm-cal span.is-1 { background: rgba(255, 255, 255, .42); } .hm-cal span.is-2 { background: rgba(255, 255, 255, .66); } .hm-cal span.is-3 { background: rgba(255, 255, 255, .92); }

@media (prefers-reduced-motion: reduce) { .hm-float { animation: none; } .hm-lang, .hm-feature, .hm-box { transition: none; } }
@media (max-width: 640px) { .hm-scene { padding: .5rem 0 1rem; } .hm-float { display: none; } }
