/* ─────────────────────────────────────────────
   StoriaPod Landing Page — matches Figma design
   ───────────────────────────────────────────── */

@font-face {
  font-family: "MadaniArabic";
  src: url("/fonts/MadaniArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MadaniArabic";
  src: url("/fonts/MadaniArabic-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MadaniArabic";
  src: url("/fonts/MadaniArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --lp-bg:          #1a1a1d;
  --lp-bg-card:     #252525;
  --lp-bg-soft:     #2d2d31;
  --lp-text:        #fffcf2;
  --lp-text-muted:  #b1ada3;
  --lp-text-dim:    #6f6b63;
  --lp-gold:        #eedc82;
  --lp-burgundy:    #800020;
  --lp-border:      #3a383f;
  --lp-line:        rgba(238, 220, 130, 0.12);
  --lp-font:        "MadaniArabic", "Segoe UI", sans-serif;
  --lp-max:         1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

.landing-body {
  background: var(--lp-bg);
  color: var(--lp-text);
  font-family: var(--lp-font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Top Nav ─────────────────────────────────── */

.lp-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 80px;
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Three columns: session controls (outer-left edge) / tabs + subscribe
   (center) / logo (outer-right edge) — see _landing_topnav.html.erb for why
   the DOM order within each produces that reading. */
.lp-topnav__inner {
  max-width: var(--lp-max);
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  padding: 0 40px;
}

.lp-topnav__logo {
  width: 144px;
  height: 56px;
  object-fit: contain;
}

.lp-topnav__brand {
  display: flex;
  align-items: center;
  justify-self: end;
}

.lp-topnav__session {
  display: flex;
  align-items: center;
  justify-self: start;
}

.lp-topnav__center {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-self: center;
}

/* Secondary action — outline, quiet (login when signed out). */
.lp-topnav__login-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--lp-line);
  background: transparent;
  color: var(--lp-text);
  font-family: var(--lp-font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.lp-topnav__login-btn:hover {
  border-color: var(--lp-gold);
  color: var(--lp-gold);
}

/* The one solid, filled action in the bar — everything else here is quiet
   (outline/underline/muted text) so this is what actually reads as "the
   thing to click". */
.lp-topnav__subs-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--lp-gold);
  background: var(--lp-gold);
  color: #241d0a;
  font-family: var(--lp-font);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.lp-topnav__subs-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Demoted account cluster — smaller and dimmer than the tabs/CTA so it
   doesn't compete with them; name here doesn't link anywhere, so it's a
   plain span, not styled as a link. */
.lp-topnav__account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lp-topnav__user-name {
  font-size: 0.82rem;
  color: var(--lp-text-dim);
}

.lp-topnav__logout-form {
  display: inline-flex;
}

.lp-topnav__logout-link {
  background: none;
  border: none;
  color: var(--lp-text-dim);
  font-family: var(--lp-font);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.16);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.lp-topnav__logout-link:hover {
  color: var(--lp-burgundy);
  text-decoration-color: var(--lp-burgundy);
}

/* Tabs ("يعرض حالياً" / "الرئيسية") — real active-page indicator (a gold
   underline, via .is-active from ShowsController's current_page? check),
   not just a hover-only color change. */
.lp-topnav__tab {
  position: relative;
  color: var(--lp-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding-bottom: 4px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.22);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.lp-topnav__tab:hover {
  color: var(--lp-gold);
  text-decoration-color: var(--lp-gold);
}

.lp-topnav__tab.is-active {
  color: var(--lp-gold);
  text-decoration: none;
}

.lp-topnav__tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--lp-gold);
}

@media (max-width: 600px) {
  .lp-topnav__center { gap: 10px; }
  .lp-topnav__login-btn,
  .lp-topnav__subs-btn { padding: 7px 14px; font-size: 0.8rem; }
}

/* ── Hero ────────────────────────────────────── */

.lp-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #141416;
  padding-top: 80px;
  overflow: hidden;
}

.lp-hero__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: calc(100vh - 80px);
}

/* ── Image (left column) ── */

.lp-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  background: #141416;
  padding: 40px 24px;
}

.lp-hero__image {
  width: 100%;
  max-width: 580px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ── Text (right column) ── */

.lp-hero__text {
  padding: 64px 72px 64px 40px;
  direction: rtl;
  text-align: right;
}

.lp-hero__headline {
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--lp-text);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.lp-hero__sub {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--lp-text-muted);
  margin-bottom: 36px;
  max-width: 420px;
  margin-right: 0;
  margin-left: auto;
}

.lp-hero__cta-label {
  font-size: 0.88rem;
  color: var(--lp-text-muted);
  margin-bottom: 16px;
  direction: rtl;
}

.lp-hero__badges {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* ── Store Badges ── */

.lp-hero__stores {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.lp-hero__store-link {
  display: inline-flex;
  transition: opacity 0.2s ease;
}

.lp-hero__store-link:hover {
  opacity: 0.85;
}

.lp-hero__store-badge {
  height: 48px;
  width: auto;
}

/* Google badge ships with built-in padding — scale up + pull margins to visually match Apple */
.lp-hero__store-badge--google {
  height: 70px;
  margin: -11px;
}

/* ── About Page ── */

.lp-about {
  min-height: 100vh;
  padding-top: 80px;
  background: var(--lp-bg);
  display: flex;
  align-items: center;
}

.lp-about__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 40px;
  width: 100%;
}

.lp-about__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--lp-gold);
  text-transform: uppercase;
  padding: 5px 14px;
  border: 1px solid rgba(238, 220, 130, 0.3);
  border-radius: 999px;
  background: rgba(238, 220, 130, 0.06);
  margin-bottom: 20px;
}

