/* ============================================
   Samridhi Raj — Editorial Luxury Portfolio
   Palette tokens live here. Change these first.
   ============================================ */
:root {
  --ivory: #f7f2ec;       /* warm background */
  --espresso: #3b2b27;    /* primary text / ink */
  --sand: #e9dcd5;        /* champagne beige */
  --blush: #c3a097;       /* mocha nude */
  --wine: #5b1f2a;        /* deep burgundy */
  --muted: #8a7268;       /* muted brown */
  --border: rgba(91, 31, 42, 0.16);
  --maxw: 1400px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }

body {
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.04; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
img, video { display: block; max-width: 100%; }

.eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.32em;
  color: var(--wine); font-weight: 500;
}

/* ---------- Scroll progress ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--wine), var(--blush));
  z-index: 100; transition: width 0.1s linear;
}

/* ---------- Atmosphere ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 200; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.7s steps(2) infinite; mix-blend-mode: multiply;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 25% { transform: translate(-4%, 3%); }
  50% { transform: translate(3%, -4%); } 75% { transform: translate(-3%, -2%); }
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--espresso);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; color: var(--ivory);
}
.preloader.is-done { pointer-events: none; }
.preloader__inner { display: flex; align-items: baseline; gap: 18px; }
.preloader__name { font-family: var(--serif); font-size: clamp(34px, 6vw, 68px); font-weight: 500; }
.preloader__name em { color: var(--blush); }
.preloader__count { font-family: var(--serif); font-size: clamp(34px, 6vw, 68px); color: var(--blush); font-variant-numeric: tabular-nums; }
.preloader__bar { width: min(56vw, 300px); height: 1px; background: rgba(247,242,236,0.18); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0%; background: var(--blush); }

/* ---------- Custom cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor { width: 36px; height: 36px; border: 1px solid var(--wine); transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s, opacity 0.3s; }
.cursor-dot { width: 5px; height: 5px; background: var(--wine); }
.cursor.is-hover { width: 66px; height: 66px; background: rgba(91,31,42,0.12); }
.cursor.is-hidden, .cursor-dot.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }
body.custom-cursor, body.custom-cursor a, body.custom-cursor button { cursor: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px); transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--ivory) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  padding-top: 14px; padding-bottom: 14px; box-shadow: 0 1px 0 var(--border);
}
.nav__logo { font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -0.01em; }
.nav__logo em { color: var(--wine); }
.nav__links { display: flex; gap: 34px; }
.nav__links a { font-size: 12px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); transition: color 0.25s; }
.nav__links a:hover { color: var(--wine); }
.nav__cta {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em;
  border: 1px solid var(--wine); color: var(--wine); padding: 10px 20px; border-radius: 100px; transition: all 0.3s var(--ease);
}
.nav__cta:hover { background: var(--wine); color: var(--ivory); }

/* ---------- Marquee ---------- */
.marquee { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 0; overflow: hidden; background: var(--espresso); }
.marquee__track { display: flex; gap: 48px; white-space: nowrap; width: max-content; align-items: center; animation: marquee 38s linear infinite; padding-left: 48px; will-change: transform; }
.marquee__track span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4em; color: rgba(247,242,236,0.8); }
.marquee__track .star { color: var(--blush); letter-spacing: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero { padding-top: 96px; }
.hero__grid {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(20px, 3vw, 44px);
  max-width: 1500px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 56px);
}
.hero__lead { display: flex; flex-direction: column; justify-content: space-between; }
.hero__name { font-size: clamp(76px, 13vw, 188px); line-height: 0.86; margin-top: 28px; }
/* overflow:hidden masks the word-rise reveal; padding-bottom gives the italic
   descenders (the "j" in Raj) room so they aren't clipped, with a matching
   negative margin so line spacing is unchanged. */
.hero__name .line { display: block; overflow: hidden; padding-bottom: 0.3em; margin-bottom: -0.3em; }
.hero__name .word { display: inline-block; }
.hero__name em { color: var(--blush); font-style: italic; }
.hero__role {
  margin-top: clamp(28px, 5vw, 60px); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.28em; color: var(--muted); line-height: 2;
}
.hero__wide { margin-top: 36px; aspect-ratio: 16/9; overflow: hidden; border-radius: 6px; }
.hero__wide img { width: 100%; height: 100%; object-fit: cover; }

.hero__collage { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.5vw, 20px); align-content: start; }
.hero__tile { overflow: hidden; border-radius: 6px; box-shadow: 0 1px 0 rgba(91,31,42,0.08); aspect-ratio: 1; }
.hero__tile--tall { grid-column: span 2; aspect-ratio: 4/5; }
.hero__tile img { width: 100%; height: 100%; object-fit: cover; }

