/* Copyright (c) 2026 Link Mahal. All rights reserved. */
/**
 * Link Mahal mock system — shared tokens, phone shell, mobile-first placement.
 * Loaded after section-specific mock CSS to unify homepage demos.
 */

:root {
  --lm-device-brand: #0fa56b;
  --lm-device-brand-deep: #059669;
  --lm-device-mint: #f6faf7;
  --lm-device-dark: #0c0a09;
  --lm-device-stone-900: #1c1917;
  --lm-device-stone-500: #78716c;
  --lm-device-stone-400: #a8a29e;
  /* Universal mobile mock frame — canonical WhishPay / flow / hero size */
  --lm-mock-phone-scale: 0.9;
  --lm-mock-phone-w: calc(min(78vw, 292px) * var(--lm-mock-phone-scale));
  --lm-device-phone-w: var(--lm-mock-phone-w);
  --lm-flow-phone-w: var(--lm-mock-phone-w);
  --lm-device-phone-radius: 28px;
  --lm-device-shadow-phone:
    0 2px 10px rgba(0, 0, 0, 0.32),
    0 36px 90px -22px rgba(0, 0, 0, 0.65);
  --lm-device-shadow-pill:
    0 2px 6px rgba(28, 25, 23, 0.07),
    0 26px 52px -16px rgba(28, 25, 23, 0.34);
  --lm-device-shadow-card:
    0 2px 8px rgba(28, 25, 23, 0.08),
    0 14px 30px -12px rgba(28, 25, 23, 0.35);
}

@media (min-width: 481px) {
  :root {
    --lm-mock-phone-w: calc(clamp(15rem, 62vw, 18.5rem) * var(--lm-mock-phone-scale));
  }
}

@media (min-width: 640px) {
  :root {
    --lm-mock-phone-w: calc(clamp(15.5rem, 44vw, 19.5rem) * var(--lm-mock-phone-scale));
  }
}

@media (min-width: 901px) {
  :root {
    --lm-mock-phone-w: calc(clamp(16rem, min(32vw, 38vh), 21rem) * var(--lm-mock-phone-scale));
  }
}

@media (min-width: 1280px) {
  :root {
    --lm-mock-phone-w: calc(clamp(16.5rem, min(28vw, 40vh), 22rem) * var(--lm-mock-phone-scale));
  }
}

@media (max-width: 480px) {
  :root {
    --lm-device-phone-radius: 26px;
  }
}

/* —— Ala phone shell —— */
.lm-phone {
  position: relative;
  width: var(--lm-device-phone-w);
  max-width: 100%;
  margin-inline: auto;
}

.lm-phone__halo {
  position: absolute;
  inset: -18% -24% -12%;
  z-index: 0;
  background: radial-gradient(closest-side, rgba(15, 165, 107, 0.19), transparent 72%);
  filter: blur(20px);
  pointer-events: none;
}

.lm-phone__perspective {
  position: relative;
  z-index: 1;
  perspective: 1400px;
}

.lm-phone__shell {
  position: relative;
  border-radius: var(--lm-device-phone-radius);
  background: #fff;
  box-shadow: var(--lm-device-shadow-phone);
  overflow: hidden;
  clip-path: inset(0 round var(--lm-device-phone-radius));
}

.lm-phone--tilt-right .lm-phone__shell {
  transform: rotateY(-7deg);
  transform-origin: center center;
}

.lm-phone--tilt-left .lm-phone__shell {
  transform: rotateY(7deg);
}

.lm-phone__screen {
  aspect-ratio: 9 / 19.5;
  width: 100%;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lm-phone__screen > * {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.lm-phone__sweep {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 62%
  );
  opacity: 0.55;
  animation: lm-device-sweep 11s ease-in-out infinite;
}

/* Landing food-menu mocks — no gloss sweep (looks like a broken overlay) */
.hero-mock .lm-phone__sweep,
.landing-flow-strip .lm-phone__sweep {
  display: none;
}

@keyframes lm-device-sweep {
  0%, 100% { transform: translateX(-120%); }
  45%, 55% { transform: translateX(120%); }
}

.lm-phone__ground {
  position: relative;
  z-index: 0;
  width: 82%;
  height: 2rem;
  margin: -var(--space-3) auto 0;
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.25);
  filter: blur(14px);
}

