/* ==========================================================================
   Elena Isnenghi | Design system
   Brand: black + magenta #E5107C + indigo #24078E + lavender #CAC8D2
   Motif: offset extrusion (from the E mark) translated into depth
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --brand-magenta: #d9006e;
  --brand-magenta-pure: #e5107c;
  --brand-indigo: #24078e;
  --brand-lavender: #cac8d2;

  --paper: #edecf2;
  --paper-deep: #e2e0ea;
  --surface: #ffffff;
  --surface-2: #f7f6fb;
  --ink: #0b0a10;
  --ink-soft: #4a4757;
  --ink-faint: #74707f;
  --line: #d7d4e2;
  --line-strong: #b9b5c9;

  --accent: var(--brand-magenta);
  --accent-ink: #ffffff;
  --accent-2: var(--brand-indigo);
  --accent-2-ink: #ffffff;

  --shadow-1: 0 1px 2px rgb(11 10 16 / 0.06), 0 8px 24px rgb(11 10 16 / 0.06);
  --shadow-2: 0 2px 4px rgb(11 10 16 / 0.08), 0 24px 60px rgb(11 10 16 / 0.12);
  --extrude: 6px;

  --font-display: "Playfair Display", "Iowan Old Style", "Songti SC", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans", "Noto Sans CJK JP", "Yu Gothic", sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.34rem + 0.8vw, 2.05rem);
  --step-3: clamp(1.95rem, 1.6rem + 1.75vw, 3rem);
  --step-4: clamp(2.5rem, 1.85rem + 3.25vw, 4.5rem);
  --step-5: clamp(3.1rem, 1.9rem + 6vw, 7.5rem);

  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --bleed: min(1600px, 100% - var(--gutter) * 2);
  --measure: 68ch;

  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --dur-fast: 140ms;
  --dur: 320ms;
  --dur-slow: 720ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);

  --z-nav: 80;
  --z-overlay: 90;
  --z-banner: 100;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --paper: #08070d;
  --paper-deep: #05050a;
  --surface: #14121d;
  --surface-2: #1b1826;
  --ink: #f3f2f8;
  --ink-soft: #b7b3c6;
  --ink-faint: #8b8699;
  --line: #2a2637;
  --line-strong: #3d3850;

  --accent: #ff4fa3;
  --accent-ink: #14001f;
  --accent-2: #9b8cff;
  --accent-2-ink: #0d0820;

  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px rgb(0 0 0 / 0.45);
  --shadow-2: 0 2px 4px rgb(0 0 0 / 0.55), 0 28px 70px rgb(0 0 0 / 0.6);
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

body.is-locked { overflow: hidden; }

img,
picture,
video,
svg { display: block; max-width: 100%; }

img { height: auto; }

a { color: inherit; text-decoration: none; }

button,
input,
textarea,
select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

strong { font-weight: 650; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -120%;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 12px 12px;
  font-weight: 600;
}
.skip-link:focus-visible { translate: -50% 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Layout ---------- */
.wrap {
  width: var(--bleed);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3.5rem, 9vw, 8.5rem);
}

.section--tight { padding-block: clamp(2.5rem, 6vw, 5rem); }

.stack > * + * { margin-top: var(--flow, 1.1rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 1.9rem;
  height: 2px;
  background: var(--accent);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.prose { max-width: var(--measure); }
.prose h3 {
  font-size: var(--step-2);
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
}
.prose h3.step, .prose h4 {
  font-size: var(--step-1);
  margin-top: 1.8rem;
  margin-bottom: 0.4rem;
  color: var(--accent);
}
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent); }

.serif-accent {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid var(--btn-bg);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: center;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
  box-shadow: var(--extrude) var(--extrude) 0 0 var(--accent);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--extrude) + 2px) calc(var(--extrude) + 2px) 0 0 var(--accent); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--accent); }

