/* Chooni.ir — Section-index (per-vertical landing) layout. Consumes tokens.css + base.css.
   This is the editorial composition that used to live on the site root: cinematic featured
   hero → high-scores rail → recently-added → value band. Scoped to one Section (ویدیو etc.).
   Everything is fluid; breakpoints are min-content driven (~900 tablet, ~600 mobile). */

/* ============================ HERO ============================
   Two explicit columns now (owner, 2026-09-04): content | media. Was a single reading
   column laid over a full-bleed, heavily washed backdrop — at 0.78 alpha over a light
   theme the image read as almost invisible, and with everything in one column the hero
   was just a tall stack of rows. Media is now a confined panel (never past the hero's
   center) at close to full opacity/saturation — "vivid" per the owner — and content is
   vertically centered against it instead of pinned to the top. DOM order is content
   first, media second: in this RTL page, grid column 1 is the visual right side, so
   that order puts content on the right (reading start) and the image on the left,
   matching the brief without an explicit `order`. Narrow layout below drops to one
   column, image on top. */
.hero {
  position: relative; overflow: hidden; background: var(--bg);
}

.hero__inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin-inline: auto;
  /* Compacted (owner, 2026-09-04): was clamp(120,16vw,176)/--section-y/clamp(560,88vh,900) —
     a near-full-viewport band for a detail page. No min-height at all now — the vh-based
     floor was the real "height waster" (owner, 2026-09-04): it forced 420-620px regardless
     of content. Height is now content-driven; only the top padding is fixed, and only to
     clear the absolutely positioned .nav (~114px: 68px search row + ~46px section-strip
     row) sitting on top of this band — anything less and the title runs under the nav.
     Bottom padding stays small: the season-nav strip right below has its own light
     padding, not the shared .section rhythm, so stacking a big --section-y here on top
     of it was the "unexplainable gap" (see title.html's SEASON NAV comment). */
  padding: clamp(128px, 13vw, 150px) var(--pad-x) 44px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero__content { max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
/* Split into an unclipped positioning box (.hero__media) + a clipped image frame
   (.hero__media-frame): the platform badge overlaps the frame's bottom edge like a
   poster seal, and `overflow:hidden` on the frame itself would otherwise cut it off. */
.hero__media { position: relative; }
.hero__media-frame { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--panel-2); }
.hero__media-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.08) contrast(1.03); }
/* Subtle fade only on the edge touching the content column (physical right edge of the
   image, since the image sits on the physical left) — keeps the panel from feeling like
   a pasted-on rectangle without washing the picture out the way the old full-bleed scrim did. */
.hero__media-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgb(var(--bg-rgb) / 0) 72%, rgb(var(--bg-rgb) / 0.5) 100%); }

/* Platform "where to watch" — one plain circle stamp on the image corner, nothing else
   (owner, 2026-09-04: "at least 5x" the old 22px --sm size; a pill wrapped around the
   circle "looks awful" — dropped, see title.html). */
/* Physical `left`, not inset-inline-start: the media box's outer edge is always
   physical-left here (it's the visually-left column), and logical-start would have
   resolved to the INNER edge on this RTL page — the wrong side (owner, 2026-09-04:
   move it to the outer edge, hanging out same as the bottom). */
.hero__platform { position: absolute; z-index: 2; inset-block-end: -20px; left: -20px; box-shadow: 0 14px 30px rgb(0 0 0 / 0.3); }
/* Dark drop-shadow reads as dirt/smudge on the light theme's warm-white badge (owner,
   2026-09-04) — the circle's own 1px border is enough separation from the image there. */
:root[data-theme="light"] .hero__platform { box-shadow: none; }
.platform-badge--xl { width: 112px; height: 112px; }
.platform-badge--xl .platform-logo { width: 80%; height: 80%; }
.hero__title { margin: 0; font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; }
/* .latin forces direction:ltr, so `start` would resolve to the left and detach
   the English title from the Persian one above it. Pin it to the right edge of
   the reading column so "Oppenheimer" sits directly under اوپنهایمر. */
.hero__latin { font-size: clamp(20px, 3vw, 30px); font-style: italic; color: var(--muted); line-height: 1.1; text-align: right; }
.hero__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.hero__meta .sep { color: var(--dim); }
/* One wrapping row: score badge, reach, platform, language — replaces the old
   ring-plus-stacked-column layout (see title.html hero__score comment). */
