/* ===========================================================================
   Ranjit Sutar - portfolio
   Every size below is measured from RANJIT SUTAR_WEBPAGE.pdf.
   The mockup canvas is 1163.5pt wide; the reference viewport is 1440px,
   so pt x 1.2377 = px. Fluid sizes clamp around that reference.
   =========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root{
  --red:#e34239;
  --black:#060706;
  --card:#221f1f;
  --white:#fff;

  /* container: PDF content runs x 93.9 -> 1069.6 of 1163.5 = 83.86% */
  --shell:83.86%;
  --shell-max:1210px;

  /* Grid gaps, measured off the placed artwork in the PDF: 12.5pt across and
     10.6pt down on a 975.7pt container. They are percentages of the container
     WIDTH - note that a percentage row-gap resolves against the container's
     block size, not its width, so rows use cqw against .shell instead. */
  --gap-col:1.28%;
  --gap-row:1.09cqw;
  --gap-col-wide:1.0%;

  /* every slider / navigation chevron on the page shares these */
  --arrow-w:clamp(13px,1.25vw,18px);
  --arrow-c:rgba(255,255,255,.6);
  --arrow-c-hover:#fff;

  --radius:17px;
  --radius-sm:12px;
  --shadow:6px 8px 18px rgba(0,0,0,.55);
  --shadow-lg:10px 16px 40px rgba(0,0,0,.6);

  --ease:cubic-bezier(.22,.61,.36,1);
  --ease-out:cubic-bezier(.16,1,.3,1);

  --header-h:104px;
}

/* ------------------------------------------------------------------ reset */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--black);
  color:var(--white);
  font-family:Montserrat,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-weight:400;
  line-height:1.2;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
ul,ol{margin:0;padding:0;list-style:none}
h1,h2,h3,p{margin:0}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
:focus-visible{outline:2px solid var(--white);outline-offset:3px}

.skip{
  position:fixed;top:-100px;left:16px;z-index:200;
  background:var(--white);color:var(--black);padding:10px 18px;border-radius:6px;
  font-weight:600;font-size:14px;transition:top .2s;
}
.skip:focus{top:16px}

.shell{
  width:var(--shell);max-width:var(--shell-max);
  margin-inline:auto;
  container-type:inline-size;   /* lets row-gap key off the container width */
}

/* The black bands in the mockup are the crumpled-paper texture itself; the red
   bands are flat and paint over this fixed layer, so it never needs to change. */
.page-bg{
  position:fixed;inset:0;z-index:-2;
  background:var(--black) url(../assets/img/texture.webp) center/cover no-repeat;
}

/* --------------------------------------------------------------- typography
   PDF -> px @1440 (scale 1.2377)                                            */
.h-solid{                     /* 18pt  -> 22px : CREATIVE SOLUTIONS, SKILL'S */
  font-size:clamp(16px,1.53vw,22px);
  font-weight:600;letter-spacing:.055em;text-align:center;text-transform:uppercase;
}
.h-sec{                       /* 15.6pt -> 19px : portfolio section headings */
  font-size:clamp(15px,1.33vw,19px);
  font-weight:600;letter-spacing:.075em;text-align:center;text-transform:uppercase;
}

/* --------------------------------------------------------------- preloader */
.preloader{
  position:fixed;inset:0;z-index:300;
  background:var(--black);
  display:none;             /* only shown when scripts can dismiss it */
  place-items:center;
}
.js .preloader{display:grid}
.preloader__inner{width:min(70vw,420px);text-align:center}
.preloader__name{
  font-size:clamp(18px,2vw,28px);font-weight:700;letter-spacing:.22em;
  color:var(--white);
}
.preloader__bar{
  margin:22px 0 12px;height:2px;background:rgba(255,255,255,.18);overflow:hidden;
}
.preloader__bar span{
  display:block;height:100%;width:0;background:var(--red);
}
.preloader__count{
  font-size:12px;font-weight:600;letter-spacing:.2em;color:rgba(255,255,255,.55);
}
.preloader.is-done{pointer-events:none}