.lp-about__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--lp-text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.lp-about__lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--lp-text-muted);
  max-width: 560px;
  margin-bottom: 64px;
}

.lp-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.lp-about__card {
  background: var(--lp-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px 28px;
}

.lp-about__card-title {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--lp-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.lp-about__email {
  font-size: 1rem;
  color: var(--lp-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(238, 220, 130, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.15s, color 0.15s;
}

.lp-about__email:hover {
  color: var(--lp-gold);
  border-color: var(--lp-gold);
}

.lp-about__address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--lp-text-muted);
}

.lp-about__address strong {
  color: var(--lp-text);
  font-weight: 500;
}

@media (max-width: 600px) {
  .lp-about__grid { grid-template-columns: 1fr; }
  .lp-about__inner { padding: 48px 24px; }
}

/* ── Footer ──────────────────────────────────── */

.lp-footer {
  background: #111113;
  border-top: 1px solid var(--lp-line);
  padding: 64px 40px 36px;
  direction: rtl;
}

.lp-footer__inner {
  max-width: var(--lp-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.lp-footer__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lp-footer__logo {
  width: 247px;
  height: 96px;
  object-fit: contain;
}

.lp-footer__tagline {
  font-size: 0.8rem;
  color: var(--lp-text-dim);
}

.lp-footer__links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.lp-footer__links a {
  color: var(--lp-text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.lp-footer__links a:hover { color: var(--lp-gold); }

.lp-footer__bottom {
  max-width: var(--lp-max);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.76rem;
  color: var(--lp-text-dim);
}

/* ── Offboarding ─────────────────────────────── */

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

.lp-offboarding__lead {
  font-size: 1.05rem;
  color: var(--lp-text-muted);
  margin-bottom: 36px;
}

.lp-offboarding__cta {
  margin-bottom: 24px;
}

.lp-offboarding__btn-primary {
  display: inline-block;
  background: var(--lp-gold);
  color: #0d0d0f;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.lp-offboarding__btn-primary:hover { opacity: 0.85; }

.lp-offboarding__stores {
  margin-bottom: 32px;
}

.lp-offboarding__store-hint {
  font-size: 0.88rem;
  color: var(--lp-text-dim);
  margin-bottom: 12px;
}

.lp-offboarding__store-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.lp-offboarding__store-link {
  display: inline-block;
  border: 1px solid var(--lp-line);
  color: var(--lp-text-muted);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.lp-offboarding__store-link:hover {
  border-color: var(--lp-gold);
  color: var(--lp-gold);
}

.lp-offboarding__alt {
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: var(--lp-text-muted);
}

.lp-offboarding__email {
  color: var(--lp-gold);
  text-decoration: none;
}

.lp-offboarding__warning {
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.25);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--lp-text-muted);
  line-height: 1.7;
  text-align: right;
}

/* ── Static Pages (Privacy / Terms) ─────────── */

.lp-page {
  padding: 80px 40px 60px;
  direction: rtl;
}

.lp-page__inner {
  max-width: 760px;
  margin: 0 auto;
}

.lp-page__title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--lp-text);
  margin-bottom: 4px;
}

.lp-page__updated {
  font-size: 0.82rem;
  color: var(--lp-text-dim);
  margin-bottom: 48px;
}

.lp-page__section {
  margin-bottom: 40px;
}

.lp-page__section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lp-text);
  margin-bottom: 12px;
}

.lp-page__section p,
.lp-page__section li {
  font-size: 0.97rem;
  line-height: 1.85;
  color: var(--lp-text-muted);
}

.lp-page__section ul {
  padding-right: 1.4rem;
  margin: 0;
}

.lp-page__section li {
  margin-bottom: 6px;
}

.lp-page__section a {
  color: var(--lp-gold);
  text-decoration: none;
}

.lp-page__section a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .lp-page { padding: 48px 24px 40px; }
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 900px) {
  .lp-hero__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }

  .lp-hero__visual {
    min-height: 55vw;
    order: 1;
  }

  .lp-hero__text {
    order: 2;
    padding: 48px 24px;
  }

  .lp-hero__sub { max-width: 100%; }

  .lp-hero__badges { justify-content: flex-start; }

  .lp-footer { padding: 36px 24px 24px; }

  .lp-footer__inner { flex-direction: column; align-items: flex-start; gap: 20px; }

  .lp-footer__links { gap: 18px; }

  .lp-topnav__inner { padding: 0 24px; }
}

