/* Odyssey Landing Page
   Mobile-first. Uses the shared tokens, header and fonts from codex.css.
*/

body.landing {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(248, 148, 26, 0.16), transparent 70%),
    var(--bg-body);
}

.lp-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Header ---------- */
.lp-header { background: rgba(17, 16, 19, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
[data-theme="light"] .lp-header { background: rgba(255, 255, 255, 0.85); }
.lp-header .header-container { max-width: 1120px; }
.lp-nav { display: none; }
.lp-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
}
.lp-nav a:hover { color: var(--text-main); background: var(--bg-surface-elevated); }

/* ---------- Buttons ---------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.15rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.lp-btn:active { transform: scale(0.98); }
.lp-btn-lg { height: 56px; font-size: 1.05rem; padding: 0 1.5rem; }
.lp-btn-sm { height: 38px; padding: 0 0.95rem; font-size: 0.88rem; border-radius: 10px; }
.lp-btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 24px rgba(248, 148, 26, 0.3); }
.lp-btn-primary:hover { background: var(--accent-hover); }
.lp-btn-ghost { background: var(--bg-surface); color: var(--text-main); border-color: var(--border-subtle); }
.lp-btn-ghost:hover { border-color: var(--accent-border); color: var(--accent-text); }
.lp-btn-discord { background: #5865f2; color: #fff; }
.lp-btn-discord:hover { background: #4752c4; }
.lp-btn-topgg { background: #ff3366; color: #fff; }
.lp-btn-topgg:hover { background: #e02654; }

/* ---------- Hero ---------- */
.lp-hero { overflow: hidden; padding: 1.75rem 0 1rem; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.lp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(248, 148, 26, 0.35);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
}
.lp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lp-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.3rem, 9vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0.9rem 0 0.85rem;
}
.lp-title span { color: var(--accent-text); }
.lp-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; max-width: 34rem; }
.lp-lead b { color: var(--text-main); }

.lp-cta { display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.lp-cta-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0.6rem; }
.lp-cta-main .lp-btn { padding: 0 0.75rem; }
.lp-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.lp-cta-row > :first-child { grid-column: 1 / -1; }
.lp-cta-row .lp-btn { padding: 0 0.6rem; font-size: 0.9rem; }

.lp-live, .lp-counts {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.lp-live b { color: var(--text-main); }
.lp-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: lp-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes lp-pulse {
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Class fan: the four starting classes */
.lp-fan {
  position: relative;
  height: 195px;
  margin: 0 auto;
  width: 100%;
  max-width: 420px;
}
.lp-fan-card {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: var(--w, 34%);
  aspect-ratio: 3 / 4;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 110%;
  /* Spread = card width x (1 + 3 x overlap step), kept under the container width so nothing is clipped. */
  transform: translateX(calc(-50% + (var(--i) - 1.5) * var(--o, 56%))) rotate(calc((var(--i) - 1.5) * 6deg));
}
/* Each card sits on top of the one to its left, so every name label (bottom left) stays visible. */
.lp-fan-card { z-index: calc(var(--i) + 1); }
.lp-fan-card:nth-child(2), .lp-fan-card:nth-child(3) { transform: translateX(calc(-50% + (var(--i) - 1.5) * var(--o, 56%))) translateY(-12px) rotate(calc((var(--i) - 1.5) * 6deg)); }
.lp-fan-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.lp-fan-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 1.4rem 0.6rem 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}
.lp-fan-card figcaption img { width: 16px; height: 16px; }

/* ---------- Live numbers ---------- */
.lp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: 1.5rem; }
.lp-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}
.lp-stat .lemo { width: 26px; height: 26px; margin-bottom: 0.2rem; }
.lp-stat b { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.lp-stat > span:last-child { font-size: 0.74rem; color: var(--text-muted); line-height: 1.25; }

/* ---------- Sections ---------- */
.lp-section { margin-top: 3.25rem; }
.lp-head { margin-bottom: 1.1rem; }
.lp-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.65rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lp-h2.lp-h2-sm { font-size: 1.3rem; }
.lp-mobile-only { display: inline-flex; }
.lp-sub { color: var(--text-muted); margin-top: 0.35rem; font-size: 0.98rem; line-height: 1.55; }
.lemo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; }
.lemo img { width: 100%; height: 100%; object-fit: contain; }
.lemo-txt { font-size: 1.4rem; line-height: 1; }

/* Steps */
.lp-steps { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
.lp-steps > *, .lp-features > *, .lp-tools > *, .lp-stats > *, .lp-hero-grid > * { min-width: 0; }
.lp-step {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.lp-step-n {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 800;
}
.lp-step h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.lp-step p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.2rem; line-height: 1.5; }
.lp-step > div { min-width: 0; flex: 1; }
.lp-cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px dashed var(--border-subtle);
  background: var(--bg-surface-elevated);
  cursor: pointer;
  text-align: left;
}
.lp-cmd code { font-size: 0.85rem; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lp-cmd span { font-size: 0.78rem; font-weight: 700; color: var(--accent-text); flex-shrink: 0; }
.lp-cmd:hover { border-color: var(--accent-border); }
a.lp-cmd { text-decoration: none; }
a.lp-cmd code { font-family: var(--font-sans); font-weight: 700; }
.lp-note a { color: var(--accent-text); font-weight: 600; }

/* Tutorial video: thumbnail first, YouTube loads on play */
.lp-video {
  position: relative;
  margin-top: 0.85rem;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
.lp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lp-video-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.lp-video-btn img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.85; transition: opacity var(--transition-fast); }
.lp-video-btn:hover img { opacity: 1; }
.lp-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  padding-left: 4px;
}
.lp-video-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  text-align: left;
}
.lp-video-cap b { font-family: var(--font-display); font-size: 1.1rem; }
.lp-video-cap small { font-size: 0.8rem; opacity: 0.8; }
.lp-note { margin-top: 0.85rem; font-size: 0.88rem; color: var(--text-muted); }
.lp-note code, .lp-step code { padding: 0.1rem 0.4rem; border-radius: 6px; background: var(--bg-surface-elevated); color: var(--text-main); }