.kenburns { animation: kenburns 12s ease-in-out infinite alternate; }
.kenburns-alt { animation: kenburns-alt 16s ease-in-out infinite alternate; }
@keyframes kenburns { 0% { transform: scale(1.05); } 100% { transform: scale(1.2) translate3d(-2%, -2%, 0); } }
@keyframes kenburns-alt { 0% { transform: scale(1.1); } 100% { transform: scale(1.22) translate3d(2%, -1%, 0); } }

.hero__meta {
  border-top: 1px solid var(--border); max-width: 1500px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px clamp(20px, 5vw, 56px); font-size: 11px; text-transform: uppercase; letter-spacing: 0.34em; color: var(--muted);
}
.hero__scroll { display: inline-flex; align-items: center; gap: 12px; }
.hero__scroll-line { display: inline-block; width: 42px; height: 1px; background: var(--blush); animation: scrollPulse 2s var(--ease) infinite; transform-origin: left; }
@keyframes scrollPulse { 0%,100% { transform: scaleX(0.4); opacity: 0.5; } 50% { transform: scaleX(1); opacity: 1; } }
@media (max-width: 820px) { .hero__meta-mid { display: none; } }

/* ---------- Signature line ---------- */
/* Less bottom gap before the work chapters than top. */
.signature { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vw, 160px) clamp(20px, 5vw, 48px) clamp(44px, 6vw, 80px); }
/* Grid areas: kicker sits top-left above the image; the statement aligns with
   the IMAGE row on the right (same top), not with the kicker. */
.signature__grid {
  display: grid; grid-template-columns: 3fr 9fr; column-gap: clamp(28px, 4vw, 60px); row-gap: 16px;
  grid-template-areas: "kicker ." "image line"; align-items: start;
}
.signature__kicker {
  grid-area: kicker; align-self: end; margin-bottom: 0; white-space: nowrap;
  /* Enlarged but kept to ONE line (never wraps) at a size that fits the column */
  font-size: clamp(13px, 1.55vw, 20px); letter-spacing: 0.3em;
}
.signature__img { grid-area: image; margin-top: 0; overflow: hidden; border-radius: 6px; }
.signature__img img { width: 100%; object-fit: cover; }
.signature__line { grid-area: line; align-self: start; font-family: var(--serif); font-size: clamp(28px, 4.4vw, 60px); line-height: 1.16; text-wrap: balance; }

/* ---------- Journey rail ---------- */
.rail {
  position: fixed; right: clamp(14px, 2vw, 30px); top: 50%; transform: translateY(-50%);
  z-index: 80; display: flex; flex-direction: column; gap: 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease);
}
.rail.is-on { opacity: 1; pointer-events: auto; }
.rail__item {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  background: none; border: 0; cursor: pointer; color: var(--muted); padding: 2px;
}
.rail__label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--wine);
  max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; line-height: 1; padding: 0;
  border-radius: 100px; background: color-mix(in oklab, var(--ivory) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(8px); backdrop-filter: saturate(140%) blur(8px);
  box-shadow: 0 6px 20px -8px rgba(91, 31, 42, 0.28);
  transition: max-width 0.45s var(--ease), opacity 0.45s var(--ease), padding 0.45s var(--ease);
}
.rail__num { font-family: var(--serif); font-style: italic; font-size: 13px; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.rail__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--blush); transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease); }
/* Quiet progress ring grows around the active dot as you move through a chapter */
.rail__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--wine); opacity: 0; transform: scale(0.5); }
.rail__item.active .rail__dot::after { opacity: calc(var(--p, 0) * 0.85); transform: scale(calc(0.6 + var(--p, 0) * 0.9)); }
/* Dots only by default; the chapter name reveals (as a backdrop pill) on hover.
   max-width fits the longest category ("Celebrity Partnerships & Collaborations" ≈ 333px). */
.rail__item:hover .rail__label { max-width: min(78vw, 360px); opacity: 1; padding: 6px 12px; margin-right: 4px; }
.rail__item.active .rail__num { color: var(--wine); }
.rail__item.active .rail__dot { background: var(--wine); border-color: var(--wine); transform: scale(1.35); }

