/* ===== Landing page (loaded only by common/landing.html) =====

   Three blocks — hero scene, the three-principles module, Telegram.
   Everything is scoped under body.landing-page so the app shell's own
   tokens/components in base.css stay untouched. Theme overrides mirror
   base.css's precedence: light default -> OS preference -> explicit
   html[data-theme] toggle.

   Visual rules: blue is a UI accent (buttons, counters, links), never a
   light source — no glows, haze or gradient fog. Surfaces are flat,
   slightly lifted from the background, separated by thin borders. */

/* Geologica itself is declared once, site-wide, in base.css. */

/* ----- Tokens ----- */

body.landing-page {
  --lp-bg: #f5f6f8;
  --lp-surface: #ffffff;
  --lp-surface-2: #f1f2f5;
  --lp-ink: #0c0e13;
  --lp-ink-2: #4b5263;
  --lp-ink-3: #8a90a0;
  --lp-line: rgba(12, 14, 19, 0.08);
  --lp-line-strong: rgba(12, 14, 19, 0.15);
  --lp-blue: #1f5eff;
  --lp-blue-hover: #1a4fd9;
  --lp-ok: #13845a;
  --lp-ok-soft: #e4f4ec;
  --lp-frozen: #3f53c4;
  --lp-frozen-soft: #e9ecfb;
  --lp-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.22);
  --lp-floor-shadow: rgba(15, 23, 42, 0.22);
  --lp-r-sm: 8px;
  --lp-r: 12px;
  --lp-r-lg: 16px;
  --lp-r-xl: 20px;
  --lp-gutter: clamp(16px, 4vw, 64px);
  --lp-ease: cubic-bezier(0.2, 0.7, 0.15, 1);

  font-family: "Geologica", var(--font-sans);
  background: var(--lp-bg);
  color: var(--lp-ink);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.landing-page {
    --lp-bg: #0b0c10;
    --lp-surface: #131419;
    --lp-surface-2: #1a1c22;
    --lp-ink: #f3f4f6;
    --lp-ink-2: #a2a7b3;
    --lp-ink-3: #6d7380;
    --lp-line: rgba(255, 255, 255, 0.07);
    --lp-line-strong: rgba(255, 255, 255, 0.13);
    --lp-blue: #3b78ff;
    --lp-blue-hover: #5a8dff;
    --lp-ok: #4cc38a;
    --lp-ok-soft: rgba(76, 195, 138, 0.12);
    --lp-frozen: #93a8ff;
    --lp-frozen-soft: rgba(120, 145, 255, 0.14);
    --lp-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
    --lp-floor-shadow: rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] body.landing-page {
  --lp-bg: #0b0c10;
  --lp-surface: #131419;
  --lp-surface-2: #1a1c22;
  --lp-ink: #f3f4f6;
  --lp-ink-2: #a2a7b3;
  --lp-ink-3: #6d7380;
  --lp-line: rgba(255, 255, 255, 0.07);
  --lp-line-strong: rgba(255, 255, 255, 0.13);
  --lp-blue: #3b78ff;
  --lp-blue-hover: #5a8dff;
  --lp-ok: #4cc38a;
  --lp-ok-soft: rgba(76, 195, 138, 0.12);
  --lp-frozen: #93a8ff;
  --lp-frozen-soft: rgba(120, 145, 255, 0.14);
  --lp-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  --lp-floor-shadow: rgba(0, 0, 0, 0.6);
}

/* ----- Shell overrides (header, page, footer) ----- */

body.landing-page .page {
  max-width: none;
  padding: 0;
}

body.landing-page .topbar {
  position: relative;
  z-index: 10;
  background: transparent;
  border-bottom: 1px solid var(--lp-line);
  padding: 10px var(--lp-gutter);
}

body.landing-page .topbar-inner {
  max-width: 1440px;
}

body.landing-page .landing-brand-logo {
  height: 76px;
}

body.landing-page .landing-nav {
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r);
  background: var(--lp-surface);
}

body.landing-page .landing-nav a {
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--lp-r-sm);
  color: var(--lp-ink-2);
  transition: color 0.2s, background 0.2s;
}

