:root {
  --bg: #FFFFFF;
  --surface: #FAFAFA;
  --text: #0F0F0F;
  --text-secondary: #6B6B6B;
  --text-tertiary: #B5B5B5;
  --hairline: rgba(15, 15, 15, 0.1);
  --hairline-soft: rgba(15, 15, 15, 0.05);
  --accent: #C8462A;

  --sans: "Inter", -apple-system, system-ui, "Helvetica Neue", sans-serif;
  --serif: "Inter", -apple-system, system-ui, sans-serif; /* Pentagram is mono-typeface; serif var kept for safety */

  --pad: clamp(20px, 4vw, 64px);
  --header-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.4;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: 16px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ------------- Loader ------------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--text); /* dark surface so the white-stroke logo reads */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 600ms ease, visibility 0s linear 600ms;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-mark img {
  height: auto;
  width: clamp(120px, 12vw, 180px);
  max-width: 50vw;
  opacity: 0;
  transform: scale(0.96);
  animation: loaderLogoIn 900ms 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes loaderLogoIn { to { opacity: 1; transform: scale(1); } }

/* ------------- Cursor ------------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text);
  pointer-events: none;
  z-index: 99;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s, opacity 0.2s;
}
.cursor.lg {
  width: 64px; height: 64px;
  background: var(--accent);
  mix-blend-mode: multiply;
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ------------- Nav (Pentagram-style sticky thin header) ------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  padding: 0 var(--pad);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.25s;
}
.nav__brand:hover { background: var(--accent); }
.nav__brand img {
  height: 28px;
  width: auto;
  display: block;
}
.nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
}
.nav__links a {
  position: relative;
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--accent); }
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  position: relative;
  cursor: pointer;
}
.nav__hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text);
  position: absolute;
  left: 6px;
  transition: transform 320ms, top 320ms;
}
.nav__hamburger span:nth-child(1) { top: 13px; }
.nav__hamburger span:nth-child(2) { top: 19px; }
.nav__hamburger.is-open span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { top: 16px; transform: rotate(-45deg); }
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: block; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  z-index: 40;
  padding: 32px var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu.is-open {
  opacity: 1; visibility: visible;
  transition: opacity 300ms ease, visibility 0s linear 0s;
}
.mobile-menu a {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
body.menu-open { overflow: hidden; }

/* ------------- Hero / Tagline ------------- */
.hero {
  padding: clamp(80px, 12vw, 180px) var(--pad) clamp(48px, 6vw, 96px);
  max-width: 1600px;
}
.hero__line {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 22ch;
}
.hero__line em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
  display: inline-block;
  min-width: 4ch;
}

/* ------------- Filter pills ------------- */
.filters {
  padding: 0 var(--pad) clamp(32px, 4vw, 56px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: clamp(24px, 3vw, 40px);
}
.filters__group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters__label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-right: 4px;
}
.filter-pill {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.filter-pill:hover {
  border-color: var(--text);
}
.filter-pill.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.filters__divider {
  width: 1px;
  height: 24px;
  background: var(--hairline);
  margin: 0 12px;
}
@media (max-width: 768px) {
  .filters { flex-direction: column; align-items: flex-start; gap: 16px; }
  .filters__divider { display: none; }
}

/* ------------- Work grid (Pentagram-style 12-col, varied tile sizes) ------------- */
.work {
  padding: clamp(40px, 5vw, 80px) var(--pad) clamp(80px, 10vw, 160px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 32px);
  align-items: start;
}
@media (max-width: 980px) {
  .work { grid-template-columns: 1fr; gap: 56px; }
}

.tile {
  display: block;
  cursor: pointer;
  position: relative;
  grid-column: span 6; /* default: half-width */
}
.tile__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* default; per-size overrides below */
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 18px;
}
.tile__image img,
.tile__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.tile:hover .tile__image img,
.tile:hover .tile__image video { transform: scale(1.04); }

/* Tile size variants — span different column counts and aspect ratios */
.tile.large  { grid-column: span 8; }
.tile.large  .tile__image { aspect-ratio: 16 / 10; }
.tile.wide   { grid-column: span 7; }
.tile.wide   .tile__image { aspect-ratio: 16 / 9; }
.tile.tall   { grid-column: span 5; }
.tile.tall   .tile__image { aspect-ratio: 5 / 6; }
.tile.medium { grid-column: span 4; }
.tile.medium .tile__image { aspect-ratio: 1 / 1; }
.tile.half   { grid-column: span 6; }
.tile.half   .tile__image { aspect-ratio: 4 / 3; }
.tile.small  { grid-column: span 4; }
.tile.small  .tile__image { aspect-ratio: 1 / 1; }

