/* ============================================================
   THE INVESTOR: a Netflix-style parody for a Robinhood-chain
   memecoin. Netflix black/red base, Robinhood green accent.
   ============================================================ */

:root {
  --bg: #141414;
  --bg-2: #181818;
  --bg-3: #202020;
  --red: #e50914;
  --red-2: #f6121d;
  --text: #ffffff;
  --muted: #b3b3b3;
  --dim: #7a7a7a;
  --line: rgba(255, 255, 255, 0.14);
  --rh: #00c805;
  --rh-2: #00e676;

  --anton: "Anton", Impact, sans-serif;
  --inter: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --g1: linear-gradient(145deg, #e50914, #7b0a10);
  --g2: linear-gradient(145deg, #00c805, #06592a);
  --g3: linear-gradient(145deg, #8b5cf6, #3b1a75);
  --g4: linear-gradient(145deg, #2e86de, #123a63);
  --g5: linear-gradient(145deg, #f5a623, #7a4a06);
  --g6: linear-gradient(145deg, #ff5a5f, #6d1b3a);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--inter);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
svg {
  display: block;
}
img {
  max-width: 100%;
  display: block;
}
::selection {
  background: var(--red);
  color: #fff;
}
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 3px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- brand wordmark ---------- */
.brand {
  font-family: var(--anton);
  color: var(--red);
  font-size: 26px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transform: scaleY(1.08);
  transform-origin: left center;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(229, 9, 20, 0.35);
}
.brand--sm {
  font-size: 22px;
}

/* ============================================================
   SCREEN 1: PROFILE GATE
   ============================================================ */
.gate {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 22px clamp(18px, 4vw, 48px) 60px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar__hint {
  font-size: 14px;
  color: var(--muted);
}
.gate__center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.gate__title {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.gate__sub {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--muted);
  margin-bottom: clamp(34px, 6vh, 64px);
}
.profiles {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 3vw, 46px);
}
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.profile__btn {
  position: relative;
  border-radius: 8px;
}
.avatar {
  display: block;
  width: clamp(96px, 12vw, 150px);
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid transparent;
  transition: transform 0.28s var(--ease), border-color 0.2s var(--ease), filter 0.28s var(--ease);
}
.avatar img,
.avatar svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile__name {
  font-size: clamp(15px, 1.6vw, 20px);
  color: var(--dim);
  transition: color 0.2s var(--ease);
}
.profile__btn:hover .avatar,
.profile__btn:focus-visible .avatar {
  transform: scale(1.07);
  border-color: #fff;
}
.profile__btn:hover + .profile__name,
.profile:hover .profile__name {
  color: #fff;
}

/* locked (non-investor) profiles */
.profile__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.profile__lock svg {
  width: 34px;
  height: 34px;
}
.profile[data-locked] .profile__btn:hover .profile__lock,
.profile[data-locked] .profile__btn:focus-visible .profile__lock {
  opacity: 1;
}

/* The Investor: the star profile */
.profile--star .avatar {
  box-shadow: 0 0 0 0 rgba(0, 200, 5, 0.5);
  animation: starpulse 2.6s ease-in-out infinite;
}
@keyframes starpulse {
  0%, 100% { box-shadow: 0 0 30px -6px rgba(0, 200, 5, 0.55); }
  50% { box-shadow: 0 0 46px 2px rgba(0, 200, 5, 0.8); }
}
.profile--star .profile__name {
  color: #fff;
  font-weight: 600;
}
.profile__badge {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #08210f;
  background: var(--rh-2);
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 6px 18px -6px rgba(0, 200, 5, 0.7);
}

.gate__foot {
  margin-top: clamp(40px, 8vh, 80px);
  color: var(--dim);
  font-size: 15px;
}
.gate__foot strong {
  color: var(--muted);
  font-weight: 600;
}
.gate__legal {
  text-align: center;
  color: #5a5a5a;
  font-size: 12px;
}

/* reaction toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  max-width: min(520px, 88vw);
  padding: 14px 20px;
  background: #1f1f1f;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  color: #eaeaea;
  font-size: 14.5px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 80;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- transition curtain ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 0;
  visibility: hidden;
}
.curtain.run {
  visibility: visible;
}
.curtain__avatar {
  width: clamp(110px, 14vw, 160px);
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
}
.curtain__avatar svg {
  width: 100%;
  height: 100%;
}

/* ============================================================
   SCREEN 2: BROWSE
   ============================================================ */
.browse {
  position: relative;
}
.browse [id] {
  scroll-margin-top: 84px;
}
.rail.dragging {
  user-select: none;
}

/* nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  transition: background 0.3s var(--ease);
}
.nav--solid {
  background: #141414;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav__left {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links {
  display: flex;
  gap: 20px;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.nav__links a {
  transition: color 0.2s var(--ease);
}
.nav__links a:hover {
  color: #fff;
}
.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav__cta {
  font-size: 13.5px;
  font-weight: 600;
  color: #08210f;
  background: var(--rh-2);
  padding: 8px 16px;
  border-radius: 4px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__cta:hover {
  transform: translateY(-1px);
  background: #21ff86;
}
.nav__avatar {
  width: 34px;
  aspect-ratio: 1;
  border-radius: 5px;
  overflow: hidden;
  border: none;
}

/* billboard */
.billboard {
  position: relative;
  min-height: 88svh;
  display: flex;
  align-items: center;
  padding: 90px clamp(16px, 4vw, 60px) 0;
  overflow: hidden;
}
.billboard__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(80% 90% at 78% 20%, rgba(0, 200, 5, 0.22), transparent 60%),
    radial-gradient(90% 90% at 12% 90%, rgba(229, 9, 20, 0.28), transparent 62%),
    #0c0c0c;
}
.billboard__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%);
  opacity: 0.6;
}
.billboard__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 180px;
  z-index: -1;
  background: linear-gradient(to top, var(--bg), transparent);
}
.billboard__inner {
  max-width: 640px;
}
.billboard__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}
.billboard__badge::before {
  content: "TOP\00a0 10";
  font-family: var(--anton);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--red);
  padding: 3px 6px;
  border-radius: 3px;
}
.billboard__title {
  font-family: var(--anton);
  font-size: clamp(60px, 12vw, 150px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  margin: 16px 0 18px;
  transform: scaleY(1.05);
  transform-origin: left;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}
.billboard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.match {
  color: var(--rh-2);
  font-weight: 700;
}
.rating {
  border: 1px solid var(--line);
  padding: 1px 7px;
  font-size: 12px;
  border-radius: 3px;
}
.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.chip--rh {
  color: #08210f;
  background: var(--rh-2);
}
.billboard__synopsis {
  font-size: clamp(15px, 1.7vw, 18px);
  color: #dcdcdc;
  max-width: 52ch;
  line-height: 1.6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.billboard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 26px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn svg {
  width: 22px;
  height: 22px;
}
.btn--play {
  color: #08210f;
  background: var(--rh-2);
}
.btn--play:hover {
  transform: translateY(-2px);
  background: #24ff89;
}
.btn--info {
  color: #fff;
  background: rgba(109, 109, 110, 0.55);
}
.btn--info:hover {
  transform: translateY(-2px);
  background: rgba(109, 109, 110, 0.4);
}
.btn--sm {
  padding: 10px 20px;
  font-size: 14px;
}
.btn--sm svg {
  width: 18px;
  height: 18px;
}

/* ---------- rows ---------- */
.rows {
  position: relative;
  z-index: 2;
  margin-top: -60px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 5vh, 56px);
}
.row {
  padding-left: clamp(16px, 4vw, 60px);
}
.row__title {
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 700;
  margin-bottom: 14px;
  color: #e5e5e5;
}
.rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 26px 0 30px;
  margin: -26px 0 -30px;
  scrollbar-width: none;
  cursor: grab;
}
.rail::-webkit-scrollbar {
  display: none;
}
.rail.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}
.rail > * {
  scroll-snap-align: start;
}