body.landing-page .landing-nav a:hover,
body.landing-page .landing-nav a.active {
  color: var(--lp-ink);
  background: var(--lp-surface-2);
}

body.landing-page .topbar .btn {
  border-radius: var(--lp-r);
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  background: var(--lp-blue);
  border-color: var(--lp-blue);
  color: #fff;
  transition: background 0.2s, border-color 0.2s;
}

body.landing-page .topbar .btn:hover {
  background: var(--lp-blue-hover);
  border-color: var(--lp-blue-hover);
}

body.landing-page .landing-footer {
  background: transparent;
  border-top: 1px solid var(--lp-line);
}

body.landing-page .landing-footer-inner {
  max-width: 1440px;
  padding-inline: var(--lp-gutter);
}

body.landing-page .landing-footer-bottom {
  border-top-color: var(--lp-line);
}

/* ----- Shared pieces ----- */

.lp-shell {
  width: min(1440px, 100% - 2 * var(--lp-gutter));
  margin-inline: auto;
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-ink-2);
}

.lp-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lp-blue);
}

.lp-eyebrow-icon {
  color: var(--lp-blue);
}

.lp-h2 {
  margin: 0;
  font-size: clamp(32px, 3.8vw, 58px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lp-mono {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-feature-settings: "zero" 1;
}

.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 26px;
  border-radius: var(--lp-r);
  border: 1px solid transparent;
  font: 600 16px/1 "Geologica", var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.lp-btn svg {
  transition: transform 0.3s var(--lp-ease);
}

.lp-btn:hover {
  text-decoration: none;
}

.lp-btn:hover svg {
  transform: translateX(3px);
}

.lp-btn:focus-visible {
  outline: 2px solid var(--lp-blue);
  outline-offset: 3px;
}

.lp-btn-primary {
  color: #fff;
  background: var(--lp-blue);
}

.lp-btn-primary:hover {
  background: var(--lp-blue-hover);
}

.lp-btn-ghost {
  color: var(--lp-ink);
  background: transparent;
  border-color: var(--lp-line-strong);
}

.lp-btn-ghost:hover {
  border-color: var(--lp-ink-3);
  background: var(--lp-surface);
}

.lp-avatar {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #2f66f0;
}

.lp-avatar-alt { background: #d9673a; }
.lp-avatar-alt2 { background: #1c9a6c; }
.lp-avatar-alt3 { background: #7650e0; }

.lp-count {
  flex: 0 0 auto;
  min-width: 26px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--lp-blue);
}

.lp-count-muted {
  color: var(--lp-ink-3);
  background: var(--lp-surface-2);
}

.lp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.lp-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lp-pill-ok {
  color: var(--lp-ok);
  background: var(--lp-ok-soft);
}

.lp-pill-frozen {
  color: var(--lp-frozen);
  background: var(--lp-frozen-soft);
}

/* ===== Hero ===== */

.lp-hero {
  --px: 0;
  --py: 0;
  /* The mailbox box, shared by the back layer (image) and the front
     layer (letter + chips) so both stay registered on any viewport. */
  --mb-w: clamp(560px, 52vw, 1040px);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(620px, calc(100svh - 100px), 920px);
  padding: 24px 0 88px;
  overflow: clip;
}

.lp-hero-copy {
  position: relative;
  z-index: 2;
}

.lp-title {
  max-width: 9.4em;
  margin: 24px 0 26px;
  font-size: clamp(46px, 5.4vw, 100px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.lp-title-line {
  display: block;
  animation: lp-rise 1s var(--lp-ease) both;
}

.lp-title-line + .lp-title-line {
  animation-delay: 0.1s;
}

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

.lp-lede {
  /* Never runs under the mailbox, which starts at 44vw. */
  max-width: min(33em, 38vw);
  margin: 0 0 34px;
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--lp-ink-2);
  animation: lp-fade 1s var(--lp-ease) 0.25s both;
}

.lp-hero-copy .lp-eyebrow {
  animation: lp-fade 0.9s var(--lp-ease) both;
}

.lp-hero-copy .lp-cta {
  animation: lp-fade 1s var(--lp-ease) 0.35s both;
}

.lp-note {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--lp-ink-3);
  animation: lp-fade 1s var(--lp-ease) 0.45s both;
}

/* No z-index/transform here on purpose: the stage must not form its own
   stacking context, so its children interleave with .lp-hero-copy. */
.lp-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lp-mailbox,
.lp-mailbox-front {
  position: absolute;
  left: calc(50% - 6vw);
  top: 50%;
  width: var(--mb-w);
  aspect-ratio: 960 / 800;
  translate: 0 -50%;
}

.lp-mailbox {
  z-index: 1;
  transform: translate3d(calc(var(--px) * 6px), calc(var(--py) * 4px), 0);
  animation: lp-arrive 1.4s var(--lp-ease) 0.1s both;
}

.lp-mailbox img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

/* hero-mailbox-stage.png is the original render with its pale display
   disc cut out, so the object needs its own grounding: a plain neutral
   floor shadow. */
.lp-mailbox::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 8%;
  bottom: 7%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--lp-floor-shadow), transparent);
  filter: blur(14px);
}

.lp-mailbox-front {
  z-index: 3;
}

.lp-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--lp-r-lg);
  border: 1px solid var(--lp-line-strong);
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow);
  white-space: nowrap;
}