/* ------------------------------------------------------------------ cursor */
.cursor{position:fixed;inset:0;z-index:250;pointer-events:none;display:none}
@media (hover:hover) and (pointer:fine){
  .cursor{display:block}
  body{cursor:none}
  a,button,[data-cursor]{cursor:none}
}
.cursor__dot,.cursor__ring{
  position:absolute;top:0;left:0;border-radius:50%;
  transform:translate(-50%,-50%);
  will-change:transform;
}
.cursor__dot{width:6px;height:6px;background:var(--white)}
.cursor__ring{
  width:38px;height:38px;border:1px solid rgba(255,255,255,.6);
  display:grid;place-items:center;
  transition:width .3s var(--ease),height .3s var(--ease),
             background-color .3s var(--ease),border-color .3s var(--ease);
}
.cursor__label{
  font-size:9px;font-weight:700;letter-spacing:.12em;
  color:var(--black);opacity:0;transform:scale(.6);
  transition:opacity .25s,transform .25s;white-space:nowrap;
}
.cursor.is-active .cursor__ring{
  width:82px;height:82px;background:var(--red);border-color:var(--red);
}
.cursor.is-active .cursor__label{opacity:1;transform:scale(1)}
.cursor.is-link .cursor__ring{width:56px;height:56px;background:rgba(255,255,255,.12)}
.cursor.is-hidden{opacity:0}

/* ---------------------------------------------------------- scroll progress */
.progress{
  position:fixed;top:0;left:0;height:3px;width:100%;z-index:120;
  background:var(--red);transform:scaleX(0);transform-origin:0 50%;
}

/* ------------------------------------------------------------------ header */
.header{
  position:fixed;top:0;left:0;right:0;z-index:110;
  padding:22px 0;
  transition:transform .45s var(--ease),background-color .45s var(--ease),
             padding .45s var(--ease);
}
.header.is-stuck{
  background:rgba(6,7,6,.82);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  padding:12px 0;
}
.header.is-hidden{transform:translateY(-100%)}
.header__inner{display:flex;align-items:center;justify-content:space-between;gap:24px}

.brand{display:flex;align-items:center;gap:14px}
.brand__avatar{width:44px;height:44px;flex:none;border-radius:50%;overflow:hidden}
.brand__avatar svg{width:100%;height:100%;display:block}
.brand__text{display:block;line-height:1.25}
.brand__text strong{                       /* 18pt -> 22px */
  display:block;font-size:clamp(16px,1.53vw,22px);font-weight:600;letter-spacing:.045em;
}
.brand__text em{                           /* 10.8pt -> 13px */
  display:block;font-style:normal;font-size:clamp(11px,.93vw,13.4px);font-weight:400;
  letter-spacing:.005em;color:rgba(255,255,255,.92);
}

.nav{display:flex;gap:clamp(20px,2.3vw,33px)}
.nav a{                                    /* 12.1pt -> 15px */
  position:relative;font-size:clamp(12px,1.04vw,15px);font-weight:600;letter-spacing:.075em;
  padding-bottom:4px;
}
.nav a::after{
  content:"";position:absolute;left:0;bottom:0;height:2px;width:100%;
  background:var(--red);transform:scaleX(0);transform-origin:100% 50%;
  transition:transform .4s var(--ease-out);
}
.nav a:hover::after,.nav a.is-current::after{transform:scaleX(1);transform-origin:0 50%}

