/* =====================================================================
   Landing page styles. Prefixed .lp- to avoid collisions with the tool
   styles in styles.css. Reuses the same theme tokens (--bg, --accent,
   --surface, etc.) so the page sits inside the existing design system.
   ===================================================================== */

.lp-main { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hero ---------- */
.lp-hero {
  text-align: center;
  padding: 88px 0 56px;
  position: relative;
}
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--accent-bg);
  color: var(--pill-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}
.lp-badge .lp-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-hi);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.lp-hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 auto 22px;
  max-width: 14ch;
}
.lp-hero h1 .accent {
  background: linear-gradient(120deg, var(--multi-from), var(--multi-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lp-hero .lp-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 auto 36px;
}
.lp-cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 26px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.lp-btn-primary {
  background: linear-gradient(135deg, var(--accent-hi), var(--accent-deep));
  color: #fff;
  box-shadow: 0 8px 24px -8px var(--bg-glow);
}
.lp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px var(--bg-glow); }
.lp-btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.lp-btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); }

/* ---------- Stats strip ---------- */
.lp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 8px 0 24px;
}
.lp-stat {
  text-align: center;
  padding: 22px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}
.lp-stat-num {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}
.lp-stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* ---------- Section heads ---------- */
.lp-section { padding: 64px 0; }
.lp-section-head { text-align: center; margin-bottom: 44px; }
.lp-section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.lp-section-head p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto;
  line-height: 1.55;
}

/* ---------- Tools grid ---------- */
.lp-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.lp-tool {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.lp-tool::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, var(--accent-bg), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.lp-tool:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -20px var(--bg-glow);
}
.lp-tool:hover::after { opacity: 1; }
.lp-tool-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border-radius: 13px;
  background: var(--accent-bg);
  border: 1px solid var(--border-soft);
}
.lp-tool-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-tool-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--pill-text);
}
.lp-tool-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.lp-tool-go {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-hi);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}
.lp-tool:hover .lp-tool-go { gap: 11px; }

/* ---------- Why / value props ---------- */
.lp-why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.lp-why-card {
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}
.lp-why-icon { font-size: 30px; margin-bottom: 14px; }
.lp-why-card h3 { font-size: 19px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.lp-why-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ---------- FAQ (reuses fg styling vibe, scoped here) ---------- */
.lp-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lp-faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 20px 22px;
}
.lp-faq-item h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 8px; }
.lp-faq-item p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ---------- Final CTA band ---------- */
.lp-cta-band {
  text-align: center;
  padding: 60px 32px;
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  background:
    radial-gradient(ellipse 90% 120% at 50% -10%, var(--accent-bg), transparent 60%),
    var(--surface);
  margin: 40px 0 72px;
}
.lp-cta-band h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 14px; }
.lp-cta-band p { font-size: 17px; color: var(--text-muted); margin: 0 0 28px; }

/* ---------- Trending ticker ---------- */
.lp-ticker-wrap { margin: 8px 0 28px; }
.lp-ticker {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 0;
  /* Fade the edges so items slide in/out softly. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.lp-ticker-track {
  display: flex;
  width: max-content;
  gap: 30px;
  white-space: nowrap;
  animation: lp-ticker-scroll 60s linear infinite;
}
.lp-ticker:hover .lp-ticker-track { animation-play-state: paused; }
@keyframes lp-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .lp-ticker-track { animation: none; }
}
.lp-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lp-ticker-item img {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-alt);
  object-fit: cover;
}
.lp-ticker-sym { font-weight: 800; color: var(--text); }
.lp-ticker-chg { font-weight: 700; }
.lp-ticker-chg.pos { color: var(--pos); }
.lp-ticker-chg.neg { color: var(--neg); }
.lp-ticker-loading { padding: 0 24px; color: var(--text-faint); font-size: 14px; }

/* ---------- Live index flip cards ---------- */
.lp-index-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.lp-index {
  display: block;
  text-decoration: none;
  color: var(--text);
  perspective: 1400px;
  height: 320px;
}
.lp-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
/* Flip on hover (desktop) OR when JS adds .flipped (scroll/tap). */
.lp-index:hover .lp-flip-inner,
.lp-index.flipped .lp-flip-inner { transform: rotateY(180deg); }
.lp-flip-front, .lp-flip-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
  text-align: center;
}
.lp-flip-back {
  transform: rotateY(180deg);
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, var(--accent-bg), transparent 60%),
    var(--surface);
}
.lp-flip-back p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 38ch;
}
.lp-index-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.lp-gauge { width: 200px; max-width: 78%; height: auto; color: var(--text); }
.lp-needle {
  transform-origin: 100px 100px;
  transform: rotate(0deg);
  transition: transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lp-index-score {
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.lp-index-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}
.lp-index-cta { font-size: 14px; font-weight: 700; color: var(--accent-hi); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .lp-tools { grid-template-columns: repeat(2, 1fr); }
  .lp-why { grid-template-columns: 1fr; }
  .lp-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .lp-index-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lp-tools { grid-template-columns: 1fr; }
  .lp-hero { padding: 56px 0 40px; }
  .lp-section { padding: 48px 0; }
}
