/* =========================================================
   CLAUDIO ALUZZI — Portfolio
   Minimal gallery aesthetic · monochrome · paper-toned
   ========================================================= */

:root {
  --paper:   #F5F3EE;   /* warm off-white background        */
  --paper-2: #EEEBE3;   /* slightly deeper panel            */
  --ink:     #1B1B1A;   /* charcoal text                    */
  --muted:   #74706A;   /* secondary text                   */
  --line:    #DAD5CB;   /* hairlines / borders              */

  --serif: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* display: expanded width */
  --sans:  "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* body */

  --page-max: 1240px;
  --gutter: clamp(24px, 5.5vw, 72px);

  /* motion tokens (unified rhythm — ui-ux-pro-max §7) */
  --dur-fast: 180ms;
  --dur: 460ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* Emil Kowalski's strong ease-out */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* strong ease-in-out for on-screen movement */
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* vertical only — never zero out the horizontal gutter that .wrap provides on the same element */
.section { padding-top: clamp(52px, 7.5vw, 112px); padding-bottom: clamp(52px, 7.5vw, 112px); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; font-stretch: 118%; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 8vw, 6rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 4.5vw, 3.4rem); line-height: 1.08; }
h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.15; }
p  { margin: 0 0 1.2em; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.55; color: #2B2B29; }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand {
  font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 600;
  display: inline-flex; align-items: center;
}
.brand__logo {
  height: 34px; width: auto; display: block;
  mix-blend-mode: multiply;
}
@media (max-width: 620px) { .brand__logo { height: 30px; } }

/* full-bleed hero image */
.hero-media { margin: 0; }
.hero-media img, .hero-media .ph { width: 100%; display: block; }
.hero-media--tall { max-height: 86vh; overflow: hidden; }
.hero-media--tall img { width: 100%; height: 86vh; object-fit: cover; object-position: center 30%; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); align-items: center; }
.nav__links a {
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  transition: color .2s ease; position: relative; padding: 4px 0;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-out);
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 11vh, 120px) 0 clamp(40px, 7vh, 84px); overflow-x: clip; }
.hero h1 { margin-bottom: 0.35em; }
.hero .lede { max-width: 680px; }

/* hero with a ghosted looping video behind the text (e.g. Sketchbook) */
.hero--media { position: relative; overflow: hidden; min-height: min(72vh, 620px); display: flex; align-items: center; }
.hero--media .wrap { position: relative; z-index: 2; width: 100%; }
.hero__media { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .76; filter: grayscale(1) contrast(1.05); }
.hero__scrim { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--paper) 0%, rgba(245,243,238,.72) 24%, rgba(245,243,238,.3) 54%, rgba(245,243,238,.05) 100%),
    linear-gradient(0deg, var(--paper) 0%, rgba(245,243,238,0) 20%, rgba(245,243,238,0) 78%, var(--paper) 100%);
}
@media (max-width: 640px) {
  .hero--media { min-height: 50vh; padding-bottom: clamp(40px, 12vw, 80px); }
  .hero__video { opacity: .62; }
  .hero__scrim { background:
    linear-gradient(0deg, var(--paper) 0%, rgba(245,243,238,.5) 42%, rgba(245,243,238,.34) 100%); }
}
.hero__meta { margin-top: 2.4em; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
/* intro: bio left, handwritten statement right */
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.hero__hand { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; gap: clamp(26px, 6vh, 52px); }
  .hero__aside { max-width: 440px; }
}

/* name shown as the wordmark logo instead of type */
.hero__logo { margin: 0 0 0.15em; line-height: 1; }
.hero__logo img { width: min(600px, 84%); height: auto; display: block; mix-blend-mode: multiply; }
@media (max-width: 620px) { .hero__logo img { width: 92%; } }

