/* Numinous, first run.
   ---------------------------------------------------------------------------
   Design notes, so the next change does not undo the point of this one.

   The look is borrowed from Letterboxd rather than from dashboard defaults:
   near-black ground, 4px corners instead of 14, hairline rules instead of
   bordered cards, and their green/blue/orange trio used as a signature rather
   than as decoration. The two habits that make an onboarding page read as
   generic are rounded grey panels and numbered accent-colour bubbles, so
   neither appears here: numbers are set as small tabular figures in the margin
   and separation is done with space and a single rule. */

:root {
  --ground: #0c0f12;
  --raised: #14181c; /* Letterboxd's own panel colour */
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);

  --text: #e9eef3;
  --muted: #9aa7b2;
  --dim: #5f6b75;

  --green: #00e054;
  --blue: #40bcf4;
  --orange: #ff8000;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Inter, Roboto, sans-serif;
  --text-face: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Inter, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--text-face);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------- wall */

.wall {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 10px;
  /* Behind everything, and deliberately not clickable. */
  z-index: 0;
  pointer-events: none;
}

.wall__tile {
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background-color: #171c21;
  background-size: cover;
  background-position: center;
  /* Nearly monochrome so the type stays the only thing with colour, until a
     tile is marked as rated. */
  filter: grayscale(1) brightness(0.42) contrast(1.05);
  opacity: 0;
  transform: scale(1.04);
  animation: tile-in 1.1s var(--ease) forwards;
}

.wall__tile--lit {
  filter: grayscale(0.15) brightness(0.72) contrast(1.02);
  box-shadow: 0 0 0 1px rgba(0, 224, 84, 0.28);
}

@keyframes tile-in {
  to {
    opacity: 1;
    transform: none;
  }
}

/* A scrim, not a flat overlay: the wall has to stay legible as texture at the
   top and disappear completely by the time the copy starts. */
.scrim {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(12, 15, 18, 0.55) 0%,
      rgba(12, 15, 18, 0.72) 38%,
      rgba(12, 15, 18, 0.96) 78%,
      var(--ground) 100%
    ),
    radial-gradient(
      120% 80% at 12% 20%,
      rgba(12, 15, 18, 0.2) 0%,
      rgba(12, 15, 18, 0.9) 70%
    );
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
  animation: rise 900ms var(--ease) both;
}

/* A half-filled star, which is the rating scale itself: five stars, half
   steps. It replaced three dots in green, blue and orange -- that is
   Letterboxd's logo exactly, and wearing it above a line disclaiming any
   affiliation was the loudest such claim left on the page. Same clip-path
   polygon as the mock stars, so there is one star shape in the product.
   Deliberately not their green either: the mark is the one place that has to
   be ours. */
.mark {
  display: inline-block;
  width: 13px;
  height: 12.5px;
  background: linear-gradient(
    to right,
    var(--text) 0 50%,
    rgba(233, 238, 243, 0.24) 50% 100%
  );
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.mark--sm {
  width: 11px;
  height: 10.5px;
  vertical-align: -1px;
}

.wordmark__text {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}

/* The display face carries the page. Large, tight tracking, and a real line
   height rather than the 1.4 that makes headlines look like body copy. */
.display {
  margin: 0;
  max-width: 15ch;
  font-family: var(--display);
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
  animation: rise 900ms 80ms var(--ease) both;
}

.lede {
  margin: 28px 0 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  animation: rise 900ms 160ms var(--ease) both;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 44px;
  animation: rise 900ms 240ms var(--ease) both;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 8px;
  border-radius: 3px;
  border: 1px solid rgba(0, 224, 84, 0.3);
  background: rgba(0, 224, 84, 0.08);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tag--live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 224, 84, 0.18);
}

.hero__sep {
  width: 22px;
  height: 1px;
  background: var(--line);
}

