/* =========================================================
   Vaishnavi Dwivedi: portfolio
   ========================================================= */

@font-face { font-family: "PP Eiko"; src: url("fonts/PPEiko-Thin.otf") format("opentype");        font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Eiko"; src: url("fonts/PPEiko-LightItalic.otf") format("opentype"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "PP Eiko"; src: url("fonts/PPEiko-Medium.otf") format("opentype");      font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Eiko"; src: url("fonts/PPEiko-Heavy.otf") format("opentype");       font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Eiko"; src: url("fonts/PPEiko-BlackItalic.otf") format("opentype"); font-weight: 900; font-style: italic; font-display: swap; }

:root {
  --bg: #050505;
  --card: #282828;
  --accent: #e3b9fa;   /* soft lilac */
  --glow: 227, 185, 250; /* the lilac as rgb, for hover glows */
  --muted: #8e8a84;    /* warm grey for secondary copy */
  --quote: #1e1e1e;
  --ink: #f2f0ec;
  --ink-soft: #c9c6c0;
  --ink-mute: #8b8883;
  --serif: "PP Eiko", "Times New Roman", serif;
  --sans: "Arial Narrow", Arial, sans-serif;
  --soft: 0.4px; /* the arial text blur (was 0.727px) */
  --gutter: 5.7vw;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .5, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }  /* numbered lists draw their own counters */
::selection { background: var(--accent); color: #0b0b0b; }

/* ---------- arial narrow: white, 400, -2%, lowercase, softly blurred ---------- */
.nav a, .nav-back, .hero__roles li, .hero__obsessed span, .eyebrow,
.polaroid figcaption, .quote__name, .quote__role, .site-footer {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -.02em;
  text-transform: lowercase;
  --rest: var(--soft);
  filter: blur(calc(var(--rest) + var(--fx)));
}
/* animation blur offset: not inherited, so parents' reveals don't leak into children */
@property --fx { syntax: '<length>'; inherits: false; initial-value: 0px; }

/* ---------- living grain (whole page) ---------- */
.grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  pointer-events: none;
  z-index: 100;
  opacity: .32;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .9s steps(7) infinite;
}
.grain--lift { opacity: .04; mix-blend-mode: normal; animation-delay: -.45s; animation-direction: reverse; }
@keyframes grain {
  0%   { transform: translate(0, 0); }
  14%  { transform: translate(-4%, 3%); }
  28%  { transform: translate(3%, -5%); }
  42%  { transform: translate(-6%, -2%); }
  57%  { transform: translate(5%, 4%); }
  71%  { transform: translate(-2%, 6%); }
  85%  { transform: translate(6%, -3%); }
  100% { transform: translate(0, 0); }
}

/* =========================================================
   HERO: a single 35mm frame
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
/* the frame keeps the scan's proportions and never outgrows the screen:
   on wide, short laptop screens it fits the height and the strip fades out at the sides */
.hero__frame {
  position: relative;
  width: min(100%, calc(100vh * 2000 / 1338));
  width: min(100%, calc(100svh * 2000 / 1338));
  aspect-ratio: 2000 / 1338;
  margin: 0 auto;
  background: #17120f;
  container-type: inline-size;   /* hero type is sized in cqi, so it scales with the frame */
}
@media (min-aspect-ratio: 2000 / 1338) {
  .hero__frame { background: transparent; }
  .film {
    -webkit-mask: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
            mask: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  }
}

.film, .film > * { position: absolute; }
.film { inset: 0; z-index: 0; }

.film__parallax {
  inset: 0;
  overflow: hidden;
}
/* assets/hero.jpg is the whole 35mm scan: sprockets, frame gaps and edge print included */
.film__photo, .film__halation {
  position: absolute;
  inset: 0;
  background: #17120f url("assets/hero.jpg") center / cover no-repeat;
  translate: 0 var(--py, 0px);
}
.film__photo {
  filter: blur(.4px);
  animation: settle 3.2s var(--ease) both, weave 7s steps(14) 3.2s infinite;
}
/* soft halation glow: a blurred copy screened on top */
.film__halation {
  filter: blur(22px) saturate(1.2);
  mix-blend-mode: screen;
  opacity: .22;
  animation: settle 3.2s var(--ease) both;
}
@keyframes settle {
  from { transform: scale(1.08); filter: blur(14px) brightness(.6); }
}
@keyframes weave {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(.6px, -.4px); }
  40% { transform: translate(-.4px, .7px); }
  60% { transform: translate(.3px, .2px); }
  80% { transform: translate(-.6px, -.3px); }
}