.burger{display:none;width:34px;height:26px;position:relative}
.burger span{
  position:absolute;left:0;right:0;height:2px;background:var(--white);
  transition:transform .35s var(--ease),opacity .25s;
}
.burger span:nth-child(1){top:6px}
.burger span:nth-child(2){bottom:6px}
.burger[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.burger[aria-expanded="true"] span:nth-child(2){transform:translateY(-6px) rotate(-45deg)}

/* -------------------------------------------------------------------- bands
   PDF band heights translate to generous vertical rhythm                    */
/* mockup band padding: 68.9pt above the first heading = 85px @1440 */
.band{position:relative;padding:clamp(52px,5.9vw,86px) 0}
.band--red{background:var(--red)}
.band--red .page-bg{display:none}
.work-sec{padding-bottom:clamp(42px,4.7vw,68px)}

/* --------------------------------------------------------------------- hero
   PDF hero is 1163.5 x 654.5 -> aspect 1.778                               */
.hero{
  position:relative;
  min-height:min(100svh,calc(100vw*.5625));
  height:calc(100vw*.5625);
  max-height:100svh;
  display:flex;align-items:flex-end;
  padding:0 0 clamp(24px,3.1vw,44px);
  overflow:hidden;
}
.hero__stage{position:absolute;inset:0;pointer-events:none;overflow:hidden}

/* The four hero layers are all cut from the same 1080x617 collage canvas, so
   they only stay in register if they share one box. .hero__canvas is that box,
   sized to cover the hero. It centres itself with the standalone `translate`
   property so GSAP keeps sole ownership of `transform`. */
/* The mockup places the collage at full hero height with the black paper
   showing either side, so fit by height and only fall back to width-fit when
   the viewport is narrower than the canvas. */
.hero__canvas{
  position:absolute;top:50%;left:50%;translate:-50% -50%;
  height:100%;width:auto;aspect-ratio:1080/617;
}
@media (max-aspect-ratio:1080/617){
  /* narrower than the canvas: fit by width and pin it to the top so the
     headline sits in the empty space below the collage rather than beside it */
  .hero__canvas{width:100%;height:auto;top:0;translate:-50% 0}
}
.hero__layer{position:absolute;inset:0;will-change:transform}
.hero__layer img{
  position:absolute;inset:0;
  width:100%;height:100%;max-width:none;object-fit:fill;
}
.hero__layer--clouds img{
  /* clouds.webp is cropped from that canvas at bbox 225,125 -> 714,269 */
  inset:auto;
  left:20.833%;top:20.259%;
  width:45.278%;height:23.339%;
}
/* No tint over the hero. The mockup sets the red headline straight onto the
   crumpled paper - sampling it shows no directional darkening at all (its left
   edge reads luma ~22, the same as the rest of the background). An earlier
   gradient here pushed that side down to ~9, roughly half as bright. */
.hero__content{position:relative;z-index:2;width:var(--shell);max-width:var(--shell-max)}

.hero__title{                              /* 66.5pt -> 82px, leading 1.0 */
  font-size:clamp(38px,5.7vw,82px);
  font-weight:700;line-height:1;letter-spacing:.005em;
  color:var(--red);text-transform:uppercase;
  margin-bottom:clamp(28px,4.2vw,60px);
}
.hero__title .line{display:block;overflow:hidden}
.hero__title .char{display:inline-block;will-change:transform}

.hero__meta{                               /* 18.5pt -> 23px */
  display:flex;justify-content:space-between;align-items:baseline;gap:20px;
  font-size:clamp(14px,1.6vw,23px);font-weight:400;
}
.hero__meta a{position:relative}
.hero__meta a::after{
  content:"";position:absolute;left:0;bottom:-4px;height:1px;width:100%;
  background:currentColor;transform:scaleX(0);transform-origin:100% 50%;
  transition:transform .45s var(--ease-out);
}
.hero__meta a:hover::after{transform:scaleX(1);transform-origin:0 50%}

.hero__scroll{
  position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:3;
  display:flex;align-items:center;gap:9px;
  font-size:10px;font-weight:600;letter-spacing:.24em;color:rgba(255,255,255,.6);
}
.hero__scroll span{
  width:1px;height:34px;background:linear-gradient(rgba(255,255,255,0),rgba(255,255,255,.7));
  animation:scrollHint 2.1s var(--ease) infinite;
}
@keyframes scrollHint{0%{transform:scaleY(.2);transform-origin:50% 0}
  50%{transform:scaleY(1);transform-origin:50% 0}
  50.1%{transform:scaleY(1);transform-origin:50% 100%}
  100%{transform:scaleY(.2);transform-origin:50% 100%}}

/* ------------------------------------------------------- creative solutions
   4 cards, aspect 1.643, gap 9.7pt                                          */
.services__grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:var(--gap-col-wide);
  margin-top:clamp(14px,1.5vw,22px);
}
.service{
  --ico:clamp(38px,3.8vw,56px);   /* icon size drives the hover offsets below */
  position:relative;aspect-ratio:1.643;border-radius:var(--radius-sm);
  overflow:hidden;box-shadow:var(--shadow);
  background:var(--black);
  display:grid;place-items:center;
  transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out);
}
/* the paper texture is its own layer so it can drift on hover */
.service::before{
  content:"";position:absolute;inset:0;z-index:0;
  background:url(../assets/img/hero/patch.webp) center/cover no-repeat;
  transition:transform .8s var(--ease-out);
}
.service:hover{transform:translateY(-8px);box-shadow:var(--shadow-lg)}
.service:hover::before{transform:scale(1.09)}

