/* ==========================================================================
   Guillaume Coulin - Portfolio
   Editorial minimal aesthetic
   ========================================================================== */

/* ---------- Self-hosted fonts (latin, variable WOFF2) ---------- */
/* Same file serves weights 400+500 — Google's CSS does the same.    */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F6F5F1;
  --bg-alt: #EDEBE4;
  --ink: #111111;
  --ink-soft: #2B2B2B;
  --mute: #5C5950;
  --line: #D8D4CA;
  --accent: #FF4D2E;
  --accent-ink: #FFFFFF;

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --max: 1400px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img { max-width: 100%; display: block; }

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

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mute);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

section { padding: 124px 0; position: relative; }
section + section { border-top: 1px solid var(--line); }
/* Décale les anchors pour que la nav fixée ne mange pas le titre. */
section[id] { scroll-margin-top: 96px; }
/* Sections intentionally flush with the previous block. */
#works, #process { border-top: none; }
#services { padding-bottom: 0; }

@media (max-width: 900px) {
  section { padding: 96px 0; }
}
@media (max-width: 720px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  section { padding: 72px 0; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 40px);
  max-width: var(--max);
  background: rgba(246, 245, 241, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 12px 20px 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.nav.scrolled {
  background: rgba(17, 17, 17, 0.92);
  border-color: transparent;
  color: #fff;
}
.nav.scrolled .nav-link { color: rgba(255,255,255,0.7); }
.nav.scrolled .nav-link:hover, .nav.scrolled .nav-link.active { color: #fff; }
.nav.scrolled .nav-brand { color: #fff; }
.nav.scrolled .nav-cta {
  background: var(--accent);
  color: #fff;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.4s;
}
.nav-brand-mark {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 100px;
  color: var(--ink-soft);
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}
.nav-link:hover { background: rgba(0,0,0,0.06); }
.nav.scrolled .nav-link:hover { background: rgba(255,255,255,0.1); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.nav-lang {
  display: flex;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute);
}
.nav-lang button {
  background: none; border: none; cursor: pointer;
  padding: 4px 6px; color: inherit;
  font: inherit;
}
.nav-lang button.active { color: var(--ink); font-weight: 600; }
.nav.scrolled .nav-lang button.active { color: #fff; }

.nav-cta {
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5EE28A;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-burger { display: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-lang { display: none; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-burger span {
    width: 20px; height: 1.5px;
    background: currentColor;
    transition: all 0.3s;
  }
  .nav-cta span:not(.nav-cta-dot) { display: none; }
  .nav-cta { padding: 10px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 180px; padding-bottom: 64px; }

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 64px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.hero-kicker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(40px, 6.2vw, 96px);
  margin-bottom: 32px;
  letter-spacing: -0.035em;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-title .strike {
  position: relative;
  display: inline-block;
}
.hero-title .strike::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 52%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: strike 1.2s 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
@keyframes strike { to { transform: scaleX(1); } }

.hero-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  margin-top: 80px;
  padding-top: 0;
  border-top: none;
}
.hero-lede {
  font-size: 17px;
  line-height: 1.55;
  max-width: 680px;
  color: var(--ink-soft);
}
.hero-lede strong { color: var(--ink); font-weight: 600; }

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-clients {
  margin: 36px 0 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 36px;
}
.hero-client {
  display: inline-flex;
  align-items: center;
  height: 32px;
  opacity: 0.55;
  transition: opacity 0.3s;
}
.hero-client img {
  height: 100%;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0);
}
.hero-client:hover { opacity: 1; }

@media (max-width: 720px) {
  .hero-clients { gap: 16px 24px; margin: 28px 0 4px; }
  .hero-client { height: 28px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.btn-arrow {
  transition: transform 0.3s;
}
.btn:hover .btn-arrow { transform: translate(3px, -3px); }

/* Hero variants via [data-hero-layout] */
[data-hero-layout="left"] .hero-title { text-align: left; }
[data-hero-layout="left"] .hero-meta { justify-content: space-between; }

[data-hero-layout="centered"] .hero-title { text-align: center; }
[data-hero-layout="centered"] .hero-row {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
[data-hero-layout="centered"] .hero-lede { text-align: center; }
[data-hero-layout="centered"] .hero-actions { justify-content: center; }

[data-hero-layout="split"] .hero-split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
}
[data-hero-layout="split"] .hero-title {
  font-size: clamp(36px, 5.4vw, 80px);
  text-align: left;
}
[data-hero-layout="split"] .hero-portrait {
  aspect-ratio: 1/1;
  /*background: linear-gradient(135deg, var(--bg-alt) 0%, var(--line) 100%);*/
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-hero-layout="split"] .hero-portrait-img {
  inset: 0;
  width: 80%;
  height: 80%;
  object-fit: contain;
  object-position: center;
  display: block;
}
[data-hero-layout="split"] .hero-portrait-label {
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute);
  background: var(--bg);
  padding: 6px 10px;
  border-radius: 100px;
  display: none;
}

@media (max-width: 820px) {
  .hero { padding-top: 140px; }
  /* Sélecteur attribut → spécificité (0,1,1) pour battre l'override
     [data-hero-layout="split"] .hero-title qui a la même spécificité. */
  [data-hero-layout] .hero-title { font-size: 48px; line-height: 1.05; }
  .hero-row { grid-template-columns: 1fr; gap: 32px; }
  .hero-meta { flex-direction: row; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  [data-hero-layout="split"] .hero-split { grid-template-columns: 1fr; }
  [data-hero-layout="split"] .hero-portrait { display: none; }
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  overflow: hidden;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.marquee {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 88px);
  letter-spacing: -0.02em;
}
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: 60px;
}
.marquee i {
  font-style: normal;
  color: var(--accent);
  font-size: 0.6em;
  display: inline-block;
  width: 0.6em; height: 0.6em;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 0;
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 56px 32px;
  border-top: none;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.3s;
}
.stat-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 60px;
  height: 60px;
  display: block;
  opacity: 0;
  image-rendering: pixelated;
  pointer-events: none;
}
.stat:last-child { border-right: none; }
.stat:hover { background: var(--bg-alt); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(56px, 6vw, 88px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 12px;
}
.stat-num sup {
  font-size: 0.4em;
  vertical-align: super;
  color: var(--accent);
  margin-left: 2px;
}
.stat-label {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.4;
}

@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 36px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+3) { border-bottom: none; }
  .stat-num { margin-right: 0.1em; }
}

/* ---------- Section header ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 72px;
  padding-top: 8px;
}
.section-head .eyebrow { margin-bottom: 20px; }
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 50px);
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.section-head h2 em { color: var(--accent); font-style: italic; }
.section-head p {
  color: var(--ink-soft);
  max-width: 440px;
  justify-self: end;
}
@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .section-head p { justify-self: start; }
}

/* ---------- Works / Projects ---------- */
.works-grid {
  display: grid;
  gap: 24px;
}
.works-grid[data-layout="grid-2"] { grid-template-columns: repeat(2, 1fr); }
.works-grid[data-layout="grid-3"] { grid-template-columns: repeat(3, 1fr); }
.works-grid[data-layout="list"] { grid-template-columns: 1fr; gap: 0; }
/* Bento 16:9 - aspect-ratio: 16/9 on every card.
   1×1 cards : 16:9 strict.
   2×2 featured : ~1.7 % d'écart (gap horizontal inclus 1 fois,
   vertical entre 2 rows). Passer gap à 0 pour du 16:9 exact partout. */
.works-grid[data-layout="mosaic"] {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 20px;
}
.works-grid[data-layout="mosaic"] .work:nth-child(5n+1) {
  grid-column: span 2;
  grid-row: span 2;
}
/* Last card : colonne unique, 2 rows de haut - colle à la featured
   précédente (everifox) et casse volontairement le 16/9. */
.works-grid[data-layout="mosaic"] .work:last-child {
  grid-column: span 1;
  grid-row: span 2;
  aspect-ratio: auto;
  height: auto;
}

.work {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-alt);
  aspect-ratio: 4/3;
  color: inherit;
  text-decoration: none;
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.works-grid[data-layout="mosaic"] .work { aspect-ratio: 16 / 9; height: auto; }
.work:hover { transform: translateY(-4px); }

.work-visual {
  position: absolute;
  inset: 0;
  background: var(--visual, linear-gradient(135deg, #e8e6df 0%, #c8c4bc 100%));
  transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.work-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  z-index: 1;
  transition: filter 0.5s cubic-bezier(.19,1,.22,1);
}
/* Desktop / pointer devices: desaturate by default, restore on hover. */
@media (hover: hover) {
  .work-cover-img { filter: saturate(0); }
  .work:hover .work-cover-img { filter: saturate(1); }
}
.work:hover .work-visual { transform: scale(1.05); }

.work-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.65) 100%);
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 2;
  pointer-events: none;
}
.work:hover .work-visual::after { opacity: 1; }

.work-inner {
  position: relative;
  z-index: 1;
  padding: 24px;
  color: var(--work-ink, #111);
  max-width: 80%;
  text-align: center;
}
.work-inner .mock-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.work-inner .mock-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.7;
}

.work-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.work:hover .work-info {
  opacity: 1;
  transform: translateY(0);
}
.work-info h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.work-info .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.8;
}
.work-info .arrow {
  background: #fff;
  color: #111;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.work-meta-top {
  position: absolute;
  top: 16px; left: 16px; right: 16px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  mix-blend-mode: difference;
  z-index: 3;
  pointer-events: none;
}

/* list variant */
.works-grid[data-layout="list"] .work {
  aspect-ratio: auto;
  display: grid;
  grid-template-columns: 80px 1fr 200px 120px 40px;
  align-items: center;
  gap: 24px;
  padding: 24px 8px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  overflow: visible;
}
.works-grid[data-layout="list"] .work:hover { background: var(--bg-alt); transform: none; padding-left: 20px; padding-right: 20px; }
.works-grid[data-layout="list"] .work-visual {
  position: relative;
  width: 80px; height: 60px;
  border-radius: 8px;
}
.works-grid[data-layout="list"] .work-visual::after { display: none; }
.works-grid[data-layout="list"] .work-inner { display: none; }
.works-grid[data-layout="list"] .work-meta-top { display: none; }
.works-grid[data-layout="list"] .work-info {
  all: unset;
  display: contents;
}
.works-grid[data-layout="list"] .work-info h3 {
  color: var(--ink);
  font-size: clamp(24px, 2.2vw, 36px);
  margin: 0;
}
.works-grid[data-layout="list"] .work-info .tag { color: var(--mute); }
.works-grid[data-layout="list"] .work-info .year { color: var(--mute); font-family: var(--font-mono); font-size: 12px; }
.works-grid[data-layout="list"] .work-info .arrow {
  background: var(--ink);
  color: #fff;
  width: 40px; height: 40px;
}
.works-grid[data-layout="list"] .work:hover .work-info .arrow {
  background: var(--accent);
}

@media (max-width: 820px) {
  .works-grid[data-layout="grid-3"],
  .works-grid[data-layout="mosaic"] { grid-template-columns: 1fr; grid-auto-rows: auto; container-type: normal; }
  .works-grid[data-layout="grid-2"] { grid-template-columns: 1fr; }
  .works-grid[data-layout="mosaic"] .work,
  .works-grid[data-layout="mosaic"] .work:last-child {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    aspect-ratio: 16/9;
    height: auto;
  }
  .works-grid[data-layout="list"] .work { grid-template-columns: 60px 1fr 40px; }
  .works-grid[data-layout="list"] .work-info .tag,
  .works-grid[data-layout="list"] .work-info .year { display: none; }
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
  padding-top: 8px;
}
.about-portrait {
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 140px;
}
.about-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-portrait-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 48px 18px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.45));
  z-index: 2;
}