/* dust & hairs that hop between frames */
.film__dust { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dust { fill: rgba(255,255,255,.55); stroke: rgba(255,255,255,.35); stroke-width: 1.4; opacity: 0; }
.dust path { fill: none; }
.dust--a { animation: dust 1.6s steps(1) infinite; }
.dust--b { animation: dust 1.6s steps(1) infinite .53s; }
.dust--c { animation: dust 1.6s steps(1) infinite 1.06s; }
@keyframes dust { 0% { opacity: .9; } 33% { opacity: 0; } }

.film__flicker {
  inset: 0;
  background: #fff8e8;
  mix-blend-mode: overlay;
  opacity: .03;
  animation: flicker 4s steps(20) infinite;
  pointer-events: none;
}
@keyframes flicker {
  0%, 100% { opacity: .03; } 10% { opacity: .06; } 22% { opacity: .02; } 37% { opacity: .05; }
  51% { opacity: .025; } 63% { opacity: .07; } 78% { opacity: .03; } 90% { opacity: .055; }
}
.film__vignette {
  inset: 0;
  background:
    radial-gradient(ellipse 75% 70% at 50% 45%, transparent 55%, rgba(0,0,0,.45) 100%),
    linear-gradient(to bottom, transparent 70%, rgba(0,0,0,.25) 86%);
  pointer-events: none;
}

/* hero type */
/* ---------- site nav: identical on every page ---------- */
.nav, .nav-back {
  position: absolute;
  z-index: 5;
  top: clamp(14px, 2.3vw, 40px);
  font-size: clamp(14px, 1.75vw, 30px);
  letter-spacing: -.02em;
  line-height: 1;
}
.nav { right: var(--gutter); display: flex; gap: clamp(24px, 4.6vw, 80px); }
.nav-back { left: var(--gutter); }
.nav a, .nav-back {
  position: relative;
  color: #fff;
  transition: opacity .4s var(--ease), filter .4s var(--ease);
}
.nav a::after, .nav-back::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -.15em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .55s var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after, .nav-back:hover::after, .nav-back:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav:hover a:not(:hover) { opacity: .55; --fx: 1px; }

.hero__name {
  position: absolute;
  z-index: 3;
  left: 8.5%;
  top: 25.5%;
  font-family: var(--serif);
  font-size: 6.15cqi;
  line-height: 1;
  letter-spacing: -.035em;
  color: #f4f1ea;
  text-transform: none;
  white-space: nowrap;
  text-shadow: 0 0 .25em rgba(255, 250, 235, .28), 0 0 .04em rgba(255,255,255,.5);
}
.hero__first { font-weight: 100; display: inline-block; }
.hero__last  { font-weight: 300; font-style: italic; display: inline-block; letter-spacing: -.02em; }

.hero__roles {
  position: absolute;
  z-index: 3;
  left: 70.3%;
  top: 56.3%;
  font-size: 2.55cqi;
  line-height: 1.6;
  color: #fff;
}
.hero__roles li { display: block; }

.hero__obsessed {
  position: absolute;
  z-index: 3;
  left: 14.7%;
  top: 73.6%;
  width: 15.6%;
  font-size: 1.6cqi;
  line-height: 1.3;
  color: #fff;
}
.hero__obsessed span { display: flex; justify-content: space-between; }
.hero__obsessed b { font-weight: 400; }

/* intro: words breathe in out of a blur */
.intro { opacity: 0; --fx: 14px; filter: blur(calc(var(--rest, 0px) + var(--fx))); transform: translateY(.25em); }
.is-loaded .intro {
  opacity: 1; --fx: 0px; filter: blur(calc(var(--rest, 0px) + var(--fx))); transform: none;
  transition: opacity 1.4s var(--ease), filter 1.6s var(--ease), transform 1.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms + 500ms);
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  padding: 0 var(--gutter);
  /* on short, wide screens (laptops) the content narrows with the screen height,
     so a full row of cards, the polaroid table or the quotes each fit on one screen */
  max-width: min(1680px, calc(100vh * 1.45 + 2 * var(--gutter)));
  max-width: min(1680px, calc(100svh * 1.45 + 2 * var(--gutter)));
  margin: 0 auto;
}
.eyebrow {
  font-weight: 400;
  font-size: clamp(26px, 5vw, 82px); /* a touch larger than the card titles (~4.5vw) */
  line-height: 1;
  color: #fff;
  margin: 0 0 clamp(20px, 2.4vw, 40px) 1.6%;
}
.work { padding-top: clamp(64px, min(11vw, 17svh), 190px); }
.creative { padding-top: clamp(72px, min(9vw, 15svh), 160px); }
.interview { padding-top: clamp(72px, min(8vw, 14svh), 150px); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); --fx: 10px; filter: blur(calc(var(--rest, 0px) + var(--fx))); }
.reveal.in {
  opacity: 1; transform: none; --fx: 0px; filter: blur(calc(var(--rest, 0px) + var(--fx)));
  transition: opacity 1.1s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}