/* —— Notification pills (Link Mahal cards) —— */
.lm-mock-notify-card {
  border-radius: 26px;
  border: 1px solid rgba(231, 229, 228, 0.7);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 248, 0.96));
  box-shadow: var(--lm-device-shadow-pill);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lm-mock-notify-card__icon {
  box-shadow: var(--shadow-md);
}

.lm-mock-notify-card--wa .lm-mock-notify-card__icon,
.lm-mock-notify-card--success .lm-mock-notify-card__icon {
  background: var(--lm-device-brand);
}

.lm-mock-notify-card__headline {
  color: var(--lm-device-stone-900);
  font-weight: 600;
}

.lm-mock-notify-card__subline {
  color: var(--lm-device-stone-400);
}

.lm-mock-notify-card__highlight {
  color: var(--lm-device-brand-deep);
  font-weight: 700;
}

/* —— Global mock placement: mobile-first, no clipping —— */
.hero-mock,
.hero-mock__canvas,
.hero-mock__stage,
.hero-mock__device,
.hero-mock__phone-wrap,
.landing-hero-visual,
.landing-flow-safari-col,
.landing-flow-safari,
.landing-flow-safari__stage,
.demo-visual,
.demo-devices-mobile,
.lm-ost-visual,
.lm-ost-stage,
.ai-home-mock-wrap,
.lm-setup-concierge__visual-wrap {
  overflow: visible;
}

.lm-mock-device--desktop {
  display: none;
}

.lm-mock-device--phone {
  display: block;
}

@media (min-width: 1024px) {
  .lm-mock-device--desktop {
    display: block;
  }

  .lm-mock-device--phone.lm-mock-device--hide-lg {
    display: none;
  }
}

/* —— Hero —— same phone scale as flow / Whish mocks —— */
.hero-mock {
  --hero-phone-w: var(--lm-mock-phone-w);
  max-width: min(100%, calc(var(--hero-phone-w) + calc(6rem * var(--hero-mock-scale, 1))));
}

@media (min-width: 1025px) {
  .hero-mock {
    --hero-phone-w: var(--lm-mock-phone-w);
  }
}

.hero-mock__phone-wrap {
  padding-top: 0;
}

.hero-mock .lm-phone {
  width: 100%;
}

.hero-mock__orbit .lm-mock-notify--hero-menu {
  inset: 0;
}

/* —— Flow strip —— */
.landing-flow-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2rem);
}

@media (min-width: 1024px) {
  .landing-flow-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }
}

.landing-flow-strip .landing-flow-safari {
  --flow-safari-w: var(--lm-flow-phone-w, var(--lm-device-phone-w));
  padding: 0;
}

.landing-flow-device--phone .landing-flow-screens {
  min-height: 100%;
}

.landing-flow-safari__window .lm-safari__content,
.landing-flow-safari__window .landing-flow-screens {
  min-height: clamp(14rem, 46vw, 17.5rem);
}

.landing-flow-safari__phone .lm-phone__screen .landing-flow-screens {
  min-height: 100%;
  height: 100%;
}

@media (min-width: 1024px) {
  .landing-flow-safari {
    --flow-safari-w: var(--lm-flow-phone-w, clamp(14.5rem, 26vh, 19rem));
  }

  .landing-flow-safari__window .lm-safari__content {
    min-height: 14.5rem;
  }
}

.landing-flow-float {
  max-width: min(14rem, 78vw);
}

/* Flow float placement: landing-flow-strip.css (.landing-flow-orbit) */

/* —— Demo section — mobile snap carousel —— */
.demo-devices-mobile {
  width: 100%;
  max-width: min(100%, 22rem);
  margin-inline: auto;
}

.demo-devices-mobile__panels {
  overflow: visible;
}

.demo-devices-mobile__stage {
  display: flex;
  justify-content: center;
  padding: var(--space-2) 0 0;
}

.demo-devices-mobile__stage .lm-phone,
.demo-devices-mobile__stage .lm-iphone {
  width: var(--lm-device-phone-w);
  max-width: 100%;
}

