/* =========================================================================
   Viktoryia Mialeshka — portfolio
   A single scroll where every chapter owns a colour and melts into the next.
   ========================================================================= */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* No CSS smooth-scroll: main.js runs the jumps so it can re-aim while
   late-loading images change the page height under it. */
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

/* ---------- tokens ---------- */
:root {
  --ff-display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
  --ff-accent: "Instrument Serif", Georgia, serif;

  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, .68);
  --ink-faint: rgba(255, 255, 255, .42);
  --line: rgba(255, 255, 255, .16);
  --card: rgba(255, 255, 255, .05);
  --card-hi: rgba(255, 255, 255, .09);

  --pad: clamp(1.25rem, 4vw, 4.5rem);
  --maxw: 1280px;
  --maxw-wide: 1560px;
  --r: 16px;

  --ease: cubic-bezier(.22, .68, 0, 1);
  --dur: .8s;
}

/* light chapters flip the ink tokens */
.is-light {
  --ink: #14101c;
  --ink-soft: rgba(20, 16, 28, .68);
  --ink-faint: rgba(20, 16, 28, .45);
  --line: rgba(20, 16, 28, .16);
  --card: rgba(255, 255, 255, .42);
  --card-hi: rgba(255, 255, 255, .72);
}

body {
  font-family: var(--ff-body);
  font-size: clamp(1rem, .95rem + .2vw, 1.0625rem);
  line-height: 1.65;
  color: #fff;
  background: #05080f;
  overflow-x: hidden;
}

/* =========================================================================
   THE COLOUR JOURNEY
   Each section fades from its own colour into the next section's colour,
   so the whole page reads as one continuous gradient.
   ========================================================================= */
#hero          { --from: #05080F; --to: #0A1121; }
#work          { --from: #0A1121; --to: #100E28; }
#about         { --from: #100E28; --to: #191338; }
#ch-frog       { --from: #191338; --to: #4A1D96; }
#design-mind   { --from: #4A1D96; --to: #9B1FA8; }
#social        { --from: #9B1FA8; --to: #5E1B5F; }
#frogcast      { --from: #5E1B5F; --to: #24325F; }
#ch-invent     { --from: #24325F; --to: #0B6BB8; }
#scale-effect  { --from: #0B6BB8; --to: #2E8BC9; }
#supply-chains { --from: #2E8BC9; --to: #59A8CE; }
#ch-marketing  { --from: #59A8CE; --to: #F5E8E1; }
#farmasi       { --from: #F5E8E1; --to: #F0DCE6; }
#eclaren       { --from: #F0DCE6; --to: #C3B4E4; }
#ch-identity   { --from: #C3B4E4; --to: #B4C9AB; }
#awes          { --from: #B4C9AB; --to: #DFCCAE; }
#siesta        { --from: #DFCCAE; --to: #EFB4D8; }
#other         { --from: #EFB4D8; --to: #E88FC6; }
#contact       { --from: #E88FC6; --to: #05080F; }

.section {
  position: relative;
  padding: clamp(5rem, 11vh, 9rem) var(--pad);
  background: linear-gradient(180deg, var(--from) 0%, var(--to) 100%);
  color: var(--ink);
  isolation: isolate;
  /* Skip rendering work for the sections you can't see. On a 20,000px page with
     91 images this is the difference between a smooth scroll and a stuttery one.
     "auto" in contain-intrinsic-size means each section remembers its real
     height after being rendered once, so the scrollbar settles quickly. */
  content-visibility: auto;
  contain-intrinsic-size: auto 1100px;
}
/* the first two screens should never be deferred — they are the first paint */
#hero, #work { content-visibility: visible; }

/* Measured heights at 1440px. These are only the first guess — "auto" above
   makes each section remember its real height once rendered — but starting
   close keeps the scrollbar steady and holds CLS down. */
