/* ==========================================================================
   mblab — site vitrine
   ========================================================================== */

:root {
  --bg: #08080a;
  --bg-2: #101013;
  --fg: #f2efe9;
  --muted: #8b8881;
  --line: rgba(242, 239, 233, 0.12);
  --accent: #ff1f2e;

  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
::selection { background: var(--accent); color: var(--bg); }

.kicker {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.section-title em { color: var(--accent); }

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--gutter);
  background: var(--bg);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-in-out);
}
.intro__name {
  display: flex;
  flex-direction: column;
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.intro__line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.intro__line > span {
  display: block;
  transform: translateY(105%);
  animation: lineUp 1s var(--ease) forwards;
}
.intro__line:nth-child(2) > span { animation-delay: 0.12s; }
.intro__count {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.intro-done .intro { clip-path: inset(0 0 100% 0); }
.no-intro .intro { display: none; }

.intro__name em { color: var(--accent); }
@keyframes lineUp { to { transform: translateY(0); } }

/* --------------------------------------------------------------------------
   Cursor & grain
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), opacity 0.3s;
}
.cursor.is-visible { opacity: 1; }
.cursor.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 80;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px var(--gutter);
  transition: transform 0.6s var(--ease), background-color 0.4s, backdrop-filter 0.4s;
}
.nav.is-solid {
  background: rgba(8, 8, 10, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav.is-hidden { transform: translateY(-100%); }

.nav__logo { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.nav__mono {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  transition: background 0.3s, color 0.3s;
}
.nav__logo:hover .nav__mono { background: var(--fg); color: var(--bg); }
.nav__mono svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav__name { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.03em; }
.nav__name em { color: var(--accent); }

.nav__links { display: flex; gap: 2rem; font-size: 0.95rem; }
.nav__links a { position: relative; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.lang {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(242, 239, 233, 0.22);
  border-radius: 999px;
  background: rgba(8, 8, 10, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--fg);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}
.lang__opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  opacity: 0.6;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), opacity 0.35s;
}
.lang__opt img { width: 18px; height: 12px; border-radius: 2px; object-fit: cover; }
.lang:hover .lang__opt { opacity: 0.85; }
.lang .lang__opt.is-active { background: var(--fg); color: var(--bg); opacity: 1; }

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: 110px var(--gutter) 28px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at var(--lab-x, 72%) var(--lab-y, 46%), rgba(255, 31, 46, 0.14), transparent 42%);
}
/* Particules (dessinées dans js/main.js) */
.hero__particles { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__main {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 4rem);
}
.hero__content { position: relative; align-self: end; }
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.75);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 31, 46, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255, 31, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 31, 46, 0); }
}

.hero__title {
  margin: 0;
  font-size: clamp(5rem, 13vw, 14rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: block; transform: translateY(110%); transition: transform 1.3s var(--ease); }
.hero__title em { padding-right: 0.05em; color: var(--accent); }
.intro-done .hero__title .line > span,
.no-intro .hero__title .line > span { transform: translateY(0); }

/* Labo : fiole + objets en orbite */
.lab {
  position: relative;
  justify-self: center;
  width: min(100%, 620px);
  aspect-ratio: 1;
  transition-delay: 0.7s;
}
.lab__glow {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 31, 46, 0.45), transparent 65%);
  filter: blur(30px);
  animation: labGlow 5s ease-in-out infinite;
}
@keyframes labGlow { 50% { opacity: 0.55; transform: scale(0.92); } }

.lab__ring {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 92%;
  height: 28%;
  border: 1px dashed rgba(242, 239, 233, 0.16);
  border-radius: 50%;
  translate: -50% -50%;
  rotate: -10deg;
}