@media (max-width: 980px) {
  .tile,
  .tile.large, .tile.wide, .tile.tall, .tile.medium, .tile.half, .tile.small {
    grid-column: span 1;
  }
  .tile.large .tile__image,
  .tile.wide .tile__image,
  .tile.tall .tile__image,
  .tile.medium .tile__image,
  .tile.half .tile__image,
  .tile.small .tile__image {
    aspect-ratio: 4 / 3;
  }
}

/* Per-case image fit overrides */
.tile--ginni .tile__image { background: #F4EFE3; }
.tile--ginni .tile__image img { object-fit: contain; padding: 8% 8%; }
.tile--rajshree .tile__image img { object-fit: cover; }
.tile--roase .tile__image img,
.tile--roase2 .tile__image img { object-fit: cover; }

.tile__name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 0.25s;
}
.tile:hover .tile__name { color: var(--accent); }
.tile__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.tile__discipline {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
}
.tile__year {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tile.is-hidden { display: none; }

/* ------------- About section ------------- */
.about {
  padding: clamp(80px, 10vw, 160px) var(--pad);
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.about__label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.about__copy p {
  font-size: clamp(20px, 2vw, 32px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 28ch;
  margin-bottom: 24px;
}
.about__copy p:last-child { margin-bottom: 0; }
.about__copy em { font-style: italic; color: var(--accent); }
@media (max-width: 768px) {
  .about { grid-template-columns: 1fr; gap: 16px; }
}


/* ------------- Motion section ------------- */
.motion {
  padding: clamp(80px, 10vw, 160px) var(--pad);
  border-top: 1px solid var(--hairline);
}
.motion__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.motion__title {
  font-size: clamp(36px, 6vw, 96px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}
.motion__count {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.motion__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.motion-clip {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--text);
  cursor: pointer;
}
.motion-clip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.motion-clip:hover video { transform: scale(1.04); }
.motion-clip__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.5) 100%);
  transition: opacity 0.3s;
}
.motion-clip__num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  align-self: flex-start;
}
.motion-clip__play {
  align-self: center;
  margin-top: auto;
  margin-bottom: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.motion-clip__play:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.motion-clip.is-playing .motion-clip__play { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .motion-clip__play { display: none; }
  .motion-clip__overlay { transition: opacity 0.3s; }
  .motion-clip:hover .motion-clip__overlay { opacity: 0; }
}
@media (max-width: 900px) {
  .motion__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .motion__grid { grid-template-columns: 1fr 1fr; gap: 1px; }
  .motion-clip__play { width: 40px; height: 40px; }
}

/* ------------- Contact band ------------- */
.contact {
  padding: clamp(96px, 12vw, 200px) var(--pad);
  border-top: 1px solid var(--hairline);
  text-align: left;
}
.contact__line {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 120px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: clamp(32px, 4vw, 56px);
  max-width: 18ch;
}
.contact__line em { font-style: italic; color: var(--accent); }
.contact__email {
  display: inline-block;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--text);
  padding-bottom: 4px;
  transition: color 0.25s, border-color 0.25s, padding-right 0.3s;
}
.contact__email:hover {
  color: var(--accent);
  border-color: var(--accent);
  padding-right: 12px;
}

/* ------------- Footer ------------- */
.footer {
  padding: 32px var(--pad);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  padding: 6px 12px;
  border-radius: 5px;
  transition: background 0.25s;
}
.footer__brand:hover { background: var(--accent); }
.footer__brand img {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.95;
}
.footer__links {
  display: flex;
  gap: 24px;
}
.footer a:hover { color: var(--accent); }
@media (max-width: 768px) {
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ------------- Project detail pages ------------- */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: clamp(40px, 6vw, 80px);
  transition: color 0.25s, gap 0.3s;
}
.detail-back:hover { color: var(--accent); gap: 14px; }