.lp-chip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.lp-chip-text b {
  font-size: 15px;
  font-weight: 600;
}

.lp-chip-text small {
  font-size: 12px;
  color: var(--lp-ink-3);
}

.lp-chip-inbox {
  left: 30%;
  top: 7%;
  transform: translate3d(calc(var(--px) * 14px), calc(var(--py) * 10px), 0);
  animation: lp-pop 0.9s var(--lp-ease) 0.6s both;
}

.lp-chip-inbox .lp-count {
  margin-left: 6px;
}

.lp-count.is-bumped {
  animation: lp-bump 0.6s var(--lp-ease);
}

.lp-chip-invite {
  right: 0;
  bottom: 24%;
  transform: translate3d(calc(var(--px) * 18px), calc(var(--py) * 12px), 0);
  animation: lp-pop 0.9s var(--lp-ease) 0.8s both;
}

.lp-chip-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--lp-r-sm);
  color: var(--lp-blue);
  background: var(--lp-surface-2);
}

.lp-chip-text .lp-status {
  font-weight: 600;
  color: var(--lp-ok);
}

/* The incoming letter: parked inside the mouth, invisible, until JS
   plays one flight every ~11s. */
.lp-letter {
  position: absolute;
  left: 25%;
  top: 41%;
  width: 12%;
  opacity: 0;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.3));
}

.lp-letter svg {
  display: block;
  width: 100%;
  height: auto;
}

.lp-letter.is-flying {
  animation: lp-letter 2.8s cubic-bezier(0.45, 0.05, 0.25, 1) both;
}

/* ===== Three principles ===== */

.lp-rules {
  padding: clamp(72px, 8vw, 120px) 0;
  border-top: 1px solid var(--lp-line);
}

.lp-section-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
}

.lp-section-head .lp-h2 {
  max-width: 16em;
}

.lp-rules-module {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 8px;
  padding: 8px;
  border-radius: var(--lp-r-xl);
  border: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

.lp-rules-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lp-rule {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px;
  flex: 1;
  padding: 26px 26px 30px;
  border: 1px solid transparent;
  border-radius: var(--lp-r-lg);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.3s, border-color 0.3s;
  /* Opt out of base.css's generic button look (single-line, centered,
     fixed min-height) — these are multi-line grid cards. */
  justify-content: stretch;
  align-items: start;
  align-content: start;
  min-height: 0;
  white-space: normal;
  line-height: 1.5;
}

.lp-rule:hover {
  border-color: transparent;
}

.lp-rule.is-active:hover {
  border-color: var(--lp-line);
}

.lp-rule:hover {
  background: var(--lp-surface-2);
}

.lp-rule.is-active {
  background: var(--lp-surface-2);
  border-color: var(--lp-line);
}

.lp-rule:focus-visible {
  outline: 2px solid var(--lp-blue);
  outline-offset: 2px;
}

.lp-rule-num {
  padding-top: 5px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--lp-ink-3);
  transition: color 0.3s;
}