.lab__flask {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 44%;
  overflow: visible;
  translate: -50% -50%;
  animation: labFloat 6s ease-in-out infinite;
}
@keyframes labFloat { 50% { transform: translateY(-10px); } }
.lab__glass { fill: rgba(242, 239, 233, 0.03); stroke: rgba(242, 239, 233, 0.9); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lab__marks { fill: none; stroke: rgba(242, 239, 233, 0.45); stroke-width: 2; stroke-linecap: round; }
.lab__shine { fill: none; stroke: rgba(242, 239, 233, 0.22); stroke-width: 4; stroke-linecap: round; }
.lab__wave { animation: labWave 3.2s linear infinite; }
.lab__wave--back { fill: rgba(255, 31, 46, 0.35); animation-duration: 5s; animation-direction: reverse; }
@keyframes labWave { to { transform: translateX(100px); } }
.lab__bubble {
  fill: rgba(255, 255, 255, 0.55);
  transform-box: fill-box;
  animation: labBubble 3.6s ease-in infinite;
  opacity: 0;
}
.lab__bubble:nth-of-type(2) { animation-delay: 0.9s; animation-duration: 3s; }
.lab__bubble:nth-of-type(3) { animation-delay: 1.7s; }
.lab__bubble:nth-of-type(4) { animation-delay: 2.4s; animation-duration: 2.8s; }
.lab__bubble:nth-of-type(5) { animation-delay: 1.2s; animation-duration: 4s; }
@keyframes labBubble {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-75px); opacity: 0; }
}
.lab__vapor {
  fill: rgba(242, 239, 233, 0.35);
  transform-box: fill-box;
  animation: labVapor 3s ease-out infinite;
  opacity: 0;
}
.lab__vapor:nth-of-type(2) { animation-delay: 1s; }
.lab__vapor:nth-of-type(3) { animation-delay: 2s; }
@keyframes labVapor {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  30% { opacity: 0.8; }
  100% { transform: translateY(-46px) scale(1.6); opacity: 0; }
}

.lab__item {
  position: absolute;
  left: 50%;
  top: 60%;
  display: grid;
  place-items: center;
  width: 11%;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 239, 233, 0.16);
  border-radius: 30%;
  background: rgba(22, 22, 26, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--fg);
  will-change: transform, opacity;
}
.lab__item svg {
  width: 48%;
  height: 48%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lab__item--accent { color: var(--accent); }

@media (max-width: 900px) {
  .hero { padding-top: 90px; }
  .hero__main { grid-template-columns: 1fr; gap: 0; }
  .lab { order: -1; width: min(88vw, 420px); }
  .hero__title { font-size: clamp(5rem, 27vw, 9rem); }
}

.hero__lead {
  max-width: 30ch;
  margin: 1.75rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: rgba(242, 239, 233, 0.85);
}
.hero__lead em { color: var(--fg); font-size: 1.1em; }

.hero__foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2.5rem, 7vh, 5rem);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.hero__scroll { display: flex; align-items: center; gap: 12px; color: var(--fg); }
.hero__scroll i {
  position: relative;
  width: 1px;
  height: 28px;
  overflow: hidden;
  background: var(--line);
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  animation: scrollLine 1.8s var(--ease-in-out) infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease) 0.5s, transform 1s var(--ease) 0.5s; }
.intro-done .reveal-up,
.no-intro .reveal-up { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.marquee__track { display: inline-flex; animation: marquee 32s linear infinite; }
.marquee__track span {
  padding-right: 0.5em;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 239, 233, 0.35);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Work
   -------------------------------------------------------------------------- */
.work { padding: clamp(5rem, 12vw, 10rem) var(--gutter) 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.section-head .kicker { grid-column: 1 / -1; }
.section-count {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-style: italic;
  line-height: 1;
  color: var(--muted);
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(4rem, 10vw, 9rem) 0;
  border-bottom: 1px solid var(--line);
}
.project__index {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--accent);
}
.project__tag {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.project__title {
  margin: 0;
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.055em;
}
.project__punch {
  margin: 0.75rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-style: italic;
  color: rgba(242, 239, 233, 0.8);
}
.project__desc {
  max-width: 46ch;
  margin: 1.75rem 0 0;
  font-size: 1.05rem;
  color: rgba(242, 239, 233, 0.72);
}
.project__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 46ch;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.project__meta dt { margin-bottom: 4px; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.project__meta dd { margin: 0; font-size: 0.95rem; }
.project__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.25rem; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  overflow: hidden;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.95rem;
  font-weight: 500;
  isolation: isolate;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { border-color: var(--accent); color: var(--bg); }
.btn i { font-style: normal; transition: transform 0.5s var(--ease); }
.btn:hover i { transform: translate(3px, -3px); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line); }

/* Tela phones */
.tela-phones {
  position: relative;
  aspect-ratio: 1 / 1.05;
  display: grid;
  place-items: center;
}
.tela-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45), rgba(37, 99, 235, 0) 65%);
  filter: blur(30px);
}
.phone {
  position: absolute;
  width: 38%;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6));
  will-change: transform;
}
.phone--1 { left: 4%; top: 14%; rotate: -8deg; }
.phone--2 { left: 31%; top: 4%; z-index: 2; width: 40%; }
.phone--3 { right: 4%; top: 16%; rotate: 8deg; }