.hero__note {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------- page */

.page {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px 120px;
  background: var(--ground);
}

.eyebrow {
  margin: 0 0 44px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ------------------------------------------------------------------ beats */

.beat {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 64px;
  align-items: center;
  padding: 72px 0;
  border-bottom: 1px solid var(--line-soft);
}

.beat:last-child {
  border-bottom: 0;
}

.beat--flip .beat__body {
  order: 2;
}

.beat__n {
  display: block;
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.beat__title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 33px);
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 600;
}

.beat__text {
  margin: 0;
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.beat__art {
  min-width: 0;
}

/* ------------------------------------------------------------------ mocks */

.mock {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #15191e 0%, #101418 100%);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.9);
}

/* --- YouTube action row --- */

.mock__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ytpill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 600;
  color: #f1f1f1;
  white-space: nowrap;
}

.ytpill--icon {
  padding: 0 12px;
  letter-spacing: 1px;
}

.ytpill__ico {
  font-size: 10px;
  display: inline-block;
}

.ytpill__ico--down {
  transform: rotate(180deg);
}

.ytpill__div {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

/* Ours: same shape as theirs, green only where the rating lives. */
.ytpill--ours {
  background: rgba(0, 224, 84, 0.13);
  box-shadow: inset 0 0 0 1px rgba(0, 224, 84, 0.32);
  color: var(--green);
}

.ytpill__star {
  font-size: 13px;
}

.mock__pop {
  width: 214px;
  margin-top: 14px;
  margin-left: 92px;
  padding: 13px 15px 15px;
  border: 1px solid var(--line);
  border-top-color: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #1b2026;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85);
}

.mock__hint {
  margin: 0 0 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--green);
}

.mock__stars {
  display: flex;
  gap: 4px;
}

.ms {
  width: 22px;
  height: 21px;
  background: rgba(255, 255, 255, 0.16);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.ms--on {
  background: var(--green);
}

.mock__note {
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--dim);
}

/* --- Letterboxd profile --- */

.mock__stats {
  display: flex;
  gap: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat b {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat i {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--dim);
}

.stat--ours b {
  color: var(--green);
}

.mock__h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.mock__tag {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 224, 84, 0.14);
  color: var(--green);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.mock__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tile__img {
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  background: #232a31;
}

/* Stand-ins, not screenshots: enough shape to read as a thumbnail, nothing
   that can rot when a real video comes down. */
.tile__img--a {
  background: linear-gradient(135deg, #2b3a44 0%, #1b242b 100%);
}
.tile__img--b {
  background: linear-gradient(135deg, #3a3040 0%, #221d28 100%);
}
.tile__img--c {
  background: linear-gradient(135deg, #263a30 0%, #182420 100%);
}

.tile__stars {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--green);
}

/* --- feed thumbnails with friend badges --- */

.mock--feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feedcard {
  position: relative;
  display: block;
}

.feedcard__img {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: linear-gradient(135deg, #2a343d 0%, #171d23 100%);
}

.feedcard__img--alt {
  background: linear-gradient(135deg, #3b3340 0%, #1d1a22 100%);
}

.feedcard__badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: 14px;
  background: rgba(10, 13, 16, 0.86);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ava {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #0c0f12;
}

.ava--1 {
  background: var(--green);
}
.ava--2 {
  background: var(--blue);
  margin-left: -9px;
}
.ava--3 {
  background: var(--orange);
}

.feedcard__rating {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

/* ------------------------------------------------------------------ setup */

.setup {
  padding-top: 96px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line-soft);
}

.step:last-child {
  border-bottom: 0;
}

/* Tabular figures in the margin. Not a filled circle: that is the single most
   recognisable tell of a template, and it costs nothing to avoid. */
.step__n {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
  padding-top: 4px;
}

.step__body h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.step__body p {
  margin: 0;
  max-width: 58ch;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  margin: 0 2px;
  vertical-align: -5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 20px;
  border-radius: 4px;
  background: var(--green);
  color: #06210f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease),
    background 200ms var(--ease);
}

.cta::after {
  content: "\2192";
  transition: transform 240ms var(--ease);
}

.cta:hover {
  background: #22ef70;
  box-shadow: 0 12px 28px -12px rgba(0, 224, 84, 0.7);
  transform: translateY(-1px);
}

.cta:hover::after {
  transform: translateX(3px);
}

.cta:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------- foot */

.foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 100px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.foot__line {
  margin: 0;
  max-width: 62ch;
  font-size: 13px;
  line-height: 1.6;
  color: var(--dim);
}

.foot__line--fine {
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.62;
}

.foot__mark {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.foot__link {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--dim);
  text-decoration: none;
  transition: color 200ms var(--ease);
}

.foot__link:hover {
  color: var(--text);
}

.foot__link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .foot__link {
    transition: none;
  }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .hero,
  .page {
    padding-left: 26px;
    padding-right: 26px;
  }

  .beat {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 52px 0;
  }

  .beat--flip .beat__body {
    order: 0;
  }

  .step {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .mock__pop {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall__tile,
  .wordmark,
  .display,
  .lede,
  .hero__meta {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .cta {
    transition: none;
  }
}