#about         { contain-intrinsic-size: auto 1750px; }
#ch-frog       { contain-intrinsic-size: auto 560px; }
#design-mind   { contain-intrinsic-size: auto 2210px; }
#social        { contain-intrinsic-size: auto 925px; }
#frogcast      { contain-intrinsic-size: auto 1050px; }
#ch-invent     { contain-intrinsic-size: auto 560px; }
#scale-effect  { contain-intrinsic-size: auto 2675px; }
#supply-chains { contain-intrinsic-size: auto 1360px; }
#ch-marketing  { contain-intrinsic-size: auto 775px; }
#farmasi       { contain-intrinsic-size: auto 3530px; }
#eclaren       { contain-intrinsic-size: auto 2070px; }
#ch-identity   { contain-intrinsic-size: auto 560px; }
#awes          { contain-intrinsic-size: auto 1225px; }
#siesta        { contain-intrinsic-size: auto 690px; }
#other         { contain-intrinsic-size: auto 760px; }
#contact       { contain-intrinsic-size: auto 940px; }

/* The two sections that carry the light/dark handover hold their start colour
   until past the text, so white type never lands on a pale background. */
#ch-marketing {
  background: linear-gradient(180deg,
    var(--from) 0,
    var(--from) clamp(320px, 46%, 560px),
    var(--to) 100%);
}
#contact { background: linear-gradient(180deg, var(--from) 0%, var(--to) 40%, var(--to) 100%); }

.wrap { max-width: var(--maxw); margin-inline: auto; }
.wrap--wide { max-width: var(--maxw-wide); margin-inline: auto; }

/* =========================================================================
   TYPE
   ========================================================================= */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.03em;
}
.h-mega  { font-size: clamp(3rem, 11.5vw, 10.5rem); font-weight: 700; }
.h-big   { font-size: clamp(2.5rem, 7.5vw, 6rem); }
.h-sect  { font-size: clamp(2rem, 5vw, 3.75rem); }
.h-card  { font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.08; }

.eyebrow {
  font-family: var(--ff-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lead {
  font-size: clamp(1.0625rem, 1rem + .5vw, 1.375rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}
/* the reset zeroes every margin, so paragraph rhythm is opt-in */
h1 + .lead, h2 + .lead, h3 + .lead, .h-sect + .lead, .h-big + .lead { margin-top: 1rem; }
.lead + .lead { margin-top: .9em; }
.lead + .swatches { margin-top: 1.5rem; }
.accent { font-family: var(--ff-accent); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
strong { font-weight: 600; color: var(--ink); }

/* =========================================================================
   BACKGROUND ATMOSPHERE
   Grain sits over everything (it also hides banding in the big gradients);
   the aurora drifts only in the calm sections, never behind artwork.
   Both animate transform/opacity only, so they stay on the compositor.
   ========================================================================= */
.grain {
  /* mix-blend-mode here cost 4.8 percentage points of dropped scroll frames:
     a fixed blended layer forces the viewport to be re-blended every frame.
     A plain low-opacity overlay composites for free and, at this strength,
     reads the same. No will-change either — the animation already promotes
     the layer, and hinting one this large just reserves GPU memory. */
  position: fixed; inset: -6%;
  z-index: 2; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 6s steps(6) infinite;
}
@keyframes grainShift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-2%, 1.5%, 0); }
  40%  { transform: translate3d(1.5%, -2%, 0); }
  60%  { transform: translate3d(-1.5%, -1.5%, 0); }
  80%  { transform: translate3d(2%, 1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; display: block;
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  border-radius: 50%;
  opacity: .55;
  /* contain paint so a drifting blob can't invalidate anything outside it */
  contain: strict;
}
/* tinted from the section's own two colours, so each chapter glows in its own hue */
.aurora__a {
  top: -18%; left: -12%;
  background: radial-gradient(circle, color-mix(in srgb, var(--from) 55%, #fff) 0%, transparent 68%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora__b {
  bottom: -22%; right: -10%;
  background: radial-gradient(circle, color-mix(in srgb, var(--to) 55%, #fff) 0%, transparent 68%);
  animation: drift2 34s ease-in-out infinite alternate;
}
.is-light .aurora span { opacity: .4; }
@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14vw, 8vh, 0) scale(1.18); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-12vw, -10vh, 0) scale(.92); }
}

/* =========================================================================
   CHROME — progress bar, top bar, dot nav
   ========================================================================= */
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 120;
  padding: .6rem 1rem; border-radius: 8px;
  background: #fff; color: #05080f; font-size: .875rem; font-weight: 600;
  transform: translateY(-160%); transition: transform .25s var(--ease);
}
.skip:focus { transform: none; }
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90;
  background: linear-gradient(90deg, #47e5ff, #8b5cf6, #ff6bd6);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  will-change: transform;
}

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem var(--pad);
  font-size: .8125rem;
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), color .4s var(--ease);
}
/* No backdrop-filter. Measured, it was the most expensive thing on the page
   while scrolling — 8.1% of frames over budget with it, 3.1% without — because
   it re-reads the backdrop every frame. At this plate opacity the blur was
   barely perceptible anyway, so it bought almost nothing. */