/* ---------- Journey chapters (horizontal pinned) ---------- */
.chapter { position: relative; }
.chapter.tone-sand { background: color-mix(in oklab, var(--sand) 60%, var(--ivory)); }
.chapter__pin { position: relative; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.chapter__ghost {
  position: absolute; left: 50%; top: 50%;
  /* Centering is applied by GSAP (xPercent/yPercent -50) so it can also drift/scale */
  font-family: var(--serif); font-style: italic; font-size: 58vh; line-height: 1;
  color: var(--wine); opacity: 0.06; pointer-events: none; z-index: 0; will-change: transform; user-select: none;
}
.chapter__track {
  position: relative; z-index: 1; display: flex; align-items: center;
  gap: clamp(18px, 2.4vw, 36px); padding: 0 clamp(20px, 7vw, 110px); will-change: transform;
}
.chapter__intro { flex: 0 0 auto; width: min(86vw, 460px); padding-right: clamp(10px, 3vw, 40px); }
.chapter__kicker { display: flex; align-items: baseline; gap: 16px; }
.chapter__num { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 4vw, 46px); color: var(--wine); }
.chapter__cat { font-family: var(--serif); font-size: clamp(18px, 2.2vw, 30px); text-transform: uppercase; letter-spacing: 0.03em; color: var(--wine); line-height: 1.1; }
.chapter__title { font-family: var(--serif); font-size: clamp(30px, 4vw, 56px); line-height: 1.04; margin-top: 18px; text-wrap: balance; }
.chapter__intro-text { margin-top: 20px; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.7; }
.chapter__hint { margin-top: 30px; display: flex; align-items: center; gap: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3em; color: var(--blush); }
.chapter__hint-line { width: 44px; height: 1px; background: var(--blush); display: inline-block; animation: scrollPulse 2s var(--ease) infinite; transform-origin: left; }
/* Chapter intro: cascade the kicker → title → text → hint in as the chapter arrives */
.chapter__kicker.reveal { transition-delay: 0.05s; }
.chapter__title.reveal { transition-delay: 0.16s; }
.chapter__intro-text.reveal { transition-delay: 0.27s; }
.chapter__hint.reveal { transition-delay: 0.38s; }

/* ---------- Project card ---------- */
/* Card size is CONTENT-DRIVEN. Focus is conveyed by light (--focus opacity),
   never by scale, so a card's size reflects its WORK (its media aspect), not
   the scroll position. */
.pcard {
  position: relative; overflow: hidden; border-radius: 10px;
  background: var(--espresso); box-shadow: 0 8px 30px -14px rgba(91,31,42,0.22);
  opacity: var(--focus, 1);
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
  will-change: transform, opacity;
}
/* Consistent HEIGHT; WIDTH follows each media's natural aspect ratio (--ar,
   set in JS from the image/poster). Portrait clips stay slim, landscape go
   wide — every card sized to its content, media filling the frame with no crop. */
.chapter__track .pcard { flex: 0 0 auto; height: min(64vh, 560px); width: auto; aspect-ratio: var(--ar, 0.8); max-width: min(88vw, 940px); }

.pcard__media {
  position: absolute; inset: 0; overflow: hidden; transition: transform 1.2s var(--ease);
  clip-path: inset(0 var(--clip, 0%) 0 0);
  /* Duotone → full colour: --duo 1 = warm mocha duotone, 0 = full colour.
     (No transition on filter — GSAP scrubs --duo per frame.) */
  filter:
    grayscale(var(--duo, 0))
    sepia(calc(var(--duo, 0) * 0.5))
    hue-rotate(calc(var(--duo, 0) * -12deg))
    saturate(calc(1 + var(--duo, 0) * 0.2))
    brightness(calc(1 - var(--duo, 0) * 0.05));
}
/* True full-frame cover: fills the entire 4:5 frame on every card, no letterbox.
   (Parallax/zoom are applied via GSAP scale on top, which only ever overflows.) */
.pcard__media img, .pcard__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; will-change: transform; }
.pcard__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(45,22,18,0.9) 0%, rgba(45,22,18,0.2) 45%, transparent 70%); }
.pcard__body { position: absolute; inset-inline: 0; bottom: 0; padding: clamp(16px, 2vw, 26px); color: var(--ivory); }
.pcard__brand { font-size: 10px; text-transform: uppercase; letter-spacing: 0.32em; color: var(--blush); }
.pcard__name { font-family: var(--serif); font-size: clamp(19px, 2vw, 30px); line-height: 1.1; margin-top: 4px; font-weight: 500; }
.pcard__sub { font-size: 13px; color: rgba(247,242,236,0.82); margin-top: 4px; }
.pcard__rule { height: 1px; width: 40px; background: var(--blush); margin-top: 14px; transition: width 0.5s var(--ease), background 0.5s var(--ease); }
/* Refined hover (desktop pointers only) — lift, warm shadow bloom, media zoom, rule fills wine */
@media (hover: hover) and (pointer: fine) {
  .pcard:hover { transform: translateY(-8px); box-shadow: 0 40px 90px -28px rgba(91,31,42,0.42); }
  .pcard:hover .pcard__media { transform: scale(1.05); }
  .pcard:hover .pcard__rule { width: 80px; background: var(--wine); }
}