.lp-rule.is-active .lp-rule-num {
  color: var(--lp-blue);
}

.lp-rule-body {
  display: grid;
  gap: 8px;
}

.lp-rule-title {
  font-size: clamp(20px, 1.6vw, 25px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lp-rule-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--lp-ink-2);
}

.lp-rule:not(.is-active) .lp-rule-desc {
  color: var(--lp-ink-3);
}

.lp-rule-progress {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--lp-line);
  opacity: 0;
  transition: opacity 0.3s;
}

.lp-rule-progress i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--lp-blue);
  transform-origin: left;
  transform: scaleX(0);
}

.lp-rules-module.is-running .lp-rule.is-active .lp-rule-progress {
  opacity: 1;
}

.lp-rules-module.is-running .lp-rule.is-active .lp-rule-progress i {
  animation: lp-progress 6.5s linear forwards;
}

.lp-rules-module:hover .lp-rule-progress i {
  animation-play-state: paused;
}

/* The stage: one product fragment at a time, on a recessed panel. */
.lp-rules-stage {
  position: relative;
  min-height: 480px;
  border-radius: var(--lp-r-lg);
  border: 1px solid var(--lp-line);
  overflow: hidden;
  background: var(--lp-bg);
}

.lp-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.5s var(--lp-ease), transform 0.7s var(--lp-ease), visibility 0s 0.5s;
}

.lp-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.6s var(--lp-ease) 0.1s, transform 0.8s var(--lp-ease) 0.1s, visibility 0s;
}

/* Panel 1 — invite ticket */
.lp-ticket {
  position: relative;
  width: min(460px, 100%);
  padding: 26px 28px 0;
  border-radius: var(--lp-r-lg);
  border: 1px solid var(--lp-line-strong);
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow);
  -webkit-mask:
    radial-gradient(circle 12px at left 0 top 66%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at right 0 top 66%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 12px at left 0 top 66%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 12px at right 0 top 66%, #0000 98%, #000) right / 51% 100% no-repeat;
}

.lp-ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lp-ticket-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-ink-3);
}

.lp-ticket-code {
  margin: 20px 0 12px;
  font-size: clamp(19px, 1.9vw, 25px);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--lp-ink);
}

.lp-ticket-meta {
  padding-bottom: 28px;
  font-size: 13px;
  color: var(--lp-ink-2);
}

.lp-ticket-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0 22px;
  border-top: 1px dashed var(--lp-line-strong);
  font-size: 14px;
  color: var(--lp-ink-2);
}

.lp-ticket-bottom b {
  margin-left: auto;
  color: var(--lp-ink);
}

/* Panel 2 — admin console */
.lp-console {
  width: min(500px, 100%);
  padding: 8px;
  border-radius: var(--lp-r-lg);
  border: 1px solid var(--lp-line-strong);
  background: var(--lp-surface);
  box-shadow: var(--lp-shadow);
}

.lp-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 12px;
  font-weight: 700;
  font-size: 16px;
}

.lp-console-search {
  width: 120px;
  height: 30px;
  border-radius: var(--lp-r-sm);
  background: var(--lp-surface-2);
  border: 1px solid var(--lp-line);
}

.lp-console-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--lp-r);
  font-size: 14px;
}

.lp-console-mail {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-pill-swap {
  display: grid;
}

.lp-pill-swap > .lp-pill {
  grid-area: 1 / 1;
  justify-self: end;
  transition: opacity 0.4s, transform 0.5s var(--lp-ease);
}

.lp-pill-swap .lp-pill-frozen {
  opacity: 0;
  transform: translateY(6px);
}

/* When the panel comes up, max@ gets frozen and the audit log records it. */
.lp-panel.is-active .lp-console-row-freeze {
  animation: lp-row-flash 1.6s ease 0.9s both;
}

.lp-panel.is-active .lp-pill-swap .lp-pill-ok {
  opacity: 0;
  transform: translateY(-6px);
  transition-delay: 1.1s;
}

.lp-panel.is-active .lp-pill-swap .lp-pill-frozen {
  opacity: 1;
  transform: none;
  transition-delay: 1.1s;
}

.lp-console-log {
  margin-top: 6px;
  padding: 12px 12px 6px;
  border-top: 1px solid var(--lp-line);
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--lp-ink-2);
}

