/* ═══════════════════════════════════════
   WOBAZI — Guest homepage: "See what you get"
   public/css/landing-showcase.css   (views/partials/landing-showcase.ejs, loaded by views/pages/landing.ejs)

   The hero's phone fan, the app index (orbs), one block per app with a real phone screenshot, and
   "How it works". Each app block carries its product's colours from config/suite.js as custom
   properties: --ln-accent, --ln-orb (conic stops), --ln-cta1/2 + --ln-cta-ink (button).
═══════════════════════════════════════ */

/* ── The phone: a dark bezel, a camera pill, the screenshot inside ── */
.lp-phone {
  --pw: 300px;
  position: relative; display: block; box-sizing: border-box; width: var(--pw); flex: none;
  padding: calc(var(--pw) * 0.03);
  border-radius: calc(var(--pw) * 0.15);
  background: linear-gradient(160deg, #2a2838, #0b0a14 40%, #14121f);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 12px 24px -12px rgba(0, 0, 0, 0.6);
}
.lp-phone::before { /* camera pill */
  content: ""; position: absolute; z-index: 2; left: 50%; top: calc(var(--pw) * 0.045);
  width: calc(var(--pw) * 0.24); height: calc(var(--pw) * 0.06); transform: translateX(-50%);
  border-radius: 999px; background: #05050a;
}
.lp-phone img {
  display: block; width: 100%; height: auto; aspect-ratio: 390 / 844;
  border-radius: calc(var(--pw) * 0.12); background: #07070f;
}

/* ── Hero: three phones fanned out, rising out of the page ── */
.lp-fan {
  position: relative; display: flex; justify-content: center; align-items: flex-start;
  height: clamp(250px, 58vw, 380px); margin: 34px auto 0; max-width: 760px;
  -webkit-mask-image: linear-gradient(#000 62%, transparent);
          mask-image: linear-gradient(#000 62%, transparent);
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.lp-fan-phone {
  --pw: clamp(130px, 34vw, 220px);
  position: absolute; top: 18px; left: 50%;
  transform: translateX(calc(-50% + var(--i) * var(--pw) * 0.62)) translateY(calc(var(--i) * var(--i) * 26px)) rotate(calc(var(--i) * 9deg));
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1);
  animation: lpFanIn 0.9s cubic-bezier(.2, .8, .2, 1) backwards;
  animation-delay: calc(0.25s + (var(--i) + 1) * 0.08s);
}
.lp-fan-phone[style*="--i: 0"] { z-index: 2; top: 0; }
@media (hover: hover) {
  .lp-fan:hover .lp-fan-phone { transform: translateX(calc(-50% + var(--i) * var(--pw) * 0.78)) translateY(calc(var(--i) * var(--i) * 14px - 10px)) rotate(calc(var(--i) * 6deg)); }
}
.lp-fan:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 24px; }
@keyframes lpFanIn {
  from { opacity: 0; transform: translateX(-50%) translateY(120px) rotate(0deg); }
}
.lp-fan-hint { margin: -6px 0 0; font-size: 13px; color: var(--m5); text-align: center; }

/* ── Section head ── */
.lp-show { max-width: 1080px; margin: 56px auto 24px; padding: 0 16px; scroll-margin-top: 80px; }
.lp-show-head { text-align: center; max-width: 640px; margin: 0 auto; }
.lp-kicker {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  background: linear-gradient(90deg, #f0c040, #f472b6, #8b5cf6, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-show h2, .lp-steps h2 { margin: 0 0 12px; font-size: clamp(28px, 6vw, 44px); line-height: 1.12; color: var(--text); letter-spacing: -0.01em; }
.lp-show-sub { margin: 0 auto; color: var(--m8); font-size: 16px; line-height: 1.55; }

/* ── App index: every app's orb, a tap jumps to its block ── */
.lp-jump {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 4px;
  margin: 28px auto 8px;
}
.lp-jump-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-sizing: border-box; width: 78px; padding: 10px 2px; border-radius: 18px; text-decoration: none;
  color: var(--m8); font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center;
  transition: background 0.2s, color 0.2s;
}
.lp-jump-item .wz-orb { transition: transform 0.35s cubic-bezier(.3, 1.6, .5, 1); }
@media (hover: hover) {
  .lp-jump-item:hover { color: var(--ln-accent); background: rgba(255, 255, 255, 0.04); }
  .lp-jump-item:hover .wz-orb { transform: translateY(-5px) scale(1.08) rotate(-6deg); }
}
.lp-jump-item:focus-visible { outline: 2px solid var(--ln-accent); outline-offset: 2px; }
@media (max-width: 599px) {
  /* phones: two rows (5 + 4), every app in view without a sideways scroller */
  .lp-jump { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 2px; margin-top: 22px; justify-items: center; }
  .lp-jump-item { width: 100%; padding: 8px 0; font-size: 11px; gap: 6px; }
  .lp-jump-item .wz-orb { --orb-size: 44px !important; }
}

/* ── One app ── */
.lp-app {
  display: grid; align-items: center; gap: 24px 64px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "media copy";
  margin: 96px 0 0; scroll-margin-top: 72px;
}
.lp-app.is-flip { grid-template-areas: "copy media"; }
.lp-jump + .lp-app { margin-top: 48px; }
.lp-app-media { grid-area: media; position: relative; display: flex; justify-content: center; padding: 18px 0; }
.lp-app-copy { grid-area: copy; max-width: 460px; }
.lp-app.is-flip .lp-app-copy { justify-self: end; }

.lp-app-glow { /* the app's own colours, slowly turning behind the phone */
  position: absolute; left: 50%; top: 50%; width: 380px; height: 380px; max-width: 110%; border-radius: 50%;
  transform: translate(-50%, -50%); background: conic-gradient(from 0deg, var(--ln-orb));
  filter: blur(70px); opacity: 0.38; animation: lpGlow 18s linear infinite;
}
@keyframes lpGlow { to { transform: translate(-50%, -50%) rotate(360deg); } }
.lp-app .lp-phone { transform: rotate(-3deg); transition: transform 0.5s cubic-bezier(.2, .8, .2, 1); }
.lp-app.is-flip .lp-phone { transform: rotate(3deg); }
@media (hover: hover) { .lp-app-media:hover .lp-phone { transform: rotate(0deg) translateY(-8px) scale(1.02); } }
.lp-app-badge { /* the app's orb, bobbing on the phone's shoulder */
  position: absolute; z-index: 3; top: 4px; left: calc(50% + var(--pw, 300px) / 2 - 34px);
  animation: lpBob 4.2s ease-in-out infinite;
}
.lp-app.is-flip .lp-app-badge { left: auto; right: calc(50% + 300px / 2 - 34px); }
@keyframes lpBob { 50% { transform: translateY(-9px) rotate(5deg); } }

.lp-app-name { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ln-accent); }
.lp-app h3 { margin: 0 0 14px; font-size: clamp(26px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -0.01em; color: var(--text); }
.lp-app-text { margin: 0 0 20px; font-size: 16px; line-height: 1.6; color: var(--m8); }
.lp-app-gets { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--m5); }
.lp-app-points { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; }
.lp-app-points li { position: relative; padding-left: 32px; font-size: 15px; line-height: 1.45; color: var(--text); }
.lp-app-points li::before { /* a tick in the app's colour */
  content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--ln-accent) 20%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ln-accent) 45%, transparent);
}
.lp-app-points li::after {
  content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 10px;
  border: solid var(--ln-accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.lp-app-cta {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 700; text-decoration: none; color: var(--ln-cta-ink);
  background: linear-gradient(135deg, var(--ln-cta1), var(--ln-cta2));
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--ln-cta1) 70%, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}
@media (hover: hover) { .lp-app-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px color-mix(in srgb, var(--ln-cta1) 85%, transparent); } }
.lp-app-cta:focus-visible { outline: 2px solid var(--ln-accent); outline-offset: 3px; }
.lp-app-cta svg { transition: transform 0.2s; }
@media (hover: hover) { .lp-app-cta:hover svg { transform: translateX(3px); } }

