/* Throwaway draft B, "Cinema": Kahani Rang as a film poster.
   True black, warm white, one projector vermilion. Image first, type huge.
   No glows and no decorative gradients: the only gradients are scrims that
   keep text readable over artwork. */

@font-face {
  font-family: Teko;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/teko-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F;
}
@font-face {
  font-family: Teko;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/teko-devanagari-500-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8E0-A8FF;
}
@font-face {
  font-family: Teko;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/teko-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F;
}
@font-face {
  font-family: Teko;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/teko-devanagari-700-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8E0-A8FF;
}
@font-face {
  font-family: Mukta;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/mukta-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F;
}
@font-face {
  font-family: Mukta;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/mukta-devanagari-400-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8E0-A8FF;
}
@font-face {
  font-family: Mukta;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/mukta-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F;
}
@font-face {
  font-family: Mukta;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/mukta-devanagari-600-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8E0-A8FF;
}
@font-face {
  font-family: Mukta;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/mukta-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F;
}
@font-face {
  font-family: Mukta;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/mukta-devanagari-800-normal.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8E0-A8FF;
}

:root {
  --black: #000;
  --screen: #0a0a0a; /* the shelf sits a hair off true black */
  --white: #f2eee6;
  --dim: #b9b4aa; /* secondary text, 9:1 on black */
  --hot: #ff4a1c; /* the only colour on the page */
  --line: rgba(242, 238, 230, 0.22);

  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --pill: 4.5rem; /* room for the draft switcher at the bottom */

  --display: Teko, 'Noto Sans Devanagari', Impact, sans-serif;
  --text: Mukta, 'Noto Sans Devanagari', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  background: var(--black);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--text);
  color: var(--white);
  background: var(--black);
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--hot);
  color: var(--black);
}

:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 4px;
}

/* ---- small type ------------------------------------------------------ */

/* Billing-block caps: tracked Latin only. Devanagari never gets tracking. */
.kicker,
.slate,
.credits,
.bar__nav {
  font: 600 0.8125rem/1.3 var(--text);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.kicker {
  margin: 0;
  color: var(--hot);
}
[lang='hi'] {
  letter-spacing: 0;
  text-transform: none;
}

/* ---- buttons and links ---------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.2rem 1.6rem 0;
  border-radius: 2px;
  font: 500 1.5rem/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}
.btn svg {
  width: 1rem;
  height: 1rem;
  margin-top: -0.2rem;
  fill: currentColor;
}
.btn--hot {
  background: var(--hot);
  color: var(--black);
}
.btn--ghost {
  box-shadow: inset 0 0 0 1.5px var(--white);
}
@media (hover: hover) {
  .btn--hot:hover {
    background: var(--white);
  }
  .btn--ghost:hover {
    background: var(--white);
    color: var(--black);
  }
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-top: 0.15rem;
  border-bottom: 2px solid var(--hot);
  font: 500 1.5rem/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
@media (hover: hover) {
  .link:hover {
    color: var(--hot);
  }
}

/* ---- top bar --------------------------------------------------------- */

.bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  text-decoration: none;
}
.brand__mark {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--hot);
}
.brand__name {
  padding-top: 0.2rem;
  font: 500 1.75rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bar__nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.bar__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  white-space: nowrap;
}
.bar__app {
  padding: 0 1rem;
  box-shadow: inset 0 0 0 1.5px var(--white);
  border-radius: 2px;
}
@media (hover: hover) {
  .bar__link:hover {
    color: var(--hot);
  }
  .bar__app:hover {
    background: var(--white);
    color: var(--black);
  }
}
@media (max-width: 30rem) {
  .bar__nav .bar__link {
    display: none;
  }
  .bar__nav {
    letter-spacing: 0.12em;
  }
}

/* ---- opening --------------------------------------------------------- */

.open {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--black);
  isolation: isolate;
}

.open__art {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.open__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  transform: scale(1.06);
  transform-origin: 50% 60%;
}

