/* The page is the night of the pilot: prison-wall indigo, with paper bands taken from the series' own art. */
:root {
  color-scheme: dark;
  --night: #131846; --wall: #1f2a6b; --turmeric: #f2b02e; --vermilion: #c63a2b; --paper: #efdfbc; --ink: #1a120c; --mist: #c9cbe6;
  --display: 'Yatra One', 'Tiro Devanagari Hindi', Georgia, serif;
  --body: 'Tiro Devanagari Hindi', Georgia, 'Noto Serif Devanagari', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--night); color: var(--paper); font: 400 1.2rem/1.65 var(--body); }
img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a:focus-visible, button:focus-visible, video:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 3px; }
.paper a:focus-visible { outline-color: var(--vermilion); }

.wrap { max-width: 1240px; margin-inline: auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(56px, 8vw, 104px); }
.paper { background: var(--paper) url(assets/paper.jpg) center / cover; color: var(--ink); }
.prose { display: grid; gap: 16px; max-width: 34em; min-width: 0; }

.top { position: sticky; top: 0; z-index: 10; background: var(--night); border-bottom: 1px solid rgba(242, 176, 46, .25); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 10px; }
.top-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 24px); white-space: nowrap; }
.sub { padding: 7px 14px 5px; background: var(--turmeric); color: var(--ink); font: 1.02rem/1.3 var(--display); text-decoration: none; }
.sub:hover { background: #ffc64d; }
.youtube-icon { display: inline-block; width: 1.3em; height: 1em; margin-right: .45em; vertical-align: -.1em; }
.mark { display: grid; font: 1.4rem/1.25 var(--display); color: var(--turmeric); }
.mark small { font: .95rem/1.3 var(--body); color: var(--mist); }
.switch { color: var(--paper); font-size: 1.1rem; text-underline-offset: 4px; }

.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding-block: clamp(16px, 3vw, 40px) clamp(56px, 7vw, 88px); }
.hero-copy { display: grid; gap: 22px; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
h1 span { display: block; }
h1 span + span { color: var(--turmeric); margin-top: .35em; }
.hook { max-width: 26em; font-size: 1.35rem; line-height: 1.5; }
.lede { max-width: 32em; color: var(--mist); }
.when { color: var(--mist); font-size: 1.05rem; display: grid; gap: 4px; padding-left: 14px; border-left: 3px solid var(--turmeric); }
.when strong { color: var(--paper); font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.btn { display: inline-block; padding: 14px 26px 12px; background: var(--turmeric); color: var(--ink); font: 1.2rem var(--display); text-decoration: none; border: 3px solid var(--ink); outline: 2px solid var(--turmeric); outline-offset: 0; }
.btn:hover { background: #ffc64d; }
.btn.alt { background: transparent; color: var(--ink); outline-color: var(--ink); }
.btn.alt:hover { background: rgba(26, 18, 12, .08); }
.link { color: inherit; text-underline-offset: 4px; }
.frame { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: #0b0e2c; box-shadow: 0 0 0 1px rgba(242, 176, 46, .35); }
.cap { margin-top: 12px; color: var(--mist); font-size: 1.02rem; }

.katha { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.scene { display: flex; justify-content: center; align-items: flex-end; gap: clamp(20px, 5vw, 64px); border-bottom: 2px solid rgba(26, 18, 12, .35); }
.scene img { height: auto; width: 33%; }
.scene .flip { transform: scaleX(-1); }

.preview { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center; }

.gens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 36px; }
.gens li { display: grid; gap: 10px; align-content: start; padding-top: 16px; border-top: 4px double var(--vermilion); }
.gens h3 { color: var(--vermilion); }

.journey { display: grid; gap: 36px; align-items: start; }
.garland { --cols: 25; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 18px 2px; max-width: calc(var(--cols) * 36px); padding-top: 18px; }
.lamp { position: relative; display: block; }
.lamp::before { content: ''; display: block; aspect-ratio: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M1.5 9.500c3.5 1.5 13.5 1.5 17 0-.5 5.5-4 8.5-8.5 8.500s-8-3-8.5-8.500z' fill='%23f2b02e' opacity='.5'/%3E%3Cpath d='M10 10.500V7.5' stroke='%23f2b02e' stroke-width='1.5' stroke-linecap='round' opacity='.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.lamp.lit::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 .8c2.6 3 3.2 5 3.2 6.400a3.2 3.2 0 0 1-6.4 0C6.8 5.8 7.4 3.8 10 .8z' fill='%23ffd76a'/%3E%3Cpath d='M1.5 9.500c3.5 1.5 13.5 1.5 17 0-.5 5.5-4 8.5-8.5 8.500s-8-3-8.5-8.500z' fill='%23f2b02e'/%3E%3C/svg%3E"); transform: scale(1.6); filter: drop-shadow(0 0 7px #ffb82e); }
.lamp.first:not(.lit)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M1.5 9.500c3.5 1.5 13.5 1.5 17 0-.5 5.5-4 8.5-8.5 8.500s-8-3-8.5-8.500z' fill='%23f2b02e' opacity='.95'/%3E%3Cpath d='M10 10.500V7.5' stroke='%23f2b02e' stroke-width='1.5' stroke-linecap='round' opacity='.95'/%3E%3C/svg%3E"); }
.lamp .tag { position: absolute; bottom: calc(100% + 3px); left: 0; font: 400 .8rem/1 var(--body); color: var(--turmeric); white-space: nowrap; }
.map { display: grid; }
.row { padding-block: 14px; border-top: 1px solid rgba(201, 203, 230, .25); }
.skandha { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; gap: 2px 24px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.skandha b { font: 400 1.3rem var(--display); color: var(--turmeric); }
.skandha span { font-size: 1.05rem; line-height: 1.4; }
.skandha small { color: var(--mist); font-size: .95rem; }
.skandha:hover span { text-decoration: underline; text-underline-offset: 4px; }
.titles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 0 40px; align-content: start; max-height: 340px; overflow-y: auto; margin-top: 12px; padding: 16px; background: var(--wall); font-size: 1.08rem; line-height: 1.45; }
.titles[hidden] { display: none; }
.titles li { display: flex; flex-wrap: wrap; gap: 0 10px; padding-block: 4px; }
.titles .no { min-width: 2em; color: var(--mist); font-variant-numeric: tabular-nums; }
.titles .here { color: var(--turmeric); }
.titles em { font-style: normal; font-size: .95rem; }

.cast { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 40px 22px; margin-top: 36px; }
.cast li { display: grid; grid-template-rows: 310px auto auto; gap: 4px; align-content: start; }
.fig { display: flex; align-items: flex-end; justify-content: center; border-bottom: 2px solid rgba(26, 18, 12, .35); margin-bottom: 10px; }
.fig img { width: calc(var(--w) * var(--k, .42) * 1px); height: auto; }
.cast h3 { color: var(--vermilion); }
.cast p { font-size: 1.02rem; line-height: 1.4; }



.end { display: grid; gap: 22px; justify-items: center; text-align: center; padding: clamp(36px, 6vw, 72px) clamp(18px, 4vw, 56px); background: var(--paper) url(assets/paper.jpg) center / cover; background-clip: padding-box; color: var(--ink); border: 34px solid var(--paper); border-image: url(assets/border.png) 92 / 34px round; }
.end .actions { justify-content: center; }

footer { padding-block: 8px 48px; text-align: center; color: var(--mist); font-size: 1.02rem; display: grid; gap: 6px; }
.mantra { font-size: 1.3rem; color: var(--turmeric); }

@media (min-width: 1041px) {
  .journey { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 36px clamp(28px, 4vw, 56px); }
  .map { grid-column: 1 / -1; }
}
@media (max-width: 1040px) { .cast { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .hero, .katha, .preview, .gens, .skandha { grid-template-columns: minmax(0, 1fr); }
  .hero-video { order: -1; }
  .scene { max-width: 340px; }
}
@media (max-width: 639px) {
  /* Column count is also PHONE_COLUMNS in src/build.mjs. */
  .garland { --cols: 15; }
  .lamp .tag.flip { left: auto; right: 0; }
  .lamp.lit::before { transform: scale(1.35); }
}
@media (max-width: 520px) {
  body { font-size: 1.12rem; }
  .mark { font-size: 1.15rem; }
  .mark small { font-size: .82rem; }
  .top .wrap { gap: 10px; }
  .top-links { gap: 12px; }
  .sub { padding: 6px 10px 4px; font-size: .95rem; }
  .switch { font-size: 1rem; }
  .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cast li { grid-template-rows: 260px auto auto; }
  .fig img { --k: .34; }
  .btn { width: 100%; text-align: center; }
  .end { border-width: 22px; border-image-width: 22px; }
}
@media (max-width: 360px) {
  .mark { font-size: 1rem; }
  .mark small { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