/* ---------- a / recent work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2.9vw, 52px);
}
.card {
  --mx: 50%; --my: 30%;
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 450 / 522;
  background: var(--card);
  overflow: hidden;
  container-type: inline-size;
  transition: transform .8s var(--ease), background-color .6s var(--ease), opacity .6s var(--ease), filter .6s var(--ease);
}
.card::before { /* spotlight that follows the cursor */
  content: "";
  position: absolute; inset: 0;
  /* a wide, soft lilac glow with an eased falloff, sitting beneath the image and title */
  background: radial-gradient(circle 120cqi at var(--mx) var(--my), rgba(var(--glow), 0.2) 0%, rgba(var(--glow), 0.144) 18%, rgba(var(--glow), 0.084) 38%, rgba(var(--glow), 0.036) 58%, rgba(var(--glow), 0.01) 78%, transparent 100%);
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.card::after { /* hairline frame that draws in */
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(255,255,255,.14);
  clip-path: inset(0 100% 100% 0);
  transition: clip-path 1s var(--ease);
  pointer-events: none;
  z-index: 1;
}
.card__media {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 6.5% 6% 0;
  min-height: 0;
  position: relative;
  z-index: 1;   /* image sits above the glow */
}
.card__media img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  transition: filter .9s var(--ease);
  -webkit-mask: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent), linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-composite: source-in;
          mask: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent), linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
          mask-composite: intersect;
}
.card__title {
  position: relative;
  z-index: 1;
  padding: 0 8% 7.8%;
  margin-top: 7%;
  font-family: var(--serif);
  font-weight: 100;
  font-size: 10.6cqi;
  line-height: 1;
  letter-spacing: -.035em;
  color: #f4f2ee;
  text-transform: none;
  white-space: nowrap;
  transition: color .7s var(--ease);
}
.card__title span { position: relative; display: inline-block; }
.card__title span::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -.06em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease) .1s;
}
.card:hover, .card.is-active { transform: translateY(-8px); background-color: #2e2e2e; }
.card:hover::before, .card.is-active::before { opacity: 1; }
.card:hover::after, .card.is-active::after { clip-path: inset(0 0 0 0); }
.card:hover .card__title, .card.is-active .card__title { color: #fff; }
.card:hover .card__title span::after, .card.is-active .card__title span::after { transform: scaleX(1); }
.work-grid:has(.card:hover) .card:not(:hover) { opacity: .45; filter: blur(1.5px); }
.card.reveal.in { transition: opacity 1.1s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease), background-color .6s var(--ease); }
.work-grid:has(.card:hover) .card.reveal.in { transition-delay: 0s; transition-duration: .6s; }
.card:hover img, .card.is-active img, .card:focus-visible img { filter: grayscale(0); }
.card:focus-visible { outline: 1px solid rgba(255,255,255,.5); outline-offset: 4px; }

/* ---------- b / creative ---------- */
.polaroids {
  position: relative;
  width: 100%;
  aspect-ratio: 1575 / 880;
}
.polaroid {
  --w: 15.6%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  padding: 0;
  background: #f5f3ee;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 30px -12px rgba(0,0,0,.7);
  container-type: inline-size;
  transform: translate(-50%, -50%) rotate(var(--r));
  transition: transform .8s var(--ease-spring), box-shadow .6s var(--ease), filter .6s var(--ease);
  cursor: default;
  will-change: transform;
}
.polaroid::after { /* paper sheen */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(125deg, rgba(255,255,255,.35), transparent 40%, transparent 70%, rgba(0,0,0,.04));
  pointer-events: none;
}
.polaroid__photo {
  margin: 7.5cqi 7.5cqi 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #222;
}
.polaroid__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(1.04) blur(.3px);
  transition: filter .7s var(--ease), transform 1s var(--ease);
}
.polaroid figcaption {
  font-size: 9.5cqi;
  letter-spacing: -.02em;
  color: #1d1d1d;
  text-align: center;
  padding: 9% 0 11%;
  white-space: nowrap;
}
.polaroid:hover, .polaroid:focus-within {
  z-index: 5;
  transform: translate(-50%, -54%) rotate(calc(var(--r) + var(--hr))) scale(1.07);
  box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 30px 50px -16px rgba(0,0,0,.85), 0 0 46px rgba(var(--glow), .2);
}
.polaroid:hover img { filter: saturate(1.05) contrast(1.05) blur(0); transform: scale(1.04); }
.polaroids:has(.polaroid:hover) .polaroid:not(:hover) { filter: brightness(.7) blur(.5px); }