.service h3{                               /* 18pt -> 22px */
  position:relative;z-index:2;
  font-size:clamp(12px,1.5vw,22px);font-weight:600;letter-spacing:.045em;text-align:center;
  padding:0 10px;
  transition:transform .5s var(--ease-out);
}
/* short rule that draws in under the title */
.service h3::after{
  content:"";position:absolute;left:50%;bottom:-.62em;
  width:34px;height:2px;background:var(--red);
  margin-left:-17px;
  transform:scaleX(0);transform-origin:50% 50%;
  transition:transform .45s var(--ease-out) .06s;
}
.service__icon{
  position:absolute;z-index:1;
  width:var(--ico);height:auto;
  opacity:0;transform:translateY(calc(var(--ico) * .18)) scale(.8);
  transition:opacity .5s var(--ease-out),transform .5s var(--ease-out);
}
/* icon rises by .62 of its size, title drops by .42 - together that always
   clears half the icon plus half the cap height, at any viewport */
.service:hover .service__icon{opacity:.95;transform:translateY(calc(var(--ico) * -.62)) scale(1)}
.service:hover h3{transform:translateY(calc(var(--ico) * .42))}
.service:hover h3::after{transform:scaleX(1)}

/* ------------------------------------------------------------------ skills */
.h-solid--skills{margin-top:clamp(54px,6.2vw,90px)}
.skills{
  display:flex;justify-content:center;align-items:center;
  gap:clamp(9px,1.05vw,15px);
  margin-top:clamp(14px,1.5vw,22px);
}
.skills li{width:clamp(42px,5.8vw,84px)}
.skills img{
  width:100%;height:auto;border-radius:22%;
  transition:transform .45s var(--ease-out),filter .45s var(--ease-out);
}
.skills li:hover img{transform:translateY(-9px) scale(1.08) rotate(-4deg);
  filter:drop-shadow(0 12px 20px rgba(0,0,0,.45))}

/* -------------------------------------------------------------- experience */
.experience__grid{
  display:grid;grid-template-columns:1fr 1fr;
  gap:clamp(30px,4.4vw,64px);
  margin-top:clamp(34px,4.6vw,66px);
  align-items:start;
}
.draw-frame{
  position:absolute;inset:0;width:100%;height:100%;pointer-events:none;
}
.draw-frame rect{
  fill:none;stroke:rgba(255,255,255,.55);stroke-width:1.6;
  vector-effect:non-scaling-stroke;
}
.about-box{position:relative;padding:clamp(26px,3.2vw,46px)}
.about-box__text p{                        /* 15.7pt -> 19px, leading 1.2 */
  font-size:clamp(13px,1.32vw,19px);line-height:1.2;text-align:justify;
  hyphens:auto;
}
.about-box__text p+p{margin-top:1.6em}
.about-box__text b{font-weight:700}

.timeline{position:relative;padding:clamp(26px,3.2vw,44px) clamp(20px,2.6vw,38px)}
.timeline ol{position:relative}
.timeline .job{padding:0 0 clamp(20px,2.4vw,34px);position:relative}
.timeline .job+.job{padding-top:clamp(18px,2.2vw,30px)}
.timeline .job+.job::before{
  content:"";position:absolute;top:0;left:0;right:6%;height:1px;
  background:rgba(255,255,255,.55);transform-origin:0 50%;
  transition:transform .8s var(--ease-out);
}
.js .timeline .job+.job::before{transform:scaleX(0)}
.js .timeline .job+.job.is-ruled::before{transform:scaleX(1)}
.timeline h3{                              /* 17.1pt -> 21px */
  font-size:clamp(15px,1.47vw,21px);font-weight:400;letter-spacing:.005em;
}
.timeline p{                               /* 11.3pt -> 14px */
  font-size:clamp(11px,.97vw,14px);font-weight:400;margin-top:.5em;
  color:rgba(255,255,255,.92);
}