.about-body h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.8vw, 54px);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 32px;
}
.about-body h2 em { color: var(--accent); font-style: italic; }
.about-body p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 560px;
}
.about-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.6em;
  float: left;
  line-height: 0.9;
  margin: 6px 10px 0 0;
  color: var(--accent);
}

.about-timeline {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.about-cv-btn {
  margin-top: 36px;
}
.about-cv-btn .btn-arrow {
  transition: transform 0.3s;
}
.about-cv-btn:hover .btn-arrow { transform: translateY(3px); }
.about-timeline .row {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: start;
  gap: 28px;
  padding: 22px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.about-timeline .row:hover { background: var(--bg-alt); }
.about-timeline .yr {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 6px;
}
.about-timeline .tl-role {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
}
.about-timeline .tl-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 8px;
  max-width: 560px;
}
.about-timeline .tl-company {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about-portrait { position: relative; top: 0; max-width: 400px; }
  .about-timeline .row { grid-template-columns: 90px 1fr; gap: 16px; }
  .about-timeline .tl-desc { max-width: none; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.service {
  padding: 56px 36px 64px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.3s;
  cursor: pointer;
}
.service:nth-child(3n) { border-right: none; }
.service:hover { background: var(--ink); color: var(--bg); }
.service:hover .service-num,
.service:hover .service-list li { color: rgba(255,255,255,0.6); }

.service-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
}
.service-plus {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.service:hover .service-plus {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(45deg);
}

.service h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 20px;
}
.service p {
  color: var(--mute);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.service:hover p { color: rgba(255,255,255,0.8); }
.service-list {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute);
}
.service-list li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  transition: color 0.3s, padding 0.3s;
}
.service:hover .service-list li { border-color: rgba(255,255,255,0.15); }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
  .service { border-right: none; }
}