.topbar.stuck {
  background: rgba(8, 10, 20, .86);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.topbar.stuck.on-light {
  background: rgba(255, 255, 255, .88);
  color: #14101c;
  box-shadow: 0 1px 0 rgba(20, 16, 28, .1);
}
.topbar__name { font-family: var(--ff-display); font-weight: 700; letter-spacing: -.02em; font-size: .95rem; }
/* tells you which chapter you're in — the page is long, orientation matters */
.topbar__where {
  flex: 1; min-width: 0; margin-left: 1rem;
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: currentColor; opacity: 0; transition: opacity .35s var(--ease);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar.stuck .topbar__where { opacity: .55; }
.topbar__where span::before { content: "— "; opacity: .5; }
@media (max-width: 900px) { .topbar__where { display: none; } }
.topbar__links { display: flex; gap: 1.25rem; align-items: center; }
.topbar__links a { opacity: .72; transition: opacity .25s; }
.topbar__links a:hover { opacity: 1; }
.topbar__cta {
  padding: .4rem .95rem; border: 1px solid currentColor; border-radius: 100px;
  opacity: 1 !important; font-weight: 500;
}
.topbar__cta:hover { background: currentColor; }
.topbar__cta:hover span { mix-blend-mode: difference; }
@media (max-width: 720px) { .topbar__links a:not(.topbar__cta) { display: none; } }

.dotnav {
  position: fixed; right: max(1rem, 2vw); top: 50%; transform: translateY(-50%);
  z-index: 70; display: grid; gap: .7rem;
}
.dotnav button {
  position: relative;
  display: block; width: 8px; height: 8px; padding: 0; border: 0; cursor: pointer;
  border-radius: 100px; background: currentColor; opacity: .3;
  transition: opacity .3s, height .3s var(--ease);
}
.dotnav button[aria-current="true"] { opacity: 1; height: 22px; }
.dotnav button:hover { opacity: .75; }
/* name the destination on hover — unlabelled dots make people guess */
.dotnav__l {
  position: absolute; right: calc(100% + 12px); top: 50%; translate: 0 -50%;
  padding: .3rem .6rem; border-radius: 6px;
  background: rgba(10, 12, 22, .88); color: #fff;
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s var(--ease);
}
.is-light .dotnav__l { background: rgba(20, 16, 28, .9); }
.dotnav button:hover .dotnav__l,
.dotnav button:focus-visible .dotnav__l { opacity: 1; }
@media (max-width: 900px), (hover: none) { .dotnav { display: none; } }

/* =========================================================================
   HERO
   ========================================================================= */
#hero {
  min-height: 100svh;
  display: grid; align-content: center;
  padding-top: clamp(6rem, 16vh, 10rem);
  overflow: hidden;
}
.orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .5;
  transform: translate3d(calc(var(--mx, 0) * var(--f)), calc(var(--my, 0) * var(--f)), 0);
  transition: transform .9s var(--ease);
}
.orb--1 { width: 46vw; height: 46vw; left: -8vw;  top: 4vh;  --f: 24px; background: radial-gradient(circle, #4c1d95, transparent 70%); }
.orb--2 { width: 40vw; height: 40vw; right: -6vw; top: 26vh; --f: -32px; background: radial-gradient(circle, #0e7490, transparent 70%); }
.orb--3 { width: 30vw; height: 30vw; left: 32vw;  bottom: -8vh; --f: 18px; background: radial-gradient(circle, #a21caf, transparent 70%); }

.hero__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-bottom: clamp(1.25rem, 3vh, 2.5rem); }
.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 100px;
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  background: var(--card);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: pulse 2.4s infinite; }
@keyframes pulse { 70%, 100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } }

#hero h1 { margin-bottom: clamp(1rem, 2.5vh, 2rem); }
#hero h1 .line { display: block; overflow: hidden; }
#hero h1 .line > span {
  display: block;
  transform: translateY(105%);
  animation: riseIn 1.15s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes riseIn { to { transform: translateY(0); } }
.hero__grad {
  background: linear-gradient(96deg, #ffffff 8%, #9ad9ff 42%, #d59bff 68%, #ff9ad4 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 220% 100%; animation: slide 9s linear infinite alternate;
}
@keyframes slide { to { background-position: 100% 0; } }

.hero__role {
  font-family: var(--ff-display); font-weight: 400;
  font-size: clamp(1.1rem, 2.6vw, 2rem); letter-spacing: -.02em;
  color: var(--ink-soft); margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
}
.hero__meta { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: .8125rem; color: var(--ink-faint); letter-spacing: .05em; text-transform: uppercase; }

.scrollcue { display: flex; align-items: center; gap: .6rem; margin-top: clamp(2.5rem, 7vh, 5rem); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.scrollcue span { display: block; width: 1px; height: 34px; background: linear-gradient(180deg, currentColor, transparent); animation: drop 2s var(--ease) infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: 0 0; } 55%, 100% { transform: scaleY(1); transform-origin: 0 0; } }

/* =========================================================================
   SELECTED WORK — the scan surface
   A recruiter should see the whole body of work without scrolling 20,000px.
   ========================================================================= */
.whead { display: grid; gap: clamp(1rem, 3vw, 3rem); margin-bottom: clamp(2rem, 5vh, 3.5rem); }
@media (min-width: 860px) { .whead { grid-template-columns: 1fr 1fr; align-items: end; } }

.wgrid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .wgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .wgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.wcard { display: grid; gap: .1rem; align-content: start; }
.wcard__img {
  display: block; overflow: hidden; border-radius: 12px; margin-bottom: .7rem;
  background: var(--card); box-shadow: 0 1px 0 var(--line) inset;
}
.wcard__img img {
  width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover;
  transition: transform .7s var(--ease), filter .5s var(--ease);
  filter: saturate(.92);
}
.wcard__t { font-family: var(--ff-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -.02em; }
.wcard__m { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.wcard__o { margin-top: .3rem; font-size: .8125rem; color: var(--ink-soft); }
.wcard__o::before {
  content: ""; display: inline-block; width: 14px; height: 1px; margin-right: .5rem;
  vertical-align: middle; background: currentColor; opacity: .5;
}
@media (hover: hover) {
  .wcard:hover .wcard__img img { transform: scale(1.06); filter: saturate(1.05); }
  .wcard:hover .wcard__t { text-decoration: underline; text-underline-offset: 3px; }
}
.wcard:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; border-radius: 4px; }

/* outcome facts — what the work actually moved */
.outcomes { display: grid; gap: .55rem; margin-top: 1.5rem; }
.outcomes li { display: flex; align-items: baseline; gap: .6rem; font-size: .875rem; color: var(--ink-soft); }
.outcomes b {
  flex: none; min-width: 5.5rem;
  font-family: var(--ff-display); font-size: 1.125rem; font-weight: 700;
  letter-spacing: -.02em; color: var(--ink);
}

/* progressive disclosure for the long catalogue set */
.reveal-more:not(.open) .is-extra { display: none; }
.morebtn {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-top: 1.25rem; padding: .6rem 1.15rem;
  border: 1px solid var(--line); border-radius: 100px; background: var(--card);
  font-size: .8125rem; letter-spacing: .04em; color: var(--ink-soft); cursor: pointer;
  transition: color .25s, border-color .25s, background .25s;
}
.morebtn:hover { color: var(--ink); border-color: currentColor; background: var(--card-hi); }
.morebtn svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.morebtn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* =========================================================================
   ABOUT
   ========================================================================= */
.about {
  display: grid; gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) { .about { grid-template-columns: 1.15fr .85fr; } }

.about__portrait { position: relative; }
.about__portrait img {
  width: 100%;
  /* height:auto releases the width/height attributes so aspect-ratio can win,
     keeping the portrait roughly as tall as the bio column beside it */
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 12%;
  border-radius: 200px 200px var(--r) var(--r);
}
.about__portrait::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(180deg, transparent, var(--to));
  pointer-events: none; border-radius: 0 0 var(--r) var(--r);
}
.about__frame {
  position: absolute; inset: 8% -4% -3% 6%; z-index: -1;
  border: 1px solid var(--line); border-radius: 200px 12px 12px 12px;
}

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: clamp(2rem, 5vh, 3.5rem); background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 1.25rem 1.25rem 1.4rem; background: var(--from); }
.stat b { display: block; font-family: var(--ff-display); font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.stat small { display: block; margin-top: .4rem; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }

.cols { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr; margin-top: clamp(3rem, 7vh, 5rem); }
@media (min-width: 760px) { .cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cols--3 { grid-template-columns: repeat(3, 1fr); } }
.col h3 { font-size: .8125rem; font-family: var(--ff-body); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); padding-bottom: .75rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }

.tl { display: grid; gap: 1.1rem; }
.tl li { display: grid; gap: .15rem; padding-left: 1rem; border-left: 1px solid var(--line); position: relative; }
.tl li::before { content: ""; position: absolute; left: -3px; top: .5rem; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); }
.tl li:first-child::before { background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.tl b { font-weight: 600; font-size: .9375rem; }
.tl span { font-size: .8125rem; color: var(--ink-faint); }
.tl em { font-style: normal; font-size: .8125rem; color: var(--ink-soft); }

.bars { display: grid; gap: .8rem; }
.bar { display: grid; gap: .35rem; }
.bar__top { display: flex; justify-content: space-between; font-size: .8125rem; }
.bar__track { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #47e5ff, #a78bfa); transition: width 1.2s var(--ease) var(--d, 0s); }
.in .bar__fill { width: var(--w); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 100px; font-size: .8125rem; color: var(--ink-soft); background: var(--card); }

/* =========================================================================
   CHAPTER DIVIDERS
   ========================================================================= */
.chapter { display: grid; place-items: center; text-align: center; min-height: 62vh; }
.chapter .h-big { margin-bottom: 1rem; }
.chapter__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.chapter__tags li { display: flex; align-items: center; gap: 1.5rem; }
.chapter__tags li:not(:last-child)::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.rule { width: min(280px, 40vw); height: 2px; margin: 0 auto clamp(1.5rem, 4vh, 2.5rem); background: linear-gradient(90deg, transparent, currentColor, transparent); opacity: .5; }
#ch-marketing.chapter { align-content: start; place-items: start; text-align: left; min-height: 86vh; }
#ch-marketing .rule { margin-left: 0; }
#ch-marketing .chapter__tags { justify-content: flex-start; }

/* =========================================================================
   PROJECT HEADERS + META
   ========================================================================= */
.phead { display: grid; gap: clamp(1.25rem, 3vw, 3rem); margin-bottom: clamp(2.5rem, 6vh, 4rem); }
@media (min-width: 860px) { .phead { grid-template-columns: 1.1fr .9fr; align-items: end; } }
.phead__t .eyebrow { margin-bottom: .9rem; }
.phead__t h2 { margin-bottom: 1rem; }
.pmeta { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pmeta h4 { font-family: var(--ff-body); font-size: .6875rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .6rem; }
.pmeta li { font-size: .875rem; color: var(--ink-soft); }
.srcline { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; font-size: .8125rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: .2rem; transition: color .25s, border-color .25s; }
.srcline:hover { color: var(--ink); border-color: currentColor; }
.srcline svg { width: 13px; height: 13px; }

/* =========================================================================
   WORK GRIDS + FIGURES
   ========================================================================= */
.grid { display: grid; gap: clamp(.75rem, 1.6vw, 1.25rem); grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); align-items: start; }
@media (max-width: 900px) { .grid { --cols: 2 !important; } }
@media (max-width: 560px) {
  .grid { --cols: 1 !important; }
  /* the dense catalogue/banner sets stay two-up so the page doesn't run forever */
  .grid--tight { --cols: 2 !important; }
}
.grid--tight { gap: clamp(.5rem, 1vw, .8rem); }
.span2 { grid-column: span 2; }
@media (max-width: 560px) { .span2 { grid-column: span 1; } }

.fig { position: relative; margin: 0; }
.fig__btn {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: var(--card); border-radius: var(--r); overflow: hidden;
  box-shadow: 0 1px 0 var(--line) inset, 0 18px 40px -28px rgba(0, 0, 0, .7);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease);
}
.fig__btn img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: var(--ar, 16 / 10); transition: transform .8s var(--ease), filter .5s; }
.fig--tall .fig__btn img { --ar: 9 / 16; }
.fig--square .fig__btn img { --ar: 1 / 1; }
.fig--wide .fig__btn img { --ar: 21 / 9; }
/* Spreads, banners and mockups are the wrong shape for a uniform crop —
   let them keep their real proportions instead of sitting in a padded box. */
.fig--book .fig__btn img,
.fig--contain .fig__btn img { aspect-ratio: auto; height: auto; object-fit: contain; }
@media (hover: hover) {
  .fig__btn:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--card-hi) inset, 0 30px 60px -30px rgba(0, 0, 0, .8); }
  .fig__btn:hover img { transform: scale(1.035); }
}
.fig__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.fig figcaption { margin-top: .6rem; font-size: .78rem; line-height: 1.45; color: var(--ink-faint); }