.detail-hero {
  padding: clamp(56px, 8vw, 120px) var(--pad) clamp(48px, 6vw, 96px);
  max-width: 1600px;
}
.detail-hero__name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 144px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: clamp(32px, 4vw, 56px);
  max-width: 18ch;
}
.detail-hero__name em { font-style: italic; color: var(--accent); }
.detail-hero__meta {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  margin-bottom: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}
.detail-hero__meta strong { color: var(--text); font-weight: 500; }
.detail-hero__intro {
  font-size: clamp(20px, 2vw, 32px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 32ch;
}
.detail-hero__intro em { font-style: italic; color: var(--accent); }

/* DEFAULT detail-image — full viewport width, parallax-enabled */
.detail-image {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-image.is-visible { opacity: 1; transform: translateY(0); }
.detail-image .showcase__inner {
  display: block;
  width: 100%;
  margin-top: -50px;   /* buffer for parallax — image can translate ±50px */
  margin-bottom: -50px;
  will-change: transform;
}
.detail-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Background variants only — width stays 100% */
.detail-image--logo  { background: #F4EFE3; }
.detail-image--slide { background: var(--surface); }

/* Full-width video for hero/feature video assets on detail pages */
.detail-video {
  width: 100%;
  background: var(--text);
  overflow: hidden;
  position: relative;
}
.detail-video video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100vh;
  object-fit: cover;
}

/* MOBILE: disable parallax buffer so detail images render at full natural
   height — touch users don't get parallax anyway, no need to crop. */
@media (max-width: 768px) {
  .detail-image { overflow: visible; }
  .detail-image .showcase__inner {
    margin: 0 !important;
    transform: none !important;
  }
}
/* --photo, --wide, --tall use the default (no extra rule) */

/* Rajshree-only — scroll-driven horizontal carousel, no gaps between images. */
.rajshree-carousel {
  position: relative;
  height: calc(var(--slides, 1) * 80vh);
  width: 100%;
}
.rajshree-carousel__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--surface);
}
.rajshree-carousel__track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.rajshree-carousel__slide {
  flex: 0 0 auto;       /* width = image natural width at 100vh height */
  height: 100%;
  display: block;
  margin: 0;
  padding: 0;
}
.rajshree-carousel__slide img {
  display: block;
  height: 100%;          /* fills 100vh */
  width: auto;           /* natural aspect — no cropping, no stretch */
}
.rajshree-carousel__progress {
  position: absolute;
  bottom: 24px;
  left: var(--pad);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 2;
}
@media (max-width: 768px) {
  .rajshree-carousel { height: auto; }
  .rajshree-carousel__pin { position: relative; height: auto; overflow: visible; }
  .rajshree-carousel__track { flex-direction: column; height: auto; transform: none !important; }
  .rajshree-carousel__slide { flex: 1 0 auto; height: 70vh; min-height: 480px; }
  .rajshree-carousel__progress { display: none; }
}

/* CAPPED variants (MVIP / MEGA) — square brand-mark assets render at natural
   width with max-height ceiling, centered, no parallax (no overflow needed).
   These OVERRIDE the default full-width treatment. */
.detail-image--square,
.detail-image--portrait {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(40px, 5vw, 96px) 0;
  overflow: visible;
}
.detail-image--square .showcase__inner,
.detail-image--portrait .showcase__inner {
  display: contents;
  margin: 0;
}
.detail-image--square img,
.detail-image--portrait img {
  width: auto;
  max-width: min(900px, 92%);
  max-height: 92vh;
  margin: 0 auto;
}

/* Closing text block on detail pages */
.detail-close {
  padding: clamp(80px, 10vw, 160px) var(--pad);
  max-width: 1600px;
  border-top: 1px solid var(--hairline);
}
.detail-close__copy {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 36ch;
}
.detail-close__copy em { font-style: italic; color: var(--accent); }

/* Next project nav */
.detail-next {
  padding: clamp(64px, 8vw, 128px) var(--pad);
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.detail-next__label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.detail-next__link {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  align-self: flex-start;
  transition: color 0.25s, gap 0.3s;
}
.detail-next__link:hover { color: var(--accent); gap: 0.5em; }
.detail-next__link em { font-style: italic; color: var(--accent); }

/* ------------- Reveal on scroll ------------- */
[data-fade] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-fade].is-visible { opacity: 1; transform: translateY(0); }

.tile {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.tile.is-visible { opacity: 1; transform: translateY(0); }

/* Lenis smooth-scroll plumbing */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ------------- Reduced motion ------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .loader-mark img { opacity: 1; transform: none; }
  .cursor { display: none; }
  [data-fade], .tile, .detail-image { opacity: 1; transform: none; }
  .tile__image img { transform: none !important; }
}