/* ---------- Process ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step {
  padding: 40px 24px;
  border-top: 2px solid var(--ink);
  position: relative;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 40px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 14px;
}
.step p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--mute);
}
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .process { grid-template-columns: 1fr; }
}

/* ---------- Testimonials (masonry via CSS columns) ---------- */
.testimonials {
  columns: 3;
  column-gap: 24px;
}
.quote {
  display: block;
  break-inside: avoid;
  padding: 26px 26px 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin: 0 0 24px;
  transition: background 0.4s, color 0.4s, transform 0.4s;
  cursor: default;
}
.quote:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-3px);
}
.quote-date {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute);
  margin-bottom: 14px;
}
.quote:hover .quote-date { color: rgba(255,255,255,0.5); }
.quote-mark {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 0.5;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}
.quote p {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quote-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}
.quote-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.quote-name {
  font-size: 14px;
  font-weight: 600;
}
.quote-role {
  font-size: 12px;
  color: var(--mute);
}
.quote:hover .quote-role { color: rgba(255,255,255,0.6); }

@media (max-width: 900px) {
  .testimonials { columns: 2; }
}
@media (max-width: 640px) {
  /* Horizontal scroll on mobile, edge-to-edge */
  .testimonials {
    columns: unset;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 4px 20px 8px;
    scroll-padding-left: 20px;
  }
  .testimonials::-webkit-scrollbar { display: none; }
  .testimonials .quote {
    flex: 0 0 86%;
    margin: 0;
    scroll-snap-align: start;
  }
}