/* ---------- buttons / links ---------- */
.link-underline {
  display: inline-block; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: 3px; color: var(--ink);
  transition: opacity .2s ease;
}
.link-underline:hover { opacity: 0.55; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  background: var(--ink); color: var(--paper);
  padding: 13px 24px; border-radius: 999px;
  transition: transform var(--dur-fast) var(--ease-out), background .2s ease;
}
.btn-primary:hover { background: #000; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.arrow-link {
  font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2.1rem); display: inline-flex; align-items: baseline; gap: 0.4em;
}
.arrow-link .arw { font-size: 0.8em; transition: transform .25s ease; }
.arrow-link:hover .arw { transform: translateX(6px); }

/* ---------- work index cards (home) ---------- */
.works { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.works--3 { grid-template-columns: repeat(3, 1fr); }
.work-card { display: block; }
.work-card .ph { margin-bottom: 18px; transition: transform var(--dur) var(--ease-out); }
.work-card .ph img { transition: transform 600ms var(--ease-out); }
.work-card:hover .ph { transform: translateY(-6px); }
.work-card:hover .ph img { transform: scale(1.05); }
.work-card__title { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 4px; }
.work-card__meta { color: var(--muted); font-size: 14px; letter-spacing: 0.02em; }

/* work hub — three category cards */
.work-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3.5vw, 44px); }
.work-cat { display: block; }
.work-cat .ph { margin-bottom: 18px; overflow: hidden; transition: transform var(--dur) var(--ease-out); }
.work-cat .ph img { transition: transform 600ms var(--ease-out); }
.work-cat:hover .ph { transform: translateY(-6px); }
.work-cat:hover .ph img { transform: scale(1.05); }
.work-cat__title { font-family: var(--serif); font-stretch: 118%; font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; margin-bottom: 4px; }
.work-cat__meta { color: var(--muted); font-size: 14px; letter-spacing: 0.02em; }
@media (max-width: 860px) { .work-cats { grid-template-columns: 1fr; gap: clamp(30px, 9vw, 48px); } }

/* ---------- image placeholders ---------- */
/* Real images: replace <div class="ph"> with <img> using the same aspect wrapper,
   or drop files named to match into /images and I'll wire them in. */