.lp-log-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.lp-log-row time {
  font-variant-numeric: tabular-nums;
  color: var(--lp-ink-3);
}

.lp-log-row .lp-mono {
  margin-left: auto;
  font-size: 12px;
  color: var(--lp-ink-3);
}

.lp-log-new {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.5s, transform 0.6s var(--lp-ease);
}

.lp-panel.is-active .lp-log-new {
  opacity: 1;
  transform: none;
  transition-delay: 1.5s;
}

/* Panel 3 — many mailboxes in one account */
.lp-stack {
  position: relative;
  width: min(400px, 100%);
  display: grid;
  gap: 8px;
}

.lp-stack-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px 9px 10px;
  border-radius: var(--lp-r);
  font-size: 14px;
  background: var(--lp-surface);
  border: 1px solid var(--lp-line-strong);
}

.lp-stack-row > span:nth-child(2) {
  flex: 1;
}

.lp-stack-add {
  justify-content: center;
  gap: 8px;
  padding: 13px;
  color: var(--lp-blue);
  font-weight: 600;
  background: transparent;
  border-style: dashed;
}

.lp-stack-add > span:nth-child(2) {
  flex: 0 1 auto;
}

.lp-panel.is-active .lp-stack-row {
  animation: lp-stack-in 0.7s var(--lp-ease) both;
}

.lp-panel.is-active .lp-stack-row:nth-child(2) { animation-delay: 0.07s; }
.lp-panel.is-active .lp-stack-row:nth-child(3) { animation-delay: 0.14s; }
.lp-panel.is-active .lp-stack-row:nth-child(4) { animation-delay: 0.21s; }
.lp-panel.is-active .lp-stack-row:nth-child(5) { animation-delay: 0.3s; }

/* ===== Telegram ===== */

.lp-tg {
  padding-bottom: clamp(72px, 8vw, 120px);
}

.lp-tg-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(32px, 5vw, 72px);
  border-radius: var(--lp-r-xl);
  border: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

.lp-tg-copy .lp-h2 {
  margin: 18px 0 20px;
  max-width: 13em;
}

.lp-tg-text {
  max-width: 30em;
  margin: 0 0 34px;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.55;
  color: var(--lp-ink-2);
}

.lp-chat {
  justify-self: end;
  width: min(420px, 100%);
  padding: 14px;
  border-radius: var(--lp-r-lg);
  border: 1px solid var(--lp-line);
  background: var(--lp-bg);
}

.lp-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--lp-line);
}

.lp-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 5px;
  border: 1px solid var(--lp-line);
}

.lp-chat-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.lp-chat-name b {
  font-size: 15px;
}

.lp-chat-name small {
  font-size: 12px;
  color: var(--lp-ink-3);
}

/* Fixed-height window; new messages push old ones up and out, like a
   real chat scrolling. */
.lp-chat-feed {
  height: 290px;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  -webkit-mask: linear-gradient(transparent, #000 18%);
  mask: linear-gradient(transparent, #000 18%);
}

.lp-bubble {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  max-width: 90%;
  padding: 11px 54px 11px 13px;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid var(--lp-line);
  background: var(--lp-surface-2);
  color: var(--lp-ink);
  font-size: 14px;
  line-height: 1.35;
}

.lp-bubble-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-blue);
}

.lp-bubble-code {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lp-bubble time {
  position: absolute;
  right: 11px;
  bottom: 9px;
  font-size: 11px;
  color: var(--lp-ink-3);
}

.lp-typing {
  display: inline-flex;
  gap: 4px;
  margin-top: 8px;
  padding: 11px 13px;
  border-radius: 14px 14px 14px 4px;
  background: var(--lp-surface-2);
  opacity: 0;
  transition: opacity 0.3s;
}

.lp-typing.is-on {
  opacity: 1;
}

.lp-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lp-ink-3);
  animation: lp-typing 1.2s ease-in-out infinite;
}

.lp-typing i:nth-child(2) { animation-delay: 0.15s; }
.lp-typing i:nth-child(3) { animation-delay: 0.3s; }

