/* ============================================================
   Lipsmatch, dedicated AI lip-sync product page
   Stats band, scenario wall, tier cards, comparison matrix,
   language chips and closing CTA. Vanilla, theme-aware.
   NOTE: template sets html { font-size: 62.5% } so 1rem = 10px.
   Reuses tokens (--accent, --t-bright, --base-tint, fonts) and
   the .ls-* showcase / feature / step / eyebrow components.
   ============================================================ */

.lm {
  --lm-radius: 24px;
  --lm-screen: #0d0e11;          /* cinema-dark surfaces, fixed in both themes */
  --lm-screen-2: #15161b;
  position: relative;
  font-family: var(--_font-default);
}
.lm * { box-sizing: border-box; }

/* =========================================================
   Auto-cycling hero player, one take gliding through languages
   ========================================================= */
.lm-cycle {
  position: relative;
  overflow: hidden;
  border-radius: var(--lm-radius);
  border: 1px solid var(--st-muted);
  aspect-ratio: 16 / 9;
  background: var(--lm-screen);
  cursor: pointer;
  isolation: isolate;
}
.lm-cycle__layer {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.lm-cycle__layer.is-front { opacity: 1; }
/* the flash-slide: incoming footage eases in while a light streak
   sweeps across, one fast beat per language switch */
.lm-cycle.is-flash .lm-cycle__layer.is-front {
  animation: lm-slide-in .38s cubic-bezier(.22,1,.36,1);
}
@keyframes lm-slide-in {
  0% { transform: translateX(3%) scale(1.02); opacity: .35; }
  100% { transform: none; opacity: 1; }
}
.lm-cycle__flash {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.85) 50%, transparent 70%);
  opacity: 0;
  transform: translateX(-70%);
  pointer-events: none;
}
.lm-cycle.is-flash .lm-cycle__flash { animation: lm-flash .38s ease-out; }
@keyframes lm-flash {
  0% { opacity: 0; transform: translateX(-70%); }
  35% { opacity: .8; }
  100% { opacity: 0; transform: translateX(70%); }
}
/* centred "tap to unmute" pill, sync.so-style; the whole stage is the button */
.lm-cycle__unmute {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 1rem 1.8rem;
  border-radius: 100px;
  background: rgba(13, 14, 17, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--_font-accent);
  font-size: 1.4rem; font-weight: var(--fw-medium);
  letter-spacing: .01em;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.lm-cycle__unmute i { font-size: 1.7rem; }
.lm-cycle.is-muted .lm-cycle__unmute { opacity: 1; }
/* on fine pointers the pill trails the cursor around the player;
   JS moves it via inline transform once .is-cursor is set */
.lm-cycle__unmute.is-cursor {
  top: 0; left: 0;
  transition: transform .18s cubic-bezier(.22,1,.36,1), opacity .3s ease;
  will-change: transform;
}

.lm-cycle__sound {
  position: absolute; right: 1.6rem; bottom: 1.6rem;
  width: 4.4rem; height: 4.4rem;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(13, 14, 17, .62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff; font-size: 1.9rem;
  cursor: pointer;
  transition: border-color .25s, color .25s;
}
.lm-cycle__sound.is-on { color: var(--accent); border-color: rgba(var(--accent-rgb), .5); }
/* plain-text language rail under the frame, reference style:
   the active word is lit, the rest sit dimmed */
.lm-cycle-wrap { position: relative; }
.lm-cycle__langs {
  display: flex; align-items: center; justify-content: safe center;
  gap: clamp(1.8rem, 3vw, 3.6rem);
  margin-top: 1.8rem;
  padding: 0.4rem 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.lm-cycle__langs::-webkit-scrollbar { display: none; }
.lm-cycle__lang {
  flex: 0 0 auto;
  padding: 0.4rem 0.2rem;
  border: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--_font-accent);
  font-size: clamp(1.5rem, 1.7vw, 1.8rem);
  font-weight: var(--fw-regular);
  text-transform: lowercase;
  letter-spacing: .01em;
  color: var(--t-muted);
  opacity: .55;
  cursor: pointer;
  transition: opacity .25s, color .25s;
}
.lm-cycle__lang:hover { opacity: .85; }
.lm-cycle__lang.is-active {
  color: var(--t-bright);
  font-weight: var(--fw-medium);
  opacity: 1;
}
.lm-cycle-note {
  display: flex; align-items: center; gap: 0.8rem;
  margin: 1.2rem 0 0;
  font-size: 1.35rem; color: var(--t-muted);
}
.lm-cycle-note i { color: var(--accent); font-size: 1.7rem; flex: 0 0 auto; }

/* =========================================================
   Demo tiles grid (tiles reuse .lm-tile below)
   ========================================================= */
.lm-demos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: clamp(1.6rem, 2.4vw, 2.8rem);
}

/* =========================================================
   Proof stats band
   ========================================================= */
.lm-stats {
  position: relative;
  overflow: hidden;
  border-radius: var(--lm-radius);
  border: 1px solid var(--st-muted);
  padding: clamp(2.8rem, 4vw, 4.4rem);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(var(--accent-rgb), .1), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgba(var(--accent-rgb), .06), transparent 55%),
    var(--base-tint);
}
.lm-stats__head {
  display: flex; flex-direction: column; gap: 1rem;
  max-width: 70rem; margin-bottom: clamp(2.8rem, 4vw, 4rem);
}
.lm-stats__eyebrow {
  display: inline-flex; align-items: center; gap: 0.8rem;
  font-family: var(--_font-accent);
  font-size: 1.25rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: var(--fw-semibold); color: var(--accent);
}
.lm-stats__eyebrow i { font-size: 1.7rem; }
.lm-stats__lead { font-size: 1.6rem; line-height: 1.55; color: var(--t-muted); margin: 0; }
.lm-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: clamp(1.6rem, 2.4vw, 2.8rem);
}
.lm-stat {
  position: relative;
  padding-left: 2.2rem;
  border-left: 2px solid rgba(var(--accent-rgb), .35);
}
.lm-stat__num {
  display: flex; align-items: baseline; gap: 0.2rem;
  font-family: var(--_font-accent);
  font-weight: var(--fw-semibold);
  font-size: clamp(4.4rem, 6vw, 6.6rem);
  line-height: 0.9; letter-spacing: -0.02em;
  color: var(--t-bright);
  margin-bottom: 1.4rem;
}
.lm-stat__num em {
  font-style: normal;
  font-size: 0.42em;
  font-weight: var(--fw-medium);
  color: var(--accent);
}
.lm-stat__label {
  display: block;
  font-family: var(--_font-accent);
  font-size: 1.7rem; font-weight: var(--fw-medium);
  color: var(--t-bright); line-height: 1.2; margin-bottom: 0.5rem;
}
.lm-stat__sub { display: block; font-size: 1.35rem; color: var(--t-muted); line-height: 1.45; }

