/* =====================================================================
   Naveen — portfolio stylesheet
   Editorial, restrained. Tokens first, then components in page order,
   then responsive and reduced-motion rules.
   ===================================================================== */

@font-face{font-family:Instrument;src:url('assets/fonts/instrument-serif-regular.woff2') format('woff2');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:Instrument;src:url('assets/fonts/instrument-serif.woff2') format('woff2');font-style:italic;font-weight:400;font-display:swap}

:root{
  --paper:#F8F7F2;
  --ink:#252A33;
  /* colour split: ~60% paper, ~30% teal (accents + the deep-teal Contact and footer), ~10% orange (CTAs and arrows only) */
  --teal:#378F88;
  --teal-soft:#DCE7DE;
  --teal-deep:#1D4B47;   /* the Contact section and footer */
  /* shades that follow the colours above (app.js works them out again when a colour is changed in Studio) */
  --teal-hover:#2C746E;  /* the teal button on hover */
  --accent-hover:#C9532D;
  --deep-top:#275853;    /* the Contact section's gradient starts here, the footer's ends at --deep-bottom */
  --deep-bottom:#183F3C;
  --dark-ink:#F3F1EC;    /* text on the deep teal */
  --dark-teal:#8CCFC6;   /* accents and the button on the deep teal */
  --dark-teal-hover:#A9DDD6;
  --accent:#E36A42;      /* orange (a touch more saturated than #D97757): supporting CTAs, arrow marks, hovers */
  --accent-ink:#C8522B;  /* deeper orange for text and hover */
  --grey:#788494;        /* labels, metadata */
  --text-2:#596270;      /* secondary body copy */
  --rule:#E4E1D9;
  --close-bg:#F7D9D5;   /* pastel red close buttons */
  --close-ink:#C2453B;
  --plate:#EFEDE6;       /* placeholder surfaces */
  --plate-2:#F3F1EA;
  --serif:Instrument,'Times New Roman',Georgia,serif;
  --sans:'Instrument Sans',-apple-system,BlinkMacSystemFont,'SF Pro Text','Helvetica Neue',Arial,sans-serif;
  --mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  --ease:cubic-bezier(.2,.7,.2,1);
  --ease-out:cubic-bezier(.16,1,.3,1);
  --gutter:clamp(20px,5vw,80px);
  --max:1440px;
  --radius:8px;
}