/* ---------- Metrics ---------- */
.metrics { background: var(--espresso); color: var(--ivory); padding: clamp(80px, 11vw, 150px) 0; }
.metrics__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.metrics .eyebrow { color: var(--blush); }
.metrics__heading { font-size: clamp(30px, 4.4vw, 60px); margin-top: 16px; max-width: 18ch; }
.metrics__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(30px, 4vw, 56px); margin-top: clamp(48px, 6vw, 80px); }
.metric { border-left: 1px solid rgba(247,242,236,0.22); padding-left: 28px; }
.metric::after { content: ""; display: block; height: 1px; width: 0; margin-top: 20px; background: var(--blush); transition: width 1s var(--ease) 0.35s; }
.metric.is-visible::after { width: 56px; }
.metric__value { font-family: var(--serif); font-size: clamp(52px, 7vw, 92px); line-height: 1; display: flex; align-items: baseline; gap: 4px; }
.metric__value .suffix { color: var(--blush); }
.metric__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.32em; color: rgba(247,242,236,0.66); margin-top: 16px; }

/* ---------- About ---------- */
.about__open { max-width: var(--maxw); margin: 0 auto; padding: clamp(90px, 13vw, 180px) clamp(20px, 5vw, 48px) clamp(40px, 6vw, 80px); text-align: center; }
.about__opening { font-family: var(--serif); font-size: clamp(30px, 5.2vw, 76px); line-height: 1.18; max-width: 16ch; margin: 18px auto 0; text-wrap: balance; }
.about__opening em { color: var(--wine); font-style: normal; }
.about__bio { background: color-mix(in oklab, var(--sand) 60%, var(--ivory)); }
.about__bio-grid, .about__bio { }
.about__bio { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 4vw, 64px); max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 9vw, 130px) clamp(20px, 5vw, 48px); align-items: start; }
.about__portrait { overflow: hidden; border-radius: 12px; box-shadow: 0 30px 80px -30px rgba(60,20,30,0.35); }
.about__portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about__text { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.85; color: rgba(59,43,39,0.86); }
.about__text p + p { margin-top: 22px; }
.about__text .eyebrow { display: block; margin-bottom: 26px; }
/* Stagger the bio in, line group by line group */
.about__text p:nth-of-type(1) { transition-delay: 0.05s; }
.about__text p:nth-of-type(2) { transition-delay: 0.16s; }
.about__text p:nth-of-type(3) { transition-delay: 0.27s; }
.about__text p:nth-of-type(4) { transition-delay: 0.38s; }
.about__text p:nth-of-type(5) { transition-delay: 0.49s; }
/* Enlarged initial letter — a subtle accent that stays on the first line
   only (no drop cap, doesn't wrap text around two lines) */
.about__text .dropcap::first-letter {
  font-family: var(--serif); color: var(--wine); font-weight: 600;
  font-size: 1.5em; line-height: 1;
}
.about__text em { color: var(--wine); font-style: italic; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: clamp(90px, 13vw, 180px) clamp(20px, 5vw, 48px); }
.contact__title { font-size: clamp(38px, 7vw, 96px); line-height: 1.05; margin: 16px 0 36px; }
.contact__title em { color: var(--wine); }
.contact__email {
  display: inline-block; font-family: var(--serif); font-size: clamp(22px, 3vw, 40px); color: var(--wine);
  border-bottom: 1px solid var(--blush); padding-bottom: 6px; transition: color 0.3s, border-color 0.3s;
}
.contact__email:hover { color: var(--espresso); border-color: var(--wine); }