/* ── Mailto copy toast (in-app WebView fallback) ── */
.lp-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  max-width: 90vw;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  direction: rtl;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.lp-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Show / Episode detail (SEO landing) ─────── */

.lp-detail {
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 120px 24px 64px;
}

.lp-detail__hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.lp-detail__art {
  width: 300px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--lp-border);
  background: var(--lp-bg-card);
}

.lp-detail__meta {
  flex: 1 1 320px;
}

.lp-detail__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.lp-detail__title-row .lp-detail__title { margin-bottom: 0; }

/* Bigger than the card/carousel star — this sits next to a large heading,
   not a small meta row, so the default 32px button / 14px icon reads too
   small here. */
.lp-detail__title-row .lp-favorite-btn { width: 44px; height: 44px; }
.lp-detail__title-row .lp-favorite-icon { width: 22px; height: 22px; }

.lp-detail__kicker {
  color: var(--lp-gold);
  font-weight: 500;
  margin-bottom: 8px;
}

.lp-detail__series-link { color: var(--lp-gold); text-decoration: none; }
.lp-detail__series-link:hover { text-decoration: underline; }

.lp-detail__title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.lp-detail__desc {
  color: var(--lp-text-muted);
  line-height: 1.9;
  white-space: pre-line;
  margin-bottom: 24px;
}

.lp-detail__cta {
  color: var(--lp-text);
  font-weight: 500;
  margin-bottom: 16px;
}

.lp-detail__episodes { margin-top: 56px; }

.lp-detail__episodes-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lp-line);
}

.lp-episode-list { list-style: none; }

.lp-episode-list__item { border-bottom: 1px solid var(--lp-line); }

.lp-episode-list__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 8px;
  color: var(--lp-text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.lp-episode-list__link:hover { background: var(--lp-bg-soft); }

.lp-episode-list__num {
  flex: 0 0 auto;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--lp-bg-card);
  color: var(--lp-gold);
  font-weight: 500;
  font-size: 0.9rem;
}

.lp-episode-list__title { color: var(--lp-text); }

.lp-detail--empty { text-align: center; }
.lp-detail--empty .lp-detail__cta { margin-top: 24px; }
.lp-detail--empty .lp-hero__stores { justify-content: center; }

/* ── Shows Catalog (/shows) ───────────────────── */

.lp-shows {
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 120px 24px 64px;
}

.lp-shows__catalog { margin-top: 56px; }

.lp-section-header { margin-bottom: 24px; }

.lp-section-header__title {
  font-size: 1.4rem;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lp-line);
}

.lp-section-header__subtitle {
  color: var(--lp-text-muted);
  margin-top: 8px;
}

/* Card — shared by the plain grid and the full-bleed carousel (variant local
   in shared/_card.html.erb picks the modifier class below). */
.lp-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--lp-bg-card);
  border: 1px solid var(--lp-border);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.lp-card:hover { border-color: var(--lp-gold); }

.lp-card__link {
  display: block;
  color: var(--lp-text);
  text-decoration: none;
}

.lp-card__art-wrap { position: relative; }

.lp-card__art {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background-color: var(--lp-bg-soft);
  background-size: cover;
  background-position: center;
}

.lp-card__body { padding: 14px 16px 8px; }

