/* TrickerAI landing page — mobile-first.
   Tokens, .scanner, .label-pill and .pressable come from /app/css/base.css. */

:root {
  --lp-text-2: #6f6863; /* warm gray with AA contrast on cream, for body copy */
  --lp-gutter: 20px;
  --lp-nav-h: 56px;
  --lp-max: 1120px;
}

/* base.css is written for the full-screen app; the landing page scrolls normally. */
html,
body {
  height: auto;
}
body.lp {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior: auto;
}
main,
.lp-footer {
  overflow-x: hidden;
  overflow-x: clip;
}

ion-icon {
  width: 1em;
  height: 1em;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(123, 92, 250, 0.5);
  outline-offset: 3px;
}

.lp-wrap {
  width: 100%;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding-left: max(var(--lp-gutter), env(safe-area-inset-left));
  padding-right: max(var(--lp-gutter), env(safe-area-inset-right));
}

.lp-center {
  text-align: center;
}

.lp-accent {
  color: var(--accent);
}

.lp-top {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

/* ---------- Nav ---------- */

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top);
  background: rgba(250, 247, 244, 0.86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lp-nav.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 14px rgba(26, 28, 34, 0.04);
}

.lp-nav-in {
  height: var(--lp-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin-left: -4px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}
.lp-brand img {
  width: 34px;
  height: 34px;
}

.lp-nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.1px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(98, 66, 217, 0.26);
}
/* 48px tall hit area around the slim pill. */
.lp-nav-cta::after {
  content: '';
  position: absolute;
  inset: -4px -2px;
}

/* ---------- Buttons ---------- */

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  --press-scale: 0.95;
}
.lp-btn ion-icon {
  font-size: 20px;
  transition: transform 0.25s var(--ease-out);
}
.lp-btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--sh-accent);
}
.lp-btn-xl {
  min-height: 62px;
  font-size: 19px;
}
@media (hover: hover) {
  .lp-btn-accent:hover,
  .lp-nav-cta:hover {
    background: #6f4ff5;
  }
  .lp-btn:hover ion-icon {
    transform: translateX(3px);
  }
}

/* ---------- Hero ---------- */

.lp-hero {
  padding: 14px 0 12px;
}

.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}

.lp-h1 {
  max-width: 12em;
  margin: 0;
  font-size: clamp(34px, 10.2vw, 46px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.lp-lede {
  max-width: 30em;
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--lp-text-2);
  text-wrap: balance;
  animation: fadeInUp 0.5s 0.05s var(--ease-out) both;
}

.lp-demo {
  position: relative;
  width: 100%;
  margin-top: 18px;
  animation: fadeInUp 0.5s 0.1s var(--ease-out) both;
}
/* Hold the widget's space while it loads so nothing jumps. */
.lp-demo:empty {
  min-height: 420px;
}

.lp-hero-cta {
  width: 100%;
  max-width: 460px;
  margin-top: 18px;
  animation: fadeInUp 0.5s 0.15s var(--ease-out) both;
}

.lp-micro {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--lp-text-2);
}

/* ---------- Fallback phone (only when the demo widget can't load) ---------- */

.lp-demo.is-fallback {
  display: flex;
  justify-content: center;
  padding: 6px 0 10px;
}
.lp-demo.is-fallback::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360px;
  height: 360px;
  margin: -180px 0 0 -180px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(123, 92, 250, 0.2), rgba(123, 92, 250, 0));
  pointer-events: none;
}

.lp-phone {
  position: relative;
  display: block;
  width: 200px;
  height: 408px;
  padding: 8px;
  border-radius: 40px;
  background: #121317;
  box-shadow: inset 0 0 0 1.5px #3a3c43, 0 28px 56px -18px rgba(26, 28, 34, 0.45),
    0 14px 30px -14px rgba(98, 66, 217, 0.4);
  --press-scale: 0.98;
}
.lp-phone-screen {
  position: relative;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--surface-muted);
  isolation: isolate;
}
.lp-phone-island {
  position: absolute;
  top: 15px;
  left: 50%;
  width: 62px;
  height: 18px;
  margin-left: -31px;
  border-radius: 10px;
  background: #000;
  z-index: 3;
}
.lp-phone .scanner {
  transition: opacity 0.45s ease;
}
.lp-phone .scanner.is-entering {
  opacity: 0;
}
/* Longer hold on the "after" than the in-app cards, so each prank lands. */
.lp-phone .scanner .after {
  animation: lpScanReveal 5s infinite;
}
.lp-phone .scanner .line {
  animation: lpScanLine 5s infinite;
}
.lp-phone-pill {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 2;
  display: flex;
}
.lp-phone-pill .label-pill {
  font-size: 12px;
  animation: fadeInUp 0.35s var(--ease-out) both;
}

