:root {
  --paper: #f7f5ee;
  --ink: #171917;
  --muted: #50534d;
  --blue: #223dcc;
  --dark-blue: #172eab;
  --line: #cfcec3;
  --body: "Segoe UI", Arial, sans-serif;
  --display: "Arial", "Segoe UI", sans-serif;
  --header-h: 4.8rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #b34d08; outline-offset: 5px; }
[id] { scroll-margin-top: 1.5rem; }
.shell { width: min(100% - 5rem, 75rem); margin-inline: auto; }
.skip { position: absolute; z-index: 60; top: .5rem; left: .5rem; padding: .75rem; background: var(--paper); transform: translateY(-180%); }
.skip:focus { transform: none; }
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3.5px; background: linear-gradient(90deg, var(--blue), #506dff); transform-origin: left; transform: scaleX(0); z-index: 1000; pointer-events: none; }

/* Sticky Header - Spans full width edge-to-edge */
.site-header { position: sticky; top: 0; z-index: 50; width: 100%; background: var(--paper); border-bottom: 1px solid var(--line); transition: background 250ms ease, box-shadow 250ms ease, border-color 250ms ease; }
.site-header.is-scrolled { background: rgba(247, 245, 238, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: rgba(207, 206, 195, 0.8); box-shadow: 0 6px 24px rgba(23, 25, 23, 0.08); }
.site-header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; min-height: 4.8rem; }
.wordmark { justify-self: start; font: 900 1.5rem/1 var(--display); letter-spacing: -.075em; text-decoration: none; transition: transform 200ms ease; }
.wordmark:hover { transform: scale(1.04); }
.wordmark span { color: var(--blue); }
.site-nav, .locale, .actions { display: flex; align-items: center; }
.site-nav { gap: clamp(.75rem, 3vw, 2.25rem); }
.site-nav a { position: relative; font-weight: 650; text-decoration: none; min-height: 2.75rem; display: inline-flex; align-items: center; transition: color 180ms ease; }
.site-nav a::after { content: ""; position: absolute; bottom: 0.65rem; left: 0; width: 100%; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: right; transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.site-nav a:hover, .site-nav a.is-active { text-decoration: none; color: var(--blue); }
.locale { justify-self: end; border: 1px solid var(--line); padding: .2rem; gap: .15rem; border-radius: 2rem; background: var(--paper); transition: border-color 200ms ease, box-shadow 200ms ease; }
.locale:hover { border-color: var(--blue); box-shadow: 0 2px 8px rgba(34, 61, 204, 0.12); }
.locale-duck { width: 1.45rem; height: 1.45rem; object-fit: contain; }
.locale a { display: flex; justify-content: center; align-items: center; gap: .23rem; padding: .18rem .53rem; border-radius: 2rem; min-width: 2.75rem; min-height: 2.15rem; text-decoration: none; font-size: .78rem; font-weight: 750; transition: transform 180ms ease, background 180ms ease; }
.locale a:hover { transform: scale(1.05); }
.locale a[aria-current] { color: white; background: var(--blue); }
.locale a:hover:not([aria-current]) { background: #e9e8df; }
.home-page .site-header { position: fixed; inset: 0 0 auto; }
.home-page .site-header:not(.is-scrolled) { background: transparent; border-bottom-color: #fffaf033; color: #fffaf0; }
.home-page .site-header:not(.is-scrolled) .wordmark span,
.home-page .site-header:not(.is-scrolled) .site-nav a:is(:hover, .is-active) { color: #c4cfff; }
.home-page .site-header:not(.is-scrolled) .site-nav a::after { background: #c4cfff; }
.home-page .site-header:not(.is-scrolled) .locale { background: #14171399; border-color: #fffaf066; }
.home-page .site-header:not(.is-scrolled) .locale a:hover:not([aria-current]) { background: #fffaf026; }
.home-page .site-header:not(.is-scrolled) :focus-visible { outline-color: #ffd17d; }
.home-page :is(#work, #about, #contact) { scroll-margin-top: calc(var(--header-h) + .75rem); }

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.07; letter-spacing: -.045em; }
h1 { font-size: clamp(2.75rem, 6.5vw, 6.25rem); font-weight: 800; }
h2 { font-size: clamp(2.2rem, 4.6vw, 4.75rem); }
h3 { font-size: clamp(1.45rem, 2.75vw, 2.85rem); }
.eyebrow { color: var(--blue); font-size: .81rem; font-weight: 750; letter-spacing: .04em; }
.eyebrow span { padding-inline: .25em; color: var(--muted); }
.lead { max-width: 37rem; color: var(--muted); font-size: clamp(1.05rem, 1.65vw, 1.28rem); }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #181c17;
  color: #fffaf0;
  width: 100%;
  display: grid;
  margin-bottom: 0;
}
.hero-background {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline-start: 22%;
}
.hero-background::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -4rem;
  background: url("./assets/andy-portrait.webp") center 62% / cover no-repeat;
  filter: blur(3rem) brightness(.64);
}
.hero-background img {
  width: auto;
  height: 100%;
  object-fit: contain;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, #141713db, transparent clamp(10rem, 25%, 17rem)),
    linear-gradient(90deg, #141713c4, #14171356 28%, transparent 45%);
}
.hero-inner {
  position: relative;
  width: calc(100% - 2 * clamp(1.25rem, 5vw, 7rem));
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding-block: calc(var(--header-h) + 1.25rem) clamp(2rem, 7svh, 5rem);
}
.hero-copy {
  max-width: min(27vw, 27rem);
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 18px #141713a6;
}
.hero-role { margin-bottom: 1rem; color: #d8e0ff; font-weight: 750; font-size: clamp(.85rem, 1.6vw, 1.05rem); }
.hero h1 { letter-spacing: -.055em; line-height: 1.02; font-size: clamp(1.65rem, 3.55vw, 4.5rem); }
.hero-word { position: relative; display: table; appearance: none; border: 0; background: transparent; padding: 0 .035em 0 0; color: inherit; font: inherit; letter-spacing: inherit; cursor: default; user-select: none; text-align: left; }
.hero-word > span { position: relative; z-index: 1; display: block; pointer-events: none; }
.hero-word > span > span { display: block; }
.hero-second { color: #a7b7ff; }
.hero-word:is(:focus-visible, [aria-pressed="true"]) > span { translate: 0 -.07em; }
.hero-actions { display: flex; gap: 1rem; align-items: center; }
.hero-sticker { position: relative; flex: 0 0 3.8rem; aspect-ratio: 1; pointer-events: none; }
.hero-sticker img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-sticker .hero-duck-lift { opacity: 0; }
.hero-copy:has(.hero-word:is(:focus-visible, [aria-pressed="true"])) .hero-duck-idle { opacity: 0; }
.hero-copy:has(.hero-word:is(:focus-visible, [aria-pressed="true"])) .hero-duck-lift { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .hero-word:hover > span { translate: 0 -.07em; }
  .hero-copy:has(.hero-word:hover) .hero-duck-idle { opacity: 0; }
  .hero-copy:has(.hero-word:hover) .hero-duck-lift { opacity: 1; }
}
.hero .lead { margin-block: 1.5rem 1.5rem; max-width: 30rem; color: #fbf9f1; }
.hero .action.primary { background: #3155ee; border-color: #7087ff; }
.hero .action.primary:hover { background: #2343cd; }
.hero :focus-visible { outline-color: #ffd17d; }
.motion-toggle { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .35rem .65rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 2rem; font: 650 .76rem var(--body); cursor: pointer; }
.motion-toggle[hidden] { display: none; }
.hero .motion-toggle { margin-top: .65rem; color: white; background: #20251feb; border-color: #b3b9ae; }
.motion-toggle[aria-pressed="true"] { border-color: #8ba0ff; }
.motion-state { padding: .12rem .35rem; border: 1px solid currentColor; border-radius: 1rem; }
.motion-toggle[aria-pressed="false"] .motion-state span:last-child,
.motion-toggle[aria-pressed="true"] .motion-state span:first-child { display: none; }
.motion-toggle img { width: 1.35rem; height: 1.35rem; object-fit: contain; }



/* Mascot Duck Follower Animations */
@keyframes duck-waddle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-6deg); }
  75% { transform: translateY(-3px) rotate(6deg); }
}
@keyframes duck-cheer {
  0%, 100% { transform: translateY(0) scale(1.08); }
  50% { transform: translateY(-8px) scale(1.15) rotate(5deg); }
}
@keyframes heart-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes duck-click {
  0% { transform: scale(0.9) translateY(2px); }
  50% { transform: scale(1.28) translateY(-12px); }
  100% { transform: scale(1) translateY(0); }
}

.cursor-duck { position: fixed; z-index: 999; top: 0; left: 0; width: 3.5rem; height: 3.5rem; opacity: 0; pointer-events: none; transition: opacity 150ms ease; }
.cursor-duck.is-visible { opacity: 1; }
.cursor-duck img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(16, 19, 16, 0.35)); transition: opacity 140ms ease; }
.cursor-duck:not(.faces-left) img { scale: -1 1; }
.cursor-duck.is-visible:not(.is-hugging):not(.is-pointing) .cursor-run { animation: duck-waddle 240ms infinite ease-in-out; }

.cursor-duck .cursor-hug,
.cursor-duck .cursor-point { opacity: 0; }

.cursor-duck.is-hugging .cursor-run { opacity: 0; }
.cursor-duck.is-hugging .cursor-hug { opacity: 1; }
.cursor-duck.is-hugging::after { content: "♥"; position: absolute; top: -.35rem; right: -.35rem; color: #ff5b65; font: 800 1.1rem/1 var(--body); text-shadow: 0 1px 4px #20251f; animation: heart-pop 280ms cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }

.cursor-duck.is-pointing .cursor-run,
.cursor-duck.is-pointing .cursor-hug { opacity: 0; }
.cursor-duck.is-pointing .cursor-point { opacity: 1; animation: duck-cheer 320ms infinite alternate ease-in-out; }

.cursor-duck .duck-bubble {
  position: absolute;
  top: -1.6rem;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: var(--blue);
  color: #ffffff;
  font: 750 0.72rem/1 var(--body);
  padding: 0.3rem 0.55rem;
  border-radius: 1rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(34, 61, 204, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 160ms ease;
}
.cursor-duck .duck-bubble::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0 4px;
  border-style: solid;
  border-color: var(--blue) transparent transparent transparent;
}
.cursor-duck.is-pointing .duck-bubble {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}
.cursor-duck.is-clicking {
  animation: duck-click 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* Actions & Buttons */
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; gap: .5rem; padding: .48rem .95rem; border: 1px solid var(--line); text-decoration: none; font-size: .9rem; font-weight: 750; line-height: 1.3; text-align: left; border-radius: 4px; transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease, border-color 200ms ease, background 200ms ease, color 200ms ease; }
.action:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(34, 61, 204, 0.15); }
.action-duck { width: 1.85rem; height: 1.85rem; object-fit: contain; flex: 0 0 auto; }
.arrow { margin-left: .25rem; font-size: 1.05rem; transition: transform 200ms ease; }
.action:hover .arrow { transform: translate(3px, -3px); }
.action.primary { background: var(--blue); border-color: var(--blue); color: white; }
.action.primary:hover { background: var(--dark-blue); border-color: var(--dark-blue); color: white; }
.action-duck, .locale-duck { transition: transform 150ms ease-out; }
.action:hover .action-duck, .action:focus-visible .action-duck,
.locale a:hover .locale-duck, .locale a:focus-visible .locale-duck { transform: translateY(-2px) rotate(-8deg); }

/* Work Section */
.work-section { border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 5rem); }
.work-section > h2 { margin-bottom: 2.5rem; }
.work-item { border-top: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2.2rem) 1rem; border-radius: 8px; transition: background 280ms ease, box-shadow 280ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
.work-item:hover { background: #ffffff; box-shadow: 0 14px 32px rgba(23, 25, 23, 0.05); }
.work-item.featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.25rem, 5.5vw, 4.75rem); align-items: center; }
.work-image { display: block; position: relative; aspect-ratio: 1.66; background: #eae7dd; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.06); transition: box-shadow 300ms ease; }
.work-item:hover .work-image { box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.work-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease; }
.work-item:hover .work-image img { transform: scale(1.045); }
.work-image-badge {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  background: rgba(23, 25, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 0.38rem 0.85rem;
  border-radius: 2rem;
  font: 700 0.82rem var(--body);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.work-item:hover .work-image-badge { opacity: 1; transform: translateY(0); }
.work-title-link { text-decoration: none; color: inherit; transition: color 180ms ease; }
.work-title-link:hover { color: var(--blue); }
.work-copy h3 { margin-block: .55rem .8rem; }
.work-copy > p:not(.eyebrow) { color: var(--muted); }
.inline-metric { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .65rem; margin-block: .85rem 1.05rem; font-size: .92rem; }
.inline-metric strong { color: var(--blue); font-size: 1.25rem; transition: transform 200ms ease; }
.work-item:hover .inline-metric strong { transform: scale(1.05); }

.other-title { margin-top: 1.8rem; margin-bottom: 1.4rem; font-size: clamp(1.65rem, 3.25vw, 3rem); }
.other-work { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 4vw, 4rem); }
.other-work .work-item { padding: 1.25rem; background: rgba(255, 255, 255, 0.4); border-radius: 8px; border: 1px solid var(--line); }
.other-work .work-item:hover { background: #ffffff; box-shadow: 0 14px 32px rgba(23, 25, 23, 0.07); }
.other-work .work-image { margin-bottom: 1rem; }
.other-work h3 { font-size: clamp(1.4rem, 2.2vw, 2.15rem); }

/* About Section */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 8vw, 6rem); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 7vw, 5rem); margin-top: 1.25rem; }
.about h2, .about h3 { margin-bottom: 1rem; }
.about h3 { font-size: 1.5rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: auto 1fr; gap: .7rem 1.1rem; padding-block: .75rem; border-top: 1px solid var(--line); }
.timeline li span { color: var(--blue); font-size: .9rem; font-variant-numeric: tabular-nums; }
.timeline strong { font-weight: 650; }

/* Contact Section */
.contact { background: var(--blue); color: white; }
.contact-layout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.5rem; padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.contact h2 { max-width: 17ch; }
.contact p { margin-block: .8rem 1.25rem; }
.actions { gap: .75rem; flex-wrap: wrap; }
.action.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.action.light:hover { color: var(--dark-blue); }
.action.outline { border-color: #c0c8ff; color: white; }
.action.outline:hover { color: white; background: var(--dark-blue); border-color: white; }
.contact :focus-visible { outline-color: white; }
.contact-duck-col { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.contact-duck { width: clamp(5rem, 17vw, 13rem); aspect-ratio: 1; object-fit: contain; }
.built-by {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .28rem .75rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.94);
  color: #1a1e29;
  font: 500 .74rem/1.2 var(--body);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  opacity: .88;
}
.built-by::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7388db;
  display: inline-block;
}
.built-by strong {
  font-weight: 750;
  color: #0b1120;
}
.built-by:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

/* Case Study Pages */
.case { padding-block: 2rem 4rem; }
.case-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.case-heading { max-width: 63rem; padding-block: clamp(1.5rem, 5vw, 4rem) 2rem; }
.case h1 { margin-block: .75rem 1rem; font-size: clamp(2.35rem, 6vw, 5.7rem); }
.case-body { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(1.5rem, 7vw, 6rem); padding-block: clamp(2rem, 5vw, 4rem); }
.case-metric { align-self: start; border-top: 2px solid var(--blue); padding-top: .65rem; }
.case-metric strong { display: block; color: var(--blue); font: 800 clamp(1.9rem, 4vw, 3.4rem)/1.07 var(--display); letter-spacing: -.05em; }
.case-metric p { color: var(--muted); margin-top: .45rem; }
.case-story { display: grid; gap: 1.6rem; max-width: 43rem; }
.case-story p { color: var(--muted); }
.case-chapter, .case-results { padding-block: clamp(2rem, 5vw, 4.5rem); border-top: 1px solid var(--line); }
.case-chapter.with-media { display: grid; align-items: start; gap: clamp(1.25rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.case-chapter:nth-of-type(even).with-media:not(.panoramic) { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.case-chapter:nth-of-type(even).with-media:not(.panoramic) .chapter-copy { grid-column: 2; grid-row: 1; }
.case-chapter:nth-of-type(even).with-media:not(.panoramic) .chapter-media { grid-column: 1; grid-row: 1; }
.case-chapter.panoramic { grid-template-columns: 1fr; }
.chapter-copy h2, .case-results > h2 { margin-bottom: .8rem; font-size: clamp(1.65rem, 3.25vw, 3rem); }
.chapter-copy p, .case-results > p { color: var(--muted); max-width: 67ch; }
.chapter-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(.8rem, 2vw, 1.6rem); }

/* Case Figure with Lightbox Zoom */
.case-figure { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.08); transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms ease; cursor: zoom-in; }
.case-figure:hover { transform: translateY(-4px) scale(1.018); box-shadow: 0 16px 36px rgba(0,0,0,0.14); }
.case-figure-wrap { position: relative; overflow: hidden; width: 100%; }
.case-figure img { width: 100%; height: auto; transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1); display: block; }
.case-figure:hover img { transform: scale(1.03); }
.zoom-cue {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  background: rgba(23, 25, 23, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 0.35rem 0.8rem;
  border-radius: 2rem;
  font: 650 0.8rem var(--body);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.case-figure:hover .zoom-cue, .case-figure:focus-visible .zoom-cue { opacity: 1; transform: translateY(0); }
.case-figure:only-child, .case-figure.wide { grid-column: 1 / -1; }
.case-figure:only-child:not(.wide) { width: min(100%, 39rem); }

/* Stats Boxes */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; margin: 1.65rem 0 0; }
.stats div { display: flex; flex-direction: column-reverse; justify-content: start; gap: .45rem; border-top: 3px solid var(--blue); padding: .85rem 1rem; border-radius: 8px; background: rgba(255, 255, 255, 0.65); box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), background 250ms ease, box-shadow 250ms ease; }
.stats div:hover { transform: translateY(-4px); background: #ffffff; box-shadow: 0 10px 24px rgba(34, 61, 204, 0.12); }
.stats dd { margin: 0; color: var(--blue); font-size: clamp(1.35rem, 3vw, 2.25rem); font-weight: 750; line-height: 1.14; }
.stats dt { color: var(--muted); }
.case-results .stat-note { margin-top: 1.25rem; font-size: .88rem; }
.next-project { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.next-project p { margin-bottom: .6rem; }

/* Image Lightbox Modal Popup */
dialog.image-lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 95vw;
  max-height: 95vh;
  outline: none;
  overflow: visible;
  margin: auto;
}
dialog.image-lightbox::backdrop {
  background: rgba(16, 20, 16, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 220ms ease;
}
dialog.image-lightbox.is-open::backdrop {
  opacity: 1;
}
.lightbox-dialog-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms ease;
}
dialog.image-lightbox.is-open .lightbox-dialog-inner {
  transform: scale(1);
  opacity: 1;
}
.lightbox-figure {
  margin: 0;
  background: #181c17;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 88vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 88vw;
  max-height: 74vh;
  object-fit: contain;
  display: block;
}
.lightbox-caption {
  padding: 0.85rem 1.4rem;
  color: #f7f5ee;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  background: #20241f;
  width: 100%;
  box-sizing: border-box;
}
.lightbox-close {
  position: absolute;
  top: -1.2rem;
  right: -1.2rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  border: 2px solid white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: transform 180ms ease, background 180ms ease;
  z-index: 10;
}
.lightbox-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: var(--dark-blue);
}

/* Floating Back To Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 3rem;
  padding: 0.45rem 0.85rem;
  font: 800 0.85rem var(--body);
  box-shadow: 0 8px 24px rgba(34, 61, 204, 0.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: opacity 250ms ease, transform 250ms cubic-bezier(0.16, 1, 0.3, 1), visibility 250ms, background 180ms ease, box-shadow 180ms ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 30px rgba(34, 61, 204, 0.28);
}
.back-to-top-duck {
  width: 1.65rem;
  height: 1.65rem;
  object-fit: contain;
}
.back-to-top-arrow {
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 200ms ease;
}
.back-to-top:hover .back-to-top-arrow {
  transform: translateY(-3px);
}

@keyframes title-hop {
  0% { transform: translateY(.18em); }
  45% { transform: translateY(-.11em) rotate(-1.5deg); }
  100% { transform: none; }
}
@keyframes scroll-arrival {
  from { scale: 0 1; }
  to { scale: 1 1; }
}
[data-reveal] { position: relative; }
[data-reveal]::before { content: ""; position: absolute; top: -1px; left: 0; width: 3.5rem; height: 3px; background: var(--blue); scale: 0 1; transform-origin: left; pointer-events: none; border-radius: 2px; }
html:not(.motion-paused) .hero-word > span { transition: translate 200ms ease-out; }
html:not(.motion-paused) .hero-sticker img { transition: opacity 140ms ease-out; }
.intro-ready .hero-word > span > span { animation: title-hop 470ms ease-out backwards; }
.intro-ready .hero-first > span > span { animation-delay: 75ms; }
.intro-ready .hero-second > span > span { animation-delay: 135ms; }
html:not(.motion-paused) .revealed::before { animation: scroll-arrival 450ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.motion-paused .action-duck, .motion-paused .locale-duck { transition: none; transform: none; }
.motion-paused .hero-word > span { translate: none; }
.motion-paused .cursor-duck { visibility: hidden; }

/* Dynamic entrance animations across case studies & sections */
@media (prefers-reduced-motion: no-preference) {
  html.has-reveal:not(.motion-paused) .work-item.featured:not(.revealed) {
    opacity: 0;
    transform: translateY(42px) scale(0.975);
  }
  html.has-reveal:not(.motion-paused) .work-item.featured:not(.revealed) .work-image {
    opacity: 0;
    transform: translateX(-36px) scale(0.96);
  }
  html.has-reveal:not(.motion-paused) .work-item.featured:nth-of-type(even):not(.revealed) .work-image {
    transform: translateX(36px) scale(0.96);
  }
  html.has-reveal:not(.motion-paused) .work-item.featured:not(.revealed) .work-copy {
    opacity: 0;
    transform: translateX(30px);
  }
  html.has-reveal:not(.motion-paused) .work-item.featured:nth-of-type(even):not(.revealed) .work-copy {
    transform: translateX(-30px);
  }
  html.has-reveal:not(.motion-paused) .work-item.featured {
    transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 550ms ease;
  }
  html.has-reveal:not(.motion-paused) .work-item.featured .work-image {
    transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 550ms ease;
  }
  html.has-reveal:not(.motion-paused) .work-item.featured .work-copy {
    transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1) 100ms, opacity 550ms ease 100ms;
  }
  html.has-reveal:not(.motion-paused) .work-item.featured.revealed,
  html.has-reveal:not(.motion-paused) .work-item.featured.revealed .work-image,
  html.has-reveal:not(.motion-paused) .work-item.featured.revealed .work-copy {
    opacity: 1;
    transform: none;
  }

  /* Other projects (grid cards) */
  html.has-reveal:not(.motion-paused) .other-work .work-item:not(.revealed) {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  html.has-reveal:not(.motion-paused) .other-work .work-item:first-child:not(.revealed) {
    transform: translate(-20px, 40px) scale(0.96);
  }
  html.has-reveal:not(.motion-paused) .other-work .work-item:last-child:not(.revealed) {
    transform: translate(20px, 40px) scale(0.96);
  }
  html.has-reveal:not(.motion-paused) .other-work .work-item {
    transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
  }
  html.has-reveal:not(.motion-paused) .other-work .work-item:last-child {
    transition-delay: 120ms;
  }
  html.has-reveal:not(.motion-paused) .other-work .work-item.revealed {
    opacity: 1;
    transform: none;
  }

  /* About section */
  html.has-reveal:not(.motion-paused) .about:not(.revealed) > div:first-child {
    opacity: 0;
    transform: translateX(-35px);
  }
  html.has-reveal:not(.motion-paused) .about > div:first-child {
    transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1), opacity 550ms ease;
  }
  html.has-reveal:not(.motion-paused) .about.revealed > div:first-child {
    opacity: 1;
    transform: none;
  }
  html.has-reveal:not(.motion-paused) .about:not(.revealed) .timeline li {
    opacity: 0;
    transform: translateX(30px);
  }
  html.has-reveal:not(.motion-paused) .about .timeline li {
    transition: transform 550ms cubic-bezier(0.16, 1, 0.3, 1), opacity 450ms ease;
  }
  html.has-reveal:not(.motion-paused) .about.revealed .timeline li:nth-child(1) { transition-delay: 80ms; }
  html.has-reveal:not(.motion-paused) .about.revealed .timeline li:nth-child(2) { transition-delay: 160ms; }
  html.has-reveal:not(.motion-paused) .about.revealed .timeline li:nth-child(3) { transition-delay: 240ms; }
  html.has-reveal:not(.motion-paused) .about.revealed .timeline li:nth-child(4) { transition-delay: 320ms; }
  html.has-reveal:not(.motion-paused) .about.revealed .timeline li {
    opacity: 1;
    transform: none;
  }

  /* Contact section */
  html.has-reveal:not(.motion-paused) .contact:not(.revealed) .contact-copy {
    opacity: 0;
    transform: translateY(30px);
  }
  html.has-reveal:not(.motion-paused) .contact:not(.revealed) .contact-duck-col {
    opacity: 0;
    transform: translateY(40px) scale(0.9) rotate(-3deg);
  }
  html.has-reveal:not(.motion-paused) .contact .contact-copy {
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
  }
  html.has-reveal:not(.motion-paused) .contact .contact-duck-col {
    transition: transform 700ms cubic-bezier(0.175, 0.885, 0.32, 1.275) 150ms, opacity 500ms ease 150ms;
  }
  html.has-reveal:not(.motion-paused) .contact.revealed .contact-copy,
  html.has-reveal:not(.motion-paused) .contact.revealed .contact-duck-col {
    opacity: 1;
    transform: none;
  }

  /* Case study detail pages */
  html.has-reveal:not(.motion-paused) .case-heading:not(.revealed) {
    opacity: 0;
    transform: translateY(-32px) scale(0.98);
  }
  html.has-reveal:not(.motion-paused) .case-heading {
    transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
  }
  html.has-reveal:not(.motion-paused) .case-heading.revealed {
    opacity: 1;
    transform: none;
  }

  html.has-reveal:not(.motion-paused) .case-body:not(.revealed) .case-metric {
    opacity: 0;
    transform: translateX(-48px);
  }
  html.has-reveal:not(.motion-paused) .case-body:not(.revealed) .case-story {
    opacity: 0;
    transform: translateX(48px);
  }
  html.has-reveal:not(.motion-paused) .case-body .case-metric {
    transition: transform 750ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
  }
  html.has-reveal:not(.motion-paused) .case-body .case-story {
    transition: transform 750ms cubic-bezier(0.16, 1, 0.3, 1) 120ms, opacity 600ms ease 120ms;
  }
  html.has-reveal:not(.motion-paused) .case-body.revealed .case-metric,
  html.has-reveal:not(.motion-paused) .case-body.revealed .case-story {
    opacity: 1;
    transform: none;
  }

  /* Case Chapters */
  html.has-reveal:not(.motion-paused) .case-chapter:not(.revealed) {
    opacity: 0;
    transform: translateY(35px);
  }
  html.has-reveal:not(.motion-paused) .case-chapter:not(.revealed) .chapter-copy {
    opacity: 0;
    transform: translateX(-48px);
  }
  html.has-reveal:not(.motion-paused) .case-chapter:nth-of-type(even):not(.revealed) .chapter-copy {
    transform: translateX(48px);
  }
  html.has-reveal:not(.motion-paused) .case-chapter:not(.revealed) .chapter-media {
    opacity: 0;
    transform: translateX(48px);
  }
  html.has-reveal:not(.motion-paused) .case-chapter:nth-of-type(even):not(.revealed) .chapter-media {
    transform: translateX(-48px);
  }
  html.has-reveal:not(.motion-paused) .case-chapter.panoramic:not(.revealed) .chapter-copy {
    transform: translateY(-28px);
  }
  html.has-reveal:not(.motion-paused) .case-chapter.panoramic:not(.revealed) .chapter-media {
    transform: translateY(45px) scale(0.97);
  }
  html.has-reveal:not(.motion-paused) .case-chapter {
    transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
  }
  html.has-reveal:not(.motion-paused) .case-chapter .chapter-copy {
    transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
  }
  html.has-reveal:not(.motion-paused) .case-chapter .chapter-media {
    transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1) 120ms, opacity 550ms ease 120ms;
  }
  html.has-reveal:not(.motion-paused) .case-chapter.revealed,
  html.has-reveal:not(.motion-paused) .case-chapter.revealed .chapter-copy,
  html.has-reveal:not(.motion-paused) .case-chapter.revealed .chapter-media {
    opacity: 1;
    transform: none;
  }

  /* Case study figures inside chapter-media */
  html.has-reveal:not(.motion-paused) .case-chapter:not(.revealed) .case-figure {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  html.has-reveal:not(.motion-paused) .case-chapter .case-figure {
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
  }
  html.has-reveal:not(.motion-paused) .case-chapter.revealed .case-figure {
    opacity: 1;
    transform: none;
  }
  html.has-reveal:not(.motion-paused) .case-chapter.revealed .case-figure:nth-child(2) {
    transition-delay: 150ms;
  }

  /* Results stats */
  html.has-reveal:not(.motion-paused) .case-results:not(.revealed) > h2,
  html.has-reveal:not(.motion-paused) .case-results:not(.revealed) > p {
    opacity: 0;
    transform: translateY(24px);
  }
  html.has-reveal:not(.motion-paused) .case-results > h2,
  html.has-reveal:not(.motion-paused) .case-results > p {
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
  }
  html.has-reveal:not(.motion-paused) .case-results.revealed > h2,
  html.has-reveal:not(.motion-paused) .case-results.revealed > p {
    opacity: 1;
    transform: none;
  }
  html.has-reveal:not(.motion-paused) .case-results:not(.revealed) .stats div {
    opacity: 0;
    transform: translateY(32px) scale(0.94);
  }
  html.has-reveal:not(.motion-paused) .case-results .stats div {
    transition: transform 550ms cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 450ms ease, background 250ms ease, box-shadow 250ms ease;
  }
  html.has-reveal:not(.motion-paused) .case-results.revealed .stats div:nth-child(1) { transition-delay: 80ms; }
  html.has-reveal:not(.motion-paused) .case-results.revealed .stats div:nth-child(2) { transition-delay: 160ms; }
  html.has-reveal:not(.motion-paused) .case-results.revealed .stats div:nth-child(3) { transition-delay: 240ms; }
  html.has-reveal:not(.motion-paused) .case-results.revealed .stats div:nth-child(4) { transition-delay: 320ms; }
  html.has-reveal:not(.motion-paused) .case-results.revealed .stats div {
    opacity: 1;
    transform: none;
  }

  /* Next project */
  html.has-reveal:not(.motion-paused) .next-project:not(.revealed) {
    opacity: 0;
    transform: translateY(25px);
  }
  html.has-reveal:not(.motion-paused) .next-project {
    transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
  }
  html.has-reveal:not(.motion-paused) .next-project.revealed {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 740px) {
  .shell { width: calc(100% - 2.5rem); }
  .site-header-inner { grid-template-columns: 1fr auto; gap: .25rem 1rem; padding-top: .55rem; }
  .site-nav { grid-row: 2; grid-column: 1 / -1; flex-wrap: wrap; }
  .locale { grid-column: 2; grid-row: 1; }
  .work-item.featured, .about { grid-template-columns: minmax(0, 1fr); }
  :root { --header-h: 6.6rem; }
  .hero .lead { margin-block: 1rem 1.25rem; }
  .work-section > h2 { margin-bottom: 1.25rem; }
  .work-item.featured { align-items: start; }
  .case-body { grid-template-columns: 1fr; }
  .case-chapter.with-media, .case-chapter:nth-of-type(even).with-media:not(.panoramic) { grid-template-columns: minmax(0, 1fr); }
  .case-chapter:nth-of-type(even).with-media:not(.panoramic) .chapter-copy,
  .case-chapter:nth-of-type(even).with-media:not(.panoramic) .chapter-media { grid-column: auto; grid-row: auto; }
}

@media (orientation: landscape) and (max-height: 540px) {
  .hero-inner { padding-block: calc(var(--header-h) + 1rem) 1.5rem; }
  .hero .lead { margin-block: .8rem 1rem; }
}

@media (max-width: 900px) and (orientation: portrait) {
  .hero-inner {
    min-height: 100vh;
    min-height: 100svh;
    align-content: start;
    padding-block: calc(var(--header-h) + 1.25rem) max(23rem, 43svh);
  }
  .hero-background { display: block; padding: 0; }
  .hero-background::before { display: none; }
  .hero-background img { width: 100%; object-fit: cover; object-position: 50% 100%; mask-image: none; }
  .hero-copy { max-width: min(100%, 34rem); }
  .hero h1 { font-size: clamp(2.3rem, 8vw, 4.7rem); }
  .hero::before { background: linear-gradient(180deg, #141713db, #141713a3 30%, #14171331 50%, transparent 64%); }
}

@media (max-width: 480px) {
  .hero-actions { gap: .55rem; }
  .hero-sticker { flex-basis: 3rem; }
  .other-work { grid-template-columns: 1fr; gap: 0; }
  .contact-layout { grid-template-columns: 1fr; position: relative; }
  .contact-duck { width: 5.5rem; }
  .contact-duck-col { margin-top: 1rem; }
  .timeline li { gap: .6rem; }
  .chapter-media { grid-template-columns: 1fr; }
  .back-to-top { bottom: 1.2rem; right: 1.2rem; padding: 0.35rem 0.65rem; }
}
