/* Jamalek landing — hero: headline, petals canvas, animated phone demo
   (scan → analyse → results loop), floating glass chips, marquee and stats. */

.hero { position: relative; min-height: 100svh; padding: calc(var(--header-h) + 40px) 0 80px; display: flex; align-items: center; overflow: hidden; }
.petals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
.hero-title { font-size: clamp(2.6rem, 6.6vw, 5rem); line-height: 1.22; color: var(--plum-ink); margin: 6px 0 22px; }
.shimmer { background: linear-gradient(100deg, #8E5A66 0%, #B76E79 30%, #E7B9A2 45%, #C9A24B 52%, #B76E79 66%, #8E5A66 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-lede b { color: var(--rose-deep); }
.hero-trust { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--mauve); font-size: .92rem; font-weight: 500; }
.hero-trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero-in { opacity: 0; transform: translateY(24px); animation: heroIn 1.1s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 130ms + 150ms); }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* Phone mockup with 3D pointer tilt (JS sets --rx/--ry). */
.hero-visual { position: relative; display: grid; place-items: center; perspective: 1200px; min-height: min(600px, calc(100svh - 150px)); }
.phone {
  position: relative; width: clamp(220px, calc((100svh - 190px) * .47), 300px); aspect-ratio: 9 / 19; border-radius: 46px; padding: 12px;
  background: linear-gradient(145deg, #3A2A2E, #1A1013); box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, .08);
  transform: rotateY(var(--ry, -8deg)) rotateX(var(--rx, 4deg)); transform-style: preserve-3d; transition: transform .6s var(--ease-out);
  animation: phoneIn 1.4s var(--ease-out) .3s backwards;
}
@keyframes phoneIn { from { opacity: 0; transform: translateY(60px) rotateY(-24deg) rotateX(10deg); } }
.phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, rgba(255, 255, 255, .14) 0%, transparent 30%); }
.phone-notch { position: absolute; top: 20px; left: 50%; width: 90px; height: 24px; margin-left: -45px; border-radius: 20px; background: #0E080A; z-index: 3; }
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: radial-gradient(120% 80% at 50% 30%, #5B3A44 0%, #2B1A20 70%); }

.demo-pane { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s .7s; }
[data-state="scan"] .demo-scan, [data-state="analyze"] .demo-analyze, [data-state="results"] .demo-results { opacity: 1; visibility: visible; transition: opacity .7s ease, visibility 0s; }

/* Scan pane: line-art face draws itself, oval guide, mesh dots, AR callouts. */
.face-art { position: absolute; left: 14%; top: 13%; width: 72%; stroke: #F1C9CF; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(241, 201, 207, .55)); }
.face-art path { stroke-dasharray: 600; stroke-dashoffset: 600; }
.face-art .hair { stroke: #C9A24B; opacity: .7; }
[data-state="scan"] .face-art path { animation: draw 2.4s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.scan-oval { position: absolute; left: 13%; top: 14%; width: 74%; height: 62%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .35); transition: border-color .4s; }
.phone-screen.is-locked .scan-oval { border: 2px solid #8BD3A2; box-shadow: 0 0 0 6px rgba(139, 211, 162, .15), 0 0 40px rgba(139, 211, 162, .35); }
.scan-line { position: absolute; left: 12%; right: 12%; height: 3px; top: 14%; border-radius: 3px; background: linear-gradient(90deg, transparent, #F7D6DB, transparent); box-shadow: 0 0 18px 4px rgba(247, 214, 219, .6); }
[data-state="scan"] .scan-line { animation: sweep 2.2s ease-in-out infinite alternate; }
@keyframes sweep { to { top: 74%; } }
.mesh { position: absolute; left: var(--x); top: var(--y); width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px rgba(255, 220, 226, .8); opacity: 0; }
[data-state="scan"] .mesh { animation: twinkle 1.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 180ms + 900ms); }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
.callout { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%) scale(.6); padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--plum); font-size: .7rem; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .5s, transform .5s var(--ease-out); transition-delay: calc(var(--d) * 260ms); }
.phone-screen.is-locked .callout { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.demo-status { position: absolute; bottom: 26px; left: 0; right: 0; display: grid; place-items: center; }
.demo-status span { padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: .82rem; font-weight: 500; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .4s; }
.phone-screen.is-locked .demo-status span { background: rgba(79, 138, 98, .85); }

/* Analyse pane: progress ring + step text. */
.demo-analyze { display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: #fff; background: radial-gradient(90% 60% at 50% 40%, #6E3F4B, #2B1A20); }
.ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; stroke: rgba(255, 255, 255, .14); }
.ring .ring-fill { stroke: #F3C9CF; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0)); transition: stroke-dashoffset 1s var(--ease-out); }
.demo-analyze .ring { grid-area: 1 / 1; }
.analyze-pct { grid-area: 1 / 1; align-self: center; font-size: 1.9rem; font-family: system-ui, sans-serif; }
.demo-analyze p { font-weight: 700; min-height: 1.8em; }
.demo-analyze small { display: inline-flex; gap: 6px; align-items: center; opacity: .7; font-size: .76rem; }

/* Results pane: gradient hero card + concern mini cards. */
.demo-results { padding: 46px 14px 14px; background: var(--cream); display: flex; flex-direction: column; gap: 9px; }
.mini-hero { position: relative; display: grid; justify-items: center; padding: 16px 10px 12px; border-radius: 24px; background: var(--grad-hero); color: #fff; text-align: center; transform: translateY(16px); opacity: 0; transition: .8s var(--ease-out); }
[data-state="results"] .mini-hero { transform: none; opacity: 1; }
.mini-hero .ring { width: 104px; height: 104px; grid-area: 1 / 1; }
.mini-hero .ring circle { stroke-width: 9; stroke: rgba(255, 255, 255, .22); }
.mini-hero .ring .ring-fill { stroke: #fff; stroke-dashoffset: 100; }
[data-state="results"] .mini-hero .ring-fill { stroke-dashoffset: calc(100 - var(--p)); transition-duration: 1.6s; }
.mini-score { grid-area: 1 / 1; align-self: center; font-size: 1.7rem; font-family: system-ui, sans-serif; line-height: 1; }
.mini-score small { font-size: .7rem; opacity: .8; }
.mini-hero p { font-size: .82rem; margin-top: 6px; }
.mini-stats { display: flex; gap: 6px; margin-top: 8px; }
.mini-stats span { display: grid; padding: 4px 8px; border-radius: 12px; background: rgba(255, 255, 255, .16); font-size: .62rem; line-height: 1.3; }
.mini-stats b { font-size: .95rem; }
.mini-card { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--blush-2); font-size: .8rem; font-weight: 700; color: var(--ink); box-shadow: var(--shadow-sm); transform: translateX(-30px); opacity: 0; transition: .7s var(--ease-out); transition-delay: calc(var(--d) * 160ms + 500ms); }
[data-state="results"] .mini-card { transform: none; opacity: 1; }
.mini-card em { margin-inline-start: auto; font-style: normal; font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--cream-2); color: var(--mauve); }

/* Floating glass chips around the phone (JS parallax via --tx/--ty). */
.float-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, .9); border: 1px solid #fff; box-shadow: var(--shadow-md); color: var(--plum); font-size: .8rem; font-weight: 500; transform: translate3d(var(--tx, 0), var(--ty, 0), 0); transition: transform .5s var(--ease-out); animation: chipIn 1s var(--ease-out) backwards, bob 6s ease-in-out infinite; }
.float-chip > .icon { width: 34px; height: 34px; padding: 7px; border-radius: 12px; background: var(--blush-2); color: var(--rose-deep); }
.float-chip span { display: grid; line-height: 1.35; }
.float-chip b { font-size: 1.15rem; color: var(--plum-ink); font-family: system-ui, sans-serif; text-align: right; }
.chip-age { top: 12%; inset-inline-start: -2%; animation-delay: .9s, 0s; }
.chip-hyd { top: 42%; inset-inline-end: -4%; animation-delay: 1.1s, 1.2s; }
.chip-code { bottom: 10%; inset-inline-end: 0; animation-delay: 1.3s, 2.1s; }
.chip-leaf { bottom: 30%; inset-inline-start: -4%; animation-delay: 1.5s, .6s; }
@keyframes chipIn { from { opacity: 0; scale: .7; } }
@keyframes bob { 50% { translate: 0 -10px; } }

.scroll-cue { position: absolute; bottom: 22px; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(142, 90, 102, .45); border-radius: 20px; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--rose); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Infinite concern marquee. */
.marquee-band { overflow: hidden; padding: 18px 0; }
.marquee { overflow: hidden; padding: 20px 0; background: var(--plum-ink); color: #F3DCDC; transform: rotate(-1.2deg); margin: 0 -10px; box-shadow: var(--shadow-md); }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; font-family: var(--font-display); font-size: 1.3rem; white-space: nowrap; }
.marquee-track > * { margin-inline-end: 26px; }
.marquee-track i { font-style: normal; color: var(--gold); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(50%); } }

/* Stats band. */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 72px; }
.stat { padding: 26px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .7); border: 1px solid #fff; box-shadow: var(--shadow-sm); text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.1; background: var(--grad-rose); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat p { color: var(--muted); font-size: .94rem; margin-top: 6px; }

@media (max-width: 960px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 28px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 24px; }
  .hero-lede { margin-inline: auto; }
  .hero-copy .store-row, .hero-trust { justify-content: center; }
  .hero-visual { min-height: 560px; }
  .scroll-cue { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero-visual { min-height: 500px; }
  .phone { width: 232px; border-radius: 38px; padding: 10px; }
  .phone-screen { border-radius: 30px; }
  .float-chip { font-size: .7rem; padding: 7px 10px; gap: 7px; }
  .float-chip > .icon { width: 28px; height: 28px; padding: 6px; }
  .float-chip b { font-size: .95rem; }
  .chip-age, .chip-leaf { inset-inline-start: 0; } .chip-hyd, .chip-code { inset-inline-end: 0; }
  .ring { width: 120px; height: 120px; }
  .mini-hero .ring { width: 84px; height: 84px; }
  .mini-score { font-size: 1.35rem; }
}