/* =========================================================
   Scenario wall, four looping output tiles
   ========================================================= */
.lm-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.6rem, 2.4vw, 2.8rem);
}
@media (max-width: 820px) {
  .lm-wall { grid-template-columns: minmax(0, 1fr); }
}
.lm-tile {
  position: relative;
  margin: 0;
  border-radius: var(--lm-radius);
  border: 1px solid var(--st-muted);
  background: var(--base-tint);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s, box-shadow .35s;
}
.lm-tile__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--lm-screen);
}
.lm-tile__media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.lm-tile__cap {
  padding: 1.8rem 2rem 2rem;
}
.lm-tile__tag {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--_font-accent);
  font-size: 1.3rem; letter-spacing: .08em; text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.lm-tile__tag i { font-size: 1.6rem; }
.lm-tile__cap p {
  margin: 0;
  font-size: 1.45rem; line-height: 1.5;
  color: var(--t-muted);
  max-width: 52ch;
}
/* bare variant, reference style: no caption card, just a small
   lowercase label sitting on the footage over a soft scrim */
.lm-tile--bare .lm-tile__media::after {
  content: "";
  position: absolute; inset: 55% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55));
  pointer-events: none;
}
.lm-tile__label {
  position: absolute; left: 1.6rem; bottom: 1.4rem;
  z-index: 1;
  color: #fff;
  font-family: var(--_font-accent);
  font-size: 1.45rem; font-weight: var(--fw-medium);
  text-transform: lowercase;
  letter-spacing: .01em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
  pointer-events: none;
}
/* hover lift on fine pointers only, touch devices skip the paint work */
@media (hover: hover) and (pointer: fine) {
  .lm-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), .35);
    box-shadow: 0 14px 30px -10px rgba(0,0,0,.5), 0 30px 64px -24px rgba(var(--accent-rgb), .22);
  }
}