.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--accent-ink); box-shadow: var(--extrude) var(--extrude) 0 0 var(--ink); }
.btn--accent:hover { box-shadow: calc(var(--extrude) + 2px) calc(var(--extrude) + 2px) 0 0 var(--ink); }
.btn--accent:active { box-shadow: 2px 2px 0 0 var(--ink); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: none; box-shadow: none; }
.btn--ghost:active { transform: none; box-shadow: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--accent);
  min-height: 44px;
}
.link-arrow svg { width: 1.1em; height: 1.1em; transition: translate var(--dur) var(--ease); }
.link-arrow:hover svg { translate: 0.3em 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.site-header[data-stuck="true"] { border-bottom-color: var(--line); }

.site-header__inner {
  width: var(--bleed);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-height: 44px;
}
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { font-size: 1.02rem; white-space: nowrap; }
.brand__role {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.2;
}

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 550;
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 12px;
  height: 2px;
  background: var(--accent);
  scale: 0 1;
  transform-origin: left;
  transition: scale var(--dur) var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { scale: 1 1; }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 650; }
.nav__link[aria-current="page"]::after { scale: 1 1; }

.header-tools { display: flex; align-items: center; gap: 0.45rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.icon-btn--wide { width: auto; padding-inline: 0.85rem; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.06em; }

.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }

/* Language menu */
.lang { position: relative; }
.lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 190px;
  padding: 0.4rem;
  margin: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  display: none;
}
.lang__menu[data-open="true"] { display: block; }
.lang__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 9px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.lang__menu a:hover { background: var(--surface-2); color: var(--ink); }
.lang__menu a[aria-current="true"] { color: var(--accent); font-weight: 650; }
.lang__code {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.burger { display: none; }

/* Mobile overlay nav (sibling of header so the logo stays visible) */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  padding: calc(72px + 2rem) var(--gutter) 2rem;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.mobile-nav[data-open="true"] { visibility: visible; opacity: 1; }
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.mobile-nav__link[aria-current="page"] { color: var(--accent); }
.mobile-nav__meta { margin-top: 2.5rem; color: var(--ink-faint); font-size: var(--step--1); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem;
}
.site-footer__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
.footer-word {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin: 0 0 1rem;
}
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 0.3rem; }
.footer-list a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-soft); }
.footer-list a:hover { color: var(--accent); }
.footer-title {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.6rem;
}
.site-footer__bottom {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: var(--step--1);
  color: var(--ink-faint);
}
.site-footer__bottom a:hover { color: var(--accent); }
.social-row { display: flex; gap: 0.4rem; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.social-row a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.social-row svg { width: 19px; height: 19px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 10vw, 7rem) clamp(4.5rem, 11vw, 9rem);
  overflow: clip;
}
.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
  display: block;
}
.hero__name {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.4rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}
.stat { min-width: 8rem; text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: var(--step--1);
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

/* ---------- Marquee (3D band, scroll driven) ---------- */
.marquee {
  --persp: 620px;
  position: relative;
  overflow: hidden;
  padding-block: clamp(1.5rem, 4vw, 3rem);
  border-block: 1px solid var(--line);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--accent) 8%, var(--surface)) 0%,
      var(--surface) 45%,
      color-mix(in srgb, var(--accent-2) 7%, var(--surface)) 100%);
}

.marquee__band {
  transform-style: preserve-3d;
  transform: rotateX(var(--band-rx, 13deg)) rotateZ(var(--band-rz, -1.4deg));
  transition: transform 200ms linear;
}
.marquee__band--b { --band-rx: -13deg; --band-rz: 1.4deg; margin-top: clamp(1.6rem, 4vw, 2.8rem); }

.marquee__track {
  display: flex;
  gap: clamp(3rem, 7vw, 6rem);
  width: max-content;
  will-change: transform;
  transform: translate3d(var(--mx, 0px), 0, 0);
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.4vw, 3.1rem);
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.025em;
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0.035em 0.035em 0 var(--accent);
}
.marquee__item::after {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.marquee__item--alt {
  color: var(--ink);
  text-shadow: 0.035em 0.035em 0 var(--accent-2);
}
.marquee__item--alt::after { background: var(--accent-2); }

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr;
}

.work-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.work-card:hover { border-color: var(--accent); box-shadow: var(--shadow-2); }

.work-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.work-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease);
}
.work-card:hover .work-card__media img { scale: 1.045; }