/* Scrim only: a floor of black for the title, a shade at the top for the bar. */
.open__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.9) 24%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0) 78%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 22%);
}

/* Letterbox bars: closed like a shutter, they open once and stay out of the way.
   Pure CSS so the page never depends on JS to uncover itself. */
.letterbox i {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  height: 50.5%;
  background: var(--black);
  transform: scaleY(0);
  pointer-events: none;
}
.letterbox i:first-child {
  top: 0;
  transform-origin: 50% 0;
}
.letterbox i:last-child {
  bottom: 0;
  transform-origin: 50% 100%;
}

.open__inner {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto auto;
  row-gap: 1.5rem;
  padding: 5.5rem var(--gutter) var(--pill);
}

.slate {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}
.slate__dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--hot);
}

.open__main {
  display: grid;
  gap: 1.25rem;
}

.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
}
.mask {
  display: block;
  overflow: hidden;
}
.rise {
  display: block;
}
/* Devanagari: no caps, no tracking, and headroom for the matras. */
.title__hi {
  padding-top: 0.14em;
  font-size: clamp(5.75rem, 25vw, 22rem);
  line-height: 0.92;
}
.title__en {
  margin-top: -0.04em;
  font-size: clamp(2.1rem, 8.6vw, 7.5rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hot);
  white-space: nowrap;
}

.pitch {
  max-width: 30ch;
  margin: 0;
  font-size: 1.1875rem;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.credits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.75rem;
  margin: 0;
  padding: 0.9rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.75rem;
}

@media (min-width: 56rem) {
  .open__inner {
    row-gap: 1.75rem;
  }
  .open__main {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 23rem);
    align-items: end;
    column-gap: clamp(2rem, 5vw, 5rem);
  }
  .title__hi {
    font-size: clamp(9rem, 21vw, 22rem);
  }
  .title__en {
    font-size: clamp(2.75rem, 6.6vw, 7rem);
    letter-spacing: 0.36em;
  }
  .open__side {
    padding-bottom: 0.9rem;
  }
  .pitch {
    font-size: 1.3125rem;
  }
  .credits {
    justify-content: space-between;
    font-size: 0.8125rem;
  }
}

/* ---- shelf: stacked by default (phones, no JS, reduced motion) ------- */

.reel {
  background: var(--screen);
}

.reel__stage {
  padding: 4.5rem 0 1rem;
}

.reel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter);
}
.reel__title {
  margin: 0;
  font: 700 clamp(3.5rem, 13vw, 6rem) / 0.9 var(--display);
  text-transform: uppercase;
}
.reel__count,
.reel__meter {
  display: none; /* only meaningful when the reel is moving */
}

.reel__track {
  display: grid;
  gap: 3.75rem;
  padding: 2.25rem var(--gutter) 3rem;
}

.frame {
  position: relative;
}

.frame__art {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--black);
}
.frame__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Outlined reel number: decoration, the order is also clear from the stack. */
.frame__no {
  position: absolute;
  top: 0.35rem;
  right: 0.9rem;
  font: 700 clamp(4.5rem, 20vw, 7rem) / 1 var(--display);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
}