.lp-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-card__subtitle {
  color: var(--lp-text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

/* Episode count and the favorite star at opposite ends of one row — a
   sibling of .lp-card__link (a form/button can't validly nest inside an
   <a>), not an overlay on the artwork. */
.lp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 14px;
}

.lp-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--lp-gold);
  font-size: 0.85rem;
}

.lp-card__icon { width: 14px; height: 14px; flex: 0 0 auto; }

.lp-card__favorite .lp-favorite-btn {
  width: 24px;
  height: 24px;
  background: none;
}

.lp-card__favorite .lp-favorite-btn:hover { background: var(--lp-bg-soft); }

/* Favorite star button — shared by the grid card, EC carousel slide, and
   both detail pages (shared/_favorite_show_button, _favorite_episode_button).
   Base style is the detail-page look (a filled circular chip next to the
   h1); the card/EC contexts override to a smaller, backdrop-free button
   above (.lp-card__favorite/.lp-ec-slide__favorite .lp-favorite-btn) since
   they sit in the card body, not over the artwork. */
.lp-favorite-form { margin: 0; }

.lp-favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--lp-gold);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lp-favorite-btn:hover { background: rgba(0, 0, 0, 0.6); transform: scale(1.05); }

.lp-favorite-icon { width: 14px; height: 14px; flex: 0 0 auto; }

/* Plain grid ── */

.lp-shows__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.lp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--lp-bg-card);
  border: 1px solid var(--lp-border);
  border-radius: 999px;
  padding: 8px;
  width: 40px;
  overflow: hidden;
  cursor: pointer;
  transition: width 0.25s ease, border-color 0.2s ease, padding 0.25s ease;
}

.lp-search:focus-within,
.lp-search.lp-search--active { cursor: text; }

.lp-search:focus-within,
.lp-search.lp-search--active {
  width: 280px;
  padding: 8px 16px;
  border-color: var(--lp-gold);
}

.lp-search__input {
  flex: 1 1 auto;
  min-width: 0;
  background: none;
  border: none;
  color: var(--lp-text);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.lp-search:focus-within .lp-search__input,
.lp-search.lp-search--active .lp-search__input {
  opacity: 1;
}

.lp-search__input:focus { outline: none; }

.lp-search__btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--lp-text-muted);
  cursor: pointer;
  padding: 0;
}

.lp-search__icon { width: 18px; height: 18px; }

.lp-shows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

/* Editor's Choice — full-bleed cover-art carousel with scroll-snap paging,
   synced to the dot indicators by app/javascript/controllers/ec_carousel_controller.js. */

.lp-editors-choice { margin-bottom: 48px; }

.lp-ec-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.lp-ec-carousel::-webkit-scrollbar { display: none; }

.lp-ec-slide {
  flex: 0 0 86%;
  scroll-snap-align: center;
  border-radius: 20px;
  overflow: hidden;
  background: var(--lp-bg-card);
  border: 1px solid var(--lp-border);
  transition: border-color 0.15s ease;
}

.lp-ec-slide:hover { border-color: var(--lp-gold); }

.lp-ec-slide__link {
  display: flex;
  align-items: stretch;
  gap: 24px;
  min-height: 280px;
  color: var(--lp-text);
  text-decoration: none;
}

.lp-ec-slide__art-wrap {
  flex: 0 0 38%;
  max-width: 320px;
  width: 100%;
}

.lp-ec-slide__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: var(--lp-bg-soft);
  background-size: cover;
  background-position: center;
}

/* Footer is a sibling of .lp-ec-slide__link (not nested inside it — a
   form/button can't validly nest inside an <a>), same idea as
   .lp-card__footer above: the star lives in the slide's body area, not
   overlaid on the artwork. EC has no episode-count element to place it
   opposite of, so it's pinned to the end of the row instead. */
.lp-ec-slide__footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 24px 16px;
}

.lp-ec-slide__favorite .lp-favorite-btn {
  width: 24px;
  height: 24px;
  background: none;
}

.lp-ec-slide__favorite .lp-favorite-btn:hover { background: var(--lp-bg-soft); }

.lp-ec-slide__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
  min-width: 0;
}