/* Classes: swipe on phones, grid on desktop */
.lp-classes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0 1rem 0.5rem;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lp-classes::-webkit-scrollbar { display: none; }
.lp-class {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-main);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.lp-class:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.lp-class-art { aspect-ratio: 4 / 5; background: var(--bg-surface-elevated); overflow: hidden; }
.lp-class-art img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.lp-class-body { padding: 0.85rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.lp-class-body h3 { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.lp-class-body h3 img { width: 22px; height: 22px; }
.lp-class-body p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-class-go { margin-top: auto; padding-top: 0.35rem; font-size: 0.82rem; font-weight: 700; color: var(--accent-text); }

/* Features */
.lp-features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
.lp-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.lp-feature .lemo { width: 36px; height: 36px; }
.lp-feature h3 { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; }
.lp-feature p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; margin-top: 0.15rem; }

/* Player tools */
.lp-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
.lp-tool {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.15rem;
  border-radius: 18px;
  text-decoration: none;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--accent-soft), transparent 65%), var(--bg-surface);
  border: 1px solid rgba(248, 148, 26, 0.35);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.lp-tool:hover { transform: translateY(-2px); border-color: var(--accent-border); }
.lp-tool .lemo { width: 40px; height: 40px; }
.lp-tool h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.lp-tool p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.lp-tool-go { margin-top: 0.3rem; font-weight: 700; color: var(--accent-text); }

/* Community */
.lp-community {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.lp-server { display: flex; align-items: center; gap: 0.9rem; }
.lp-server-icon { width: 64px; height: 64px; border-radius: 18px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 2px var(--border-subtle); }
.lp-server .lp-sub { margin-top: 0.2rem; font-size: 0.9rem; }
.lp-counts { margin-top: 0.4rem; font-size: 0.82rem; }
.lp-community-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

/* Footer */
.lp-footer { margin-top: 3.5rem; border-top: 1px solid var(--border-subtle); padding: 1.75rem 0 calc(1.75rem + env(safe-area-inset-bottom, 0px)); }
.lp-footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.lp-footer .brand-title { font-size: 1.1rem; }
.lp-footer .brand-logo { width: 28px; height: 28px; border-radius: 8px; }
.lp-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.1rem; }
.lp-footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.lp-footer-links a:hover { color: var(--accent-text); }
.lp-copy { font-size: 0.8rem; color: var(--text-faint); }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .lp-wrap { padding: 0 1.5rem; }
  .lp-features { grid-template-columns: 1fr 1fr; }
  .lp-tools { grid-template-columns: 1fr 1fr; }
  .lp-classes { grid-auto-columns: 42%; padding: 0 1.5rem 0.5rem; scroll-padding: 0 1.5rem; }
  .lp-cta-main { display: flex; flex-wrap: wrap; }
  .lp-cta-main .lp-btn { padding: 0 1.4rem; }
  .lp-cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
  .lp-cta-row .lp-btn { padding: 0 1rem; }
  .lp-fan { height: 270px; max-width: 520px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .lp-nav { display: flex; gap: 0.15rem; flex: 1; justify-content: center; }
  .lp-mobile-only { display: none; }
  .lp-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-step { flex-direction: column; }
  .lp-hero { padding: 4rem 0 2rem; }
  .lp-hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: 3rem; }
  .lp-fan { height: 360px; --w: 35%; --o: 50%; }
  .lp-section { margin-top: 5rem; }
  .lp-h2 { font-size: 2.2rem; }
  .lp-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-classes {
    max-width: 1120px;
    margin: 0 auto;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
  .lp-community { grid-template-columns: 1fr auto; align-items: center; padding: 1.5rem 1.75rem; }
  .lp-community-cta { display: flex; }
  .lp-footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- Small phones ---------- */
@media (max-width: 380px) {
  .lp-header .header-container { gap: 0.35rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  .lp-header .header-actions { gap: 0.35rem; }
  .lp-header .icon-btn { width: 36px; height: 36px; }
  .lp-header .lp-btn-sm { padding: 0 0.7rem; height: 36px; }
  .lp-header .brand { gap: 0.45rem; }
  .lp-header .brand-logo { width: 32px; height: 32px; }
  .lp-header .brand-title { font-size: 1.1rem; }
  .lp-cta-row { grid-template-columns: 1fr; }
  .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-community-cta { grid-template-columns: 1fr; }
  .lp-fan { height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-pulse { animation: none; }
}