.frame__body {
  padding-top: 1.1rem;
}
.frame__title {
  margin: 0.45rem 0 0;
  font: 700 clamp(3rem, 13vw, 4.5rem) / 0.88 var(--display);
  text-transform: uppercase;
  text-wrap: balance;
}
.frame__title[lang='hi'] {
  padding-top: 0.08em;
  line-height: 1.05;
}
.frame__latin {
  display: block;
  margin-top: 0.4rem;
  font: 600 0.8125rem/1.3 var(--text);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.frame__tagline {
  max-width: 34ch;
  margin: 0.8rem 0 0;
  font-size: 1.1875rem;
  line-height: 1.4;
}
.frame__meta {
  margin: 0.55rem 0 0.9rem;
  font-size: 0.9375rem;
  color: var(--dim);
}

/* ---- shelf: the moving reel (b.js adds .reel--pinned on wide screens) - */

.reel--pinned .reel__stage {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden; /* the strip is wider than the page; nothing may leak */
  padding: 4.75rem 0 var(--pill);
}

.reel--pinned .reel__head {
  align-items: flex-end;
}
.reel--pinned .reel__title {
  font-size: clamp(3rem, 5.2vw, 5rem);
}
.reel--pinned .reel__count {
  display: block;
  margin: 0;
  font: 500 clamp(1.75rem, 2.6vw, 2.5rem) / 0.9 var(--display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reel--pinned .reel__count b {
  font-weight: 700;
  color: var(--hot);
}
.reel--pinned .reel__count span {
  color: var(--dim);
}

.reel--pinned .reel__track {
  align-self: center;
  display: flex;
  gap: clamp(1.25rem, 2.2vw, 2.5rem);
  width: max-content;
  padding: 0 var(--gutter);
  will-change: transform;
}

.reel--pinned .frame {
  flex: none;
  height: min(60vh, calc(76vw * 9 / 16));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--black);
}

.reel--pinned .frame__art {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}
/* Wider than the frame so it can slide inside it as the strip moves. */
.reel--pinned .frame__art img {
  width: 114%;
  max-width: none;
}
/* Scrim: left and floor, where the words sit. */
.reel--pinned .frame__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.6) 38%, rgba(0, 0, 0, 0) 72%),
    linear-gradient(to right, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 58%);
}
.reel--pinned .frame__no {
  z-index: 1;
  top: 0.4rem;
  right: 1.4rem;
  font-size: clamp(5rem, 11vw, 11rem);
}

.reel--pinned .frame__body {
  position: absolute;
  left: clamp(1.25rem, 2.4vw, 2.5rem);
  right: clamp(1.25rem, 2.4vw, 2.5rem);
  bottom: clamp(1rem, 2.2vw, 2rem);
  z-index: 2;
  padding: 0;
}
.reel--pinned .frame__title {
  font-size: clamp(3rem, 5.4vw, 6.25rem);
}
.reel--pinned .frame__tagline {
  margin-top: 0.5rem;
  font-size: clamp(1.0625rem, 1.3vw, 1.3125rem);
}
.reel--pinned .frame__meta {
  margin-bottom: 0.5rem;
  color: var(--white);
}

.reel--pinned .reel__meter {
  display: block;
  height: 2px;
  margin: 0 var(--gutter);
  background: var(--line);
}
.reel--pinned .reel__meter i {
  display: block;
  height: 100%;
  background: var(--hot);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---- end of draft ---------------------------------------------------- */

.end {
  padding: 5rem var(--gutter) calc(var(--pill) + 3rem);
  border-top: 1px solid var(--line);
  background: var(--black);
}
.end__line {
  max-width: 26ch;
  margin: 0.75rem 0 0;
  font: 500 clamp(2rem, 5vw, 3.5rem) / 0.98 var(--display);
  text-transform: uppercase;
  color: var(--dim);
}

/* ---- motion: load sequence in CSS, scroll work in b.js --------------- */

@media (prefers-reduced-motion: no-preference) {
  .letterbox i {
    animation: shutter 1.5s cubic-bezier(0.76, 0, 0.24, 1) 0.15s both;
  }
  .open__art img {
    animation: settle 3.2s var(--ease) 0.15s both;
  }
  .rise {
    animation: rise 1.2s var(--ease) 0.75s both;
  }
  .rise--2 {
    animation-delay: 0.9s;
  }
  .slate,
  .open__side,
  .credits {
    animation: fade 0.9s ease-out 1.25s both;
  }
  .credits {
    animation-delay: 1.45s;
  }
}

@keyframes shutter {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0);
  }
}
@keyframes settle {
  from {
    transform: scale(1.22);
  }
  to {
    transform: scale(1.06);
  }
}
@keyframes rise {
  from {
    transform: translateY(108%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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