/* entrance: polaroids get tossed onto the table */
.polaroid { opacity: 0; transform: translate(-50%, -30%) rotate(calc(var(--r) * 3)) scale(.92); }
.polaroids.in .polaroid {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(var(--r));
  transition: opacity .9s var(--ease) calc(var(--d) * 90ms), transform 1.1s var(--ease-spring) calc(var(--d) * 90ms), box-shadow .6s var(--ease), filter .6s var(--ease);
}
.polaroids.in .polaroid:hover {
  transform: translate(-50%, -54%) rotate(calc(var(--r) + var(--hr))) scale(1.07);
  transition-delay: 0s;
}

/* ---------- c / me in an interview ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 44px);
  padding: 0 1.4%;
}
.quote {
  --mx: 50%; --my: 30%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 308 / 568;
  padding: 11% 9% 13%;
  background: var(--quote);
  overflow: hidden;
  container-type: inline-size;
  transition: transform .8s var(--ease), background-color .6s var(--ease), opacity .6s var(--ease), filter .6s var(--ease);
}
.quote::before { /* spotlight that follows the cursor */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle 130cqi at var(--mx) var(--my), rgba(var(--glow), 0.2) 0%, rgba(var(--glow), 0.144) 18%, rgba(var(--glow), 0.084) 38%, rgba(var(--glow), 0.036) 58%, rgba(var(--glow), 0.01) 78%, transparent 100%);
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.quote::after { /* hairline frame that draws in */
  content: "";
  position: absolute; inset: 0;
  border: 1px solid rgba(255,255,255,.14);
  clip-path: inset(0 100% 100% 0);
  transition: clip-path 1s var(--ease);
  pointer-events: none;
}
.quote__mark {
  position: absolute;
  right: -2%;
  bottom: 14%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: 80cqi;
  line-height: .6;
  color: #fff;
  opacity: 0;
  transform: translateY(12%) rotate(-8deg);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease);
  pointer-events: none;
}
.quote blockquote {
  position: relative;
  font-family: var(--sans);   /* arial narrow, like the rest of the supporting copy */
  font-weight: 400;
  font-size: min(14cqi, 44px);
  line-height: 1.22;
  letter-spacing: -.02em;
  text-transform: lowercase;
  color: #b9b6b0;
  filter: blur(var(--soft));
  transition: color .7s var(--ease), transform .9s var(--ease);
}
.quote footer { position: relative; }
.quote__name {
  display: inline-block;
  position: relative;
  font-size: 11.5cqi;
  color: #fff;
  margin-bottom: 3%;
}
.quote__name::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -.12em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease) .1s;
}
.quote__role { font-size: 7.2cqi; color: var(--muted); }