/* ---------- FAQ ---------- */
.faq { max-width: 900px; margin: 0 auto; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  cursor: pointer;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.01em;
  gap: 24px;
}
.faq-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}
.faq-item.open .faq-toggle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(45deg);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.19, 1, 0.22, 1), padding 0.3s;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 700px;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-top: 16px;
}

/* ---------- Clients marquee (above the projects grid) ---------- */
.clients-wrap {
  margin: 0 0 56px;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.clients {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 88px;
  padding: 8px 0;
  animation: clients-scroll 42s linear infinite;
}
.clients:hover { animation-play-state: paused; }
.client-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.client-logo:hover { opacity: 1; }
.client-logo img {
  width: auto;
  height: auto;
  max-height: 48px;
  max-width: 100%;
}
/* Duplicate set powers the seamless loop - always visible now that
   the marquee runs on every viewport. */
.client-logo--dup { display: inline-flex; }

@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 720px) {
  .clients-wrap { margin: 0 0 40px; }
  .clients { gap: 60px; padding: 6px 0; animation-duration: 34s; }
}

/* ---------- CTA / Contact ---------- */
.cta {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  padding: 140px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 32px;
  max-width: calc(var(--max) - 64px);
  margin: 0 auto;
}
.cta-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cta-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5EE28A;
  animation: pulse 2s infinite;
}
.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 84px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 32px;
}
.cta h2 em { color: var(--accent); font-style: italic; }
.cta-email {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 8px;
  display: inline-block;
  transition: all 0.3s;
}
.cta-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.cta-socials {
  margin-top: 48px;
  display: flex;
  gap: 24px;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.5);
}
.cta-socials a { transition: color 0.3s; }
.cta-socials a:hover { color: var(--accent); }