/* =========================================================
   Tier cards, three finish levels
   ========================================================= */
.lm-deploy__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
  gap: 1.6rem;
}
.lm-deploy__card {
  position: relative;
  padding: 2.6rem;
  border-radius: 1.8rem;
  border: 1px solid var(--st-muted);
  background: var(--base-tint);
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s, box-shadow .35s;
}
@media (hover: hover) and (pointer: fine) {
  .lm-deploy__card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), .35);
    box-shadow: 0 14px 30px -10px rgba(0,0,0,.5), 0 30px 64px -24px rgba(var(--accent-rgb), .22);
  }
}
.lm-deploy__card--feature {
  border-color: rgba(var(--accent-rgb), .4);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(var(--accent-rgb), .1), transparent 60%),
    var(--base-tint);
}
.lm-deploy__icon {
  width: 5rem; height: 5rem; border-radius: 1.2rem;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), .12);
  color: var(--accent); font-size: 2.4rem;
  margin-bottom: 1.6rem;
}
.lm-deploy__card h3 {
  font-family: var(--_font-accent);
  font-size: 2rem; font-weight: var(--fw-medium);
  color: var(--t-bright); margin: 0 0 0.8rem; line-height: 1.15;
}
.lm-deploy__card p { font-size: 1.45rem; line-height: 1.5; color: var(--t-muted); margin: 0 0 1.6rem; }
.lm-deploy__tag {
  display: inline-flex; align-items: center;
  font-size: 1.25rem; font-weight: var(--fw-semibold);
  letter-spacing: .04em;
  color: var(--accent);
  padding-top: 1.4rem;
  border-top: 1px solid var(--st-muted);
  width: 100%;
}

/* =========================================================
   Comparison matrix, four roads to multilingual
   ========================================================= */
.lm-compare {
  border-radius: var(--lm-radius);
  border: 1px solid var(--st-muted);
  background: var(--base-tint);
  overflow: hidden;
}
.lm-compare__row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--st-muted);
}
.lm-compare__row:last-child { border-bottom: none; }
.lm-compare__row--head {
  background: rgba(var(--accent-rgb), .04);
  border-bottom: 1px solid var(--st-bright);
}
.lm-compare__rowhead,
.lm-compare__col {
  padding: 1.6rem 1.8rem;
  font-size: 1.45rem; line-height: 1.35;
}
.lm-compare__rowhead {
  font-family: var(--_font-accent);
  font-weight: var(--fw-medium);
  color: var(--t-bright);
}
.lm-compare__col {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: var(--t-muted);
  border-left: 1px solid var(--st-muted);
  height: 100%;
}
.lm-compare__row--head .lm-compare__col {
  font-family: var(--_font-accent);
  font-size: 1.5rem; font-weight: var(--fw-semibold);
  color: var(--t-bright);
  text-transform: none;
}
/* per-cell sentiment: every cell carries its own verdict icon so the
   eye can score a column without reading a word */