.hero__score { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.hero__score .sep { color: var(--dim); }
.hero__quote { position: relative; margin-top: 14px; padding-inline-start: 40px; }
.hero__quote .mark { position: absolute; inset-inline-start: -4px; top: -22px; font-size: 90px; line-height: 1; color: var(--amber); }
.hero__quote p { margin: 0; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.6; }
.hero__scrollcue { position: absolute; inset-inline-start: var(--pad-x); bottom: 120px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--dim); }
.hero__scrollcue .rule { width: 1px; height: 64px; background: linear-gradient(180deg, rgba(245,184,65,0) 0%, #F5B841 100%); }
.hero__scrollcue span { writing-mode: vertical-rl; letter-spacing: 0.2em; }

@media (max-width: 900px) {
  .hero__scrollcue { display: none; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { max-width: none; }
  .hero__media { order: -1; }
  .hero__media-frame { aspect-ratio: 16 / 9; }
  .platform-badge--xl { width: 76px; height: 76px; }
  .hero__platform { inset-block-end: -14px; left: -14px; }
}

/* Boxed popcorn+percentage badge — replaces the old ring/gauge treatment at this size,
   which read as illegible mush in a compact card (owner, 2026-09-03). Same shape reused
   for any small season/episode-level score, e.g. Metacritic's own per-season score box
   is the reference: a solid badge, not a mini dial. Used in the hero and in the reviews
   section's season pills (below). */
.score-box { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 3px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.score-box__icon { height: 14px; width: auto; display: block; }
.score-box--scored { background: var(--amber-wash); color: var(--amber); border: 1px solid var(--amber-line); }
.score-box--tbd { background: transparent; color: var(--dim); border: 1px solid var(--line-2); font-weight: 500; font-size: 11px; }
.score-box--lg { height: 34px; padding: 0 12px; border-radius: 4px; font-size: 17px; gap: 8px; }
.score-box--lg .score-box__icon { height: 18px; }

/* ====================== SECTION / KIND ENTRY TILES ====================== */
/* The kind row under the head is the sub-kind shortcut within this Section. */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head__titles { display: flex; flex-direction: column; gap: 12px; }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; color: var(--teal); font-size: 15px; font-weight: 500; }
.kindrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kindrow .chip { color: var(--ink); }
.kindrow .chip:hover { border-color: var(--amber); color: var(--amber); }

/* ====================== HIGH SCORES ====================== */
.scores { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
/* Photo-backed cards — same dark-island pin as .hero (see above). */
.scores__hero, .scores__card {
  --ink: #F4EEE4; --muted: #B9AE9E; --dim: #7A6F62;
  --line: rgba(244, 238, 228, 0.10); --line-2: rgba(244, 238, 228, 0.22);
  --panel-2: #1B1620;
}
.scores__hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; min-height: 460px; padding: 36px; border-radius: 4px; overflow: hidden; color: inherit;
  background: linear-gradient(180deg, rgba(14,11,8,0) 25%, rgba(14,11,8,0.94) 100%), radial-gradient(700px 360px at 30% 20%, rgba(232,163,61,0.42) 0%, rgba(20,16,25,0) 70%), var(--panel-2); }
.scores__side { display: flex; flex-direction: column; gap: 24px; }
.scores__card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; min-height: 218px; padding: 28px; border-radius: 4px; overflow: hidden; color: inherit; }
.scores__card-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 860px) { .scores { grid-template-columns: 1fr; } .scores__hero { min-height: 360px; } }

/* ====================== RECENTLY ADDED ====================== */
.recent { display: grid; grid-template-columns: 1fr 3fr; gap: clamp(24px, 4vw, 32px); padding-top: 72px; }
.recent__intro { display: flex; flex-direction: column; gap: 12px; }
.recent__list { display: flex; flex-direction: column; }
.row-item { display: grid; grid-template-columns: 40px 1fr auto; grid-template-areas: "num title score" "num tags score"; align-items: center; column-gap: 20px; row-gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); color: inherit; }
.row-item__num { grid-area: num; color: var(--dim); font-size: 16px; }
.row-item__title { grid-area: title; display: flex; flex-direction: column; gap: 4px; }
.row-item__tags { grid-area: tags; display: flex; gap: 8px; flex-wrap: wrap; }
.row-item__score { grid-area: score; justify-self: end; }