.lp-ec-slide__eyebrow {
  color: var(--lp-gold);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.lp-ec-slide__title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.lp-ec-slide__description {
  color: var(--lp-text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lp-ec-slide__cta {
  display: inline-block;
  align-self: flex-start;
  background: var(--lp-gold);
  color: var(--lp-bg);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .lp-ec-slide__link { flex-direction: column; min-height: 0; }
  .lp-ec-slide__art-wrap { max-width: none; aspect-ratio: 16 / 9; }
  .lp-ec-slide__art { aspect-ratio: 16 / 9; }
  .lp-ec-slide__body { padding: 20px; }
}

.lp-ec-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.lp-ec-dots__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--lp-border);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lp-ec-dots__dot--active {
  background: var(--lp-gold);
  transform: scale(1.2);
}

/* Load more ── */

.lp-load-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.lp-load-more__btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--lp-gold);
  color: var(--lp-gold);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.lp-load-more__btn:hover {
  background: var(--lp-gold);
  color: var(--lp-bg);
}

/* ── Login modal / standalone login page ─────── */

.lp-login-modal::backdrop {
  background: rgba(10, 10, 12, 0.6);
}

.lp-login-modal {
  border: 1px solid var(--lp-border);
  border-radius: 20px;
  background: var(--lp-bg-card);
  color: var(--lp-text);
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 420px;
  margin: auto;
  direction: rtl;
}

.lp-login-modal__close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: none;
  border: none;
  color: var(--lp-text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.lp-login-modal__close:hover { color: var(--lp-text); }

.lp-login-modal__lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.lp-login-modal__icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.lp-login-modal__wordmark {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--lp-text);
}

.lp-login-modal__card { width: 100%; }

.lp-login-modal__error {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff8a80;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: center;
}

.lp-login-modal__field {
  margin-bottom: 18px;
}

.lp-login-modal__label {
  display: block;
  font-size: 0.82rem;
  color: var(--lp-text-muted);
  margin-bottom: 8px;
}

.lp-login-modal__input {
  width: 100%;
  background: var(--lp-bg-soft);
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--lp-text);
  font-family: var(--lp-font);
  font-size: 0.95rem;
}

.lp-login-modal__input:focus {
  outline: none;
  border-color: var(--lp-gold);
}

.lp-login-modal__password-wrap {
  position: relative;
}

.lp-login-modal__password-wrap .lp-login-modal__input {
  padding-left: 42px;
}

.lp-login-modal__password-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--lp-text-dim);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px;
}

.lp-login-modal__submit {
  width: 100%;
  background: var(--lp-gold);
  color: #0d0d0f;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-family: var(--lp-font);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.lp-login-modal__submit:hover { opacity: 0.85; }

.lp-login-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--lp-text-dim);
  font-size: 0.8rem;
  margin: 22px 0 18px;
}

.lp-login-modal__divider::before,
.lp-login-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--lp-border);
}

.lp-login-modal__sso-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-login-modal__apple-btn,
.lp-login-modal__google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border-radius: 10px;
  padding: 12px;
  font-family: var(--lp-font);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.lp-login-modal__apple-btn {
  background: #000;
  color: #fff;
}

.lp-login-modal__apple-btn:hover { opacity: 0.85; }

.lp-login-modal__google-btn {
  background: #fff;
  color: #1e1e1e;
  border-color: var(--lp-border);
}

.lp-login-modal__google-btn:hover { opacity: 0.85; }

/* Wraps the visible Google button + its invisible overlay (real Google
   button, rendered by sso_controller.js) at the same size/position so a
   click lands on the real one. pointer-events stays off until the overlay
   flags itself ready, so clicks fall through to the visible button (and its
   own error-path click handler) before Google's SDK/render call finishes. */
.lp-login-modal__google-wrap {
  position: relative;
}

.lp-login-modal__google-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
}

.lp-login-modal__google-overlay--ready {
  pointer-events: auto;
}

.lp-login-modal__google-overlay iframe {
  width: 100% !important;
}

/* Standalone /login page (non-dialog fallback) reuses the same card/lockup
   classes as the modal — see sessions/new.html.erb. */
.lp-login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 64px;
}

.lp-login-page .lp-login-modal__card {
  max-width: 420px;
}

@media (max-width: 480px) {
  .lp-login-modal { padding: 32px 22px 28px; }
}

/* Scroll-reveal — see app/javascript/controllers/reveal_controller.js.
   Only takes effect once that JS has run (adds .lp-reveal-ready to <html>),
   so a page that never runs it just shows everything, unhidden. */
.lp-reveal-ready .lp-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.lp-reveal-ready .lp-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Native View Transitions for Turbo page visits — see the
   turbo:before-render hook in app/javascript/application.js. Browsers
   without support (Firefox) just ignore all of this. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.25s;
    animation-timing-function: ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
