/* =====================================================================
   v5 — human characters from the demo accounts, Motion-driven hero deck,
   3D phone mockups. Light theme kept; dark theme inherits the tokens.
   Loaded after styles.css.
   ===================================================================== */

.icon-green-sm { width: 18px; height: 18px; filter: invert(59%) sepia(72%) saturate(524%) hue-rotate(89deg); }

/* ---------- hero ---------- */
.hero { min-height: 0; padding-top: 72px; padding-bottom: 40px; overflow: visible; }
.hero-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
.hero h1 { margin-top: 22px; }

.hero-stage { position: relative; width: 100%; max-width: 520px; margin-inline: auto; }
.hero-stage .hero-blob { position: absolute; width: 130%; left: -12%; top: -6%; opacity: .75; z-index: 0; pointer-events: none; }
.hero-stage .hero-deco { z-index: 0; }
.hero-stage .stroke-top { top: -44px; right: -6%; width: 170px; }
.hero-stage .dots-left { left: -54px; top: 30%; width: 90px; }
.hero-stage .dots-bottom { right: -30px; bottom: 96px; width: 100px; }

.deck { position: relative; z-index: 2; aspect-ratio: 4 / 5; width: min(100%, 440px); margin-inline: auto; outline: none; touch-action: pan-y; }
.deck:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 60%, transparent); outline-offset: 10px; border-radius: 36px; }
.deck-card {
  position: absolute; inset: 0; border-radius: 34px; overflow: hidden;
  background: var(--surface); box-shadow: 0 30px 70px rgba(5, 64, 30, .20), 0 0 0 1px rgba(16, 24, 40, .06);
  transform-origin: 50% 100%; will-change: transform, opacity; user-select: none;
}
.deck-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; pointer-events: none; }
/* CSS-only fallback pose (overridden by hero.js) */
.deck-card:not(.is-active) { transform: translateY(-18px) scale(.94) rotate(-3.5deg); opacity: .82; }
.deck-card:not(.is-active) ~ .deck-card:not(.is-active) { transform: translateY(-36px) scale(.88) rotate(3.5deg); opacity: .64; }

.deck-overlay { position: absolute; inset: 0; z-index: 10; pointer-events: none; transition: opacity .14s ease; }
.deck-overlay-hidden { opacity: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #17211a; font-weight: 750; font-size: .84rem;
  box-shadow: 0 8px 22px rgba(16, 24, 40, .16); backdrop-filter: blur(8px);
}
.chip img { width: 17px; height: 17px; filter: invert(59%) sepia(72%) saturate(524%) hue-rotate(89deg); }
.chip-role { position: absolute; top: 18px; left: 18px; }
.chip-who { position: absolute; left: 18px; bottom: 18px; flex-direction: column; align-items: flex-start; gap: 1px; border-radius: 18px; padding: 12px 16px; }
.chip-who strong { font-size: 1rem; line-height: 1.1; }
.chip-who span { color: #667085; font-weight: 550; font-size: .8rem; }
.deck-toast { position: absolute; right: 14px; bottom: 16px; left: auto; top: auto; animation: none; }

.deck-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; position: relative; z-index: 3; }
.deck-arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-soft); transition: transform .15s, border-color .15s; }
.deck-arrow:hover { transform: translateY(-2px); border-color: var(--green); }
.deck-arrow img { width: 18px; height: 18px; }
html[data-theme="dark"] .deck-arrow img { filter: invert(1); }
.deck-dots { display: flex; gap: 8px; }
.deck-dots button { width: 8px; height: 8px; border-radius: 999px; border: none; padding: 0; background: color-mix(in srgb, var(--muted) 45%, transparent); cursor: pointer; transition: width .3s, background .3s; }
.deck-dots button[aria-selected="true"] { width: 26px; background: var(--green); }

.deck-people { display: flex; justify-content: center; gap: 8px; margin-top: 16px; position: relative; z-index: 3; }
.deck-people button {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--bg); cursor: pointer; padding: 0;
  background-image: var(--face); background-size: 300%; background-position: 50% 8%;
  box-shadow: 0 0 0 1px var(--line); opacity: .55; transition: transform .2s, opacity .2s, box-shadow .2s;
}
.deck-people button:hover, .deck-people button.is-current { opacity: 1; transform: translateY(-3px) scale(1.08); box-shadow: 0 0 0 2px var(--green); }

