/* ===========================================================
   RASHI CHAUHAN — CINEMATIC PORTFOLIO
   =========================================================== */

:root {
  --bg: #0a0a0a;
  --ink: #f2efe9;
  --ink-dim: #aca79f;
  --line: rgba(242, 239, 233, 0.14);
  --accent: #c9a26a;
  --accent-dim: rgba(201, 162, 106, 0.55);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --display: 'Marcellus', var(--serif);
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-cine: cubic-bezier(.22, 1, .36, 1);
  --pad-edge: clamp(20px, 5vw, 72px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent-dim);
  color: #0a0a0a;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------- NAV ---------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad-edge);
  mix-blend-mode: difference;
}

.nav-mark {
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.nav-menu {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity .3s var(--ease-cine);
}

.nav-menu a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 20px;
  position: relative;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--ink);
  transition: transform .3s var(--ease-cine);
}

.nav-toggle span:first-child {
  top: 0;
}

.nav-toggle span:last-child {
  bottom: 0;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    transform: translateY(-100%);
    transition: transform .5s var(--ease-cine);
    mix-blend-mode: normal;
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .nav-menu a {
    font-size: 1.4rem;
  }
}

/* ---------------- INTRO ---------------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.intro-inner {
  padding: 0 20px;
}

.intro-line {
  margin: 0;
  opacity: 0;
  color: var(--ink);
}

.intro-line--1 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  letter-spacing: 0.35em;
  margin-bottom: 18px;
}

.intro-line--2 {
  font-family: var(--sans);
  font-size: clamp(0.7rem, 1.6vw, 0.95rem);
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  font-weight: 300;
}

.intro-line--2 span {
  color: var(--accent);
  margin: 0 6px;
}

body.intro-locked {
  overflow: hidden;
  height: 100vh;
}

/* ---------------- SCENE BASE ---------------- */
.scene {
  position: relative;
  width: 100%;
}

/* ---------------- HERO ---------------- */
.hero {
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  transform: scale(1.08);
  will-change: transform;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .05) 40%, rgba(6, 6, 6, .88) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad-edge) 9vh;
  width: 100%;
}

.hero-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.2rem, 12vw, 9rem);
  line-height: 0.86;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  letter-spacing: 0.01em;
}

.hero-name span {
  overflow: hidden;
}

.hero-role {
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 20px;
  font-weight: 500;
}

.hero-statement {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.1vw, 1.6rem);
  max-width: 620px;
  color: var(--ink-dim);
  line-height: 1.4;
  margin: 0;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  right: var(--pad-edge);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
}

.scroll-cue i {
  width: 1px;
  height: 34px;
  background: var(--ink-dim);
  position: relative;
  overflow: hidden;
}

.scroll-cue i::after {
  content: '';
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: cue-drop 1.8s ease-in-out infinite;
}

@keyframes cue-drop {
  0% {
    top: -100%;
  }

  60% {
    top: 100%;
  }

  100% {
    top: 100%;
  }
}

/* ---------------- OPENING SEQUENCE (pinned) ---------------- */
.sequence {
  height: 400vh;
}

.sequence-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

.seq-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.seq-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seq-layer--1 img {
  object-position: 60% 30%;
}

.seq-layer--2 img {
  object-position: 30% 40%;
}

.seq-layer--3 img {
  object-position: 50% 15%;
}

.seq-caption {
  position: absolute;
  left: var(--pad-edge);
  bottom: 14vh;
  z-index: 3;
  opacity: 0;
}

.seq-caption span {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .5);
}

.seq-line {
  position: absolute;
  left: var(--pad-edge);
  right: var(--pad-edge);
  bottom: 6vh;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.4rem);
  max-width: 640px;
  color: var(--ink);
  opacity: 0;
  z-index: 3;
}

/* ---------------- PROFILE ---------------- */
.profile {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: #0a0a0a;
}

.profile-media {
  overflow: hidden;
}

.profile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 20%;
  min-height: 60vh;
}