/* ------------------------------------------------------------------- grids */
/* mockup: 34.4pt from heading top to grid top, i.e. ~24px clear @1440 */
.grid{margin-top:clamp(16px,1.7vw,25px)}
[data-tilt]{perspective:900px}
.grid--3{
  display:grid;grid-template-columns:repeat(3,1fr);
  column-gap:var(--gap-col);row-gap:var(--gap-row);
}
.grid--2{
  display:grid;grid-template-columns:repeat(2,1fr);
  column-gap:var(--gap-col-wide);row-gap:var(--gap-row);
}
.grid--2+.grid--2,.grid--3+.grid--2{margin-top:var(--gap-row)}

.tile{
  position:relative;overflow:hidden;border-radius:var(--radius);
  box-shadow:var(--shadow);background:#111;
  transition:transform .55s var(--ease-out),box-shadow .55s var(--ease-out);
}
.grid--tall .tile{aspect-ratio:.846}       /* 315.4 / 372.9 */
.grid--wide .tile{aspect-ratio:1.295}      /* 483.0 / 372.9 */
.grid--square .tile{aspect-ratio:1}
.tile img{
  width:100%;height:100%;object-fit:cover;
  transition:transform .75s var(--ease-out),filter .55s var(--ease-out);
}
.tile:hover{transform:translateY(-8px);box-shadow:var(--shadow-lg)}
.tile:hover img{transform:scale(1.06)}
.tile::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to top,rgba(6,7,6,.78),rgba(6,7,6,0) 52%);
  opacity:0;transition:opacity .5s var(--ease-out);
}
.tile:hover::after{opacity:1}
.tile__label{
  position:absolute;left:0;right:0;bottom:0;z-index:2;
  padding:0 6% 7%;
  font-size:clamp(11px,1.05vw,15px);font-weight:600;letter-spacing:.09em;
  text-transform:uppercase;
  opacity:0;transform:translateY(14px);
  transition:opacity .5s var(--ease-out),transform .5s var(--ease-out);
}
.tile:hover .tile__label{opacity:1;transform:none}

/* video tiles */
.tile--video .play{
  position:absolute;left:50%;top:50%;z-index:3;
  width:clamp(52px,5.2vw,74px);aspect-ratio:1;
  transform:translate(-50%,-50%);
  display:grid;place-items:center;
  transition:transform .45s var(--ease-out);
}
.tile--video .play::before{
  content:"";width:100%;height:100%;position:absolute;border-radius:50%;
  background:rgba(255,255,255,.14);backdrop-filter:blur(4px);
  border:1px solid rgba(255,255,255,.5);
  transition:background-color .4s var(--ease-out),transform .4s var(--ease-out);
}
.tile--video .play::after{
  content:"";position:relative;
  border-left:clamp(15px,1.5vw,21px) solid var(--white);
  border-top:clamp(9px,.92vw,13px) solid transparent;
  border-bottom:clamp(9px,.92vw,13px) solid transparent;
  margin-left:19%;
}
.tile--video:hover .play::before{background:var(--red);border-color:var(--red);transform:scale(1.08)}
.tile--video:hover .play{transform:translate(-50%,-50%) scale(1.05)}

/* ---------------------------------------------------------------- logo grid
   4 x 3, aspect 1.644, grid inset to 79.9% of the page                      */
/* the logo grid is inset to 79.9% of the page, i.e. 95.3% of the shell */
.logo-grid{
  display:grid;grid-template-columns:repeat(4,1fr);
  column-gap:1.01%;row-gap:.974cqw;
  width:95.3%;margin:clamp(16px,1.7vw,25px) auto 0;
}
.logo{
  aspect-ratio:1.644;border-radius:var(--radius-sm);overflow:hidden;
  background:var(--white);box-shadow:var(--shadow);
  transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out);
}
.logo img{width:100%;height:100%;object-fit:contain;
  transition:transform .6s var(--ease-out)}
.logo:hover{transform:translateY(-8px) scale(1.02);box-shadow:var(--shadow-lg)}
.logo:hover img{transform:scale(1.07)}

/* --------------------------------------------------------------- statement */
.quote{
  font-size:clamp(15px,1.33vw,19px);
  max-width:22em;margin-inline:auto;line-height:1.5;
}
.quote .word{display:inline-block;overflow:hidden;vertical-align:bottom}
.quote .word>span{display:inline-block}