@keyframes lpScanReveal {
  0%,
  16% {
    clip-path: inset(0 0 100% 0);
    animation-timing-function: ease-in-out;
  }
  40%,
  76% {
    clip-path: inset(0 0 0 0);
    animation-timing-function: ease-in-out;
  }
  100% {
    clip-path: inset(0 0 100% 0);
  }
}
/* Moves the full-height .line layer (base.css) on the compositor, not `top`. */
@keyframes lpScanLine {
  0%,
  16% {
    transform: translateY(-100%);
    opacity: 0;
    animation-timing-function: ease-in-out;
  }
  17%,
  39% {
    opacity: 1;
  }
  40%,
  76% {
    transform: translateY(0);
    opacity: 0;
    animation-timing-function: ease-in-out;
  }
  77%,
  99% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* ---------- Sections ---------- */

.lp-section {
  padding: 32px 0;
  scroll-margin-top: calc(var(--lp-nav-h) + env(safe-area-inset-top));
}

.lp-h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.6px;
  text-wrap: balance;
}

.lp-sub {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--lp-text-2);
  text-wrap: balance;
}

/* ---------- Pick your prank (native swipe row) ---------- */

.lp-pick {
  padding-bottom: 12px;
}

.lp-row-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.lp-row-nav {
  display: none;
  gap: 8px;
}

.lp-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  box-shadow: var(--sh-soft);
  --press-scale: 0.88;
}
.lp-arrow[disabled] {
  opacity: 0.35;
  cursor: default;
}

.lp-row {
  --row-pad: max(var(--lp-gutter), calc((100% - var(--lp-max)) / 2 + var(--lp-gutter)));
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--row-pad);
  padding: 16px var(--row-pad) 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lp-row::-webkit-scrollbar {
  display: none;
}

.lp-card {
  position: relative;
  flex: none;
  width: 152px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-muted);
  box-shadow: var(--sh-card);
  scroll-snap-align: start;
  text-decoration: none;
  -webkit-user-drag: none;
}
.lp-card .scanner .after,
.lp-card .scanner .line {
  animation-delay: var(--scan-delay, 0s);
}

/* ---------- How it works (three tiny steps) ---------- */

.lp-steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 8px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-card);
  text-align: center;
}

.lp-step-ic {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: var(--r-squircle);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-size: 24px;
}

.lp-step-n {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 0 3px var(--surface);
}

.lp-step-t {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.2px;
  text-wrap: balance;
}

/* ---------- Pricing ---------- */

.lp-pricing .lp-wrap {
  max-width: 560px;
}

.lp-price-card {
  margin-top: 22px;
  padding: 22px 16px 18px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--sh-card);
}

.lp-plan {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1.5px solid var(--border-strong);
}
.lp-plan + .lp-plan {
  margin-top: 12px;
}
.lp-plan-best {
  border: 2px solid var(--accent);
  background: var(--accent-tint);
}

.lp-badge {
  position: absolute;
  top: -12px;
  left: 14px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lp-plan-info {
  min-width: 0;
}
.lp-plan-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.lp-plan-desc {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--lp-text-2);
}

.lp-plan-price {
  flex: none;
  margin: 0;
  text-align: right;
}
.lp-plan-price strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}
.lp-plan-price span {
  font-size: 13px;
  font-weight: 600;
  color: var(--lp-text-2);
}

.lp-perks {
  list-style: none;
  margin: 20px 4px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.lp-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}
.lp-perks ion-icon {
  font-size: 22px;
  color: var(--accent);
}

.lp-fine {
  margin: 14px 4px 0;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--lp-text-2);
}

/* ---------- FAQ ---------- */

.lp-faq .lp-wrap {
  max-width: 720px;
}