.profile-copy {
  padding: 12vh var(--pad-edge);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}

.profile-copy h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1.2;
  margin: 0;
  max-width: 12ch;
}

.profile-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--accent);
  margin: 0;
  max-width: 30ch;
}

.profile-body {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ink-dim);
  max-width: 46ch;
  margin: 0;
  font-weight: 300;
}

@media (max-width: 860px) {
  .profile {
    grid-template-columns: 1fr;
  }

  .profile-media img {
    min-height: 55vh;
  }

  .profile-copy {
    padding: 8vh var(--pad-edge);
  }
}

/* reveal-lines base state (JS drives the animation) */
.reveal-lines {
  opacity: 1;
}

/* ---------------- CAPABILITIES ---------------- */
.capabilities {
  background: #0a0a0a;
}

.cap-card {
  min-height: 92svh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-top: 1px solid var(--line);
}

.cap-card--reverse {
  grid-template-columns: 1fr 1.1fr;
}

.cap-card--reverse .cap-img {
  order: 2;
}

.cap-card--reverse .cap-text {
  order: 1;
}

.cap-img {
  overflow: hidden;
  position: relative;
}

.cap-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.cap-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh var(--pad-edge);
}

.cap-index {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  display: block;
}

.cap-text h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin: 0 0 30px;
  line-height: 1;
}

.cap-text ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cap-text li {
  font-size: 0.95rem;
  color: var(--ink-dim);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  max-width: 280px;
}

@media (max-width: 860px) {

  .cap-card,
  .cap-card--reverse {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .cap-card--reverse .cap-img,
  .cap-card--reverse .cap-text {
    order: unset;
  }

  .cap-img {
    height: 56vh;
  }

  .cap-text {
    padding: 6vh var(--pad-edge);
  }
}

/* ---------------- AMIGO TITLE ---------------- */
.amigo-title {
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, #17110a 0%, #0a0a0a 70%);
}

.amigo-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  margin-bottom: 18px;
}

.amigo-mark {
  font-family: var(--display);
  font-size: clamp(4rem, 16vw, 12rem);
  margin: 0;
  line-height: 0.9;
  background: linear-gradient(180deg, #f2efe9, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.amigo-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--ink-dim);
  margin-top: 20px;
}

/* ---------------- AMIGO ARRIVAL ---------------- */
.amigo-arrival {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.amigo-arrival img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  filter: brightness(0.62);
}

.amigo-arrival-copy {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad-edge) 10vh;
  max-width: 720px;
}

.amigo-arrival-copy p:first-child {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
}

.amigo-arrival-copy h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.3;
  margin: 0 0 20px;
}

.amigo-arrival-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-dim);
}

/* ---------------- AMIGO VIDEO SCENE (pinned) ---------------- */
.amigo-film {
  height: 250vh;
}

.amigo-film-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.amigo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

.amigo-film-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .5) 60%, rgba(0, 0, 0, .75));
}

.amigo-film-headline {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  text-align: center;
  max-width: 16ch;
  line-height: 1.25;
  padding: 0 var(--pad-edge);
  opacity: 0;
}

.video-toggle {
  position: absolute;
  z-index: 3;
  bottom: 8vh;
  right: var(--pad-edge);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 10, 10, .4);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .3s var(--ease-cine);
}

.video-toggle:hover {
  border-color: var(--accent);
}

.vt-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--ink);
  margin-left: 3px;
  transition: all .2s;
}

.video-toggle.playing .vt-icon {
  width: 10px;
  height: 12px;
  border: none;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 0 / 3px 100% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 7px 0 / 3px 100% no-repeat;
  margin-left: 0;
}

/* ---------------- AMIGO ROLE ---------------- */
.amigo-role {
  background: #0a0a0a;
}

.role-block {
  min-height: 90svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.role-block--reverse .role-media {
  order: 2;
}

.role-block--reverse .role-copy {
  order: 1;
}

.role-media {
  overflow: hidden;
}

.role-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}