/* mbpix stack */
.mbpix-stack { position: relative; aspect-ratio: 1 / 1.1; }
.frame { position: absolute; margin: 0; overflow: hidden; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); will-change: transform; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.frame:hover img { transform: scale(1.05); }
.frame--a { left: 0; top: 6%; width: 72%; aspect-ratio: 3 / 2; }
.frame--b { right: 0; top: 30%; width: 42%; aspect-ratio: 2 / 3; z-index: 2; }
.frame--c { left: 10%; bottom: 0; width: 55%; aspect-ratio: 3 / 2; }

/* @phauto_ stats, under mbpix */
.project__extra { grid-column: 1 / -1; margin-top: clamp(1rem, 4vw, 3rem); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 2.5rem 1rem; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:nth-child(2) { transition-delay: 0.1s; }
.stat:nth-child(3) { transition-delay: 0.2s; }
.stat:nth-child(4) { transition-delay: 0.3s; }
.stat__num {
  margin: 0;
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.stat__label { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--muted); }

@media (max-width: 900px) {
  .project { grid-template-columns: 1fr; }
  .project--mbpix .project__visual { order: 2; }
  .project__extra { order: 3; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* Grand écran : chiffres @phauto_ en colonne, dans l'espace libre à droite du texte */
@media (min-width: 1440px) {
  .project--mbpix { position: relative; }
  .project--mbpix .project__extra {
    position: absolute;
    top: 50%;
    right: 0;
    width: 130px;
    margin: 0;
    transform: translateY(-50%);
  }
  .project--mbpix .stats { grid-template-columns: 1fr; border: 0; }
  .project--mbpix .stat { padding: 1.25rem 0; border-top: 1px solid var(--line); }
  .project--mbpix .stat + .stat { border-left: 0; }
  .project--mbpix .stat__num { font-size: 2.6rem; }
  .project--mbpix .stat__label { margin-top: 0.4rem; font-size: 0.8rem; line-height: 1.35; }
}

/* --------------------------------------------------------------------------
   Web projects
   -------------------------------------------------------------------------- */
.web { padding: clamp(4rem, 10vw, 9rem) 0 clamp(4rem, 8vw, 7rem); }
.web__head {
  display: grid;
  grid-template-columns: 1fr minmax(0, 34ch);
  align-items: end;
  gap: 1rem 3rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.web__head .kicker { grid-column: 1 / -1; margin-bottom: 0.25rem; }
.web__title {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.web__title em { color: var(--accent); }
.web__intro { margin: 0; color: rgba(242, 239, 233, 0.65); }
@media (max-width: 760px) { .web__head { grid-template-columns: 1fr; } }

.sites {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.site { display: flex; flex-direction: column; gap: 2rem; }
.site--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.site__window {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  transition: transform 0.8s var(--ease), border-color 0.5s;
}
.site__window::before {
  content: "";
  position: absolute;
  inset: 10% 6% -6%;
  z-index: -1;
  border-radius: 50%;
  background: var(--site-color, var(--accent));
  opacity: 0.22;
  filter: blur(70px);
  transition: opacity 0.8s var(--ease);
}
.site__window:hover { transform: translateY(-8px); border-color: rgba(242, 239, 233, 0.25); }
.site__window:hover::before { opacity: 0.38; }

.site__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.site__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(242, 239, 233, 0.16); }
.site__url {
  flex: 1;
  max-width: 260px;
  margin: 0 auto;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(242, 239, 233, 0.06);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  transform: translateX(-14px);
}
.site__screen { display: block; overflow: hidden; border-radius: 0 0 11px 11px; aspect-ratio: 16 / 10; }
.site__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.4s var(--ease); }
.site__window:hover .site__screen img { transform: scale(1.04); }

.site__info .project__index { margin-bottom: 1rem; }
.site__title {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.site__year {
  margin-left: 0.3em;
  font-family: var(--serif);
  font-size: 0.4em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: super;
}
.site__desc { max-width: 46ch; margin: 1.25rem 0 0; color: rgba(242, 239, 233, 0.72); }
.site__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.site__chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: rgba(242, 239, 233, 0.8);
}

@media (max-width: 900px) {
  .sites { grid-template-columns: 1fr; }
  .site--wide { display: flex; }
}

/* --------------------------------------------------------------------------
   Gallery (horizontal scroll)
   -------------------------------------------------------------------------- */
.gallery { position: relative; }
.gallery__sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2rem, 4vh, 3rem);
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.gallery__head { padding: 0 var(--gutter); }
.gallery__track {
  display: flex;
  align-items: flex-end;
  gap: clamp(16px, 2vw, 28px);
  width: max-content;
  padding: 0 var(--gutter);
  will-change: transform;
}
.shot { position: relative; margin: 0; flex: none; }
.shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.shot--tall { height: min(56vh, 560px); aspect-ratio: 2 / 3; }
.shot--wide { height: min(44vh, 440px); aspect-ratio: 3 / 2; }
.shot figcaption {
  position: absolute;
  left: 0;
  bottom: -28px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Fallback mobile / reduced motion: native horizontal scroll */
.gallery.is-native .gallery__sticky { position: static; height: auto; padding: clamp(5rem, 12vw, 8rem) 0; }
.gallery.is-native .gallery__track {
  width: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 40px;
  scrollbar-width: none;
}
.gallery.is-native .gallery__track::-webkit-scrollbar { display: none; }
.gallery.is-native .shot { scroll-snap-align: start; }
.gallery.is-native .shot--tall { height: 60vh; max-height: 440px; }
.gallery.is-native .shot--wide { height: 40vh; max-height: 300px; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about { padding: clamp(6rem, 14vw, 12rem) var(--gutter); border-top: 1px solid var(--line); }
.about__text {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(2rem, 5.2vw, 5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.about__text .w { opacity: 0.16; transition: opacity 0.3s; }
.about__text .w.on { opacity: 1; }

.about__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: clamp(4rem, 8vw, 7rem) 0 0;
  padding: 0;
  list-style: none;
}
.about__list li { display: flex; flex-direction: column; gap: 6px; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.05rem; }
.about__list li span:first-child { font-family: var(--serif); font-style: italic; color: var(--accent); }
@media (max-width: 760px) { .about__list { grid-template-columns: 1fr 1fr; row-gap: 2rem; } }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { padding: clamp(6rem, 12vw, 10rem) var(--gutter) clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.contact__intro { margin: 0; font-size: clamp(1.2rem, 2.2vw, 1.8rem); color: rgba(242, 239, 233, 0.75); letter-spacing: -0.02em; }
.contact__big {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  font-size: clamp(4rem, 15vw, 14rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
}
.contact__big em { color: var(--accent); }
.contact__big i {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(64px, 10vw, 140px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.5s;
}
.contact__big:hover i { background: var(--accent); border-color: var(--accent); color: var(--bg); transform: rotate(45deg); }
.contact__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 1.05rem;
}
.contact__mail { color: rgba(242, 239, 233, 0.8); }
.contact__mail:hover { color: var(--fg); }
.contact__socials { display: flex; gap: 1.75rem; }
.contact__socials a { color: var(--muted); transition: color 0.3s; }
.contact__socials a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.footer p { margin: 0; }
.footer a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Legal page
   -------------------------------------------------------------------------- */
.legal { max-width: 820px; padding: 140px var(--gutter) 6rem; }
.legal h1 { margin: 0 0 3rem; font-size: clamp(3rem, 9vw, 6rem); font-weight: 600; line-height: 0.92; letter-spacing: -0.05em; }
.legal h2 { margin: 3rem 0 1rem; font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em; }
.legal p, .legal li { color: rgba(242, 239, 233, 0.75); }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal .back { display: inline-block; margin-bottom: 2rem; color: var(--muted); text-decoration: none; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none; }
  .grain { display: none; }
}