.lp-faq-list {
  margin-top: 18px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--sh-card);
  overflow: hidden;
}

.lp-faq-list details + details {
  border-top: 1px solid var(--border);
}

.lp-faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 14px 18px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  list-style: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.lp-faq-list summary::-webkit-details-marker {
  display: none;
}
.lp-faq-list summary ion-icon {
  flex: none;
  font-size: 22px;
  color: var(--text-2);
  transition: transform 0.25s var(--ease-out);
}
.lp-faq-list details[open] summary ion-icon {
  transform: rotate(45deg);
}
.lp-faq-list details p {
  margin: 0;
  padding: 0 18px 18px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--lp-text-2);
}

/* ---------- Footer ---------- */

.lp-footer {
  margin-top: 10px;
  padding: 26px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
.lp-footer-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.lp-brand-sm {
  font-size: 18px;
}
.lp-brand-sm img {
  width: 28px;
  height: 28px;
}
.lp-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 6px;
}
.lp-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
@media (hover: hover) {
  .lp-footer-links a:hover {
    color: var(--accent-dark);
  }
}
.lp-copy {
  margin: 0;
  font-size: 14px;
  color: var(--lp-text-2);
}
/* EN / SV switch (js/landing-i18n.js) */
.lp-lang {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin: 2px 0 4px;
  border-radius: 999px;
  background: var(--surface, #fff);
  box-shadow: 0 0 0 1px var(--border);
}
.lp-lang-btn {
  min-width: 44px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lp-text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
}
.lp-lang-btn.is-active {
  background: var(--text, #1a1c22);
  color: #fff;
}
.lp-lang-btn:focus-visible {
  outline: 2px solid var(--accent, #7b5cfa);
  outline-offset: 2px;
}

/* ---------- Sticky mobile CTA ---------- */

.lp-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(250, 247, 244, 0.9);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.35s var(--ease-out), visibility 0s linear 0.35s;
}
.lp-sticky.is-shown {
  transform: none;
  visibility: visible;
  transition: transform 0.35s var(--ease-out), visibility 0s;
}
.lp-sticky .lp-btn {
  padding: 0 16px;
  font-size: clamp(15px, 4.3vw, 17px);
}

/* ---------- Scroll reveal (enabled by landing.js) ---------- */

.lp-reveal-on .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.lp-reveal-on .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Small phones ---------- */

@media (max-width: 359px) {
  :root {
    --lp-gutter: 16px;
  }
  .lp-step-t {
    font-size: 15px;
  }
}

/* Short phones (e.g. 375x667): tighten the hero so the CTA sits right under the demo. */
@media (max-width: 759px) and (max-height: 700px) {
  :root {
    --lp-nav-h: 52px;
  }
  .lp-hero {
    padding-top: 6px;
  }
  .lp-h1 {
    font-size: clamp(31px, 9vw, 38px);
  }
  .lp-lede {
    margin-top: 6px;
    font-size: 16px;
  }
  .lp-demo {
    margin-top: 10px;
  }
  .lp-demo:empty {
    min-height: 400px;
  }
  .lp-hero-cta {
    margin-top: 10px;
  }
  .lp-btn-xl {
    min-height: 56px;
    font-size: 18px;
  }
  .lp-phone {
    width: 186px;
    height: 380px;
    border-radius: 38px;
  }
  .lp-phone-screen {
    border-radius: 30px;
  }
}

/* Short phones: a smaller demo stage keeps the CTA on screen (e.g. SE at 375x667). */
@media (max-width: 759px) and (max-height: 720px) {
  .lp-hero .tk-demo__stage {
    width: min(100%, 360px, 74vw, 38svh);
  }
  .lp-hero .tk-demo {
    gap: 10px;
  }
}

/* Very short (SE with Safari toolbars, ~548px): the CTA moves up under the sub,
   above the demo. */
@media (max-width: 759px) and (max-height: 600px) {
  .lp-hero .lp-demo {
    order: 2;
  }
  .lp-hero .lp-hero-cta {
    margin-top: 14px;
  }
  .lp-hero .lp-micro {
    margin-top: 8px;
  }
  .lp-hero .tk-demo__stage {
    width: min(100%, 360px, 74vw, 46svh);
  }
}

/* ---------- Tablet + desktop ---------- */

@media (min-width: 760px) {
  .lp-sticky {
    display: none;
  }
  .lp-section {
    padding: 48px 0;
  }
  .lp-h2 {
    font-size: 36px;
    letter-spacing: -0.9px;
  }
  .lp-sub {
    font-size: 17px;
  }
  .lp-row-nav {
    display: flex;
  }
  .lp-card {
    width: 196px;
    padding: 12px;
  }
  .lp-card .label-pill {
    font-size: 12px;
  }
  .lp-steps {
    gap: 16px;
    max-width: 760px;
    margin: 24px auto 0;
  }
  .lp-step {
    flex-direction: row;
    justify-content: center;
    gap: 14px;
    padding: 20px 16px;
    text-align: left;
  }
  .lp-step-t {
    font-size: 17px;
  }
  .lp-phone {
    width: 250px;
    height: 510px;
    padding: 10px;
    border-radius: 48px;
  }
  .lp-phone-screen {
    border-radius: 38px;
  }
  .lp-phone-island {
    top: 19px;
    width: 78px;
    height: 22px;
    margin-left: -39px;
    border-radius: 12px;
  }
}

@media (min-width: 960px) {
  :root {
    --lp-gutter: 32px;
    --lp-nav-h: 68px;
  }
  .lp-brand {
    font-size: 22px;
  }
  .lp-brand img {
    width: 38px;
    height: 38px;
  }
  .lp-nav-cta {
    height: 44px;
    padding: 0 22px;
    font-size: 16px;
  }
  .lp-nav-cta::after {
    inset: -2px;
  }
  .lp-hero {
    padding: 40px 0 36px;
  }
  /* Copy on the left (vertically centred), demo on the right. */
  .lp-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    grid-template-rows: 1fr auto auto auto 1fr;
    grid-template-areas:
      '. demo'
      'h1 demo'
      'lede demo'
      'cta demo'
      '. demo';
    column-gap: 56px;
    justify-items: start;
    text-align: left;
  }
  .lp-h1 {
    grid-area: h1;
    font-size: clamp(52px, 4.7vw, 70px);
    max-width: 9.4em;
  }
  .lp-lede {
    grid-area: lede;
    margin-top: 16px;
    font-size: 21px;
  }
  .lp-demo {
    grid-area: demo;
    margin-top: 0;
    align-self: center;
  }
  .lp-demo:empty {
    min-height: 560px;
  }
  .lp-hero-cta {
    grid-area: cta;
    max-width: 380px;
    margin-top: 30px;
  }
  .lp-section {
    padding: 56px 0;
  }
  .lp-h2 {
    font-size: 40px;
  }
  .lp-card {
    width: 216px;
  }
  .lp-phone {
    width: 272px;
    height: 556px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-reveal-on .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- CLS: hold the real size of the JS-built blocks while they load ----------
   Keep in sync with .tk-demo__stage (landing-demo.css: 3:4, width min(100%, 360px, 74vw, 46svh))
   plus its chip row (58px incl. gap), and with the .lp-card widths above (3:4, + 36px padding). */
.lp-demo:empty {
  min-height: calc(min(360px, 74vw, 46vh) * 4 / 3 + 58px);
  min-height: calc(min(360px, 74vw, 46svh) * 4 / 3 + 58px);
}
.lp-row:empty {
  min-height: calc(152px * 4 / 3 + 36px);
}
@media (max-width: 759px) and (max-height: 720px) {
  .lp-demo:empty {
    min-height: calc(min(360px, 74vw, 38svh) * 4 / 3 + 56px);
  }
}
@media (max-width: 759px) and (max-height: 600px) {
  .lp-demo:empty {
    min-height: calc(min(360px, 74vw, 46svh) * 4 / 3 + 56px);
  }
}
@media (min-width: 760px) {
  .lp-row:empty {
    min-height: calc(196px * 4 / 3 + 36px);
  }
}
@media (min-width: 960px) {
  .lp-row:empty {
    min-height: calc(216px * 4 / 3 + 36px);
  }
}
/* Mouse + wide screen: the chips wrap under the 480px stage (landing-demo.css). */
@media (hover: hover) and (pointer: fine) and (min-width: 700px) {
  .lp-demo:empty {
    min-height: 732px;
  }
}