.case-split{
  display:grid;grid-template-columns:1.18fr 1fr;
  gap:clamp(28px,4vw,60px);align-items:center;
  margin-top:clamp(44px,6vw,90px);
}
.case-split__art{
  margin:0;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-lg);
  transition:transform .6s var(--ease-out);
}
.case-split__art:hover{transform:translateY(-8px) scale(1.01)}
.case-split__art img{width:100%;height:auto}
.case-split__text{position:relative;padding:clamp(26px,3.4vw,50px)}
.case-split__text p{
  font-size:clamp(13px,1.32vw,19px);line-height:1.2;text-align:justify;
}
.case-split__text p+p{margin-top:1.5em}

/* --------------------------------------------------------- full-bleed strip */
.bleed{
  margin:clamp(48px,6vw,90px) 0 0;overflow:hidden;
  width:100vw;position:relative;left:50%;transform:translateX(-50%);
}
.strip-sec{padding:0}
.strip-sec .bleed{margin:0}
.bleed img{width:100%;height:auto;will-change:transform}

/* ---------------------------------------------------------------- carousel */
.carousel{
  position:relative;margin-top:clamp(16px,1.7vw,25px);
  display:flex;align-items:center;gap:clamp(8px,1.6vw,24px);
  padding-inline:clamp(8px,3vw,44px);
}
.carousel__viewport{
  flex:1;overflow:hidden;border-radius:var(--radius);
  box-shadow:var(--shadow-lg);
}
.carousel__track{display:flex;will-change:transform}
.carousel__slide{flex:0 0 100%;aspect-ratio:1.778}
.carousel__slide img{width:100%;height:100%;object-fit:cover}
.carousel__arrow{
  flex:none;width:var(--arrow-w);color:var(--arrow-c);
  padding:10px;box-sizing:content-box;
  transition:color .3s,transform .4s var(--ease-out);
}
.carousel__arrow:hover{color:var(--arrow-c-hover);transform:scale(1.12)}
.carousel__arrow svg{width:100%;height:auto;display:block}
.carousel__dots{
  position:absolute;left:0;right:0;bottom:-30px;
  display:flex;justify-content:center;gap:9px;
}
.carousel__dots button{
  width:26px;height:3px;background:rgba(255,255,255,.28);border-radius:2px;
  transition:background-color .35s,transform .35s;
}
.carousel__dots button.is-active{background:var(--red);transform:scaleY(1.6)}

/* ----------------------------------------------------------------- marquee */
.marquee{
  margin-top:clamp(16px,1.7vw,25px);
  overflow:hidden;cursor:grab;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
}
.marquee.is-dragging{cursor:grabbing}
.marquee__track{display:flex;gap:clamp(14px,1.7vw,25px);will-change:transform;width:max-content}
.webcard{
  flex:none;width:clamp(190px,23vw,332px);aspect-ratio:.66;
  border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);
  background:#fff;
  transition:transform .55s var(--ease-out),box-shadow .55s var(--ease-out);
}
.webcard img{width:100%;height:100%;object-fit:cover;object-position:top center}
.webcard:hover{transform:translateY(-10px) scale(1.02);box-shadow:var(--shadow-lg)}

/* ------------------------------------------------------------------ footer */
.footer{
  position:relative;
  padding:clamp(56px,7vw,104px) 0 clamp(46px,6vw,88px);
}
.footer__inner{
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:clamp(28px,4vw,60px);flex-wrap:wrap;
}
.footer__id h2{                            /* 29.8pt -> 37px */
  font-size:clamp(26px,2.56vw,37px);font-weight:600;letter-spacing:.045em;
}
.footer__role{                             /* 17.8pt -> 22px */
  font-size:clamp(15px,1.53vw,22px);font-weight:400;margin-top:.18em;
}
.footer__contact{                          /* 13.8pt -> 17px */
  font-size:clamp(12px,1.18vw,17px);font-weight:400;margin-top:.6em;
  display:flex;gap:.55em;flex-wrap:wrap;
}
.footer__contact a{display:inline-block;will-change:transform}
.footer__contact a:hover{color:var(--red)}
.footer__details{text-align:left}
.footer__details h3{font-size:clamp(15px,1.53vw,22px);font-weight:400}
.footer__details ul{
  margin-top:.65em;font-size:clamp(12px,1.18vw,17px);
  display:grid;grid-template-columns:auto auto;gap:.35em clamp(18px,2vw,30px);
}
.footer__details li:first-child{
  border-right:1px solid rgba(255,255,255,.45);padding-right:clamp(18px,2vw,30px);
}
.footer__details li:nth-child(3){grid-column:1 / -1}