@media (max-width: 860px) { .recent { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .row-item { grid-template-columns: 28px 1fr; grid-template-areas: "num title" "num tags" "num score"; }
  .row-item__score { justify-self: start; }
}

/* ====================== AUDIENCE REVIEWS (season-level) ====================== */
/* #reviews carries the shared `.section` class, which pulls the generic --section-y
   top padding (clamp 64-120px, tuned for section-to-section rhythm on landing pages).
   Stacked on top of the compact .seasons block's own bottom padding right above it,
   that read as an unexplained ~130px gap (owner, 2026-09-04) — same category of bug as
   the earlier hero-to-seasons gap. Override it to a fixed, modest value here; the id
   selector wins over the .section class without touching that class for other pages. */
#reviews { padding-top: 32px; }
/* Star widget: one outline row + one filled row (identical star glyphs, --fill sets the
   filled row's clip-path inset so it works for half-stars too). clip-path insets from the
   SVG's own left edge regardless of page `dir`, so this is RTL-safe without extra rules.
   Each <use> in title.html MUST carry explicit width="16" height="16": without it, a
   <use> referencing a <symbol> establishes its own nested viewport sized to the OUTER
   svg's viewBox (92x16 here, not the symbol's 16x16), and preserveAspectRatio then
   centers the star inside that oversized box — every glyph renders ~38px off from its
   x position, silently breaking the fill percentage (traced via getBoundingClientRect,
   not guessed — an earlier `direction:ltr` guess did nothing, this was the real cause). */
.stars { position: relative; display: inline-block; width: 92px; height: 16px; flex-shrink: 0; }
.stars__row { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars__row--bg { fill: none; stroke: var(--line-2); stroke-width: 1; }
.stars__row--fg { fill: var(--amber); stroke: none; clip-path: inset(0 calc(100% - var(--fill)) 0 0); }

/* Season filter — a rail beside the review grid (right side, RTL, same convention as
   browse.html's .rail), not a standalone nav band above the section (owner, 2026-09-04):
   picking a season is picking which review set to read, so it belongs with the reviews.
   The pills themselves lay out horizontally (owner: "place the seasons box horizontally")
   and wrap inside the narrow column rather than stacking one-per-line like a normal filter
   list — there are only 5, a wrapped row reads faster than a tall list. */
.reviews__body { display: grid; grid-template-columns: 1fr; gap: clamp(24px, 3vw, 40px); align-items: start; }
/* The 220px rail column exists only when the season rail is rendered; without it the lone
   .reviews__main would auto-place into the 220px track and squash the review grid. */
.reviews__body--rail { grid-template-columns: 220px 1fr; }
.reviews__rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.season-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.season-pill { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 96px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: inherit; font: inherit; text-align: start; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.season-pill:hover { border-color: var(--amber-line); }
.season-pill--active { border-color: var(--amber-line); background: var(--amber-wash); }
.season-pill__label { font-size: 13px; font-weight: 700; color: var(--ink); }

@media (max-width: 900px) {
  .reviews__body--rail { grid-template-columns: 1fr; }
  .reviews__rail { position: static; }
  .season-pills { flex-wrap: wrap; }
}

.reviews__controls { display: flex; flex-wrap: wrap; gap: clamp(20px, 3vw, 40px); padding: 20px 0 28px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.reviews__control { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.reviews__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.reviews__chips [data-sort], .reviews__chips [data-filter] { cursor: pointer; height: 30px; font-size: 12px; padding: 0 12px; }

/* align-items: start — each card is as tall as its own text. Rows would still be as tall as their
   tallest card, leaving a hole under the short one; .is-masonry (set by review-clamp.js) switches to
   4px rows with each card spanning exactly its own height, so the next card moves up under it while
   the order stays row by row (most helpful first). Without JS: the plain two-column grid. */
.reviews__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.reviews__grid.is-masonry { grid-auto-rows: 4px; row-gap: 0; }
.reviews__grid.is-masonry > .review-card { margin-bottom: 24px; }
.review-card { padding: 28px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); display: flex; flex-direction: column; gap: 14px; }
.review-card .quote { font-size: 16px; line-height: 1.8; margin: 0; }
.review-card__byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-card__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.review-card__badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 2px; background: var(--amber-wash); color: var(--amber); font-size: 11px; font-weight: 600; }
.reviews__empty { color: var(--muted); font-size: 15px; padding: 32px 0; text-align: center; }

@media (max-width: 720px) { .reviews__grid { grid-template-columns: 1fr; } }

/* ====================== WHY / STATS BAND ====================== */
.why { position: relative; padding: clamp(40px, 6vw, 64px) clamp(28px, 5vw, 72px); border-radius: 4px; overflow: hidden; background: var(--panel); border: 1px solid var(--line);
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 4vw, 32px); align-items: center; }
.why__copy { display: flex; flex-direction: column; gap: 14px; }
.why__stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .n { font-size: clamp(40px, 6vw, 56px); line-height: 1; }

@media (max-width: 820px) { .why { grid-template-columns: 1fr; } }
