/* Homepage aligned to the user's Figma frame 18:357 (1512 × 747).
   All overrides stay within the homepage; drawing uses its existing geometry. */
.home-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.home-shell .topbar { flex: 0 0 clamp(64px, 9dvh, 80px); min-height: 0; }
.home-shell .home { flex: 1; display: flex; flex-direction: column; padding: clamp(24px, 4dvh, 40px) 0 max(20px, env(safe-area-inset-bottom)); }
.home-shell .hero { flex: 1; min-height: 0; padding-bottom: clamp(28px, 5dvh, 48px); gap: 40px; }
.home-shell .eyebrow { font-size: 13px; letter-spacing: .8px; color: var(--muted); }
.home-shell .hero h1 { font-size: clamp(44px, 6.5dvh, 60px); line-height: 1.24; margin: 20px 0; }
.home-shell .hero-intro { font-size: 16px; line-height: 1.85; color: var(--muted); max-width: none; }
.home-shell .hero-actions { margin-top: 28px; }
.home-shell .hero-actions .btn { min-height: 52px; padding: 13px 24px; font-size: 16px; gap: 12px; }
.home-shell .hero-art { min-height: 0; margin: 0; padding: 0; }
.home-shell .deck-card { border-radius: var(--card-face-radius, 5.53% / 4.24%); }
.home-shell .front-card { padding: 30px; }
.home-shell .card-art { min-height: 0; }
.home-shell .repair-illustration { transform: scale(1.3); }
.home-shell .intro-steps { margin: 0; padding: 22px 0; gap: 28px; border-bottom: 0; }
.home-shell .intro-step { gap: 12px; }
.home-shell .step-index { color: var(--muted); font-size: 12px; }
.home-shell .intro-step strong { font-size: 15px; font-weight: 600; line-height: 1.6; }
.home-shell .intro-step p { font-size: 14px; line-height: 1.6; margin-top: 4px; color: var(--muted); }
.home-shell .hero-draw-guide { display: none; pointer-events: none; transition: opacity .25s ease; }
/* The dashed guide steps aside as soon as the deck starts its draw intro. */
.home-shell .hero:has(.card-stack[data-phase]) .hero-draw-guide { opacity: 0; }

/* At the reference viewport: a 1016px composition, 471px copy block,
   67.5px headline and a 315px card. Smaller viewports release the empty space. */
@media (min-width: 721px) {
 .home-shell { width: min(1016px, calc(100% - 80px)); }
 .home-shell .topbar { flex-basis: clamp(64px, 9.216dvh, 80px); }
 .home-shell .brand-text { letter-spacing: -1.089px; }
 .home-shell .nav-button { font-size: 14px; color: var(--muted); }
 .home-shell .home { padding: clamp(24px, 4dvh, 40px) 0 max(5px, env(safe-area-inset-bottom)); }
 .home-shell .hero { width: 100%; margin: 0; grid-template-columns: minmax(0, 414fr) minmax(0, 473fr); gap: clamp(32px, 6.15vw, 93px); padding-right: clamp(0px, calc((100vw - 980px) / 8), 36px); }
 .home-shell .hero-copy { height: min(471px, calc(100dvh - 276px)); min-height: min-content; padding: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
 .home-shell .eyebrow { font-size: 14px; line-height: 23px; letter-spacing: .886px; }
 .home-shell .hero h1 { font-size: clamp(44px, min(9.0374dvh, 6.5vw), 67.5096px); line-height: 1.24; letter-spacing: -.05048em; margin: 0; white-space: nowrap; }
 .home-shell .hero h1 em::after { left: .23em; right: -.32em; bottom: .07em; height: .29em; }
 .home-shell .hero-intro { font-size: 16px; line-height: 2.047875; letter-spacing: -.346px; }
 .home-shell .hero-actions { margin: 0; }
 .home-shell .hero-actions .btn { min-width: 214.192px; min-height: 58px; padding: 14.39px 26.57px; font-size: 17.711px; letter-spacing: -.346px; line-height: 1.5; gap: 13.28px; border-radius: 9.963px; }
 .home-shell .hero-actions .icon { width: 22.14px; height: 22.14px; }
 .home-shell .hero-art { height: min(457.51px, 61.2463dvh); margin: 0; }
 .home-shell .hero .card-stack { position: relative; inset: auto; width: min(315.08px, 42.1794dvh, 32.5vw); height: auto; margin: 0; transform: none; }
 .home-shell .hero .back-one { transform: rotate(-14deg) translate(-23.4px, 0); }
 .home-shell .hero .back-two { transform: rotate(10deg) translate(24.5px, 1.1px); }
 .home-shell .intro-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 180px; gap: 0; padding: 30px 0 22px; }
 .home-shell .intro-step { min-height: 56px; flex-direction: row; }
 .home-shell .step-index { width: 28px; height: 28px; flex: 0 0 28px; margin-top: 2px; }
 .home-shell .intro-step strong { letter-spacing: -.234px; }
 .home-shell .intro-step p { max-width: none; letter-spacing: -.15px; }
 .home-shell .hero-draw-guide { display: block; position: absolute; z-index: 1; left: 21.16%; bottom: calc(clamp(28px, 5dvh, 48px) + (100% - clamp(28px, 5dvh, 48px) - min(471px, calc(100dvh - 276px))) / 2 + 28px); width: 35.04%; height: auto; }
}