.demo-devices-mobile__tabs {
  display: none !important;
}

.demo-devices-mobile__tab {
  border-radius: 999px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(231, 229, 228, 0.9);
  background: rgba(255, 255, 255, 0.92);
  color: var(--lm-device-stone-500);
  box-shadow: var(--lm-device-shadow-card);
}

.demo-devices-mobile__tab.is-active {
  background: var(--lm-device-stone-900);
  border-color: var(--lm-device-stone-900);
  color: #fff;
}

@media (min-width: 769px) {
  .demo-devices--desktop {
    display: block;
  }

  .demo-devices-mobile,
  .demo-devices-caption--mobile {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .demo-devices--desktop,
  .demo-devices-caption--desktop {
    display: none !important;
  }

  .demo-visual {
    padding-inline: 0;
  }
}

/* —— Order live — Link Mahal stage sizing —— */
.lm-ost-stage {
  height: clamp(22rem, 68vw, 30rem);
  max-width: min(100%, 22rem);
}

@media (min-width: 640px) {
  .lm-ost-stage {
    max-width: min(100%, 26rem);
    height: clamp(24rem, 58vw, 32rem);
  }
}

@media (min-width: 1024px) {
  .lm-ost-grid {
    flex-direction: row;
    align-items: center;
  }

  .lm-ost-stage {
    width: clamp(20rem, 34vw, 33.75rem);
    height: clamp(24rem, 40vw, 36rem);
    max-width: none;
  }
}

.lm-ost-phone {
  transform: scale(0.72);
  transform-origin: bottom left;
}

@media (min-width: 640px) {
  .lm-ost-phone {
    transform: scale(0.82);
  }
}

@media (min-width: 1024px) {
  .lm-ost-phone {
    transform: scale(1);
  }
}

.lm-ost-dash__window {
  box-shadow: var(--lm-device-shadow-phone);
  border-radius: 1rem;
}

.lm-ost-phone__sheet {
  border-radius: 1.375rem 1.375rem 1rem 1rem;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.22),
    0 24px 56px -18px rgba(0, 0, 0, 0.45);
}

/* —— Setup WhatsApp — Link Mahal palette —— */
.lm-setup-wa-phone {
  width: var(--lm-device-phone-w);
  max-width: 100%;
}

.lm-setup-wa-phone .lm-phone__screen {
  background: #ece5dd;
}

.lm-setup-wa-phone .lm-wa-mock,
.lm-setup-wa-phone .lm-wa-mock__phone {
  height: 100%;
  min-height: 100%;
  border-radius: 0;
  border: none;
  background: transparent;
}

.lm-setup-wa-phone .lm-wa-mock__phone {
  display: flex;
  flex-direction: column;
}

.lm-setup-wa-phone .lm-wa-mock__thread {
  flex: 1;
  min-height: 0;
}

.lm-wa-mock {
  border-radius: 0;
  box-shadow: none;
}