.to-top{
  position:fixed;right:clamp(16px,2.4vw,34px);bottom:clamp(16px,2.4vw,34px);z-index:100;
  width:48px;height:48px;border-radius:50%;
  background:var(--red);display:grid;place-items:center;
  opacity:0;transform:translateY(20px) scale(.8);pointer-events:none;
  transition:opacity .4s var(--ease),transform .4s var(--ease-out);
  box-shadow:0 8px 22px rgba(0,0,0,.4);
}
.to-top.is-visible{opacity:1;transform:none;pointer-events:auto}
.to-top svg{width:20px;height:20px}

/* ---------------------------------------------------------------- lightbox */
.lightbox{
  position:fixed;inset:0;z-index:220;
  background:rgba(6,7,6,.94);
  backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
  display:flex;flex-direction:column;
  opacity:0;
}
.lightbox[hidden]{display:none}
.lightbox__bar{
  flex:none;display:flex;align-items:baseline;gap:12px;
  padding:9px clamp(14px,2vw,26px);
  border-bottom:1px solid rgba(255,255,255,.12);
}
.lightbox__title{display:flex;align-items:baseline;gap:10px;min-width:0}
.lightbox__title strong{
  font-size:13px;font-weight:600;letter-spacing:.06em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.lightbox__title span{
  font-size:10px;letter-spacing:.12em;text-transform:uppercase;
  color:rgba(255,255,255,.5);white-space:nowrap;
}
.lightbox__close{
  width:26px;height:26px;margin-left:auto;flex:none;
  display:grid;place-items:center;align-self:center;
  transition:transform .35s var(--ease-out),color .3s;
}
.lightbox__close:hover{transform:rotate(90deg);color:var(--red)}
.lightbox__close svg{width:18px;height:18px}

.lightbox__body{
  flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;  /* keeps the arrows symmetric */
  padding:clamp(10px,1.4vw,18px) clamp(10px,2vw,26px) clamp(20px,3vw,36px);
  scroll-behavior:smooth;
}
/* case studies: full-width tiles stacked into one scrolling document */
.lightbox__body img{
  display:block;width:100%;max-width:980px;margin-inline:auto;height:auto;
}
.lightbox__body img+img{margin-top:-1px}
.lightbox__body video{
  display:block;max-width:100%;max-height:82svh;margin:auto;
  border-radius:var(--radius);background:#000;
}
/* single-image zoom: fit the screen instead of overflowing it.
   margin:auto centres it - align-items:center would make any overflow
   unreachable, because you cannot scroll above a centred flex item. */
.lightbox__body .lb-media{min-height:100%;display:flex}
.lightbox__body .lb-media > *{margin:auto}
.lightbox__body .lb-media img{
  width:auto;max-width:100%;max-height:82svh;object-fit:contain;
}
/* Pulled in beside the 980px content column rather than pinned to the window
   edges, and dropped back to the edges once the viewport is too narrow. */
.lightbox__nav{
  position:absolute;top:50%;transform:translateY(-50%);z-index:2;
  width:var(--arrow-w);color:var(--arrow-c);
  padding:10px;box-sizing:content-box;
  transition:color .3s,transform .4s var(--ease-out);
}
.lightbox__nav:hover{color:var(--arrow-c-hover);transform:translateY(-50%) scale(1.12)}
.lightbox__nav svg{width:100%;height:auto;display:block}
.lightbox__nav--prev{left:max(4px,calc(50% - 558px))}
.lightbox__nav--next{right:max(4px,calc(50% - 558px))}
.lightbox__nav[hidden]{display:none}
body.is-locked{overflow:hidden}

/* --------------------------------------------------------- reveal defaults
   JS removes these once GSAP takes over; if JS fails everything stays visible */
.js .reveal-card{opacity:0}
/* transitions stay off until the reveal has finished and handed transform back
   to CSS (see revealGroup in sections.js), so they cannot smear the reveal */
.js .reveal-card:not(.is-in){transition:none}
.js .reveal-text{opacity:0}
.js .hero__title{opacity:0}
.js .draw-frame rect{stroke-dasharray:1;stroke-dashoffset:1}

/* ------------------------------------------------------------- breakpoints */
@media (max-width:1024px){
  /* Gaps open up slightly on smaller screens, but stay equal on both axes -
     a shorthand `gap` percentage would resolve row-gap against the block size
     and collapse the rows, so both axes are set explicitly. */
  :root{--shell:88%;--gap-col:1.8%;--gap-row:1.8cqw;--gap-col-wide:1.8%}
  .experience__grid{grid-template-columns:1fr;gap:34px}
  .case-split{grid-template-columns:1fr;gap:30px}
  .grid--3{grid-template-columns:repeat(2,1fr)}
  .logo-grid{
    grid-template-columns:repeat(3,1fr);width:100%;
    column-gap:1.6%;row-gap:1.6cqw;
  }
  .services__grid{grid-template-columns:repeat(2,1fr)}
  .hero{height:auto;min-height:100svh;padding-top:calc(var(--header-h) + 20px)}
  .hero__title{font-size:clamp(40px,6.4vw,58px)}
}

@media (max-width:760px){
  :root{--shell:88%;--radius:13px;--header-h:78px}
  .nav{
    position:fixed;inset:0;z-index:-1;
    flex-direction:column;justify-content:center;align-items:center;gap:34px;
    background:rgba(6,7,6,.97);
    opacity:0;pointer-events:none;transition:opacity .4s var(--ease);
  }
  .nav.is-open{opacity:1;pointer-events:auto;z-index:1}
  .nav a{font-size:22px;letter-spacing:.16em}
  .burger{display:block;position:relative;z-index:2}
  .header.is-stuck{padding:10px 0}
  .brand__avatar{width:36px;height:36px}

  .skills{flex-wrap:wrap;gap:12px}
  .skills li{width:50px}

  /* Stacked hero. Below this width the collage is only ~200px tall, so laying
     the headline over it left a large empty gap between the two. The artwork
     becomes a full-bleed band and the headline sits underneath it. */
  .hero{
    height:auto;min-height:0;display:block;
    padding:calc(var(--header-h) + 6px) 0 clamp(30px,7vw,50px);
  }
  .hero__stage{
    position:relative;inset:auto;
    width:100vw;left:50%;margin-left:-50vw;
    aspect-ratio:1080/617;
  }
  .hero__content{margin-top:clamp(18px,5vw,34px)}
  .hero__title{font-size:clamp(38px,10.5vw,50px);margin-bottom:clamp(20px,5vw,32px)}

  .hero__meta{flex-direction:column;gap:8px;align-items:flex-start}
  .hero__scroll{display:none}
  .footer__inner{flex-direction:column}
  .footer__details ul{grid-template-columns:1fr}
  .footer__details li:first-child{border:0;padding-right:0}
  .about-box__text p,.case-split__text p{text-align:left}
  .carousel{padding-inline:0;gap:6px}
  .carousel__dots{bottom:-24px}
  .quote{max-width:none}
}

/* Single column only once two side-by-side cards would be too narrow to read.
   Between 560 and 760 the layout keeps two columns - a 600px tablet showing
   one card per row means scrolling through 15 package shots one at a time. */
@media (max-width:560px){
  .grid--3,.grid--2{grid-template-columns:1fr;gap:14px}
  .logo-grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .services__grid{grid-template-columns:1fr;gap:12px}
  .service{aspect-ratio:2.6}

  /* There is no room beside the image at this width, so the arrows move to a
     row underneath rather than sitting on top of the artwork. Swiping works
     too - see the touch handler in lightbox.js. */
  .lightbox__nav{top:auto;bottom:8px;transform:none;padding:12px}
  .lightbox__nav:hover{transform:none}
  .lightbox__nav--prev{left:50%;margin-left:-58px}
  .lightbox__nav--next{right:50%;margin-right:-58px}
  .lightbox__body{padding-bottom:62px}
  .lightbox__body .lb-media img,.lightbox__body video{max-height:70svh}
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
  .js .reveal-card,.js .reveal-text,.js .hero__title{opacity:1}
  .js .draw-frame rect{stroke-dasharray:none;stroke-dashoffset:0}
  .cursor{display:none!important}
  body{cursor:auto}
}