/* Huge name decoration */
.cta-bg-name {
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: clamp(80px, 18vw, 300px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.foot {
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mute);
}

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 300px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 16px;
  padding: 20px;
  z-index: 200;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  font-size: 13px;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.tweaks.collapsed {
  width: auto;
  padding: 14px 20px;
}
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.tweaks.collapsed .tweaks-head { margin-bottom: 0; }
.tweaks.collapsed .tweaks-body { display: none; }
.tweaks-close {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tweaks-row {
  margin-bottom: 14px;
}
.tweaks-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.tweaks-colors {
  display: flex;
  gap: 8px;
}
.tweaks-swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.tweaks-swatch.active {
  border-color: #fff;
  transform: scale(1.1);
}
.tweaks-buttons {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 3px;
}
.tweaks-buttons button {
  flex: 1;
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: none;
  padding: 6px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
}
.tweaks-buttons button.active {
  background: var(--accent);
  color: #fff;
}

/* ---------- Cursor blob ---------- */
.cursor-blob {
  position: fixed;
  top: 0; left: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}
.cursor-blob.hover {
  width: 60px; height: 60px;
}
@media (hover: none) { .cursor-blob { display: none; } }

/* ---------- Font options (tweak) ---------- */
[data-font="serif"] {
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, sans-serif;
}
[data-font="grotesk"] {
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Space Grotesk", "Inter", sans-serif;
}
[data-font="grotesk"] .display,
[data-font="grotesk"] .hero-title,
[data-font="grotesk"] h1,
[data-font="grotesk"] h2,
[data-font="grotesk"] h3,
[data-font="grotesk"] h4 {
  font-weight: 500;
  letter-spacing: -0.03em;
}
[data-font="grotesk"] em {
  font-style: italic;
  color: var(--accent);
}
[data-font="mono-editorial"] {
  --font-display: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "JetBrains Mono", ui-monospace, monospace;
}
[data-font="mono-editorial"] .display,
[data-font="mono-editorial"] .hero-title,
[data-font="mono-editorial"] h1,
[data-font="mono-editorial"] h2,
[data-font="mono-editorial"] h3,
[data-font="mono-editorial"] h4 {
  font-weight: 500;
  letter-spacing: -0.03em;
}
[data-font="mono-editorial"] .hero-title {
  font-size: clamp(28px, 4.6vw, 64px);
  line-height: 1.05;
}
[data-font="mono-editorial"] em {
  font-style: normal;
  color: var(--accent);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(.75,0,0,.8),
              transform 0.9s cubic-bezier(.75,0,0,.8);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Word-by-word title reveal (used by <RevealTitle>). Pure CSS
   transition delay driven by --i; no JS timers. */
.rt-w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  transition: opacity 0.75s cubic-bezier(.75,0,0,.8),
              transform 0.75s cubic-bezier(.75,0,0,.8);
  transition-delay: calc(var(--i, 0) * 45ms);
  will-change: transform;
}
.rt.auto-in .rt-w,
.reveal.in .rt-w {
  opacity: 1;
  transform: translateY(0);
}
/* When the RevealTitle sits inside a .reveal block, let the
   block-level translate drive the motion and keep the word stagger
   subtle (just opacity). Avoids the double-shift. */
.reveal .rt-w { transform: none; }
.reveal.in .rt-w { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { transition: none; transform: none; opacity: 1; }
  .rt-w { transition: none; transform: none; opacity: 1; }
  .marquee, .clients { animation: none; }
  .nav-cta-dot, .cta-eyebrow::before, .hero-kicker-dot { animation: none; }
}

/* ---------- Utility ---------- */
.divider {
  height: 1px;
  background: var(--line);
  max-width: calc(var(--max) - 64px);
  margin: 0 auto;
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5EE28A;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(94,226,138,0.15);
}

/* ---------- Mobile tel button in nav ---------- */
.nav-tel {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--ink);
  transition: background .2s, color .2s;
}
.nav-tel:hover { background: rgba(0,0,0,0.06); }
.nav.scrolled .nav-tel { color: #fff; }
.nav.scrolled .nav-tel:hover { background: rgba(255,255,255,0.12); }
@media (max-width: 820px) {
  .nav-tel { display: inline-flex; }
}

/* ---------- WhatsApp floating button ---------- */
.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
  transition: transform .3s cubic-bezier(.19,1,.22,1), box-shadow .3s;
}
.wa-fab:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(37,211,102,0.45); }
.wa-fab svg { display: block; }