/* ---------- scan band ---------- */
.scan-section { padding: 40px 0 80px; }
.scan-band { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.scan-photo { position: relative; margin: 0; border-radius: var(--radius-xl); overflow: visible; }
.scan-photo > img { border-radius: var(--radius-xl); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }
.chip-float { position: absolute; font-size: .8rem; }
.chip-float img { width: 16px; height: 16px; }
.chip-float-a { top: 20px; left: -18px; }
.chip-float-b { bottom: 22px; right: -18px; }
.chip-float-c { bottom: 20px; left: 20px; }
.scan-copy h2, .team-copy h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.07; letter-spacing: -.04em; margin: 16px 0 14px; }
.scan-copy h2 span, .team-copy h2 span { color: var(--green); }
.scan-copy p, .team-copy p { color: var(--muted); font-size: 1.05rem; margin: 0 0 18px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; color: var(--text); font-weight: 600; }
.check-list li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-dark); font-size: .8rem; font-weight: 900; }

/* ---------- 3D phone mockups ---------- */
.step-phone { width: 100%; max-width: 280px; display: block; margin: 0 auto 4px; filter: drop-shadow(0 26px 34px rgba(5, 64, 30, .18)); }
.shift-phone { width: 100%; max-width: 330px; justify-self: center; filter: drop-shadow(0 26px 34px rgba(5, 64, 30, .18)); }
.download-phone { width: 100%; max-width: 360px; justify-self: center; filter: drop-shadow(0 26px 34px rgba(5, 64, 30, .18)); }
.steps-grid::before { top: 40%; }

/* ---------- team intro ---------- */
.team-intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; margin-bottom: 64px; }
.team-photo { position: relative; margin: 0; }
.team-photo > img { border-radius: var(--radius-xl); box-shadow: var(--shadow); aspect-ratio: 3 / 2; object-fit: cover; }
.split-demo { display: grid; gap: 10px; margin-top: 8px; }
.split-demo > div { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; font-size: .9rem; }
.split-demo span { color: var(--muted); font-weight: 600; }
.split-demo b { color: var(--text); }
.split-demo i { grid-column: 1 / 3; grid-row: 2; display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #24d66d, #11af54); width: 0; }
.split-demo > div:nth-child(2) i { background: linear-gradient(90deg, var(--orange), #ff9a4d); }
.split-demo > div:nth-child(3) i { background: linear-gradient(90deg, var(--purple), #b69cff); }
.split-demo > div:nth-child(4) i { background: linear-gradient(90deg, var(--gold), #ffd07a); }

/* ---------- use cases: character photos ---------- */
.use-case-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.use-card { border-radius: 26px; transition: transform .25s ease, box-shadow .25s ease; }
.use-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.use-card > img { aspect-ratio: 5 / 4; transition: transform .6s ease; }
.use-card:hover > img { transform: scale(1.04); }
.use-card > div { padding: 16px 18px; gap: 10px; font-size: 1rem; }
.use-card > div small { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .8rem; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-stage { max-width: 480px; }
  .hero-stage .hero-blob { width: 120%; left: -10%; }
  .scan-band, .team-intro { grid-template-columns: 1fr; gap: 30px; }
  .scan-photo > img, .team-photo > img { aspect-ratio: 4 / 3; }
  .use-case-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 3rem; }
  .hero-stage { max-width: 400px; }
  .hero-stage .stroke-top, .hero-stage .dots-left { display: none; }
  .deck { width: min(100%, 360px); }
  .deck-toast { right: 10px; bottom: 12px; }
  .chip-role { top: 12px; left: 12px; }
  .chip-who { left: 12px; bottom: 12px; }
  .chip-float-a { left: 10px; top: 12px; }
  .chip-float-b { right: 10px; bottom: 12px; }
  .scan-section { padding: 24px 0 60px; }
  .step-phone { max-width: 230px; }
  .shift-phone { max-width: 260px; order: -1; }
  .download-phone { max-width: 260px; order: -1; }
  .use-card > img { aspect-ratio: 4 / 3; }
}
@media (max-width: 470px) {
  .use-case-grid { grid-template-columns: 1fr; }
  .deck-people button { width: 34px; height: 34px; }
  .chip { font-size: .76rem; padding: 8px 11px; }
  .chip-float-b { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .deck-card, .use-card, .use-card > img { transition: none; }
}

/* download card: 3D illustration instead of a phone */
.download-art { max-width: 420px; filter: none; }
@media (max-width: 720px) { .download-art { max-width: 300px; } }

/* ---------- QR-code wipe canvas: always the visible face of the active card ---------- */
.deck-canvas { position: absolute; inset: 0; z-index: 9; width: 100%; height: 100%; border-radius: 34px; pointer-events: none; }

/* ---------- animated download illustration ---------- */
.cta-art { position: relative; width: 100%; max-width: 440px; justify-self: center; aspect-ratio: var(--ar, 1); }
.cta-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 22px 30px rgba(5, 64, 30, .16)); }
.cta-float { position: absolute; height: auto; will-change: transform; filter: drop-shadow(0 8px 12px rgba(5, 64, 30, .18)); }
@media (max-width: 720px) { .cta-art { max-width: 320px; } }