.lm-wa-mock__header {
  background: linear-gradient(180deg, #075e54 0%, #128c7e 100%) !important;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.lm-wa-mock__thread {
  background-color: #e5ddd5 !important;
  min-height: 20rem;
}

.lm-wa-mock__bubble--out {
  background: #d9fdd3 !important;
}

.lm-wa-mock__bubble--in {
  background: #fff !important;
}

.lm-phone__screen .lm-mock-fidelity--food-menu {
  font-size: 16px;
}

.lm-phone__screen .lm-mock-fidelity--store,
.lm-phone__screen .lm-mock-fidelity--checkout,
.lm-phone__screen .lm-mock-fidelity--dashboard,
.lm-phone__screen .lm-mock-fidelity--dpf {
  font-size: 0.88em;
}

.lm-setup-concierge__visual-wrap {
  overflow: visible;
  max-width: min(100%, calc(var(--lm-mock-phone-w) + 1.5rem));
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .lm-setup-concierge__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .lm-setup-concierge__visual-wrap {
    max-width: min(100%, calc(var(--lm-mock-phone-w) + 2rem));
  }
}

/* —— AI section — dark Link Mahal shell on mobile —— */
@media (max-width: 1023px) {
  .ai-home-mock-wrap__stage .lm-mock-device--phone {
    display: block;
  }

  .ai-home-mock-wrap__stage .lm-mock-device--desktop {
    display: none;
  }
}

.ai-home-mock-wrap__stage .lm-phone {
  width: var(--lm-device-phone-w);
}

/* —— Safari windows in marketing — device shadow —— */
.landing-flow-safari__window .lm-safari__frame,
.demo-devices__layer .lm-safari__frame,
.ai-home-mock__safari .lm-safari__frame {
  box-shadow: var(--lm-device-shadow-phone);
  border-radius: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .lm-phone__sweep {
    animation: none;
    opacity: 0;
  }
}

/* —— Mobile-first mock polish (all homepage sections) —— */
@media (max-width: 768px) {
  .landing-hero-visual {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-inline: clamp(0.35rem, 2vw, 0.75rem);
    overflow: visible;
  }

  .hero-mock {
    width: min(100%, calc(var(--lm-mock-phone-w) + calc(3.5rem * var(--hero-mock-scale, 1))));
    max-width: 100%;
    margin-inline: auto;
  }

  .hero-mock__canvas {
    padding:
      calc(clamp(1rem, 3vw, 1.35rem) * var(--hero-mock-scale, 1))
      calc(clamp(0.85rem, 4vw, 1.25rem) * var(--hero-mock-scale, 1))
      calc(0.75rem * var(--hero-mock-scale, 1));
    overflow: visible;
  }

  .hero-mock__stage,
  .hero-mock__phone-wrap,
  .hero-mock .lm-phone {
    width: 100%;
    max-width: var(--lm-mock-phone-w);
    margin-inline: auto;
  }

  .hero-mock .lm-phone--tilt-right .lm-phone__shell,
  .hero-mock .lm-phone--tilt-left .lm-phone__shell {
    transform: none;
  }

  .hero-mock__plate {
    width: min(112%, calc(var(--lm-mock-phone-w) + calc(2rem * var(--hero-mock-scale, 1))));
    height: 88%;
    top: 54%;
  }

  .lm-mock-notify--hero-menu {
    inset: -4% -8% -2% -6%;
  }

  .landing-flow-safari {
    max-width: min(100%, calc(var(--lm-mock-phone-w) + 2rem));
    margin-inline: auto;
    padding-inline: 0.5rem;
  }

  .demo-devices-mobile {
    max-width: min(100%, calc(var(--lm-mock-phone-w) + 2rem));
  }

  .ai-home-mock-wrap {
    max-width: min(100%, calc(var(--lm-mock-phone-w) + 2.5rem));
    padding-inline: 0.35rem;
  }

  .lm-setup-concierge__visual-wrap {
    max-width: min(100%, calc(var(--lm-mock-phone-w) + 1.5rem));
  }

  .landing-order-straight .lm-ost-stage {
    max-width: min(100%, calc(var(--lm-mock-phone-w) + 4rem));
  }
}

@media (max-width: 480px) {
  .hero-mock__orbit .lm-mock-notify--hero-menu .lm-mock-notify__slot--orbit-0 {
    top: 4%;
    left: -2%;
  }

  .hero-mock__orbit .lm-mock-notify--hero-menu .lm-mock-notify__slot--orbit-1 {
    top: auto;
    bottom: 8%;
    left: -2%;
    right: auto;
  }

  .hero-mock__orbit .lm-mock-notify--hero-menu .lm-mock-notify-card {
    max-width: min(12rem, 72vw);
  }
}

/* View Demo — centered on the phone column, not the wider orbit */
.lm-mock-demo-link {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0.7rem 0 0;
  padding: 0;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.hero-mock__stage .lm-mock-demo-link,
.landing-flow-safari .lm-mock-demo-link {
  width: 100%;
}

.landing-flow-safari .lm-mock-demo-link {
  width: var(--lm-flow-phone-w, var(--lm-device-phone-w));
  max-width: 100%;
  margin-inline: auto;
}

.lm-mock-demo-link__a {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lm-accent-deep, #0f766e);
  text-decoration: none;
}

.lm-mock-demo-link__a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.lm-mock-demo-link__a .lm-icon {
  width: 0.85rem;
  height: 0.85rem;
}