/* Nudge the blob/FAB above the tweaks panel if both visible */
.tweaks { bottom: 88px; }
@media (min-width: 721px) {
  .tweaks { bottom: 20px; }
  .wa-fab { bottom: 20px; right: 84px; }
}

/* ---------- Contact modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: modal-fade .2s ease-out;
}
@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  animation: modal-pop .3s cubic-bezier(.19,1,.22,1);
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all .2s;
}
.modal-close:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.modal-head { margin-bottom: 28px; }
.modal-head .eyebrow { margin-bottom: 14px; }
.modal-title {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 10px;
}
.modal-title em { color: var(--accent); font-style: italic; }
.modal-lede {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.5;
  max-width: 440px;
}

.modal .field {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 16px;
  position: relative;
}
.modal .field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mute);
}
.modal .field input,
.modal .field textarea,
.modal .field select {
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.modal .field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.modal .field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.modal .field input:focus,
.modal .field textarea:focus,
.modal .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,77,46,0.15);
}
.modal .field input[aria-invalid="true"],
.modal .field textarea[aria-invalid="true"] {
  border-color: var(--accent);
  background: #FFF5F3;
}
.modal .field-error {
  color: var(--accent);
  font-size: 12px;
  margin-top: 2px;
}
.modal .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modal .form-grid .field { margin-bottom: 0; }
.modal .form-error {
  background: #FFF5F3;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 14px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.modal-actions .btn[disabled] { opacity: 0.6; cursor: default; }
.modal-success {
  text-align: center;
  padding: 24px 0;
}
.modal-success-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 28px;
  line-height: 1;
}
.modal-success p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 360px;
  margin: 0 auto 22px;
}

@media (max-width: 540px) {
  .modal { padding: 28px 20px; }
  .modal .form-grid { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- SectionHead variants ---------- */
.section-head--center {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
  margin-bottom: 60px;
}
.section-head--center .eyebrow { justify-content: center; }
.section-head--center p { justify-self: center; }

.section-head--tight { margin-bottom: 80px; }