/* ---------- Footer ---------- */
.footer { background: var(--espresso); color: var(--ivory); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-end; }
.footer__name { font-family: var(--serif); font-size: clamp(30px, 4vw, 50px); }
.footer__tag { margin-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.32em; color: rgba(247,242,236,0.6); }
.footer__contacts { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.footer__contacts a { display: inline-flex; align-items: center; gap: 8px; color: rgba(247,242,236,0.85); transition: color 0.25s; }
.footer__contacts a:hover { color: var(--blush); }
.footer__contacts .sep { width: 1px; height: 16px; background: rgba(247,242,236,0.25); }
/* inline-flex + justify/align center beats the inherited `.footer__contacts a`
   inline-flex (which left-aligned the icon); gap:0 so the single child truly centers */
.footer__ln { width: 40px; height: 40px; border: 1px solid rgba(247,242,236,0.3); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 0; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.footer__ln svg { width: 17px; height: 17px; display: block; }
.footer__ln:hover { background: var(--wine); border-color: var(--wine); }
.footer__base { border-top: 1px solid rgba(247,242,236,0.14); padding: 22px; text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3em; color: rgba(247,242,236,0.55); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Fallback layout when chapters are NOT pinned (reduced-motion / no-GSAP):
   the horizontal track would clip its cards, so wrap them into a grid. */
.no-pin .chapter__pin { height: auto; display: block; overflow: visible; padding: clamp(70px,9vw,120px) 0; }
.no-pin .chapter__ghost { display: none; }
.no-pin .chapter__track { flex-wrap: wrap; transform: none !important; }
.no-pin .chapter__intro { width: 100%; }
.no-pin .chapter__track .pcard { width: clamp(220px, 30vw, 320px); height: auto; aspect-ratio: var(--ar, 0.8); }

/* Unpinned (mobile) cards: slide up + bloom from warm duotone to full colour as
   they scroll into view — carries the desktop motion language to the stack.
   (reveal-m is inert on desktop, where there is no .no-pin ancestor.) */
.no-pin .chapter__track .pcard.reveal-m {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.no-pin .chapter__track .pcard.reveal-m .pcard__media {
  --duo: 1; transition: filter 1.1s var(--ease), transform 1.2s var(--ease);
}
.no-pin .chapter__track .pcard.reveal-m.is-visible { opacity: 1; transform: none; }
.no-pin .chapter__track .pcard.reveal-m.is-visible .pcard__media { --duo: 0; }

/* ---------- Responsive: MOBILE = immersive single-column stack ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }

  /* HERO: declutter — name + role, then a prominent portrait and a 2-up row.
     The busy marketing-collage strip is hidden on mobile. */
  .hero { padding-top: 80px; }
  .hero__grid { grid-template-columns: 1fr; gap: 22px; }
  .hero__name { font-size: clamp(50px, 16vw, 96px); }
  .hero__role { margin-top: 22px; }
  .hero__wide { display: none; }
  .hero__collage { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
  .hero__tile--tall { aspect-ratio: 4 / 5; }
  .hero__meta { padding-top: 18px; padding-bottom: 18px; }

  /* SIGNATURE: a clean stacked statement — kicker, full-width image, then the line. */
  .signature { padding: clamp(60px, 13vw, 100px) clamp(20px, 5vw, 40px); }
  .signature__grid { grid-template-columns: 1fr; grid-template-areas: "kicker" "image" "line"; gap: 22px; }
  .signature__kicker { align-self: start; font-size: 12px; letter-spacing: 0.32em; }
  .signature__img { margin-top: 0; width: 100%; border-radius: 6px; overflow: hidden; }
  .signature__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .signature__line { font-size: clamp(26px, 7vw, 40px); line-height: 1.18; }
  .rail { display: none; }

  /* WORK: full-width cards stacked top-to-bottom at their true aspect ratio.
     (.no-pin prefix so these beat the base .no-pin grid rules by specificity.) */
  .no-pin .chapter__pin { height: auto; display: block; padding: clamp(56px, 12vw, 90px) 0; }
  .no-pin .chapter__ghost { display: none; }
  .no-pin .chapter__track { flex-direction: column; flex-wrap: nowrap; align-items: stretch; transform: none !important; padding: 0 16px; gap: clamp(16px, 5vw, 28px); }
  .no-pin .chapter__intro { width: 100%; padding-right: 0; margin-bottom: clamp(20px, 6vw, 34px); }
  .chapter__num { font-size: clamp(40px, 12vw, 64px); }   /* a bolder chapter marker, since the ghost number is hidden */
  .chapter__cat { font-size: clamp(15px, 4.4vw, 20px); }
  .chapter__title { font-size: clamp(26px, 7vw, 38px); }
  .no-pin .chapter__track .pcard { width: 100%; height: auto; aspect-ratio: var(--ar, 0.8); }
  .pcard__body { padding: clamp(18px, 5vw, 26px); }
  .pcard__name { font-size: clamp(22px, 6vw, 30px); }

  .metrics__grid { grid-template-columns: 1fr; gap: 36px; }
  .about__bio { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .reveal-m { opacity: 1 !important; transform: none !important; }
  .no-pin .chapter__track .pcard.reveal-m .pcard__media { --duo: 0; }
  .marquee__track, .hero__scroll-line, .grain, .kenburns, .kenburns-alt { animation: none; }
  .preloader { display: none; }
  .cursor, .cursor-dot { display: none; }
}