/* JS-driven states (html.lp-js is set by landing.js). Without JS
   everything is simply shown, static. */
.lp-js .lp-bubble {
  display: none;
}

.lp-js .lp-bubble.is-shown {
  display: grid;
  animation: lp-bubble-in 0.5s var(--lp-ease) both;
}

.lp-js .lp-reveal {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.9s var(--lp-ease), translate 1s var(--lp-ease);
}

.lp-js .lp-reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

/* ===== Keyframes ===== */

@keyframes lp-rise {
  from { opacity: 0; transform: translateY(0.3em); }
  to { opacity: 1; transform: none; }
}

@keyframes lp-fade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes lp-arrive {
  from { opacity: 0; scale: 0.96; }
  to { opacity: 1; scale: 1; }
}

@keyframes lp-pop {
  from { opacity: 0; scale: 0.94; }
  to { opacity: 1; scale: 1; }
}

@keyframes lp-letter {
  0% { opacity: 0; transform: translate(-420%, -260%) rotate(-24deg) scale(1.25); }
  12% { opacity: 1; }
  55% { transform: translate(-170%, -170%) rotate(-10deg) scale(1.05); }
  86% { opacity: 1; transform: translate(0, 0) rotate(4deg) scale(0.62); }
  100% { opacity: 0; transform: translate(35%, 10%) rotate(6deg) scale(0.45); }
}

@keyframes lp-bump {
  0% { scale: 1; }
  35% { scale: 1.25; }
  100% { scale: 1; }
}

@keyframes lp-progress {
  to { transform: scaleX(1); }
}

@keyframes lp-row-flash {
  0%, 100% { background: transparent; }
  30% { background: var(--lp-frozen-soft); }
}

@keyframes lp-stack-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes lp-bubble-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes lp-typing {
  0%, 60%, 100% { opacity: 0.35; transform: none; }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ===== Responsive ===== */

@media (max-width: 1100px) {
  .lp-hero {
    --mb-w: min(80vw, 640px);
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 24px 0 32px;
  }

  .lp-lede {
    max-width: 33em;
  }

  .lp-stage {
    position: relative;
    inset: auto;
    height: calc(var(--mb-w) * 0.8);
    margin-top: 40px;
  }

  .lp-mailbox,
  .lp-mailbox-front {
    left: calc(50% - var(--mb-w) * 0.47);
  }

  .lp-rules-module {
    grid-template-columns: 1fr;
  }

  .lp-rules-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lp-rule {
    grid-template-columns: 1fr;
    padding: 22px 22px 28px;
  }

  .lp-rule-progress {
    left: 22px;
    right: 22px;
  }

  .lp-rules-stage {
    min-height: 430px;
  }
}

@media (max-width: 860px) {
  body.landing-page .landing-brand-logo {
    height: 60px;
  }

  body.landing-page .landing-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.landing-page .landing-nav::-webkit-scrollbar {
    display: none;
  }

  body.landing-page .landing-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 14px;
    padding: 8px 12px;
  }

  .lp-hero {
    --mb-w: min(112vw, 620px);
    padding: 20px 0 24px;
  }

  .lp-title {
    font-size: clamp(40px, 11.5vw, 84px);
    margin: 18px 0 20px;
  }

  .lp-chip {
    scale: 0.86;
  }

  .lp-chip-inbox {
    left: 22%;
    top: 0;
    transform-origin: left top;
  }

  .lp-chip-invite {
    right: 16%;
    transform-origin: right bottom;
  }

  .lp-rules-list {
    grid-template-columns: 1fr;
  }

  .lp-rule {
    grid-template-columns: 40px 1fr;
  }

  .lp-rules-stage {
    min-height: 400px;
  }

  .lp-tg-stage {
    grid-template-columns: 1fr;
  }

  .lp-chat {
    justify-self: stretch;
    width: 100%;
  }

  .lp-chat-feed {
    height: 250px;
  }
}

@media (max-width: 520px) {
  .lp-btn {
    width: 100%;
  }

  .lp-chip-invite {
    display: none;
  }

  .lp-ticket {
    padding: 22px 20px 0;
  }

  .lp-panel {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page *,
  body.landing-page *::before,
  body.landing-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