/* ---------- Project page ---------- */
.project-hero {
  padding-top: 180px;
  padding-bottom: 80px;
}
.project-hero-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}
.project-hero-title {
  font-size: clamp(36px, 5.6vw, 82px);
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin-bottom: 28px;
  max-width: 960px;
}
.project-hero-title em { color: var(--accent); font-style: italic; }
.project-hero-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 56px;
}
.project-hero-visual {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--visual, linear-gradient(135deg, #e8e6df 0%, #c8c4bc 100%));
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-hero-inner { text-align: center; padding: 24px; max-width: 80%; }
.project-hero-inner .mock-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  white-space: pre-line;
}
.project-hero-inner .mock-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.project-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

/* Secondary main visual - full-bleed block between facts and body. */
.project-main2 {
  margin-top: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.project-main2 img {
  display: block;
  width: 100%;
  height: auto;
}

/* Gallery - 2 columns on desktop, 1 on mobile. */
.project-gallery {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.project-gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.project-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 720px) {
  .project-gallery { grid-template-columns: 1fr; gap: 12px; }
  .project-main2 { margin-top: 48px; }
}

/* Section parente des facts : aucun padding ni bordure pour
   coller au hero juste au-dessus. */
section.project-facts-section { padding: 0; border-top: none; }
section.project-facts-section + section { border-top: none; }

.project-facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Project stats - même look que .stats home, mais nombre de colonnes
   piloté par le nombre d'items via --n inline. 1, 2, 3 ou plus. */
.stats--project {
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  border-bottom: 0;
}
/* Parent <section.wrap> around .stats--project: flush with the block above. */
section.wrap:has(> .stats--project) { padding-top: 0; padding-bottom: 0; }
@media (max-width: 820px) {
  .stats--project { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .stats--project { grid-template-columns: 1fr; }
  .stats--project .stat { border-right: none; }
  .stats--project .stat:not(:last-child) { border-bottom: 1px solid var(--line); }
}
.project-fact {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
}
.project-fact:last-child { border-right: none; }
.project-fact-k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute);
  margin-bottom: 8px;
}
.project-fact-v {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.project-body { padding-top: 120px; padding-bottom: 0; }
.project-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding: 60px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.project-section:first-of-type { border-top: none; padding-top: 0; }
.project-section-aside .eyebrow { position: sticky; top: 120px; }
.project-section-title {
  font-size: clamp(24px, 3vw, 42px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 24px;
}
.project-section-title em { color: var(--accent); font-style: italic; }
.project-section-main p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 16px;
  max-width: 620px;
}

/* Project pager (previous / next cards) */
.project-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pager-card {
  display: block;
  /* Overlay dégradé sombre par-dessus la couleur du projet pour
     garantir la lisibilité du titre blanc, peu importe la teinte. */
  background:
    linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.20)),
    var(--visual, var(--bg-alt));
  border-radius: var(--radius);
  padding: 56px 36px;
  min-height: 220px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
  transition: transform .5s cubic-bezier(.19,1,.22,1);
}
.pager-card:hover { transform: translateY(-4px); }
.pager-card--prev { text-align: left; }
.pager-card--next { text-align: right; }
.pager-label {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
  margin-bottom: 32px;
}
.pager-card--next .pager-label { justify-content: flex-end; }
.pager-label .mono { color: #fff; }

/* ---------- Project single testimonial (optional, above stats) ---------- */
.project-testimonial .quote {
  background: transparent;
  padding: 16px 0 8px;
  margin: 0;
  cursor: default;
  transition: none;
}
.project-testimonial .quote:hover {
  background: transparent;
  color: inherit;
  transform: none;
}
.project-testimonial .quote:hover .quote-date,
.project-testimonial .quote:hover .quote-role {
  color: var(--mute);
}
.project-testimonial .quote p {
  font-size: 20px;
  line-height: 1.55;
}
@media (max-width: 640px) {
  .project-testimonial .quote p { font-size: 17px; }
}
.pager-label .arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  transition: transform .4s;
  flex-shrink: 0;
}
.pager-card--next:hover .pager-label .arrow { transform: translate(4px, -4px); }
.pager-card--prev:hover .pager-label .arrow { transform: translate(-4px, -4px); }
.pager-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.02;
}

@media (max-width: 720px) {
  .project-pager { grid-template-columns: 1fr; }
  .pager-card { padding: 36px 28px; min-height: 0; }
}

@media (max-width: 900px) {
  .project-hero { padding-top: 140px; padding-bottom: 60px; }
  .project-facts { grid-template-columns: repeat(2, 1fr); }
  .project-fact { border-bottom: 1px solid var(--line); }
  .project-fact:nth-child(2n) { border-right: none; }
  .project-fact:nth-last-child(-n+2) { border-bottom: none; }
  .project-body { padding-top: 60px; padding-bottom: 60px; }
  .project-section { grid-template-columns: 1fr; gap: 16px; padding: 40px 0; }
  .project-section-aside .eyebrow { position: static; }
  .next-project { padding: 40px 24px; }
}

@media (max-width: 540px) {
  .project-facts { grid-template-columns: 1fr; }
  .project-fact { border-right: none; border-bottom: 1px solid var(--line); }
  .project-fact:last-child { border-bottom: none; }
}