.role-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh var(--pad-edge);
}

.role-label {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
}

.role-copy h4 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  margin: 0 0 22px;
}

.role-copy p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-dim);
  max-width: 42ch;
  font-weight: 300;
  margin: 0;
}

@media (max-width: 860px) {
  .role-block {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .role-block--reverse .role-media,
  .role-block--reverse .role-copy {
    order: unset;
  }

  .role-media {
    height: 55vh;
  }

  .role-copy {
    padding: 6vh var(--pad-edge);
  }
}

/* ---------------- AMIGO SECOND FILM ---------------- */
.amigo-film2 {
  height: 220vh;
}

.amigo-film2-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.amigo-video2 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.amigo-film2-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, .55) 100%);
}

.amigo-film2-copy {
  position: relative;
  z-index: 2;
  padding-left: var(--pad-edge);
}

.af2-line {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 3rem);
  margin: 0 0 6px;
  color: var(--ink-dim);
  opacity: 0;
}

.af2-line--final {
  color: var(--accent);
}

/* ---------------- ARCHIVE ---------------- */
.archive {
  padding: 14vh var(--pad-edge);
  background: #0a0a0a;
}

.archive-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 6vh;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  grid-auto-flow: dense;
}

.archive-item {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
}

.archive-item--tall {
  grid-row: span 2;
}

.archive-item--wide {
  grid-column: span 2;
  aspect-ratio: 16/10;
}

.archive-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-cine);
}

.archive-item:hover img {
  transform: scale(1.06);
}

@media (max-width: 860px) {
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .archive-item--wide {
    grid-column: span 2;
  }
}

/* ---------------- LIGHTBOX ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(6, 6, 6, .97);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lb-img {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 12px;
}

.lb-close {
  top: 20px;
  right: 20px;
}

.lb-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------------- CREATIVE ---------------- */
.creative {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0a0a0a;
}

.creative-media {
  overflow: hidden;
}

.creative-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 30%;
  filter: saturate(0.85);
}

.creative-copy {
  padding: 12vh var(--pad-edge);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 44px;
}

.creative-copy h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  max-width: 12ch;
  margin: 0;
}

.creative-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.creative-item h4 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 8px;
  color: var(--accent);
}

.creative-item p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 300;
  max-width: 40ch;
}

@media (max-width: 860px) {
  .creative {
    grid-template-columns: 1fr;
  }

  .creative-media img {
    min-height: 50vh;
  }

  .creative-copy {
    padding: 8vh var(--pad-edge);
    gap: 32px;
  }
}

/* ---------------- EXPERIENCE ---------------- */
.experience {
  padding: 16vh var(--pad-edge);
  background: #0a0a0a;
  border-top: 1px solid var(--line);
}

.experience h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0 0 6vh;
}

.exp-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.exp-role {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.exp-org {
  color: var(--ink-dim);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

/* ---------------- FINALE ---------------- */
.finale {
  height: 100svh;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.finale-media {
  position: absolute;
  inset: 0;
}

.finale-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.1);
  filter: brightness(0.55);
}

.finale-copy {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad-edge);
  width: 100%;
}

.finale-copy h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.2;
  margin: 0 0 30px;
}

.finale-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  color: var(--accent);
  margin: 0 0 26px;
}

.finale-email {
  display: inline-block;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: opacity .3s;
}

.finale-email:hover {
  opacity: 0.7;
}

/* ---------------- CREDITS ---------------- */
.credits {
  padding: 10vh var(--pad-edge) 6vh;
  text-align: center;
  background: #060606;
  border-top: 1px solid var(--line);
}

.credits-name {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.credits-roles {
  font-size: 0.8rem;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.credits-org {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 22px;
}

.credits-email {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 40px;
  color: var(--ink-dim);
  transition: color .3s;
}

.credits-email:hover {
  color: var(--ink);
}

.credits-dev {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(242, 239, 233, 0.35);
}