.quote:hover { transform: translateY(-8px); background-color: #222; }
.quote:hover::before { opacity: 1; }
.quote:hover::after { clip-path: inset(0 0 0 0); }
.quote:hover .quote__mark { opacity: .06; transform: none; }
.quote:hover blockquote { color: #f6f4ef; transform: translateY(-2px); }
.quote:hover .quote__name::after { transform: scaleX(1); }
.quote-grid:has(.quote:hover) .quote:not(:hover) { opacity: .45; filter: blur(1.5px); }
.quote.reveal.in { transition: opacity 1.1s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease), background-color .6s var(--ease); }
.quote-grid:has(.quote:hover) .quote.reveal.in { transition-delay: 0s; transition-duration: .6s; }

/* ---------- footer ---------- */
.site-footer {
  text-align: center;
  padding: clamp(90px, min(12vw, 20svh), 200px) 0 clamp(36px, 4vw, 64px);
  font-size: clamp(15px, 1.35vw, 23px);
  color: #fff;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
  .quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote { aspect-ratio: 4 / 5; }
}

@media (max-width: 700px) {
  :root { --gutter: 16px; }

  .hero, .hero__frame { aspect-ratio: auto; width: 100%; height: 100svh; min-height: 560px; }
  .film { -webkit-mask: none; mask: none; }
  .film__photo, .film__halation { background-position: 58% center; }

  .hero__name { left: 26px; top: 20%; font-size: 13.5vw; white-space: normal; line-height: .95; }
  .hero__first, .hero__last { display: block; }
  .hero__roles { left: 26px; top: auto; bottom: 120px; font-size: 19px; line-height: 1.45; }
  .hero__obsessed { left: auto; right: 26px; top: 46%; width: 38vw; font-size: 14px; }

  .work-grid { grid-template-columns: 1fr; }
  .eyebrow { font-size: calc((100vw - 32px) * .118); margin-left: 0; }

  .polaroids {
    aspect-ratio: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px 18px;
    padding: 8px 0 20px;
  }
  .polaroid, .polaroids.in .polaroid, .polaroids.in .polaroid:hover {
    position: relative;
    left: auto; top: auto;
    width: 44%;
    translate: none;
  }
  .polaroid { transform: rotate(calc(var(--r) * 3)) scale(.92); }
  .polaroids.in .polaroid { transform: rotate(var(--r)); }
  .polaroids.in .polaroid:hover { transform: translateY(-4%) rotate(calc(var(--r) + var(--hr))) scale(1.05); }

  .quote-grid { grid-template-columns: 1fr; padding: 0; }
  .quote { aspect-ratio: auto; min-height: 260px; padding: 28px 24px; }
  .quote blockquote { font-size: 28px; margin-bottom: 40px; }
  .quote__name { font-size: 23px; }
  .quote__role { font-size: 14px; }
  .quote__mark { font-size: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .reveal, .intro { opacity: 1 !important; --fx: 0px !important; }
  .polaroid { opacity: 1 !important; }
}

/* =========================================================
   Custom cursor: a lilac "you" tag, beige "view" over case study cards
   (only on devices with a real mouse; touch keeps the default)
   ========================================================= */
:root { --beige: #e9dcc3; }
.cursor {
  --c: var(--accent);
  position: fixed;
  left: 0; top: 0;
  z-index: 200;               /* above the grain */
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s var(--ease);
  will-change: transform;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-beige { --c: var(--beige); }
.cursor__arrow {
  display: block;
  width: 18px; height: 20px;
  fill: var(--c);
  stroke: rgba(0,0,0,.45);
  stroke-width: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
  transform-origin: 2px 2px;
  transition: fill .3s var(--ease), transform .2s var(--ease);
}
.cursor__tag {
  position: absolute;
  left: 15px; top: 19px;
  padding: 3px 8px 4px;
  border-radius: 3px 8px 8px 8px;
  background: var(--c);
  color: #141414;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-transform: lowercase;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: background-color .3s var(--ease), transform .35s var(--ease-spring);
}
.cursor__label { display: block; }
.cursor__label.is-swapping { animation: cursor-swap .32s var(--ease); }
@keyframes cursor-swap { from { opacity: 0; transform: translateY(5px); } }
.cursor.is-beige .cursor__tag { transform: scale(1.06); }
.cursor.is-down .cursor__arrow { transform: scale(.85); }

@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}

/* =========================================================
   Case study password lock (built by gate.js)
   ========================================================= */
html.is-locked body > :not(.gate, .grain, .cursor) { display: none !important; }
html.is-locked, html.is-locked body { overflow: hidden; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;                 /* under the grain, so it keeps the film texture */
  display: grid;
  place-items: center;
  padding: 24px var(--gutter);
  background: var(--bg);
  transition: opacity 1s var(--ease), filter 1s var(--ease);
}
.gate.is-open { opacity: 0; filter: blur(14px); pointer-events: none; }

.gate__photo {
  position: absolute;
  inset: -8%;
  background: var(--gate-photo) center / cover no-repeat;
  filter: blur(42px) saturate(.8) brightness(.55);
  opacity: .5;
  animation: gate-breathe 14s var(--ease) infinite alternate;
}
.gate__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(5,5,5,.55) 55%, var(--bg) 100%);
}
@keyframes gate-breathe { to { transform: scale(1.06) translateY(-1.5%); } }

.gate__form {
  position: relative;
  width: min(100%, 560px);
  text-align: center;
  animation: gate-in 1.2s var(--ease) both;
}
@keyframes gate-in { from { opacity: 0; filter: blur(12px); transform: translateY(12px); } }

.gate__back, .gate__kicker, .gate__label, .gate__hint, .gate__ask, .gate__field button {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -.02em;
  text-transform: lowercase;
  filter: blur(var(--soft));
}
.gate__back {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  top: clamp(14px, 2.3vw, 40px);
  font-size: clamp(14px, 1.75vw, 30px);
  line-height: 1;
  color: #fff;
  transition: color .3s var(--ease);
}
.gate__back:hover, .gate__back:focus-visible { color: var(--accent); }
.gate__kicker { font-size: clamp(15px, 1.35vw, 22px); color: var(--muted); }
.gate__title {
  margin: .18em 0 .32em;
  font-family: var(--serif);
  font-weight: 100;
  font-size: clamp(52px, min(8vw, 14svh), 132px);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: none;
  color: #fff;
}
.gate__title em { font-style: italic; font-weight: 300; color: var(--accent); }
.gate__label { display: block; font-size: clamp(16px, 1.5vw, 24px); color: #fff; }

.gate__field {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: clamp(22px, 2.6vw, 40px) auto 0;
  max-width: 420px;
  border-bottom: 1px solid rgba(255,255,255,.3);
  transition: border-color .4s var(--ease), box-shadow .6s var(--ease);
}
.gate__field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 18px 40px -22px rgba(var(--glow), .55);
}
.gate__field input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: var(--sans);
  font-size: clamp(20px, 1.8vw, 28px);
  letter-spacing: .08em;
  caret-color: var(--accent);
}
.gate__field input::placeholder { color: var(--muted); letter-spacing: -.02em; text-transform: lowercase; }
.gate__field button {
  padding: 12px 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: clamp(17px, 1.5vw, 24px);
  cursor: pointer;
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.gate__field button:hover, .gate__field button:focus-visible { color: var(--accent); transform: translateX(3px); outline: 0; }
.gate__field.is-wrong { animation: gate-shake .5s var(--ease); border-color: #e9a3a3; }
@keyframes gate-shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(2px); }
}

.gate__hint { min-height: 1.4em; margin-top: 14px; font-size: clamp(14px, 1.2vw, 19px); color: #e9a3a3; }
.gate__ask {
  display: inline-block;
  margin-top: clamp(18px, 2vw, 30px);
  font-size: clamp(14px, 1.2vw, 19px);
  color: var(--muted);
  text-decoration: none;
  transition: color .3s var(--ease);
}
.gate__ask:hover, .gate__ask:focus-visible { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .gate__photo, .gate__form, .gate__field.is-wrong { animation: none; }
}