.ph {
  position: relative; width: 100%; background: var(--paper-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ph[data-ratio="4/5"]  { aspect-ratio: 4/5; }
.ph[data-ratio="1/1"]  { aspect-ratio: 1/1; }
.ph[data-ratio="3/4"]  { aspect-ratio: 3/4; }
.ph[data-ratio="3/2"]  { aspect-ratio: 3/2; }
.ph[data-ratio="16/9"] { aspect-ratio: 16/9; }
.ph[data-ratio="2/3"]  { aspect-ratio: 2/3; }
.ph__label {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  text-align: center; padding: 12px; line-height: 1.5;
}
.ph__label b { display: block; font-family: var(--serif); font-size: 20px; letter-spacing: .04em; color: #9a958c; text-transform: none; margin-bottom: 4px; }
.ph--filled { border: 0; background: transparent; }
.ph--filled img { width: 100%; height: 100%; object-fit: cover; display: block; }
figure { margin: 0; }
figure figcaption { margin-top: 10px; font-size: 12.5px; letter-spacing: 0.03em; color: var(--muted); }

/* ---------- gallery grids ---------- */
.gallery { display: grid; gap: clamp(20px, 3vw, 40px); }
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
.gallery--1 { grid-template-columns: 1fr; max-width: 900px; margin-inline: auto; }

/* ===== 3D hero intro ===== */
#hero3d #stage { position: fixed; inset: 0; z-index: 0; }
#hero3d #stage canvas { display: block; }
.h3d-ui { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.h3d-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--gutter); }
.h3d-top .brand__logo { height: 40px; width: auto; mix-blend-mode: multiply; pointer-events: auto; }
.h3d-top span { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.h3d-caption { position: absolute; left: var(--gutter); bottom: clamp(26px, 6vh, 60px); max-width: 24ch; }
.h3d-caption .eyebrow { margin-bottom: 10px; }
/* demoted to a quiet tagline so it doesn't compete with the GRATEFUL wordmark */
.h3d-caption h1 { font-family: var(--sans); font-weight: 400; font-stretch: normal; font-size: clamp(1rem, 1.5vw, 1.35rem); line-height: 1.4; letter-spacing: 0.005em; color: var(--ink); }
.h3d-hint { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.h3d-hint .bar { width: 1px; height: 40px; background: linear-gradient(var(--muted), transparent); }
.h3d-scroll { height: 180vh; }
.h3d-loader { position: fixed; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: var(--paper); color: var(--muted); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; transition: opacity 0.8s ease; }
.h3d-loader.hidden { opacity: 0; pointer-events: none; }
.site { position: relative; z-index: 3; background: var(--paper); }

/* masonry gallery (mixed aspect ratios) */
.masonry { columns: 3 320px; column-gap: clamp(16px, 2.4vw, 30px); }
.masonry figure { break-inside: avoid; margin: 0 0 clamp(16px, 2.4vw, 30px); }
.masonry img { width: 100%; display: block; background: var(--paper-2); }
.masonry figcaption { margin-top: 9px; }
@media (max-width: 620px) { .masonry { columns: 1; } }

/* ---------- lightbox / carousel ---------- */
.masonry img, .gallery img, .jarrival-gallery img, [data-lb-group] img { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: #0b0b0c; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s var(--ease-out), visibility .3s var(--ease-out); }
.lb.open { opacity: 1; visibility: visible; pointer-events: auto; }
.lb__stage { display: flex; align-items: center; justify-content: center; gap: clamp(22px, 3.4vw, 60px); max-width: 94vw; max-height: 88vh; }
.lb__figure { display: flex; align-items: center; justify-content: center; min-width: 0; }
.lb__img { max-width: min(64vw, 1100px); max-height: 86vh; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; box-shadow: 0 24px 70px rgba(0,0,0,.55); transition: opacity .26s var(--ease-out); }
.lb__img.swapping { opacity: 0; }

/* info panel */
.lb__panel { flex: none; width: clamp(230px, 24vw, 350px); align-self: center; color: #cfccc4; font-family: var(--sans); }
.lb__ptitle { font-size: 19px; letter-spacing: .01em; color: #f2f0ea; margin-bottom: 20px; font-weight: 500; }
.lb__spec { margin: 0 0 22px; padding: 0; border-top: 1px solid rgba(255,255,255,.14); }
.lb__spec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.lb__spec-row dt { margin: 0; color: #97938a; letter-spacing: .13em; text-transform: uppercase; font-size: 10px; }
.lb__spec-row dd { margin: 0; color: #dad7cf; text-align: right; font-size: 13px; }
.lb__statement { font-size: 13.5px; line-height: 1.64; color: #c1bdb5; margin: 0; }
.lb__statement.is-placeholder { color: #7c7970; font-style: italic; }

.lb__btn { position: absolute; background: none; border: 0; color: #ece9e2; cursor: pointer; opacity: .78; transition: opacity .2s ease, transform .2s var(--ease-out); font-family: var(--sans); }
.lb__btn:hover { opacity: 1; }
.lb__close { top: 18px; right: 20px; font-size: 24px; line-height: 1; padding: 8px; }
.lb__nav { top: 50%; transform: translateY(-50%); font-size: 34px; line-height: 1; padding: 14px 18px; }
.lb__prev { left: max(6px, 1.5vw); }
.lb__next { right: max(6px, 1.5vw); }
.lb__count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #b7b4ac; font-size: 12px; letter-spacing: .12em; }
.lb__detail { margin-top: 22px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; padding: 9px 16px; color: #ece9e2; background: none; cursor: pointer; display: none; transition: background .2s ease; }
.lb__detail:hover { background: rgba(255,255,255,.08); }
.lb__detail.show { display: inline-block; }
@media (max-width: 820px) {
  .lb__stage { flex-direction: column; gap: 16px; max-height: 90vh; }
  .lb__img { max-width: 92vw; max-height: 56vh; }
  .lb__panel { width: min(92vw, 560px); align-self: stretch; max-height: 30vh; overflow-y: auto; }
  .lb__ptitle { margin-bottom: 14px; }
  .lb__spec { margin-bottom: 16px; }
}
@media (max-width: 640px) { .lb__nav { font-size: 26px; padding: 10px 12px; } }

/* gods & monsters — handwritten title art */
.gm-feature { margin: 0 0 clamp(24px, 4vw, 48px); }
.gm-title { --edge: 0px; margin: clamp(6px, 1.5vh, 20px) 0 0.05em; margin-inline: calc(50% - 50vw + var(--edge)); line-height: 1; }
.gm-title img { width: 100%; max-width: none; height: auto; display: block; mix-blend-mode: multiply; }
.gm-count { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-align: center; margin-top: clamp(28px,5vh,52px); }

/* statement block */
.statement { max-width: 720px; }
.statement p { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.6; }

/* ---------- journey timeline ---------- */
.chapter { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; }
.chapter__head { display: grid; grid-template-columns: 180px 1fr; gap: clamp(20px, 4vw, 56px); align-items: start; margin-bottom: clamp(28px, 4vw, 52px); }
.chapter__years { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--muted); }
.chapter__no { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chapter__title { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 0.4em; }
.chapter__text { max-width: 620px; color: #35342F; }

/* ---------- about (editorial) ---------- */
.about-hero { padding-bottom: clamp(16px, 2.5vh, 32px); }
.about { padding-top: clamp(18px, 3vh, 44px); }
/* big full-width portrait */
.about__portrait { margin: 0 0 clamp(34px, 5.5vw, 72px); }
.about__portrait img { width: 100%; height: auto; display: block; background: var(--paper-2); }
.about__portrait figcaption { margin-top: 14px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
/* opening statement, left-aligned to match the masthead */
.about__lede { max-width: 40ch; margin: 0 0 clamp(40px, 6vw, 76px); text-wrap: balance;
  font-size: clamp(1.4rem, 2.7vw, 2.1rem); line-height: 1.36; color: var(--ink); font-weight: 400; }
/* bio: a single left-aligned reading column */
.about__prose { max-width: 66ch; }
.about__prose > p { margin-bottom: 1.4em; font-size: 1.06rem; line-height: 1.72; }
.about__cta { margin-top: 2.4em; }
@media (max-width: 820px) {
  .about__lede { font-size: clamp(1.3rem, 5vw, 1.7rem); max-width: none; }
}

/* photo blur-in — a slow, deliberate reveal (marketing moment: longer duration is fine) */
.has-reveal .blur-in { opacity: 0; transform: translateY(28px) scale(1.05); filter: blur(22px); }
.blur-in { transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out), filter 0.95s var(--ease-out); will-change: transform, filter; }
.blur-in.in { opacity: 1; transform: none; filter: blur(0); }
@media (prefers-reduced-motion: reduce) {
  .has-reveal .blur-in { opacity: 1 !important; transform: none !important; filter: none !important; }
  .blur-in { transition: opacity 0.3s ease !important; }
}

/* ---------- footer (centred sign-off) ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(74px, 13vh, 150px) 0 clamp(40px, 7vh, 72px); }
.footer__center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(30px, 5vh, 58px); }
.footer__mark { display: inline-block; line-height: 0; }
.footer__mark img { height: clamp(96px, 13vh, 136px); width: auto; display: block; mix-blend-mode: multiply; transition: transform var(--dur) var(--ease-out); }
.footer__mark:hover img { transform: translateY(-5px); }
.footer__contact { display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; justify-content: center; }
.footer__contact a { font-size: 15px; letter-spacing: 0.02em; color: var(--ink); border-bottom: 1px solid transparent; padding-bottom: 3px; transition: border-color .2s ease; }
.footer__contact a:hover { border-color: var(--ink); }
.footer__base { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); line-height: 1.6; }

/* ---------- motion: scroll reveals + micro-interactions ---------- */
/* elements only start hidden once JS confirms it can reveal them (no-JS shows everything) */
/* blur-fade entrance (Emil Kowalski): opacity + subtle rise + blur, strong ease-out */
.has-reveal .reveal { opacity: 0; transform: translateY(32px); filter: blur(12px); }
.reveal { transition: opacity 0.72s var(--ease-out), transform 0.72s var(--ease-out), filter 0.72s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* work cards: gentle lift + image settle on hover */
.work-card .ph, .work-card img { transition: transform var(--dur-fast) var(--ease-out); }
.work-card:hover .ph, .work-card:focus-visible .ph { transform: translateY(-6px); }

/* gallery images: subtle scale on hover (transform only — no reflow) */
.masonry figure, .gallery figure { overflow: hidden; }
.masonry figure img, .gallery figure img { transition: transform 600ms var(--ease-out); will-change: transform; }
.masonry figure:hover img, .gallery figure:hover img { transform: scale(1.03); }

/* nav gains a hairline shadow once you scroll (spatial feedback) */
.nav { transition: box-shadow 220ms ease, background 220ms ease; }
.nav.is-scrolled { box-shadow: 0 1px 14px rgba(20, 18, 14, 0.06); }

/* press feedback on links/buttons (scale 0.97–1, restores on release) */
.link-underline, .arrow-link, .work-card { transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.link-underline:active, .arrow-link:active { transform: scale(0.97); }

/* lightbox opens with a subtle settle (scale up + fade), not a flat cut */
.lb__stage { transform: scale(0.985); transition: transform .36s var(--ease-out); }
.lb.open .lb__stage { transform: none; }

/* keyboard focus — visible ring for anyone tabbing through, invisible to mouse users */
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
.lb a:focus-visible, .lb button:focus-visible { outline-color: #ece9e2; }

@media (prefers-reduced-motion: reduce) {
  /* keep opacity, drop movement + blur (Emil: gentler, not zero) */
  .has-reveal .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .reveal { transition: opacity 0.3s ease !important; }
  .work-card .ph, .masonry figure img, .gallery figure img { transition: none !important; }
  .masonry figure:hover img, .gallery figure:hover img, .work-card:hover .ph { transform: none !important; }
  .lb__stage { transform: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .works, .works--3, .about-grid { grid-template-columns: 1fr; }
  .gallery--3 { grid-template-columns: repeat(2, 1fr); }
  .chapter__head { grid-template-columns: 1fr; gap: 8px; }
  .chapter__years { font-size: 1.2rem; }
}
@media (max-width: 620px) {
  .nav__links { position: fixed; inset: 66px 0 auto 0; background: var(--paper);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .22s ease; }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 16px 0; font-size: 15px; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__toggle { display: block; }
  .gallery--2, .gallery--3 { grid-template-columns: 1fr; }
}

/* ---------- mobile refinement ---------- */
@media (max-width: 640px) {
  .section { padding-top: clamp(40px, 11vw, 72px); padding-bottom: clamp(40px, 11vw, 72px); }
  .hero { padding: 48px 0 clamp(26px, 7vw, 44px); }
  .hero__logo img { width: 84%; }
  .hero__grid { gap: clamp(24px, 7vw, 40px); }
  .hero__aside { max-width: 360px; }
  .lede { font-size: 1.06rem; }
  .about-hero { padding-bottom: 10px; }
  .footer { padding: clamp(56px, 15vw, 92px) 0 40px; }
  .footer__mark img { height: clamp(76px, 22vw, 108px); }
  .footer__contact { gap: 18px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