@media (min-width: 721px) and (max-width: 1099px) {
 .home-shell .hero { gap: 32px; padding-right: 0; }
 .home-shell .hero-intro { font-size: 15px; }
 .home-shell .intro-steps { gap: 20px; }
 .home-shell .hero-draw-guide { display: none; }
}
@media (max-width: 720px) {
 .home-shell .topbar { flex-basis: 64px; }
 .home-shell .top-nav { gap: 14px; }
 .home-shell .nav-button { font-size: 13px; }
 .home-shell .home { padding-top: 24px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
 .home-shell .hero { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 12px; padding-bottom: 20px; }
 .home-shell .hero-copy { width: 100%; max-width: none; }
 .home-shell .hero h1 { font-size: 40px; margin: 16px 0; letter-spacing: -1.5px; }
 .home-shell .hero-intro { font-size: 15px; line-height: 1.8; }
 .home-shell .hero-actions { margin-top: 22px; }
 .home-shell .hero-actions .btn { width: 100%; }
 .home-shell .hero-art { height: 190px; flex: 0 0 190px; position: relative; }
 .home-shell .card-stack { position: absolute; top: 50%; left: 50%; width: 262px; height: auto; margin: 0; transform: translate(-50%, -50%) scale(.46); }
 .home-shell .intro-steps { gap: 12px; padding: 16px 0 0; }
 .home-shell .intro-step { display: block; }
 .home-shell .step-index { display: inline-grid; width: 22px; height: 22px; font-size: 11px; margin: 0 0 7px; }
 .home-shell .intro-step strong { font-size: 13px; line-height: 1.6; }
 .home-shell .intro-step p { font-size: 12px; line-height: 1.6; }
}
/* Small phones give the space to the words and action instead of shrinking text. */
@media (max-width: 720px) and (max-height: 740px) {
 .home-shell .home { padding-top: 20px; }
 .home-shell .hero-art { display: none; }
 .home-shell .hero h1 { font-size: 38px; }
}
@media (max-width: 380px) {
 .home-shell .top-nav { gap: 10px; }
 .home-shell .nav-button { font-size: 12px; gap: 4px; }
 .home-shell .hero h1 { font-size: 36px; }
 .home-shell .eyebrow { font-size: 12px; }
 .home-shell .intro-steps { gap: 10px; }
}
@media (min-width: 721px) and (max-height: 500px) {
 .home-shell .topbar { flex-basis: 54px; }
 .home-shell .home { padding: 8px 0; }
 .home-shell .hero { padding-bottom: 12px; gap: 24px; }
 .home-shell .hero-copy { height: auto; display: block; }
 .home-shell .hero h1 { font-size: 32px; margin: 8px 0; letter-spacing: -1px; }
 .home-shell .hero-intro { font-size: 14px; line-height: 1.65; }
 .home-shell .hero-actions { margin-top: 14px; }
 .home-shell .hero-actions .btn { min-height: 46px; padding: 10px 20px; font-size: 15px; }
 .home-shell .hero-art { height: 220px; }
 .home-shell .hero .card-stack { width: 170px; transform: none; }
 .home-shell .hero-draw-guide { display: none; }
 .home-shell .intro-steps { padding: 12px 0 0; }
 .home-shell .intro-step { min-height: 0; }
 .home-shell .intro-step strong { font-size: 13px; }
 .home-shell .intro-step p { font-size: 12px; }
}