/* full-bleed lead image */
.lead-img { margin-bottom: clamp(1rem, 2.5vw, 1.75rem); }

/* horizontal scroll rail for the social-media phone frames */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 22vw, 230px); gap: clamp(.6rem, 1.4vw, 1.1rem); overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 4px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.railhint { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }

/* marquee of tools */
.marquee { display: flex; overflow: hidden; gap: 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); margin-top: clamp(2rem, 5vh, 3rem); border-block: 1px solid var(--line); padding-block: 1.1rem; }
.marquee__row { display: flex; flex: 0 0 auto; gap: 2.5rem; padding-right: 2.5rem; animation: scroll 34s linear infinite; }
.marquee span { font-family: var(--ff-display); font-size: clamp(1.1rem, 2.4vw, 1.9rem); font-weight: 500; letter-spacing: -.02em; color: var(--ink-faint); white-space: nowrap; }
.marquee span:nth-child(even) { color: var(--ink-soft); }
@keyframes scroll { to { transform: translateX(-100%); } }
.marquee:hover .marquee__row { animation-play-state: paused; }

/* pull quote */
.quote { max-width: 40ch; margin: clamp(2.5rem, 6vh, 4rem) auto; text-align: center; font-family: var(--ff-accent); font-style: italic; font-size: clamp(1.5rem, 3.6vw, 2.6rem); line-height: 1.18; letter-spacing: -.02em; color: var(--ink); }
.quote cite { display: block; margin-top: 1rem; font-family: var(--ff-body); font-style: normal; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }

/* KPI strip for the Scale Effect */
/* 2x2 then 4-up — auto-fit left a dead cell once the labels widened the tracks */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: clamp(1.5rem, 4vh, 2.5rem); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 1.1rem 1.25rem; background: color-mix(in srgb, var(--from) 88%, #000); }
.kpi b { display: block; font-family: var(--ff-display); font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 700; letter-spacing: -.03em; }
.kpi small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-top: .3rem; }

/* palette swatches for Éclarén */
.swatches { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.sw { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: var(--ink-soft); }
.sw i { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); }

/* =========================================================================
   CONTACT
   ========================================================================= */
#contact { text-align: center; padding-top: clamp(8rem, 22vh, 14rem); }
/* sits over the last of the pink, so it needs more weight than a dark-section eyebrow */
#contact .eyebrow { color: rgba(255, 255, 255, .75); }
.contact__mail { display: inline-block; font-family: var(--ff-display); font-weight: 600; font-size: clamp(1.35rem, 5.5vw, 3.6rem); letter-spacing: -.035em; line-height: 1.05; word-break: break-word; background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .6s var(--ease); }
.contact__mail:hover { background-size: 100% 1px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: clamp(2rem, 5vh, 3rem); }
.links a { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.15rem; border: 1px solid var(--line); border-radius: 100px; font-size: .875rem; color: var(--ink-soft); transition: color .3s, border-color .3s, background .3s, transform .3s var(--ease); }
.links a:hover { color: #fff; border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .07); transform: translateY(-2px); }
.foot { margin-top: clamp(4rem, 12vh, 7rem); padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .75rem; color: var(--ink-faint); }

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background: rgba(4, 6, 12, .93); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; }
.lb[data-open="true"] { opacity: 1; visibility: visible; }
.lb__img { max-width: 100%; max-height: 78vh; width: auto; border-radius: 10px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); transform: scale(.97); transition: transform .45s var(--ease); }
.lb[data-open="true"] .lb__img { transform: scale(1); }
.lb__cap { margin-top: 1.1rem; max-width: 60ch; text-align: center; font-size: .875rem; color: rgba(255, 255, 255, .66); }
.lb__cap b { display: block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .4); margin-bottom: .35rem; font-weight: 500; }
.lb__btn { position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; transition: background .25s, border-color .25s; }
.lb__btn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); }
.lb__btn--prev { left: clamp(.5rem, 2vw, 2rem); }
.lb__btn--next { right: clamp(.5rem, 2vw, 2rem); }
.lb__close { position: absolute; top: clamp(.75rem, 2vw, 1.75rem); right: clamp(.75rem, 2vw, 1.75rem); translate: none; }
@media (max-width: 640px) { .lb__btn--prev, .lb__btn--next { top: auto; bottom: 1rem; translate: none; } }

/* =========================================================================
   REVEAL
   ========================================================================= */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity var(--dur) var(--ease) var(--d, 0s), transform var(--dur) var(--ease) var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="scale"] { transform: scale(.965); }
[data-reveal="left"] { transform: translateX(-26px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  #hero h1 .line > span { transform: none; }
  .orb { transform: none; }
  .bar__fill { width: var(--w); }
  /* keep the atmosphere, drop the motion */
  .grain { animation: none; }
  .aurora span { animation: none; }
}

@media print {
  .topbar, .dotnav, .progress, .lb, .scrollcue, .grain, .aurora, .orbs, .morebtn, .skip { display: none !important; }
  .section { background: #fff !important; color: #000 !important; padding: 1.5rem 0; break-inside: avoid; }
  :root { --ink: #000; --ink-soft: #333; --ink-faint: #666; --line: #ccc; }
  .reveal-more .is-extra { display: block !important; }
}