/* ---------- base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{background:var(--paper);scroll-behavior:smooth;scroll-padding-top:24px;-webkit-text-size-adjust:100%;overscroll-behavior-x:none}
body{margin:0;background:transparent;color:var(--ink);font:400 15px/1.5 var(--sans);-webkit-font-smoothing:antialiased;overflow-x:clip}
body.modal-open{overflow:hidden}
/* Lenis smooth scroll (its recommended base styles) */
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:clip}
.lenis.lenis-smooth iframe{pointer-events:none}
h1,h2,h3,p,figure,dl,dd{margin:0}
h1,h2,h3{font-weight:400}
ul{list-style:none;margin:0;padding:0}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
a,button{-webkit-tap-highlight-color:transparent}
img,video,svg{display:block;max-width:100%}
em{font-family:var(--serif);font-style:italic;color:var(--teal)}
::selection{background:#D9E2FF}
:focus-visible{outline:2px solid var(--teal);outline-offset:4px;border-radius:2px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;top:-100px;left:12px;z-index:100;background:var(--ink);color:var(--paper);padding:10px 14px;border-radius:6px}
.skip-link:focus{top:12px}
.defs{position:absolute;width:0;height:0;overflow:hidden}

/* type utilities */
.micro,.eyebrow,.tag{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;line-height:1.5}
.eyebrow{font-size:11px;color:var(--grey);display:block}
.lede{font-size:clamp(15px,1.15vw,17px);line-height:1.65;color:var(--text-2);max-width:520px}
.section-title{font:400 clamp(44px,5.2vw,84px)/1.02 var(--serif);letter-spacing:-.02em}
.u{background-image:linear-gradient(currentColor,currentColor);background-size:0% 1px;background-repeat:no-repeat;background-position:left calc(100% - 1px);transition:background-size .45s var(--ease-out),color .3s;padding-bottom:2px}
.u:hover,.u:focus-visible{background-size:100% 1px}
.arrow{display:inline-block;transition:transform .45s var(--ease-out)}

/* word masks for the split-text reveals (JS wraps words in .w > .wi) */
.w{display:inline-block;overflow:hidden;vertical-align:top;padding:0 .08em .14em;margin:0 -.08em -.14em}
.wi{display:inline-block;will-change:transform}

/* buttons */
.btn{display:inline-flex;align-items:center;gap:14px;padding:15px 22px;border-radius:var(--radius);font:500 14px/1 var(--sans);border:1px solid var(--ink);color:var(--ink);transition:color .35s var(--ease),border-color .35s var(--ease),background-color .35s var(--ease);will-change:transform}
/* main CTA: teal fill; supporting CTA: orange outline that fills on hover */
.btn-solid{background:var(--btn-bg,var(--teal));border-color:var(--btn-bg,var(--teal));color:var(--btn-ink,#fff)}
.btn-solid:hover{background:var(--btn-hover,var(--teal-hover));border-color:var(--btn-hover,var(--teal-hover));color:var(--btn-ink,#fff)}
.btn-ghost{border-color:var(--accent);color:var(--accent-ink)}
.btn-ghost:hover{background:var(--accent);border-color:var(--accent);color:#fff}
.btn:hover .arrow{transform:translate(3px,-3px)}
.btn .arrow{font-size:15px}

/* reveals (JS adds .in when scrolled into view) */
html.js [data-reveal]{opacity:0;transform:translateY(22px);transition:opacity .9s var(--ease-out),transform .9s var(--ease-out);transition-delay:var(--d,0ms)}
html.js [data-reveal].in{opacity:1;transform:none}

/* section rhythm */
.section{padding:clamp(72px,9vw,128px) var(--gutter);border-top:1px solid var(--rule)}
.section>*{max-width:var(--max);margin-inline:auto}
.section-head{display:grid;grid-template-columns:1fr 1fr;gap:20px 48px;align-items:end;margin-bottom:44px}
.section-head .eyebrow{grid-column:1/-1}
.section-head .lede{justify-self:start;padding-bottom:10px}

/* ---------- background: the paint simulation, or soft static blobs ---------- */
.fluid{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;display:none;opacity:0;transition:opacity .6s}
html.has-fluid .fluid{display:block}
html.fluid-ready .fluid{opacity:1}   /* a fresh WebGL canvas is black until it first draws: it stays hidden till then */
html.has-fluid .aurora{display:none}
.aurora{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.aurora-drift{position:absolute;will-change:transform}
.aurora-drift-a{left:22%;top:8%;animation:drift-a 28s ease-in-out infinite alternate}
.aurora-drift-b{left:66%;top:34%;animation:drift-b 34s ease-in-out infinite alternate}
.aurora-drift-c{left:42%;top:72%;animation:drift-c 40s ease-in-out infinite alternate}
.aurora-blob{display:block;border-radius:50%;filter:blur(64px);will-change:transform;transform:translate(-50%,-50%)}
.aurora-a{width:min(50vw,680px);height:min(50vw,680px);background:radial-gradient(circle,rgba(128,146,255,.4) 0%,rgba(128,146,255,.14) 40%,rgba(128,146,255,0) 66%)}
.aurora-b{width:min(46vw,620px);height:min(46vw,620px);background:radial-gradient(circle,rgba(201,166,255,.4) 0%,rgba(201,166,255,.12) 42%,rgba(201,166,255,0) 66%)}
.aurora-c{width:min(40vw,520px);height:min(40vw,520px);background:radial-gradient(circle,rgba(255,150,196,.28) 0%,rgba(255,150,196,.1) 42%,rgba(255,150,196,0) 66%)}
@keyframes drift-a{to{transform:translate(8vw,9vh)}}
@keyframes drift-b{to{transform:translate(-10vw,-8vh)}}
@keyframes drift-c{to{transform:translate(10vw,-10vh)}}

/* ---------- custom cursor ---------- */
html.has-cursor,html.has-cursor a,html.has-cursor button,html.has-cursor [role="link"],html.has-cursor [role="button"],html.has-cursor .reel-stage{cursor:none}
html.has-cursor body.modal-open{cursor:auto}
/* inside panels the custom cursor is off: anything clickable shows the hand */
html.has-cursor body.modal-open :is(a,button,[role="link"],[role="button"],summary,label[for]):not(:disabled){cursor:pointer}
html.has-cursor body.modal-open button:disabled{cursor:default}
.cursor{position:fixed;left:0;top:0;z-index:1000;pointer-events:none;opacity:0;transition:opacity .3s}
html.has-cursor .cursor.is-on{opacity:1}
body.modal-open .cursor,.cursor.is-off{opacity:0!important}
html.has-cursor [data-native-cursor],html.has-cursor [data-native-cursor] :is(button,[role="slider"]){cursor:pointer}
.cursor-dot{position:absolute;left:0;top:0;width:6px;height:6px;border-radius:50%;background:var(--ink);transform:translate(-50%,-50%);transition:opacity .25s,background-color .3s}
.cursor-ring{position:absolute;left:0;top:0;width:34px;height:34px;border-radius:50%;border:1.5px solid var(--ink);background:rgba(37,42,51,0);display:grid;place-items:center;will-change:transform,width,height;transition:width .4s var(--ease-out),height .4s var(--ease-out),background-color .35s,border-color .35s}
.cursor-label{font:500 9px/1 var(--mono);letter-spacing:.14em;color:var(--paper);opacity:0;transition:opacity .2s;white-space:nowrap}
.cursor.is-link .cursor-ring{width:64px;height:64px;background:rgba(37,42,51,.1);border-color:rgba(37,42,51,0)}
.cursor.is-view .cursor-ring{width:84px;height:84px;background:var(--ink);border-color:var(--ink)}
.cursor.is-view .cursor-label{opacity:1}
.cursor.is-view .cursor-dot{opacity:0}
.cursor.is-text .cursor-ring{width:3px;height:26px;border-radius:2px;background:var(--ink)}
.cursor.on-dark .cursor-dot{background:#F3F1EC}
.cursor.on-dark .cursor-ring{border-color:#F3F1EC}
.cursor.on-dark.is-link .cursor-ring{background:rgba(243,241,236,.14);border-color:rgba(243,241,236,0)}
.cursor.on-dark.is-view .cursor-ring{background:#F3F1EC;border-color:#F3F1EC}
.cursor.on-dark .cursor-label{color:var(--teal-deep)}

/* ---------- header ---------- */
.header{display:flex;align-items:center;gap:48px;height:96px;padding:0 max(var(--gutter),calc((100% - var(--max)) / 2));border-bottom:1px solid var(--rule);position:relative;z-index:3}   /* logo and menu line up with the page content; the rule stays full width */
.wordmark{display:inline-flex;align-items:center;flex:none}
.wordmark-logo{display:block;height:calc(38px * var(--logo-scale,1));width:auto}   /* assets/images/logo.svg, shown as supplied */
.wordmark-footer .wordmark-logo{height:calc(56px * var(--logo-scale,1))}
.footer-brand{display:flex;align-items:flex-start;gap:8px}
.footer-copy{font:400 15px/1 var(--sans);color:var(--grey);margin-top:-2px}   /* the © mark beside the logo */
.header-note{color:var(--grey);white-space:pre-line;line-height:1.6}
.nav{margin-left:auto;display:flex;align-items:center;gap:34px;font:500 13px var(--sans)}
.nav-link{padding:6px 0}
.nav-emph{color:var(--accent-ink)}
.nav-emph .arrow{margin-left:8px}
.nav-emph:hover .arrow{transform:translate(2px,-2px)}

/* ---------- hero ---------- */
.hero{position:relative;padding:0 var(--gutter);min-height:clamp(640px,calc(100svh - 96px),960px);display:flex;flex-direction:column}
.hero-grid{flex:1;display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr);gap:clamp(24px,4vw,64px);align-items:end;position:relative;max-width:var(--max);margin-inline:auto;width:100%}
.hero-copy{align-self:center;padding:clamp(40px,7vh,88px) 0 clamp(48px,9vh,110px)}
.hero-kicker{display:flex;align-items:center;gap:12px}
.hero-kicker::before{content:'';width:22px;height:1px;background:var(--teal)}
.hero-title{font:400 clamp(60px,7.4vw,124px)/.96 var(--serif);letter-spacing:-.025em;margin:22px 0 30px}
.hero-intro{max-width:470px;font-size:clamp(15px,1.15vw,17px);line-height:1.65;color:var(--text-2)}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:38px}

/* the portrait: an animated SVG image. Its viewBox is -40 -40 1199 1975 (40 units of room for the sway), so the img is offset and oversized to keep the 1119×1895 art frame aligned with .portrait-stack */
.portrait{position:relative;justify-self:end;align-self:end;height:clamp(560px,84vh,840px);aspect-ratio:1119/1895;max-width:100%;mix-blend-mode:multiply}   /* sized to the drawing, so it sits right on the content's right edge */
.portrait-stack{position:absolute;left:0;right:0;bottom:0;margin:0 auto;width:100%;height:100%;will-change:transform}
.portrait-base{position:absolute;left:-3.5746%;top:-2.1108%;width:107.1492%;height:104.2216%;max-width:none;-webkit-mask-image:linear-gradient(#000 83.6%,transparent 98%);mask-image:linear-gradient(#000 83.6%,transparent 98%)}
/* the layer covers SVG box x 180–940, y -100–660 of the 1119 × 1895 drawing */
.portrait-caption{position:absolute;right:-2px;top:14px;writing-mode:vertical-rl;color:var(--grey)}
/* the note is anchored to the figure's centre line so it clears the arm at every width */
.hero-note{position:absolute;right:calc(50% + 196px);bottom:64%;width:max-content;color:var(--ink);transform:rotate(-6deg);text-align:right}
.hero-note-text{display:block;font:italic 26px/1.1 var(--serif);color:var(--ink);white-space:nowrap}
.hero-note-arrow{width:86px;margin:4px 0 0 auto;color:var(--accent);overflow:visible;transform:scaleX(-1)}
.hero-foot{position:relative;display:flex;justify-content:flex-start;padding:18px 0 20px;border-top:1px solid var(--rule);max-width:var(--max);margin-inline:auto;width:100%}
.scroll-note{color:var(--grey)}

/* ---------- selected work: filters + reel ---------- */
.work-toolbar{display:flex;align-items:center;gap:18px 28px;flex-wrap:wrap;margin-bottom:18px}
.work-hint{margin-left:auto;color:var(--grey)}
.filters{position:relative;display:flex;flex-wrap:wrap;gap:4px}
.filter{position:relative;z-index:1;padding:9px 15px;border-radius:999px;font:500 12.5px/1.2 var(--sans);color:var(--text-2);border:1px solid transparent;transition:color .3s var(--ease)}
.filter:hover,.filter[aria-pressed="true"]{color:var(--ink)}
.filter-indicator{position:absolute;left:0;top:0;width:0;height:0;border-radius:999px;border:1px solid var(--rule);background:#EEF2EE;opacity:0;z-index:0}
.gallery-filters .filter[aria-pressed="true"]{border-color:var(--rule);background:#EEF2EE}

.reel{--card-w:clamp(190px,19vw,250px);--card-h:calc(var(--card-w) * 16 / 9);position:relative;border:1px solid var(--rule);border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(255,255,255,0));padding:clamp(28px,4vw,52px) 0 22px;outline-offset:6px;overflow:hidden;overscroll-behavior-x:contain}
.reel-stage{position:relative;height:var(--card-h);perspective:1400px;transform-style:preserve-3d;touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab}
.reel-stage.dragging{cursor:grabbing}
.reel-card{position:absolute;left:50%;top:0;width:var(--card-w);height:var(--card-h);margin-left:calc(var(--card-w) / -2);will-change:transform;transform-style:preserve-3d;backface-visibility:hidden}
.reel-card.is-out{display:none}
.reel-open{display:block;width:100%;height:100%;border-radius:14px;overflow:hidden;border:1px solid var(--rule);background:var(--plate);box-shadow:0 30px 60px -36px rgba(37,42,51,.4);transition:box-shadow .5s var(--ease),border-color .5s;position:relative}
.reel-card.is-active .reel-open{border-color:#CFCBC0;box-shadow:0 44px 70px -34px rgba(37,42,51,.45)}
.reel-open .media-inner{position:absolute;inset:0;display:grid;place-items:center}
.reel-open .chip{top:14px;left:14px}
.reel-shade{position:absolute;inset:0;background:rgba(248,247,242,0);transition:background .5s var(--ease);pointer-events:none}
.reel-card:not(.is-active) .reel-shade{background:rgba(248,247,242,.35)}
.reel-foot{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;padding:26px clamp(18px,3vw,36px) 0}
.reel-caption{min-height:62px}
.reel-caption .tile-tags{margin-bottom:8px}
.reel-caption-title{font:500 16px/1.3 var(--sans);letter-spacing:-.005em}
.reel-caption-meta{color:var(--grey);margin-top:6px;display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.reel-caption-open{color:var(--teal);font-size:10px}
.reel-controls{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.reel-btn{width:42px;height:42px;border:1px solid var(--rule);border-radius:50%;display:grid;place-items:center;font-size:16px;transition:border-color .3s,color .3s,transform .4s var(--ease-out),background .3s}
.reel-btn:hover{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.reel-count{color:var(--grey);min-width:7ch;text-align:center}
.reel-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--grey);margin:0}
.reel-empty[hidden]{display:none}

/* ---------- gallery grid (inside the category window) ---------- */
.work-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:240px;grid-auto-flow:dense;gap:20px}
.tile{position:relative;display:flex;flex-direction:column;min-width:0;border:1px solid var(--rule);border-radius:12px;background:rgba(255,255,255,.35);overflow:hidden;transform-style:preserve-3d;will-change:transform}
.tile.is-hidden{display:none}
.tile-xl{grid-column:span 2;grid-row:span 2}
.tile-wide{grid-column:span 2}
.tile-tall{grid-row:span 2}
.tile-open{display:block;flex:1;min-height:0;width:100%;text-align:left;position:relative;overflow:hidden}
.tile-open:focus-visible{outline-offset:-4px}
.tile-media{position:absolute;inset:0;background:var(--plate)}
.media-inner{position:absolute;inset:0;display:grid;place-items:center;transform-origin:50% 50%;transition:transform 1s var(--ease-out)}
.tile-open:hover .media-inner{transform:scale(1.04)}
.media-inner img,.media-inner video{width:100%;height:100%;object-fit:cover}
.tile-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px 13px;border-top:1px solid var(--rule);background:rgba(248,247,242,.8)}
.tile-title{font:500 14px/1.3 var(--sans);letter-spacing:-.005em;margin-top:5px}
.tile-tags{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.tile-year{color:var(--grey);margin-left:4px}
.tile-meta{align-items:center}
.tile-meta > div{min-width:0}
.tile-title{overflow-wrap:break-word}
.tile-arrow{flex:0 0 auto;width:36px;height:36px;border-radius:50%;border:1px solid var(--rule);background:var(--paper);color:var(--accent);display:grid;place-items:center;overflow:hidden;transition:background .35s var(--ease),border-color .35s,color .35s}
.tile-arrow .arrow{font:500 15px/1 var(--sans);transform:translateY(-.5px)}
.tile:hover .tile-arrow{background:var(--accent);border-color:var(--accent);color:#fff}
.tile:hover .tile-arrow .arrow{transform:translateY(-.5px)}   /* fill only, the arrow stays put */
/* hover: a thin orange outline eases in around the card */
.tile::after{content:"";position:absolute;inset:-1px;border-radius:inherit;border:1.5px solid var(--teal);opacity:0;transform:scale(.985);pointer-events:none;z-index:2;transition:opacity .45s var(--ease),transform .6s var(--ease-out)}
.tile:hover::after,.tile:has(.tile-open:focus-visible)::after{opacity:.75;transform:scale(1)}
.chip{position:absolute;top:12px;left:12px;padding:5px 8px;border:1px solid var(--rule);border-radius:4px;background:rgba(248,247,242,.9);color:var(--text-2);font-size:9px;z-index:1}
.tag{display:inline-block;padding:3px 7px;border:1px solid var(--rule);border-radius:4px;color:var(--text-2);font-size:9px;letter-spacing:.12em;background:rgba(248,247,242,.7)}
button.tag{transition:border-color .3s,color .3s,background .3s}
button.tag:hover{border-color:var(--teal);color:var(--teal);background:#EEF4F3}

/* placeholder visuals */
.ph{display:flex;flex-direction:column;align-items:center;gap:12px;color:var(--grey)}
.ph svg{width:36px;height:36px;stroke:currentColor;fill:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.ph-play{width:54px;height:54px;border:1px solid currentColor;border-radius:50%;display:grid;place-items:center}
.ph-play svg{width:18px;height:18px;margin-left:3px}
.ph-corner{position:absolute;left:14px;bottom:12px;color:var(--grey)}
.ui-mock{position:absolute;inset:16% 13% 14%;border:1px solid #DAD7CE;border-radius:6px;background:var(--paper);display:grid;grid-template-rows:20px 1fr;overflow:hidden}
.ui-bar{display:flex;gap:4px;align-items:center;padding:0 8px;border-bottom:1px solid var(--rule)}
.ui-bar i{width:5px;height:5px;border-radius:50%;background:#D9D6CD}
.ui-body{display:grid;grid-template-columns:27% 1fr;min-height:0}
.ui-side{border-right:1px solid var(--rule);padding:10px 8px;display:flex;flex-direction:column;gap:7px}
.ui-main{padding:11px;display:flex;flex-direction:column;gap:7px;min-height:0}
.ui-side i,.ui-main i{display:block;height:4px;border-radius:2px;background:var(--rule)}
.ui-main b{display:block;flex:1;min-height:22px;background:var(--plate);border-radius:4px}
.ui-main i.w60{width:60%}

/* ---------- services ---------- */
.service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--rule);border-radius:12px;overflow:hidden;background:rgba(255,255,255,.25)}
.service{position:relative;display:flex;flex-direction:column;padding:26px 28px 34px;min-width:0;cursor:pointer;transition:background .5s var(--ease)}
.service:hover{background:rgba(255,255,255,.55)}
.service:focus-visible{outline-offset:-6px}
.service+.service{border-left:1px solid var(--rule)}
.service-number{color:var(--grey)}
.service-figure{width:100%;max-width:380px;margin:10px auto 6px;--hairline-plate:#FDFCFA;--hairline-hi:var(--teal);--hairline-edge:#59626F;--hairline-mid:#A3ABB6;--hairline-lo:#D3D7DD;--hairline-stroke:1}
.service-figure[data-hairline]{aspect-ratio:5/4;touch-action:pan-y}
.service-title{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font:400 clamp(34px,3.1vw,50px)/1 var(--serif);letter-spacing:-.02em;margin-top:6px}
.service-title{align-items:center}
.service-arrow{width:42px;height:42px}
.service-arrow .arrow{font:500 17px/1 var(--sans)}
.service:hover .service-arrow,.service:focus-visible .service-arrow{background:var(--accent);border-color:var(--accent);color:#fff}
/* hover: a thin orange outline eases in inside the card */
.service::after{content:"";position:absolute;inset:10px;border-radius:10px;border:1.5px solid var(--teal);opacity:0;transform:scale(.985);pointer-events:none;transition:opacity .45s var(--ease),transform .6s var(--ease-out)}
.service:hover::after{opacity:.6;transform:scale(1)}
.service-desc{color:var(--text-2);font-size:15px;line-height:1.6;margin:14px 0 20px}
.service-list{border-top:1px solid var(--rule);margin-bottom:26px}
.service-list li{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--rule);font:400 11px var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--text-2)}
.service-list li::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--teal-soft);border:1px solid var(--teal);flex:0 0 auto}
.service-link{margin-top:auto;align-self:flex-start;color:var(--teal);font-size:10px}

/* ---------- about ---------- */
.about-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:48px clamp(32px,6vw,96px);align-items:start}
.about-main .section-title{margin-top:20px}
.about-copy p{font-size:clamp(15px,1.2vw,17px);line-height:1.7;color:var(--text-2);max-width:560px;margin-top:20px}
.about-copy p:first-child{margin-top:30px}
.about-side{display:grid;gap:28px;padding-top:40px}
.about-portrait{aspect-ratio:4/5;width:100%;max-width:300px;border:1px dashed #CFCBC0;border-radius:var(--radius);display:grid;place-items:center;color:var(--grey);background:var(--plate-2);overflow:hidden}
.about-portrait img{width:100%;height:100%;object-fit:cover}
.about-facts{border-top:1px solid var(--rule)}
.about-facts div{display:grid;grid-template-columns:118px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid var(--rule)}
.about-facts dt{color:var(--grey)}
.about-facts dd{font-size:14px;color:var(--ink)}

/* ---------- deep-teal close: Contact + footer (tokens flipped for light text) ---------- */
.contact,.footer{--ink:var(--dark-ink);--paper:var(--teal-deep);--text-2:#C5D6D3;--grey:#93B3AE;--rule:rgba(243,241,236,.16);--teal:var(--dark-teal);--btn-bg:var(--dark-teal);--btn-hover:var(--dark-teal-hover);--btn-ink:#123532;background:var(--teal-deep);color:var(--ink)}
/* a mild gradient, lighter at the top; with the paint running, the canvas draws this same gradient (fluid.js) so the paint can flow over it */
.contact{background:linear-gradient(180deg,var(--deep-top),var(--teal-deep))}
html.paint-ground .contact{background:transparent}
.footer{background:linear-gradient(180deg,var(--teal-deep),var(--deep-bottom))}
.contact{border-top:0}

/* ---------- contact ---------- */
.contact{padding-bottom:clamp(80px,10vw,140px)}
.contact-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:40px clamp(32px,5vw,80px);align-items:center}
.contact-title{font:400 clamp(56px,7.6vw,128px)/.98 var(--serif);letter-spacing:-.03em;margin:18px 0 26px}
.contact-lede{font-size:clamp(16px,1.3vw,19px)}
.contact-actions{display:flex;align-items:center;gap:26px;flex-wrap:wrap;margin-top:42px}
.copy-email{display:inline-flex;align-items:center;gap:16px;padding:10px 0;border-bottom:1px solid var(--rule);font:500 15px var(--sans);color:var(--ink);transition:border-color .35s var(--ease)}
.copy-email:hover{border-color:var(--teal)}
.copy-state{display:inline-block;overflow:hidden;min-width:9ch;font-size:10px;height:14px;color:var(--teal);text-align:left}   /* sized to the label, so it centres on the email */
.copy-text{display:block;line-height:14px}
.cv-link{display:inline-flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--rule);font:500 15px var(--sans);color:var(--ink);transition:border-color .35s var(--ease)}   /* the resume, beside the email */
.cv-link .arrow{color:var(--teal)}
/* the document icon (the resume): a slightly finer line than the arrows, and it lifts on hover instead of sliding */
.arrow.doc .ai{width:1.15em;height:1.15em}
.arrow.doc .ai svg{stroke-width:1.7}
.btn:hover .arrow.doc,.cv-link:hover .arrow.doc{transform:translateY(-2px)}
.cv-link:hover{border-color:var(--teal)}
/* the rotating ring: text on a circle around a magnetic arrow */
.contact-scene{position:relative;justify-self:end;width:100%;max-width:420px;display:grid;place-items:center}
.badge{position:relative;display:grid;place-items:center;width:min(380px,76vw);aspect-ratio:1;border-radius:50%;color:var(--ink);will-change:transform}
.badge::before{content:'';position:absolute;inset:17%;border:1px solid var(--rule);border-radius:50%;transition:border-color .4s,transform .6s var(--ease-out)}
.badge:hover::before{border-color:var(--teal);transform:scale(1.04)}
.badge-ring{position:absolute;inset:0;width:100%;height:100%;will-change:transform;overflow:visible}
.badge-text{font:500 13.5px var(--mono);letter-spacing:.32em;fill:var(--ink);text-transform:uppercase}
.badge-core{position:relative;width:33%;aspect-ratio:1;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;transition:background .4s var(--ease),transform .6s var(--ease-out)}
.badge:hover .badge-core{background:var(--accent-ink);transform:scale(1.08)}
.badge-arrow{font:400 44px/1 var(--sans)}
.badge:hover .badge-arrow{transform:translate(3px,-3px)}

/* ---------- footer ---------- */
.footer{border-top:1px solid var(--rule);padding:48px var(--gutter) 40px}
.footer>*{max-width:var(--max);margin-inline:auto}
/* footer cat + butterfly cursor (assets/js/footer-cat.js, desktop only) */
.footer{position:relative}
.footer>*:not(.footer-cat-stage){position:relative;z-index:1}
/* The rig inherits the footer palette; its ground never affects layout. */
.footer-cat-stage{position:absolute;inset:0 var(--gutter);max-width:none;pointer-events:none;z-index:0;overflow:hidden}
.footer-cat-stage[hidden]{display:none}
.footer-cat{position:absolute;left:0;top:0;width:100%;height:100%;max-width:none;overflow:visible}
/* the cat: a thick ink pass under a pen-offset fill pass leaves one contour that swells and thins */
.footer-cat .cat-solid{fill:#000;stroke:none}
.footer-cat .cat-pen{flood-color:var(--ink)}
.footer-cat .cat-pen-far{flood-color:var(--ink);flood-opacity:.55}
.footer-cat .cat-paper{flood-color:var(--teal-deep)}
.footer-cat .cat-fill{fill:var(--teal-deep);stroke:none}
.footer-cat .cat-ink{fill:var(--ink);stroke:none}
.footer-cat .cat-eye{fill:var(--ink);stroke:var(--ink);stroke-width:.6;stroke-linejoin:round}
.footer-cat .cat-dust{fill:none;stroke:var(--ink);stroke-width:1}
.footer-cat .cat-shadow{fill:#000;stroke:none;opacity:.13}
.footer-cat .cat-z{fill:#F2895F;font-weight:500;font-family:var(--serif);font-style:italic;text-anchor:middle;opacity:0}
.footer-cat .cat-shadow{fill:#000;stroke:none;opacity:.13}
@media(max-width:899px){.footer-cat-stage{display:none}}
/* the butterfly: wings beat in 3D (rotateY) around a body tilted towards the viewer */
.footer-butterfly{position:absolute;left:0;top:0;z-index:1001;width:0;height:0;pointer-events:none;opacity:0;transition:opacity .25s;perspective:220px}
.bf-3d{position:absolute;left:0;top:0;transform-style:preserve-3d}
.bf-wing{position:absolute;top:-19px;width:27px;height:38px;transform-style:preserve-3d}
.bf-wing svg{display:block;width:100%;height:100%;overflow:visible}
.bf-l{left:-27px;transform-origin:100% 50%}
.bf-r{left:0;transform-origin:0 50%}
.bf-r svg{transform:scaleX(-1)}
.bf-wing .fw,.bf-wing .hw{fill:none;stroke:var(--accent);stroke-width:1.3;stroke-linejoin:round}
.bf-body{position:absolute;left:-6px;top:-16px;width:12px;height:30px;max-width:none;overflow:visible;transform:translateZ(2px)}
.bf-body path{fill:none;stroke:var(--accent);stroke-width:1.5;stroke-linecap:round}
.bf-body .ant{stroke-width:1}
/* the glow at the tip of the body: a bright warm core with a tight, sharp orange halo (its opacity is set in footer-cat.js) */
.bf-light{position:absolute;left:-2.5px;top:6px;width:5px;height:5px;border-radius:50%;background:#FFE3CF;box-shadow:0 0 1.5px 1px #FFC39E,0 0 5px 2px rgba(255,128,74,.9),0 0 12px 3px rgba(227,106,66,.5);opacity:0;transform:translateZ(3px);pointer-events:none}
html.footer-butterfly-on .footer-butterfly{opacity:1}
.footer-butterfly.is-held{opacity:1;transition:none}
html.footer-butterfly-on .cursor{opacity:0!important}
html.footer-butterfly-on .footer,html.footer-butterfly-on .footer *{cursor:none!important}
html.footer-cat-quiet .cursor{opacity:0!important}
.footer-ghost{position:fixed;left:0;top:0;z-index:1000;pointer-events:none;opacity:0;transition:opacity .3s}
.footer-ghost.is-on{opacity:1}
.footer-ghost i{position:absolute;left:0;top:0;border-radius:50%;transform:translate(-50%,-50%)}
.footer-ghost .ring{width:34px;height:34px;border:1.5px solid #F3F1EC}
.footer-ghost .dot{width:6px;height:6px;background:#F3F1EC}
html.footer-cat-quiet .footer,html.footer-cat-quiet .footer *{cursor:none!important}
.footer-top{display:flex;align-items:center;gap:32px;flex-wrap:wrap}
.social{margin-left:auto;display:flex;gap:6px}
.social a{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--rule);border-radius:50%;color:var(--ink);transition:transform .4s var(--ease-out),border-color .3s,color .3s}
.social a:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-3px)}
.social svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.footer-bottom{display:flex;align-items:flex-end;gap:28px;flex-wrap:wrap;margin-top:56px;color:var(--grey)}
.footer-link{font:500 13px var(--sans);color:var(--ink)}
.signature{order:-1;opacity:.7}   /* signature bottom-left under the logo, Back to top bottom-right */
.footer-bottom .back-to-top{margin-left:auto}
.signature-svg{height:64px;width:auto;display:block;color:var(--ink);overflow:visible}
.signature-ph{width:168px;height:60px;border:1px dashed #CFCBC0;border-radius:6px;display:grid;place-items:center;color:var(--grey);background:var(--plate-2)}

/* ---------- dialogs ---------- */
dialog{border:1px solid var(--rule);background:var(--paper);color:var(--ink);padding:0}
dialog:modal{position:fixed}
dialog::backdrop{background:rgba(37,42,51,.5);backdrop-filter:blur(6px)}
dialog[open]{animation:dialog-in .5s var(--ease-out)}
@keyframes dialog-in{from{opacity:0;transform:translateY(14px) scale(.985)}}
.dialog-close{position:absolute;top:16px;right:16px;width:44px;height:44px;border-radius:50%;border:0;background:var(--close-bg);color:var(--close-ink);display:grid;place-items:center;line-height:0;z-index:4;box-shadow:0 1px 0 rgba(255,255,255,.6) inset,0 6px 18px -8px rgba(194,69,59,.45);transition:transform .45s var(--ease-out),background .3s,color .3s,box-shadow .3s}
.dialog-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.dialog-close:hover{transform:rotate(90deg);background:var(--close-ink);color:#fff;box-shadow:0 8px 22px -8px rgba(194,69,59,.7)}
.dialog-close:focus-visible{outline:2px solid var(--close-ink);outline-offset:3px}

.gallery{--gpad:clamp(28px,4vw,56px);width:min(1320px,96vw);max-height:94vh;border-radius:14px;overflow:auto;padding:0 var(--gpad) var(--gpad)}
/* pinned header: tightens once the work scrolls under it, with a soft fade below */
.gallery-head{position:sticky;top:0;z-index:3;display:grid;grid-template-columns:1fr;gap:10px;margin:0 calc(-1 * var(--gpad)) 28px;padding:var(--gpad) var(--gpad) 0;background:var(--paper);transition:padding .45s var(--ease-out)}
.gallery-head::after{content:"";position:absolute;left:0;right:0;top:100%;height:36px;background:linear-gradient(rgba(248,247,242,.72),rgba(248,247,242,.42) 35%,rgba(248,247,242,.14) 70%,rgba(248,247,242,0));opacity:0;pointer-events:none;}
.gallery-head.is-stuck{box-shadow:0 1px 0 var(--rule)}
.gallery-head .dialog-close{top:calc(var(--gpad) - 10px);right:calc(var(--gpad) - 10px);transition:transform .45s var(--ease-out),background .3s,color .3s,box-shadow .3s,top .45s var(--ease-out)}
.gallery-head .eyebrow{max-height:30px;overflow:hidden;transition:max-height .45s var(--ease-out),opacity .3s}
.gallery-head .section-title{font-size:clamp(40px,4.6vw,72px);transform-origin:0 50%;transition:font-size .45s var(--ease-out)}
.gallery-filters{margin-top:8px;border-top:1px solid var(--rule);padding:18px 0 16px}
.gallery-head.is-stuck{padding-top:18px}
.gallery-head.is-stuck::after{opacity:1}
.gallery-head.is-stuck .eyebrow{max-height:0;opacity:0}
.gallery-head.is-stuck .section-title{font-size:clamp(30px,2.6vw,40px)}
.gallery-head.is-stuck .dialog-close{top:14px}
.gallery-head.is-stuck .gallery-filters{margin-top:0;padding-top:12px}

.detail{width:min(1080px,94vw);max-height:92vh;border-radius:12px;overflow:auto}
.detail-grid{display:grid;grid-template-columns:1.15fr .85fr;min-height:540px}
.detail-media{position:relative;background:var(--plate);border-right:1px solid var(--rule);min-height:420px}
.detail-frame{position:absolute;inset:0}
.detail-info{padding:48px 44px 36px;display:flex;flex-direction:column}
.detail-tags{display:flex;gap:4px;flex-wrap:wrap}
.detail-title{font:400 clamp(36px,3.6vw,58px)/1 var(--serif);letter-spacing:-.02em;margin:16px 0 26px}
.detail-meta{display:grid;grid-template-columns:1fr 1fr;gap:16px 20px;border-top:1px solid var(--rule);padding-top:18px}
.detail-meta dt{color:var(--grey)}
.detail-meta dd{font-size:14px;margin-top:4px}
.detail-summary{margin-top:26px;color:var(--text-2);line-height:1.7;font-size:15px}
.detail-note{color:var(--grey);margin-top:18px}
.detail-nav{margin-top:auto;padding-top:30px;display:flex;justify-content:space-between;gap:12px}
.detail-step{display:inline-flex;align-items:center;gap:8px;padding:8px 0;font:500 13px var(--sans);color:var(--ink);transition:color .3s}
.detail-step:hover{color:var(--teal)}
.detail-step:disabled{opacity:.3;cursor:default;color:var(--ink)}

/* ---------- responsive ---------- */
@media(max-width:1100px){
  .hero-grid{grid-template-columns:minmax(0,1fr) minmax(0,.9fr)}
  .portrait{height:clamp(480px,70vh,700px)}
  .hero-title{font-size:clamp(52px,8vw,96px)}
  .hero-note{right:calc(50% + 166px);bottom:64%}
  .hero-note-text{font-size:22px}
  .hero-note-arrow{width:70px}
  .service{padding:22px 20px 28px}
  .about-grid{grid-template-columns:1.1fr .9fr}
  .contact-grid{grid-template-columns:1fr;gap:28px}
  .contact-scene{justify-self:start;max-width:380px}
}
@media(max-width:820px){
  .header{height:80px;gap:20px}
  .wordmark-logo{height:calc(32px * var(--logo-scale,1))}
  .header-note{display:none}
  .nav{gap:20px;font-size:12.5px}
  .hero{min-height:0}
  .hero-grid{grid-template-columns:1fr;gap:0}
  .hero-copy{padding:44px 0 8px}
  .hero-title{font-size:clamp(48px,13vw,84px)}
  .hero-intro{font-size:15px}
  .portrait{justify-self:center;width:min(88%,460px);height:clamp(380px,62vh,560px);margin-top:8px}
  .portrait-caption{right:-18px}
  .hero-note{right:calc(50% + 78px);bottom:80%;transform:rotate(-7deg)}
  .hero-note-text{font-size:18px;line-height:1.15}
  .hero-note-line{display:block;text-align:center}   /* two centred lines on phones, clear of the screen edge */
  .hero-note-arrow{width:50px}
  .section{padding-top:64px;padding-bottom:64px}
  .section-head{grid-template-columns:1fr;gap:16px;margin-bottom:28px}
  .section-head .lede{padding-bottom:0}
  .work-hint{margin-left:0;width:100%}
  .reel{--card-w:min(58vw,230px);border-left:0;border-right:0;border-radius:0;margin:0 calc(var(--gutter) * -1);max-width:none;padding-top:20px}
  .reel-foot{flex-direction:column;align-items:stretch;padding:22px var(--gutter) 0}
  .reel-controls{justify-content:space-between}
  .service-grid{grid-template-columns:1fr}
  .service+.service{border-left:0;border-top:1px solid var(--rule)}
  .service-figure{max-width:320px}
  .about-grid{grid-template-columns:1fr;gap:32px}
  .about-side{padding-top:0;grid-template-columns:minmax(0,220px) 1fr;align-items:start}
  .about-facts div{grid-template-columns:1fr;gap:4px}
  .contact-actions{margin-top:32px;gap:18px}
  .contact-scene{max-width:320px;justify-self:center}
  .badge{width:min(300px,76vw)}
  .badge-arrow{font-size:36px}
  .footer{display:grid;grid-template-columns:auto 1fr;column-gap:16px;align-items:end}
  .footer>.footer-top,.footer>.footer-bottom{margin-inline:0}   /* not centred in their columns: the right one sits flush on the right edge */
  .footer-bottom{justify-self:end}
  .footer-top{gap:20px;flex-direction:column;align-items:flex-start}
  .social{margin-left:0}
  .footer-bottom{margin-top:0;gap:14px;flex-direction:column;align-items:flex-end;justify-content:flex-end}
  .signature{order:0;display:flex;justify-content:flex-end}
  .signature-svg{height:48px}
  .footer-bottom .back-to-top{margin-left:0;order:1}
  .gallery{--gpad:20px;width:100vw;max-width:100vw;max-height:94vh;margin:auto 0 0;border-radius:14px 14px 0 0;border-left:0;border-right:0;padding:0 20px 32px}
  .gallery-head{padding-top:24px;gap:8px}
  .gallery-head .dialog-close{top:16px;right:16px}
  .work-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:190px;gap:12px}
  .tile-wide,.tile-xl{grid-column:span 2}
  .detail{width:100vw;max-width:100vw;max-height:94vh;margin:auto 0 0;border-radius:14px 14px 0 0;border-left:0;border-right:0}
  .detail-grid{grid-template-columns:1fr;min-height:0}
  .detail-media{min-height:0;aspect-ratio:4/3;border-right:0;border-bottom:1px solid var(--rule)}
  .detail-info{padding:28px 22px 24px}
  .detail-title{font-size:clamp(32px,9vw,44px)}
}
@media(max-width:520px){
  .hero-actions .btn{width:100%;justify-content:center}
  .about-side{grid-template-columns:1fr}
  .about-portrait{max-width:220px}
  .contact-actions{flex-direction:column;align-items:stretch}
  .contact-actions .btn{justify-content:center}
  .nav{gap:14px;font-size:12px}
  .filter{padding:8px 12px;font-size:12px}
  .work-grid{grid-template-columns:1fr;grid-auto-rows:200px}
  .tile-wide,.tile-xl{grid-column:span 1}
  .tile-xl{grid-row:span 2}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
  html.js [data-reveal]{opacity:1;transform:none}
  .aurora-drift{animation:none}
  .tile-open:hover .media-inner{transform:none}
}

/* ---------- showreel (replaces the reel carousel in the work section) ---------- */
.showreel{position:relative;aspect-ratio:16/9;cursor:pointer;border:1px solid var(--rule);border-radius:14px;overflow:hidden;background:#F4F1DF;box-shadow:0 30px 80px rgba(37,42,51,.08)}
.showreel-video{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover;background:#F4F1DF;transition:opacity .5s var(--ease)}
/* the play button: centred across the frame, in the empty band under the title */
.showreel-play{position:absolute;z-index:3;left:50%;top:62%;width:clamp(64px,8.5vw,128px);aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);transition:transform .6s var(--ease-out),opacity .35s var(--ease)}
.showreel-play img{width:100%;height:100%}
.showreel-play::before{content:'';position:absolute;inset:-12%;border-radius:50%;border:1px solid #BB3133;opacity:0;animation:showreel-pulse 2.6s var(--ease-out) infinite}
.showreel-play:hover{transform:translate(-50%,-50%) scale(1.08)}
.showreel.is-playing .showreel-play{opacity:0;pointer-events:none;transform:translate(-50%,-50%) scale(.85)}
@keyframes showreel-pulse{0%{transform:scale(.9);opacity:.55}100%{transform:scale(1.35);opacity:0}}

/* ---------- project links (GitHub etc.) ---------- */
.repo-link{display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:9px 16px 9px 13px;border:1px solid var(--ink);border-radius:999px;background:var(--ink);color:var(--paper);transition:background .3s var(--ease),border-color .3s var(--ease),transform .4s var(--ease-out)}
.repo-link:hover{background:var(--teal);border-color:var(--teal);transform:translateY(-1px)}
.repo-icon svg{width:14px;height:14px}
.repo-link .arrow{color:inherit;transition:transform .3s var(--ease-out)}
.repo-link:hover .arrow{transform:translate(2px,-2px)}
.detail-summary .repo-link{display:flex;width:max-content;margin-top:20px}

@media (prefers-reduced-motion:reduce){.showreel-play::before{animation:none}}
@media (prefers-reduced-motion:reduce){.showreel-play::before{animation:none}}
.showreel-play:focus-visible{outline-offset:6px;border-radius:50%}

/* ---------- gallery layouts: portrait 3 per row (social), landscape 2 per row (the rest); app.js picks one per category ---------- */
.gallery-grid[class*=layout-]{grid-auto-rows:auto}
.gallery-grid[class*=layout-] .tile{grid-column:auto;grid-row:auto}
.gallery-grid[class*=layout-] .tile-open{flex:none;aspect-ratio:16/9}
.gallery-grid.lay-portrait{grid-template-columns:repeat(3,minmax(0,1fr))}
.gallery-grid.lay-portrait .tile-open{aspect-ratio:4/5}
.gallery-grid.lay-landscape{grid-template-columns:repeat(2,minmax(0,1fr))}
/* show the whole piece, so brand names are never cropped */
.gallery-grid .media-inner img{object-fit:contain}
.video-badge{position:absolute;left:18px;bottom:18px;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:rgba(248,247,242,.92);color:var(--ink);box-shadow:0 10px 30px rgba(0,0,0,.25);transition:transform .5s var(--ease-out)}
.video-badge .icon svg{width:22px;height:22px;margin-left:3px}
.tile-open:hover .video-badge{transform:scale(1.08)}

/* ---------- detail panel with an image set: info across the top, a horizontal carousel below ---------- */
.detail.has-set{width:min(1480px,97vw)}
.detail.has-set .detail-grid{grid-template-columns:minmax(0,1fr);min-height:0}
.detail.has-set .detail-media{order:2;min-width:0;min-height:0;border:0;background:none;padding:22px 0 30px;display:flex;flex-direction:column;gap:26px}
.detail.has-set .detail-info{order:1;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:56px;padding:28px 44px 22px;border-bottom:1px solid var(--rule)}
.detail.has-set .detail-tags,.detail.has-set .detail-title{grid-column:1}
.detail.has-set .detail-title{margin:10px 0 0;font-size:clamp(30px,2.6vw,42px)}
.detail.has-set .detail-meta{grid-column:2;grid-row:1/3;align-self:end}
.detail.has-set .detail-summary{grid-column:1;margin-top:10px;font-size:14px;line-height:1.6}
.detail.has-set .detail-note{grid-column:2}
.detail.has-set .detail-nav{grid-column:2;align-self:end;padding-top:12px}
.detail.has-set .detail-meta{padding-top:12px}
.shot-wrap{min-width:0}
.shot-strip{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0 44px;padding:0 44px 6px;cursor:grab;scrollbar-width:none;overscroll-behavior-x:contain}
.shot-strip::-webkit-scrollbar{display:none}
.shot-strip.is-dragging{cursor:grabbing;scroll-snap-type:none;user-select:none}
.shot-strip .detail-shot{flex:0 0 auto;height:clamp(320px,56vh,600px);cursor:zoom-in;width:auto;max-width:none;border-radius:8px;scroll-snap-align:start;background:var(--plate-2);box-shadow:0 18px 50px rgba(37,42,51,.12)}
.shot-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 44px 0}
.shot-label{color:var(--ink)}
.shot-controls{display:flex;align-items:center;gap:10px}
.shot-controls .reel-btn{width:34px;height:34px}
.shot-count{color:var(--grey);min-width:64px;text-align:center}
@media(max-width:820px){
  .gallery-grid.lay-portrait{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gallery-grid.lay-landscape{grid-template-columns:1fr}
  .detail.has-set{width:100vw}
  .detail.has-set .detail-media{aspect-ratio:auto}
  .detail.has-set .detail-info{grid-template-columns:1fr;padding:60px 20px 16px}
  .detail.has-set .detail-meta,.detail.has-set .detail-summary,.detail.has-set .detail-note,.detail.has-set .detail-nav{grid-column:1;grid-row:auto}
  .detail.has-set .detail-meta{margin-top:20px}
  .shot-strip{padding:0 20px 6px;scroll-padding:0 20px;gap:10px}
  /* each slide at its own shape: a landscape one runs the width of the screen, a portrait one fits the height; never letterboxed in a box */
  .shot-strip{align-items:flex-start}
  .shot-strip .detail-shot{height:auto;width:auto;max-width:88vw;max-height:clamp(260px,52vh,460px);object-fit:initial;background:none}
  .shot-bar{padding:10px 20px 0}
  .showreel-play{width:clamp(52px,14vw,72px)}
}

/* the desktop showreel file sits under the poster; the poster fades once playback has started */
.showreel-file{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#F4F1DF}
.showreel.has-started .showreel-video{opacity:0;pointer-events:none}
.showreel:fullscreen{border-radius:0;border:0;background:#000}
.showreel:fullscreen .showreel-file{object-fit:contain;background:#000}
/* showreel control bar: appears once playback has started (on hover with a mouse) */
.showreel-bar{position:absolute;z-index:3;left:0;right:0;bottom:0;display:flex;align-items:center;gap:18px;padding:28px 22px 16px;background:linear-gradient(180deg,transparent,rgba(11,11,13,.55));opacity:0;transform:translateY(6px);transition:opacity .35s var(--ease),transform .5s var(--ease-out);pointer-events:none;cursor:default}
.showreel.has-started .showreel-bar{pointer-events:auto}
.showreel.has-started:not(.is-playing) .showreel-bar,.showreel.has-started:hover .showreel-bar,.showreel.has-started:focus-within .showreel-bar{opacity:1;transform:none}
.showreel-track{position:relative;flex:1;height:18px;cursor:pointer;display:flex;align-items:center}
.showreel-track::before{content:'';position:absolute;left:0;right:0;height:3px;border-radius:2px;background:rgba(255,255,255,.3)}
.showreel-fill{position:absolute;left:0;right:0;height:3px;border-radius:2px;background:#fff;transform-origin:0 50%;transform:scaleX(0)}
.showreel-ctls{display:flex;gap:8px}
.showreel-ctl{color:#fff;padding:6px 10px;border:1px solid rgba(255,255,255,.4);border-radius:999px;background:rgba(11,11,13,.25);transition:background .3s var(--ease)}
.showreel-ctl:hover{background:rgba(11,11,13,.6)}
.showreel-bar[hidden]{display:none}

/* YouTube player (swapped in on play) */
.yt{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000;z-index:4}
video.yt{object-fit:contain}
.video-play{cursor:pointer;width:72px;height:72px;left:50%;top:50%;bottom:auto;transform:translate(-50%,-50%)}
.video-play:hover{transform:translate(-50%,-50%) scale(1.08)}
.video-play .icon svg{width:28px;height:28px}
.shot-label{max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- full view (lightbox) ---------- */
.lightbox{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:rgba(14,15,18,.96);color:#F3F1EC;overflow:hidden;touch-action:none;display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto;cursor:auto}
.lightbox:not([open]){display:none}
.lightbox::backdrop{background:rgba(14,15,18,.6)}
.lb-top{grid-column:1/-1;display:flex;align-items:center;gap:24px;padding:18px 24px 10px 32px}
.lb-meta{display:flex;align-items:baseline;gap:14px;flex:1;min-width:0}
.lb-title{color:#F3F1EC}
.lb-label{color:rgba(243,241,236,.55);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-count{color:rgba(243,241,236,.7)}
.lb-close{position:static}
.lb-stage{grid-column:2;grid-row:2;display:grid;place-items:center;min-height:0;overflow:hidden;padding:8px 0;touch-action:none}
.lb-img{max-width:100%;max-height:calc(100dvh - 200px);width:auto;height:auto;object-fit:contain;border-radius:6px;box-shadow:0 30px 90px rgba(0,0,0,.5);user-select:none}
.lb-nav{grid-row:2;align-self:center;width:56px;height:56px;margin:0 20px;border-radius:50%;border:1px solid rgba(243,241,236,.3);color:#F3F1EC;font-size:20px;display:grid;place-items:center;transition:background .3s var(--ease),opacity .3s}
.lb-nav:hover{background:rgba(243,241,236,.12)}
.lb-nav:disabled{opacity:.25;cursor:default}
.lb-prev{grid-column:1}.lb-next{grid-column:3}
.lb-thumbs{grid-column:1/-1;display:flex;gap:8px;justify-content:safe center;overflow-x:auto;padding:12px 24px 20px;scrollbar-width:none}
.lb-thumbs::-webkit-scrollbar{display:none}
.lb-thumb{flex:0 0 auto;height:64px;border-radius:4px;overflow:hidden;opacity:.45;outline:1px solid transparent;transition:opacity .3s var(--ease),outline-color .3s}
.lb-thumb img{height:100%;width:auto}
.lb-thumb:hover{opacity:.8}
.lb-thumb.is-on{opacity:1;outline-color:#F3F1EC}
@media(max-width:820px){
  .lightbox{grid-template-columns:minmax(0,1fr)}
  .lb-top{padding:14px 14px 6px 18px;gap:12px}
  .lb-meta{flex-direction:column;gap:2px}
  .lb-stage{grid-column:1;padding:6px 10px}
  .lb-nav{display:none}
  .lb-thumb{height:48px}
  .lb-img{max-height:calc(100dvh - 160px)}
}

/* phones: the vertical (9:16) edit, play button in the gap between the title and the portrait */
.showreel.is-vertical{aspect-ratio:9/16;width:min(100%,calc(86svh * 9 / 16));margin:0 auto}
.showreel.is-vertical .showreel-play{left:50%;top:49.5%}   /* the clear band between SHOWREEL and Dalí */

/* video projects (Tools & Development): the video runs the full width on top, the details sit below */
.detail.is-video{width:min(1240px,95vw)}
.detail.is-video .detail-grid{grid-template-columns:minmax(0,1fr);min-height:0}
.detail.is-video .detail-media{aspect-ratio:16/9;max-height:62vh;width:100%;min-height:0;border-right:0;border-bottom:1px solid var(--rule);background:#0E0F12}   /* leaves room for the details on short screens */
.detail.is-video .detail-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#0E0F12}
.detail.is-video .detail-info{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:56px;padding:30px 44px 26px}
.detail.is-video .detail-tags,.detail.is-video .detail-title,.detail.is-video .detail-summary{grid-column:1}
.detail.is-video .detail-title{margin:12px 0 0;font-size:clamp(32px,3vw,46px)}
.detail.is-video .detail-meta{grid-column:2;grid-row:1/4;align-self:start;margin-top:4px}
.detail.is-video .detail-summary{margin-top:14px}
.detail.is-video .detail-nav{grid-column:1/-1;padding-top:22px}
.detail.is-video .dialog-close{background:rgba(247,217,213,.92);backdrop-filter:blur(6px)}
@media(max-width:820px){
  .detail.is-video{width:100vw}   /* phones: the video panel runs edge to edge like the others */
  .detail.is-video .detail-info{grid-template-columns:1fr;padding:24px 22px}
  .tile-arrow{width:30px;height:30px}
  .tile-arrow .arrow{font-size:13px}
  .detail.is-video .detail-meta{grid-column:1;grid-row:auto;margin-top:18px}
}

/* project panel with carousels: the header stays pinned on top while the rows scroll, tightening once stuck */
.detail.has-set .detail-info{position:sticky;top:0;z-index:3;background:var(--paper);padding-right:104px;transition:padding .45s var(--ease-out),margin-bottom .45s var(--ease-out)}
.detail{overflow-anchor:none}
.detail-info.is-measuring,.detail-info.is-measuring *{transition:none!important}
.detail.has-set .detail-info::after{content:"";position:absolute;left:0;right:0;top:100%;height:30px;background:linear-gradient(rgba(248,247,242,.7),rgba(248,247,242,.35) 40%,rgba(248,247,242,0));opacity:0;pointer-events:none;transition:opacity .5s var(--ease)}
.detail.has-set .detail-info .dialog-close{top:22px;right:28px}
.detail.has-set .detail-title{transition:font-size .45s var(--ease-out)}
.detail.has-set .detail-summary{max-height:120px;overflow:hidden;transition:max-height .45s var(--ease-out),opacity .3s,margin .45s var(--ease-out)}
.detail.has-set .detail-info.is-stuck{padding-top:16px;padding-bottom:14px}
.detail.has-set .detail-info.is-stuck::after{opacity:1}
.detail.has-set .detail-info.is-stuck .detail-title{font-size:clamp(24px,2vw,30px)}
.detail.has-set .detail-info.is-stuck .detail-summary{max-height:0;opacity:0;margin-top:0}
.detail.has-set .detail-info.is-stuck .dialog-close{top:12px}
@media(max-width:820px){
  .detail.has-set .detail-info{padding-right:72px}
  .detail.has-set .detail-info .dialog-close{top:16px;right:16px}
  .detail.has-set .detail-info.is-stuck .detail-tags,.detail.has-set .detail-info.is-stuck .detail-meta{display:none}   /* phones: only title + prev/next stay pinned */
  .detail.has-set .detail-info.is-stuck .detail-nav{padding-top:8px}
}

/* panels open with focus on their title (not the close button), so no focus ring shows on open */
#gallery-title:focus,#detail-title:focus{outline:none}

/* touch screens: every arrow and round button is at least 44px to tap */
@media (pointer:coarse){
  .reel-btn,.shot-controls .reel-btn{width:48px;height:48px;font-size:21px;line-height:1}
  .reel-btn span{font-size:21px;line-height:1}
  .tile-arrow{width:44px;height:44px}
  .tile-arrow .arrow{font-size:19px;line-height:1}
  .detail-step{min-height:48px;padding:10px 4px;font-size:15px;gap:10px}
  .detail-step>span[aria-hidden]{font-size:21px;line-height:1}
  .service-arrow{width:48px;height:48px}
  .dialog-close{min-width:44px;min-height:44px}
  .btn .arrow{font-size:18px}
}

/* the blocks that ride the scroll on springs (app.js) move on their own layers, so the page
   is shifted by the GPU each frame instead of being repainted */
@media (hover:hover) and (pointer:fine){.hero-grid,.section-head,.showreel,.service,.contact-grid,.footer-top,.footer-bottom{will-change:translate}}   /* desktop only: phones scroll natively, without the springs */

/* phones: panels that keep still while you scroll them */
@media(max-width:820px){
  /* project panel: the details scroll away with the work; only the close button stays pinned */
  .detail.has-set .detail-info{position:relative}
  .detail-closebar{position:sticky;top:0;height:0;z-index:6}
  .detail-closebar .dialog-close{position:absolute;top:14px;right:14px}
  /* gallery: one compact pinned header that never changes size, the filters in a single swipeable row */
  .gallery-head,.gallery-head.is-stuck{padding-top:16px;gap:4px;box-shadow:0 1px 0 var(--rule);transition:none}
  .gallery-head::after,.gallery-head.is-stuck::after{opacity:1}
  .gallery-head .section-title,.gallery-head.is-stuck .section-title{font-size:32px;transition:none}
  .gallery-head .dialog-close,.gallery-head.is-stuck .dialog-close{top:10px;right:12px;transition:none}
  .gallery-filters,.gallery-head.is-stuck .gallery-filters{margin:0 calc(-1 * var(--gpad));padding:8px var(--gpad) 12px;border-top:0;display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
  .gallery-filters::-webkit-scrollbar{display:none}
  .gallery-filters>*{flex:0 0 auto;white-space:nowrap}
}

/* arrow icons (app.js draws every arrow glyph as this line icon) */
.ai{display:inline-block;width:1.05em;height:1.05em;vertical-align:-.17em;line-height:0;flex:none}
.ai svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;overflow:visible}
/* inside a round button the icon is centred as a box (no text baseline to sit on), so it is
   exactly in the middle of the circle */
.tile-arrow .arrow,.reel-btn>span,.lb-nav>span,.badge-arrow{display:grid;place-items:center;line-height:0;transform:none}
.tile-arrow .ai,.reel-btn .ai,.lb-nav .ai,.badge-arrow .ai{display:block;vertical-align:0}
/* the arrow on a card isn't a separate button (the whole card opens), so it is shown filled,
   to stand out; hovering the card deepens it */
.tile-arrow{background:var(--accent);border-color:var(--accent);color:#fff}
.tile:hover .tile-arrow,.service:hover .service-arrow,.service:focus-visible .service-arrow{background:var(--accent-hover);border-color:var(--accent-hover);color:#fff}
.tile:hover .tile-arrow .arrow{transform:none}
@media (pointer:coarse){.ai svg{stroke-width:2.4}}

/* audit fixes */
/* the spinning ring's corners must never widen the page on a phone */
.contact{overflow-x:clip}
/* a video's play button sits in the corner, clear of the title in its poster */
.video-play{left:24px;top:auto;bottom:24px;transform:none}
.video-play:hover{transform:scale(1.08)}
@media(max-width:820px){
  .video-play{left:16px;bottom:16px;width:60px;height:60px}
  /* the filter row fades at the right edge, a hint that it swipes */
  .gallery-filters{-webkit-mask-image:linear-gradient(90deg,#000 82%,transparent);mask-image:linear-gradient(90deg,#000 82%,transparent)}
}
/* touch screens: every link and button is at least 44px tall to tap */
@media (pointer:coarse){
  .back-to-top,.service-link,.showreel-ctl{display:inline-flex;align-items:center;min-height:44px}
  .showreel-ctl{padding:0 10px}
  .filter{min-height:44px;display:inline-flex;align-items:center}
  /* the small category chips keep their look but get an invisible 44px-tall tap area */
  .tag{position:relative}
  .tag::after{content:"";position:absolute;left:-4px;right:-4px;top:50%;height:44px;transform:translateY(-50%)}
}
/* two tiles side by side on a phone: a slightly smaller arrow leaves room for a full name on a line */
@media(max-width:520px){
  .gallery .tile-arrow{width:36px;height:36px}
  .gallery .tile-arrow .arrow{font-size:16px}
  .gallery .tile-title{font-size:13.5px}
}

/* ---------- "Say hello" choice ---------- */
.mail-dialog{width:min(440px,92vw);border-radius:18px;padding:34px 30px 28px;overflow:visible;box-shadow:0 40px 90px -30px rgba(18,53,50,.45)}
.mail-dialog .dialog-close{top:14px;right:14px}
#mail-title:focus{outline:none}
.mail-title{font:400 clamp(34px,4vw,44px)/1 var(--serif);letter-spacing:-.02em;margin:0;padding-right:52px}
.mail-lede{margin:12px 0 22px;color:var(--text-2);font-size:15px;line-height:1.55}
.mail-lede strong{color:var(--ink);font-weight:500}
.mail-opts{display:grid;gap:8px}
.mail-opt{display:flex;align-items:center;gap:14px;width:100%;min-height:56px;padding:10px 16px 10px 12px;border:1px solid var(--rule);border-radius:12px;background:#FCFBF8;color:var(--ink);font:500 15px/1.2 var(--sans);text-align:left;cursor:pointer;transition:border-color .3s var(--ease),background .3s var(--ease),transform .3s var(--ease-out)}
.mail-opt:hover,.mail-opt:focus-visible{border-color:var(--accent);background:#fff;transform:translateY(-1px)}
.mail-opt:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.mail-opt-label{flex:1}
.mail-opt-go{color:var(--accent);font-size:17px;line-height:0;transition:transform .3s var(--ease-out)}
.mail-opt:hover .mail-opt-go{transform:translate(2px,-1px)}
.mail-ico{flex:none;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#EEF2EE;color:var(--teal-deep)}
.mail-ico svg{width:19px;height:19px}
.mail-letter{font:600 15px/1 var(--sans)}
.mail-opt.is-done{border-color:var(--teal);background:#EEF6F4}
.mail-opt.is-done .mail-ico{background:var(--teal);color:#fff}
/* phones: a bottom sheet, like the other panels */
@media(max-width:820px){
  .mail-dialog{width:100vw;max-width:100vw;margin:auto 0 0;border-radius:18px 18px 0 0;border-left:0;border-right:0;border-bottom:0;padding:30px 20px calc(24px + env(safe-area-inset-bottom))}
}

/* ---------- "What I do" with more or fewer than three cards (content.js → services) ---------- */
.service-grid[data-n="1"]{grid-template-columns:minmax(0,1fr)}
.service-grid[data-n="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.service-grid[data-n="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}
.service-grid:not([data-n="3"]) .service+.service{border-left:0}
.service-grid:not([data-n="3"]) .service{box-shadow:-1px 0 0 var(--rule),0 -1px 0 var(--rule)}   /* lines between cards on every row; the frame clips the outer ones */
.service-image img{display:block;width:100%;aspect-ratio:5/4;object-fit:cover;border-radius:8px}
@media(max-width:1100px){.service-grid[data-n="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.service-grid[data-n]{grid-template-columns:1fr}}

/* ---------- added sections (content.js → layout.blocks) ---------- */
.block-copy{display:flex;flex-direction:column;align-items:flex-start;gap:28px}
.block-body{display:grid;gap:14px}
.block.is-text .section-head{margin-bottom:0}
.block.is-text .block-copy{padding-bottom:10px}
.block-figure{margin:0}
.block-figure img{display:block;width:100%;height:auto;border-radius:12px;border:1px solid var(--rule);background:var(--plate-2)}
.block-figure.is-empty{display:none}
.block-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,5vw,88px);align-items:center}
.block-split.side-right .block-figure{order:2}
.block-split .section-title{font-size:clamp(38px,4.2vw,68px);margin-top:12px}
.block-split .block-copy{margin-top:26px;font-size:clamp(15px,1.15vw,17px);line-height:1.65;color:var(--text-2);max-width:540px}
.block-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.block-cards[data-n="1"]{grid-template-columns:minmax(0,1fr)}
.block-cards[data-n="2"],.block-cards[data-n="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.block-card{border:1px solid var(--rule);border-radius:12px;padding:22px 24px 28px;background:rgba(255,255,255,.35);min-width:0}
.block-card .block-figure{margin-bottom:20px}
.block-card .block-figure img{aspect-ratio:4/3;object-fit:cover;border-radius:8px}
.block-card-title{font:400 clamp(28px,2.4vw,38px)/1.05 var(--serif);letter-spacing:-.02em}
.block-card-text{margin-top:12px;color:var(--text-2);font-size:15px;line-height:1.6}
.block-foot{display:flex;justify-content:center;margin-top:36px}
@media(max-width:820px){
  .block-split{grid-template-columns:1fr;gap:28px}
  .block-split.side-right .block-figure{order:0}
  .block-cards,.block-cards[data-n]{grid-template-columns:1fr}
  .block.is-text .block-copy{padding-bottom:0}
}

/* a replaced hero portrait (content.js → layout.portrait): the whole picture, standing on the baseline */
.portrait.is-custom .portrait-base{left:0;top:0;width:100%;height:100%;object-fit:contain;object-position:50% 100%}

/* coloured words (Studio: select words, pick a colour). Palette colours follow Page → Colours and the
   dark Contact section's own palette; a picked colour stays as it is */
.c-teal{color:var(--teal)}
.c-accent{color:var(--accent-ink)}
.c-ink{color:var(--ink)}
.c-grey{color:var(--grey)}
.c-text{color:var(--text-2)}
.contact .c-accent,.footer .c-accent{color:var(--accent)}   /* brighter orange on the deep teal */