/* cards */
.card {
  flex: 0 0 auto;
  width: clamp(200px, 22vw, 300px);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.3s var(--ease);
}
.card__poster {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.6);
}
.card__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* photo tiles get a soft bottom shade so they sit into the dark page like real posters */
.card--photo .card__poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
}
.card__label {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.35;
  padding-right: 8px;
  transition: color 0.2s var(--ease);
}
.card[data-progress] .card__poster::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  height: 4px;
  width: var(--pw, 0%);
  background: var(--red);
}
.card:hover {
  transform: scale(1.07);
  z-index: 3;
}
.card:hover .card__label {
  color: #fff;
}

/* poster color cycling */
.rail .card:nth-child(6n + 1) .card__poster { background: var(--g1); }
.rail .card:nth-child(6n + 2) .card__poster { background: var(--g2); }
.rail .card:nth-child(6n + 3) .card__poster { background: var(--g3); }
.rail .card:nth-child(6n + 4) .card__poster { background: var(--g4); }
.rail .card:nth-child(6n + 5) .card__poster { background: var(--g5); }
.rail .card:nth-child(6n + 6) .card__poster { background: var(--g6); }

/* lore cards: cinematic, photo-backed (card--photo supplies the bottom shade) */
.card--lore .card__poster {
  background: linear-gradient(160deg, #232323, #0e0e0e);
  border: 1px solid var(--line);
}
.card--lore .card__label {
  font-size: 13px;
  color: #cfcfcf;
}

/* step cards */
.card--step .card__poster {
  background: linear-gradient(150deg, #1c1c1c, #0d0d0d);
  border: 1px solid var(--line);
}
.step__n {
  font-family: var(--anton);
  font-size: clamp(52px, 7vw, 84px);
  color: transparent;
  -webkit-text-stroke: 2px rgba(0, 200, 5, 0.85);
  text-stroke: 2px rgba(0, 200, 5, 0.85);
}

/* ---------- Top 10 ---------- */
.rail--top10 {
  gap: 6px;
  align-items: flex-end;
}
.top10 {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s var(--ease);
}
.top10:hover {
  transform: scale(1.05);
  z-index: 3;
}
.top10__num {
  font-family: var(--anton);
  font-size: clamp(90px, 13vw, 168px);
  line-height: 0.7;
  color: #141414;
  -webkit-text-stroke: 2.5px #4d4d4d;
  text-stroke: 2.5px #4d4d4d;
  margin-right: -12px;
  transform: translateY(6px);
}
.top10__poster {
  position: relative;
  width: clamp(120px, 13vw, 165px);
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background: linear-gradient(160deg, #262626, #0d0d0d);
  border: 1px solid var(--line);
}
.top10__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* keep poster titles readable over photos */
.top10__poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05) 55%);
}
.top10__poster span {
  position: relative;
  z-index: 2;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.top10:first-child .top10__num {
  -webkit-text-stroke-color: var(--rh);
  text-stroke: 2.5px var(--rh);
}
.top10:first-child .top10__poster {
  background: var(--g2);
  border-color: transparent;
}
.top10:first-child .top10__poster span {
  font-family: var(--anton);
  font-size: 20px;
}

/* ---------- footer ---------- */
.browse__footer {
  padding: 50px clamp(16px, 4vw, 60px) 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 30px;
}
.ca {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.ca__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--dim);
}
.ca__box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 13px;
  color: #e5e5e5;
  transition: border-color 0.2s var(--ease);
}
.ca__box:hover,
.ca__box:focus-visible {
  border-color: var(--rh-2);
}
.ca__addr {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ca__icon {
  flex: none;
  display: inline-flex;
  color: var(--dim);
}
.ca__icon svg {
  width: 15px;
  height: 15px;
}
.ca__done {
  display: none;
  color: var(--rh-2);
  font-weight: 700;
}
.ca__box.is-copied {
  border-color: var(--rh-2);
}
.ca__box.is-copied .ca__icon {
  display: none;
}
.ca__box.is-copied .ca__done {
  display: inline;
}
.browse__footer-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.footer__x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer__x:hover,
.footer__x:focus-visible {
  color: #fff;
}
.disclaimer {
  max-width: 70ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: #6f6f6f;
  margin-bottom: 14px;
}
.copyright {
  font-size: 12px;
  color: #5a5a5a;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
}
.is-ready .reveal {
  will-change: opacity, transform;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .nav__links {
    display: none;
  }
  .billboard {
    min-height: 78svh;
  }
  .billboard__synopsis {
    font-size: 15px;
  }
  .rows {
    margin-top: -30px;
  }
}
@media (max-width: 520px) {
  .topbar__hint {
    display: none;
  }
  .gate__foot {
    margin-top: 42px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}