.work-card__body { padding: 1.35rem clamp(1.25rem, 3vw, 1.85rem) 1.6rem; }
.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.tag--solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.work-card__title {
  font-size: var(--step-2);
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}
.work-card__meta { font-size: var(--step--1); color: var(--ink-faint); }
.work-card__excerpt { margin-top: 0.7rem; color: var(--ink-soft); font-size: 0.97rem; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.filter {
  min-height: 44px;
  padding: 0 1.05rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- Cards / services ---------- */
.card-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: 1fr;
}
.card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card-grid .card { height: 100%; }
.card__index {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}
.card__title { font-size: var(--step-1); margin-bottom: 0.55rem; }
.card__text { color: var(--ink-soft); font-size: 0.98rem; }

.step-list { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 3.4rem;
  min-height: 2.4rem;
}
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -0.1rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.step-list h3, .step-list h4 { font-size: var(--step-0); font-weight: 650; margin: 0 0 0.25rem; color: var(--ink); }
.step-list p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Project page ---------- */
.project-hero { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem); }
.project-hero__title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  letter-spacing: -0.035em;
  margin-bottom: 1.1rem;
}
.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 1.25rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.fact__label {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.3rem;
}
.fact__value { font-weight: 550; overflow-wrap: anywhere; }

.figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.figure img { width: 100%; }
.figure figcaption {
  padding: 0.75rem 1rem;
  font-size: var(--step--1);
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

.gallery {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: 1fr;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
.gallery--duo { grid-template-columns: 1fr; }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.pager__label { font-size: var(--step--1); color: var(--ink-faint); display: block; }
.pager__title { font-family: var(--font-display); font-size: var(--step-2); letter-spacing: -0.02em; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step-1);
  overflow-wrap: anywhere;
}
.contact-line svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.contact-line a:hover { color: var(--accent); }

/* ---------- Legal ---------- */
.legal { max-width: 72ch; }
.legal h2 { font-size: var(--step-2); margin-top: 2.5rem; margin-bottom: 0.8rem; }
.legal h3 { font-size: var(--step-1); margin-top: 1.8rem; margin-bottom: 0.5rem; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.94rem;
}
.legal th, .legal td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal th { font-weight: 650; color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* ---------- Cookie banner ---------- */
body.is-locked .cookie { display: none; }

.cookie {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: var(--z-banner);
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  translate: 0 130%;
  opacity: 0;
  visibility: hidden;
  transition: translate var(--dur-slow) var(--ease-spring), opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.cookie[data-open="true"] { translate: 0 0; opacity: 1; visibility: visible; }
.cookie__title { font-size: var(--step-1); margin-bottom: 0.5rem; }
.cookie__text { font-size: 0.94rem; color: var(--ink-soft); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.cookie__actions .btn { flex: 1 1 auto; min-width: 10rem; box-shadow: none; }
.cookie__actions .btn:hover { transform: none; box-shadow: none; }
.cookie__prefs { margin-top: 1rem; display: none; }
.cookie__prefs[data-open="true"] { display: block; }
.consent-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.consent-row label { font-weight: 600; font-size: 0.95rem; cursor: pointer; }
.consent-row p { font-size: 0.86rem; color: var(--ink-faint); margin: 0.2rem 0 0; }
.consent-row input { width: 22px; height: 22px; margin-top: 0.2rem; accent-color: var(--accent); flex: none; cursor: pointer; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding-block: clamp(4rem, 12vw, 9rem); }
.error-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 22vw, 14rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav, .lang { display: none; }
  .burger { display: inline-flex; }
  .brand__name { font-size: 0.95rem; }
}

@media (min-width: 640px) {
  .gallery--duo { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid--featured > :first-child { grid-column: 1 / -1; }
  .work-grid--featured > :first-child .work-card__media { aspect-ratio: 21 / 9; }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .contact-grid { grid-template-columns: 1.1fr 0.9fr; }
  .split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
  .split--reverse { grid-template-columns: 1.15fr 0.85fr; }
  .sticky-col { position: sticky; top: 100px; }
}

@media (min-width: 1200px) {
  .work-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Card link (added after components) ---------- */
.work-card__link { display: block; color: inherit; }
.work-card__body ul { list-style: none; padding: 0; }

/* ---------- Flip cards share the row height ---------- */
.card-grid > .flip { height: 100%; }
.flip__inner { height: 100%; }
.flip__face { height: 100%; }

/* ---------- Inline icon sizing (SVGs have no intrinsic size) ---------- */
.btn svg,
.link-arrow svg,
.contact-line svg,
.icon-btn svg,
.social-row svg,
.cookie svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}
.btn svg { width: 1.05em; height: 1.05em; }
.icon-btn svg { width: 18px; height: 18px; }
.social-row svg { width: 19px; height: 19px; }
.contact-line svg { width: 22px; height: 22px; }

/* ---------- Stats read as a grid, not a ragged row ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
@media (min-width: 900px) {
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Buttons stay on one line ---------- */
.btn,
.link-arrow,
.filter,
.nav__link {
  white-space: nowrap;
  text-wrap: nowrap;
  max-width: 100%;
}
.btn { padding-inline: clamp(1.1rem, 3.5vw, 1.6rem); }
@media (max-width: 380px) {
  .btn { font-size: 0.95rem; padding-inline: 1rem; }
}

/* ==========================================================================
   Pink 3D intro curtain
   ========================================================================== */
:root[data-intro="run"] { overflow: hidden; }
:root[data-intro="run"] body { overflow: hidden; }
:root[data-intro="done"] .intro { display: none; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  perspective: 900px;
  background:
    radial-gradient(120% 90% at 22% 12%, #ff5fb0 0%, transparent 58%),
    radial-gradient(110% 100% at 82% 88%, #7b2bd8 0%, transparent 60%),
    linear-gradient(155deg, #e5107c 0%, #b2007c 46%, #24078e 100%);
  animation: intro-out 480ms var(--ease) 1500ms forwards;
}

.intro__stage {
  transform-style: preserve-3d;
  text-align: center;
  padding: var(--gutter);
  animation: intro-stage 1600ms var(--ease) both;
}

.intro__mark {
  width: clamp(96px, 22vw, 168px);
  height: auto;
  margin: 0 auto 1.4rem;
  overflow: visible;
  transform-style: preserve-3d;
}

.intro__bar,
.intro__e,
.intro__dot { transform-box: fill-box; transform-origin: 50% 50%; }

.intro__bar {
  fill: #ffd9ec;
  animation: mark-slide 700ms var(--ease-spring) 120ms both;
}
.intro__e {
  fill: #ffffff;
  animation: mark-build 760ms var(--ease-spring) 260ms both;
}
.intro__dot {
  fill: #24078e;
  stroke: #ffffff;
  stroke-width: 2.4;
  paint-order: stroke;
  animation: mark-pop 620ms var(--ease-spring) 620ms both;
}

.intro__word {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  font-style: italic;
  letter-spacing: -0.02em;
  color: #fff;
  animation: intro-text 700ms var(--ease) 760ms both;
}
.intro__role {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.88);
  animation: intro-text 700ms var(--ease) 900ms both;
}

@keyframes mark-slide {
  from { opacity: 0; transform: translate3d(-70px, 0, -260px) rotateY(-55deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes mark-build {
  from { opacity: 0; transform: translate3d(0, 34px, -420px) rotateX(48deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes mark-pop {
  from { opacity: 0; transform: translate3d(0, 0, 320px) scale(2.4); }
  to   { opacity: 1; transform: none; }
}
@keyframes intro-text {
  from { opacity: 0; transform: translate3d(0, 16px, -80px); }
  to   { opacity: 1; transform: none; }
}
@keyframes intro-stage {
  from { transform: rotateX(9deg) rotateY(-9deg) translateZ(-40px); }
  to   { transform: rotateX(0) rotateY(0) translateZ(0); }
}
@keyframes intro-out {
  to {
    opacity: 0;
    visibility: hidden;
    transform: perspective(900px) rotateX(-16deg) translate3d(0, -18%, 180px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}

/* ==========================================================================
   Mobile refinements
   ========================================================================== */

/* Hero deck: keep every plate inside the viewport on small screens */
.deck__plate { width: calc(var(--w, 62%) * var(--wscale, 1)); }

/* Home about teaser: copy, then a small portrait, then the button */
.about-split {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.about-split__copy { order: 1; }
.about-split__media { order: 2; max-width: 190px; }
.about-split__cta { order: 3; }

@media (min-width: 900px) {
  .about-split {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    column-gap: clamp(2rem, 6vw, 5rem);
    row-gap: 2rem;
    align-items: center;
  }
  .about-split__media { grid-column: 1; grid-row: 1 / span 2; max-width: none; align-self: center; }
  .about-split__copy { grid-column: 2; grid-row: 1; align-self: end; }
  .about-split__cta { grid-column: 2; grid-row: 2; align-self: start; }
}

/* About page hero: copy, small portrait, cube on the right */
.about-hero {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 5vw, 2.5rem);
}
.about-hero__portrait { margin: 0; max-width: 210px; }
.about-hero__cube { display: flex; justify-content: flex-end; padding-block: 2rem 0.5rem; }

@media (min-width: 900px) {
  .about-hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    column-gap: clamp(2rem, 6vw, 5rem);
    row-gap: 2.5rem;
    align-items: start;
  }
  .about-hero__copy { grid-column: 1; grid-row: 1 / span 2; }
  .about-hero__cube { grid-column: 2; grid-row: 1; }
  .about-hero__portrait { grid-column: 2; grid-row: 2; max-width: none; }
}

/* Footer: three short columns beside each other on phones */
@media (max-width: 899px) {
  .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem 0.9rem; }
  .site-footer__grid > :first-child { grid-column: 1 / -1; }
  .footer-list a, .footer-list li { font-size: 0.84rem; overflow-wrap: anywhere; }
  .footer-list a { min-height: 34px; }
  .footer-title { font-size: 0.7rem; letter-spacing: 0.1em; }
  .site-footer__bottom { flex-direction: column; text-align: center; gap: 0.4rem; }
}

/* Mobile overlay navigation */
.mobile-nav__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin-bottom: 1.5rem;
}
.mobile-nav__close { position: absolute; right: 0; top: 50%; translate: 0 -50%; }
.brand--stacked {
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}
.brand--stacked .brand__mark { width: 38px; height: 38px; }

.lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.lang-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 44px;
  padding: 0 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.lang-chip:hover { border-color: var(--accent); color: var(--accent); }
.lang-chip[aria-current="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ==========================================================================
   Motion films: YouTube facade, nothing loads until the visitor clicks
   ========================================================================== */
.video-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid--one { grid-template-columns: 1fr; }
}

.video {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.video:hover { border-color: var(--accent); box-shadow: var(--shadow-2); }

.video__trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #0b0a10;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video__media { display: block; height: 100%; }
.video__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale var(--dur-slow) var(--ease), opacity var(--dur) var(--ease);
}
.video__trigger:hover .video__media img { scale: 1.04; opacity: 0.82; }

.video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  pointer-events: none;
}
.video__play svg {
  width: clamp(58px, 9vw, 82px);
  height: clamp(58px, 9vw, 82px);
  filter: drop-shadow(0 6px 24px rgb(0 0 0 / 0.55));
  transition: scale var(--dur) var(--ease-spring), color var(--dur) var(--ease);
}
.video__trigger:hover .video__play svg { scale: 1.09; color: #ff4fa3; }

.video__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.video__body { padding: 1.15rem clamp(1.15rem, 3vw, 1.6rem) 1.4rem; }
.video__title { font-size: var(--step-1); margin-bottom: 0.25rem; }
.video__meta { font-size: var(--step--1); color: var(--ink-faint); }

/* ==========================================================================
   Featured: one large card, then a rail that loops both ways
   ========================================================================== */
.featured {
  display: grid;
  /* minmax(0,1fr) or the rail's content width blows the whole column out */
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.featured > * { min-width: 0; }
.rail, .rail__viewport { min-width: 0; max-width: 100%; }
.featured__hero .work-card__media { aspect-ratio: 16 / 10; }
@media (min-width: 900px) {
  .featured__hero .work-card__media { aspect-ratio: 21 / 9; }
}

.rail {
  --card-w: clamp(250px, 30vw, 400px);
  position: relative;
}

.rail__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  border-radius: var(--radius-lg);
  /* the rail may bleed past the gutter, so give the focus ring room */
  padding-block: 2px;
}
.rail__viewport::-webkit-scrollbar { width: 0; height: 0; display: none; }
.rail__viewport[data-dragging="true"] { cursor: grabbing; user-select: none; }
.rail__viewport[data-dragging="true"] .work-card { pointer-events: none; }
.rail__viewport:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.rail__track {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  width: max-content;
}
.rail__track > .work-card { flex: 0 0 var(--card-w); }
.rail__track .work-card__media { aspect-ratio: 16 / 10; }

.rail__nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(var(--card-w) * 0.625);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding-inline: 0.6rem;
}
.rail__btn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
}
.rail__btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rail__btn svg { width: 19px; height: 19px; }

@media (max-width: 700px) {
  .rail__btn { width: 42px; height: 42px; }
  .rail__nav { padding-inline: 0.35rem; }
}