/* Phones: the title first, then the screen, then what you get and the button. */
@media (max-width: 859px) {
  .lp-app, .lp-app.is-flip {
    grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 72px; text-align: center;
    grid-template-areas: "name" "title" "text" "media" "gets" "points" "cta";
  }
  .lp-app-copy { display: contents; }
  .lp-app-name { grid-area: name; }
  .lp-app h3 { grid-area: title; }
  .lp-app-text { grid-area: text; max-width: 520px; justify-self: center; margin-bottom: 6px; }
  .lp-app-gets { grid-area: gets; margin-top: 6px; }
  .lp-app-points { grid-area: points; justify-self: center; text-align: left; }
  .lp-app-cta { grid-area: cta; justify-self: center; }
  .lp-app-media { padding: 22px 0 26px; }
  .lp-app .lp-phone { --pw: min(64vw, 270px); }
  .lp-app-badge, .lp-app.is-flip .lp-app-badge { left: calc(50% + min(64vw, 270px) / 2 - 30px); right: auto; top: 6px; }
  .lp-app-glow { width: 300px; height: 300px; }
}

/* ── How it works ── */
.lp-steps { max-width: 960px; margin: 104px auto 32px; padding: 0 16px; text-align: center; }
.lp-steps-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.lp-steps-list li {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 18px 22px; border-radius: 20px;
  background: rgba(13, 12, 26, 0.72); border: 1px solid rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lp-step-h { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.lp-step-b { margin: 0; font-size: 14px; line-height: 1.5; color: var(--m5); }
.lp-step-n {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 50%;
  font-size: 20px; font-weight: 800; color: #1a0a00; background: linear-gradient(135deg, #f7d774, #e08020);
  box-shadow: 0 8px 22px -8px rgba(240, 192, 64, 0.7);
}
@media (max-width: 680px) { .lp-steps-list { grid-template-columns: minmax(0, 1fr); } .lp-steps-list li { flex-direction: row; flex-wrap: wrap; text-align: left; align-items: center; column-gap: 14px; } .lp-step-n { margin: 0; } .lp-step-h { flex: 1; } .lp-step-b { flex-basis: 100%; padding-left: 58px; } }

/* ── Reveal on scroll (public/js/landing.js adds html.lp-anim and .is-in) ── */
html.lp-anim .lp-app.lp-reveal .lp-phone { opacity: 0; transform: translateY(48px) rotate(-8deg); transition: opacity 0.7s ease, transform 0.9s cubic-bezier(.2, .8, .2, 1); }
html.lp-anim .lp-app.lp-reveal.is-flip .lp-phone { transform: translateY(48px) rotate(8deg); }
html.lp-anim .lp-app.lp-reveal.is-in .lp-phone { opacity: 1; transform: rotate(-3deg); }
html.lp-anim .lp-app.lp-reveal.is-flip.is-in .lp-phone { transform: rotate(3deg); }
html.lp-anim .lp-app.lp-reveal .lp-app-badge { opacity: 0; transition: opacity 0.5s ease 0.5s; }
html.lp-anim .lp-app.lp-reveal.is-in .lp-app-badge { opacity: 1; }
html.lp-anim .lp-steps.lp-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.7s ease; }
html.lp-anim .lp-steps.lp-reveal.is-in { opacity: 1; transform: none; }
@media (hover: hover) { html.lp-anim .lp-app.lp-reveal.is-in .lp-app-media:hover .lp-phone { transform: rotate(0deg) translateY(-8px) scale(1.02); } }

@media (prefers-reduced-motion: reduce) {
  .lp-app-glow, .lp-app-badge, .lp-fan-phone { animation: none; }
  .lp-fan-phone, .lp-app .lp-phone, .lp-jump-item .wz-orb, .lp-app-cta { transition: none; }
}

/* ── Two phones in one block (Feng Shui: Room Scan + Outfit Check), each with a label ── */
.lp-shot { position: relative; display: block; flex: none; }
.lp-app-media.is-duo { --dw: 236px; align-items: flex-start; padding-bottom: 40px; }
.lp-app-media.is-duo .lp-phone { --pw: var(--dw); }
.lp-app-media.is-duo .lp-shot + .lp-shot { z-index: 2; margin: 56px 0 0 calc(var(--dw) * -0.27); transform: rotate(7deg); }
.lp-app-media.is-duo .lp-app-badge { left: calc(50% - var(--dw) * 0.865 - 18px); right: auto; }
.lp-app-media.is-duo .lp-shot + .lp-shot .lp-shot-tag { transform: translateX(-50%) rotate(-7deg); }   /* level, under a tilted phone */
.lp-shot-tag {
  position: absolute; z-index: 3; left: 50%; bottom: -15px; transform: translateX(-50%); white-space: nowrap;
  padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ln-cta-ink); background: linear-gradient(135deg, var(--ln-cta1), var(--ln-cta2));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
@media (max-width: 859px) {
  .lp-app-media.is-duo { --dw: min(44vw, 200px); }
  .lp-app .lp-app-media.is-duo .lp-phone { --pw: var(--dw); }
  .lp-app-media.is-duo .lp-app-badge { left: calc(50% - var(--dw) * 0.865 - 14px); right: auto; }
}