.lm-compare__col i { font-size: 1.4rem; flex: 0 0 auto; }
.lm-compare__col[data-good] { color: var(--t-bright); }
.lm-compare__col[data-good] i { color: var(--accent); }
.lm-compare__col[data-mid] { color: var(--t-muted); }
.lm-compare__col[data-mid] i { color: var(--t-muted); opacity: .7; }
.lm-compare__col[data-bad] { color: var(--t-muted); opacity: .75; }
.lm-compare__col[data-bad] i { color: #e0655f; opacity: .9; }
/* verdict footer: one line that lands the trade each road makes */
.lm-compare__row--verdict {
  border-top: 1px solid var(--st-bright);
  background: rgba(var(--accent-rgb), .03);
}
.lm-compare__row--verdict .lm-compare__rowhead {
  font-size: 1.25rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--t-muted);
}
.lm-compare__row--verdict .lm-compare__col {
  font-family: var(--_font-accent);
  font-weight: var(--fw-medium);
  font-style: italic;
  color: var(--t-bright);
}
.lm-compare__row--verdict .lm-compare__col--hero { color: var(--accent) !important; }
/* hero column, Lipsmatch */
.lm-compare__col--hero {
  position: relative;
  background: rgba(var(--accent-rgb), .07);
  color: var(--t-bright) !important;
  font-weight: var(--fw-medium);
  border-left: 1px solid rgba(var(--accent-rgb), .3);
}
.lm-compare__row--head .lm-compare__col--hero {
  background: var(--accent);
  color: #161616 !important;
}
.lm-compare__row--head .lm-compare__col--hero i { color: #161616; font-size: 1.6rem; }
.lm-compare__col--hero i { color: var(--accent); font-size: 1.5rem; flex: 0 0 auto; }
@media (max-width: 900px) {
  /* keep the matrix intact, let it scroll horizontally inside its own box */
  .lm-compare { overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .lm-compare__row { min-width: 76rem; }
  .lm-compare__rowhead,
  .lm-compare__col { padding: 1.4rem 1.4rem; font-size: 1.35rem; }
  .lm-compare::-webkit-scrollbar { height: 6px; }
  .lm-compare::-webkit-scrollbar-thumb { background: var(--st-bright); border-radius: 100px; }
}

/* =========================================================
   Language chips, native script first
   ========================================================= */
.lm-chips { display: flex; flex-wrap: wrap; gap: 1rem; }
.lm-chip {
  display: inline-flex; align-items: baseline; gap: 0.9rem;
  padding: 1.1rem 1.8rem;
  border-radius: 100px;
  border: 1px solid var(--st-muted);
  background: var(--base-tint);
  color: var(--t-muted);
  font-family: var(--_font-accent);
  font-size: 1.35rem; font-weight: var(--fw-medium);
  transition: border-color .3s, transform .3s, background .3s;
}
.lm-chip em {
  font-style: normal;
  font-size: 1.6rem;
  color: var(--t-bright);
}
@media (hover: hover) and (pointer: fine) {
  .lm-chip:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    background: rgba(var(--accent-rgb), .06);
  }
}
.lm-chip--more {
  border-style: dashed;
  border-color: rgba(var(--accent-rgb), .45);
  color: var(--accent);
}
.lm-chip--more em { color: var(--accent); }

/* =========================================================
   Closing CTA band, filmstrip motif
   ========================================================= */
.lm-cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--lm-radius);
  border: 1px solid rgba(var(--accent-rgb), .3);
  padding: clamp(3.2rem, 6vw, 6.4rem) clamp(2.4rem, 5vw, 5.6rem);
  text-align: center;
  background:
    radial-gradient(120% 120% at 50% -20%, rgba(var(--accent-rgb), .16), transparent 60%),
    linear-gradient(180deg, var(--lm-screen-2), var(--lm-screen));
  color: #fff;
  isolation: isolate;
}
.lm-cta__glow {
  position: absolute; inset: -40% 20% auto;
  height: 60%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(var(--accent-rgb), .35), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: lm-cta-glow 7s ease-in-out infinite;
}
@keyframes lm-cta-glow {
  0%, 100% { opacity: .55; transform: translateY(0) scale(1); }
  50% { opacity: .9; transform: translateY(8%) scale(1.08); }
}
/* a strip of sprocket frames sliding along the bottom edge */
.lm-cta__frames {
  position: absolute; inset: auto 0 0;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 0.9rem; height: 5.2rem;
  padding: 0 2rem;
  opacity: .4;
  z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000);
  mask-image: linear-gradient(180deg, transparent, #000);
}
.lm-cta__frames span {
  flex: 0 0 auto;
  width: 6.4rem; height: 3.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .08);
  animation: lm-cta-frame 2.6s ease-in-out infinite;
}
.lm-cta__frames span:nth-child(odd)  { animation-delay: .3s; }
.lm-cta__frames span:nth-child(3n)   { animation-delay: .7s; }
.lm-cta__frames span:nth-child(4n)   { animation-delay: 1.1s; }
@keyframes lm-cta-frame {
  0%, 100% { opacity: .35; transform: translateY(0.4rem); }
  50% { opacity: 1; transform: translateY(0); }
}
.lm-cta__eyebrow {
  display: inline-flex; align-items: center; gap: 0.8rem;
  font-family: var(--_font-accent);
  font-size: 1.25rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: var(--fw-semibold); color: var(--accent);
  margin-bottom: 1.8rem;
}
.lm-cta__dot {
  width: 0.8rem; height: 0.8rem; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6);
  animation: lm-pulse 1.8s ease-out infinite;
}
@keyframes lm-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55); }
  100% { box-shadow: 0 0 0 1.4rem rgba(var(--accent-rgb), 0); }
}
.lm-cta__title {
  font-family: var(--_font-accent);
  font-weight: var(--fw-medium);
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1.05; letter-spacing: -0.02em;
  color: #fff;
  max-width: 22ch; margin: 0 auto 1.8rem;
}
.lm-cta__lead {
  font-size: clamp(1.5rem, 1.8vw, 1.8rem); line-height: 1.55;
  color: rgba(255,255,255,.72);
  max-width: 58ch; margin: 0 auto clamp(2.8rem, 4vw, 3.6rem);
}
.lm-cta__actions {
  display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center;
  margin-bottom: 2.8rem;
}
.lm-cta .btn-outline {
  border-color: rgba(255,255,255,.25);
  color: #fff;
}
.lm-cta__meta {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.4rem;
  font-size: 1.3rem; color: rgba(255,255,255,.55);
  margin: 0;
}
.lm-cta__meta i { color: var(--accent); font-size: 1.5rem; margin-right: 0.3rem; }

/* =========================================================
   Touch-device perf gate, join the site-wide standard:
   no blur filters, no ambient animation on coarse pointers
   ========================================================= */
@media (pointer: coarse) {
  .lm-cta__glow { filter: none; animation: none; opacity: .4; }
  .lm-cta__frames span { animation: none; opacity: .6; transform: none; }
  .lm-tile, .lm-deploy__card, .lm-chip { transition: none; }
  .lm-cycle__sound,
  .lm-cycle__unmute {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(13, 14, 17, .82);
  }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .lm-cta__glow,
  .lm-cta__frames span,
  .lm-cta__dot { animation: none; }
  .lm-cycle.is-flash .lm-cycle__flash,
  .lm-cycle.is-flash .lm-cycle__layer.is-front { animation: none; }
  .lm-cycle__layer { transition: none; }
  .lm-tile, .lm-deploy__card, .lm-chip { transition: none; }
}
