/* ==========================================================================
   arProjet — éditorial, architectural, contemporain
   ========================================================================== */

:root {
  --paper: #f3f2ee;
  --paper-2: #e8e6e0;
  --white: #fbfbf9;
  --ink: #15171b;
  --ink-2: #1e2127;
  --text: #2a2d33;
  --muted: #6c6f75;
  --line: rgba(21, 23, 27, 0.12);
  --line-strong: rgba(21, 23, 27, 0.85);
  --line-dark: rgba(255, 255, 255, 0.12);
  --on-dark: #f3f2ee;
  --on-dark-muted: rgba(243, 242, 238, 0.58);
  --accent: #d4572a;
  --accent-ink: #b8461d;

  --header-h: 4.5rem;
  --max: 1320px;
  --gutter: clamp(1rem, 3.2vw, 2.5rem);

  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

figure {
  margin: 0;
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

/* Serif accent words must not stretch heading line boxes */
h1 em,
h2 em,
h3 em {
  line-height: 0;
}

em,
.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mono,
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon-arrow {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  transition: transform 0.35s var(--ease);
}

/* --------------------------------------------------------------------------
   Reveal on scroll (enabled only when JS runs)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js .hero-title .line > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}

.js.is-loaded .hero-title .line > span {
  transform: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
body.nav-open .site-header {
  background: rgba(243, 242, 238, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

/* backdrop-filter would trap the fixed mobile menu inside the header box */
body.nav-open .site-header {
  background: var(--paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#main-content {
  padding-top: var(--header-h);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  z-index: 2;
}

.brand-logo,
.custom-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-tag {
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-list {
  display: flex;
  gap: 2rem;
}

.nav-list a {
  position: relative;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.25rem 0;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  background: transparent;
  padding: 0.4rem 0;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-toggle-bars {
  display: grid;
  gap: 5px;
  width: 1.4rem;
}

.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: 1rem 1.25rem 1rem 1.4rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}

.btn:hover::before {
  transform: scaleY(1);
}

.btn:hover .icon-arrow {
  transform: translateX(4px);
}

.btn-primary {
  background: var(--ink);
  color: var(--on-dark);
}

.btn-primary::before {
  background: var(--accent);
}

.btn-primary:hover {
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent::before {
  background: var(--ink);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary::before {
  background: var(--ink);
}

.btn-secondary:hover {
  color: var(--on-dark);
}

.btn-light {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-light::before {
  background: var(--on-dark);
}

.btn-light:hover {
  color: var(--ink);
}

.btn-nav {
  padding: 0.7rem 0.9rem 0.7rem 1.05rem;
  gap: 1rem;
  font-size: 0.88rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line-strong);
}

.link-arrow:hover .icon-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(2.5rem, 6vw, 5rem);
}

.hero-title {
  font-size: clamp(3rem, 10.5vw, 9.75rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin: 0;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.hero-title em {
  letter-spacing: -0.035em;
  color: var(--accent);
}

.hero-title .line:last-child {
  margin-top: -0.06em;
}

.hero-title .indent {
  padding-left: clamp(0rem, 12vw, 11rem);
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr minmax(0, 30rem);
  gap: 2rem;
  align-items: end;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  text-decoration: none;
}

.hero-scroll-line {
  position: relative;
  width: 3.5rem;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.hero-scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: scroll-line 2.4s var(--ease-in-out) infinite;
}

@keyframes scroll-line {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

.hero-lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
  height: clamp(320px, 62vh, 760px);
  background: var(--paper-2);
}

.hero-visual img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  object-position: 50% 60%;
  will-change: transform;
}

.hero-visual-caption {
  position: absolute;
  left: var(--gutter);
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  background: var(--paper);
  color: var(--ink);
}

.hero-visual-caption .accent-dot {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
}

/* Corner crop marks, like a plan sheet */
.crop-marks {
  position: absolute;
  inset: 1.25rem;
  pointer-events: none;
}

.crop-marks::before,
.crop-marks::after {
  content: "";
  position: absolute;
  width: 1.4rem;
  height: 1.4rem;
  border-color: rgba(21, 23, 27, 0.55);
  border-style: solid;
}

.crop-marks::before {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.crop-marks::after {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 1.75rem 1.5rem 1.75rem 0;
  border-right: 1px solid var(--line);
}

.stat + .stat {
  padding-left: 1.5rem;
}

.stat:last-child {
  border-right: 0;
}

.stat-value {
  display: block;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.stat-value small {
  font-size: 0.45em;
  letter-spacing: -0.01em;
  margin-left: 0.15em;
  color: var(--muted);
}

.stat-label {
  display: block;
  line-height: 1.45;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 38s linear infinite;
}

.marquee-group {
  display: inline-flex;
  align-items: center;
}

.marquee-group span {
  font-size: clamp(1.6rem, 3.5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
  padding: 0 1.75rem;
}

.marquee-group span:nth-child(even) {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}

.marquee-group i {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(5rem, 11vw, 9rem) 0;
}

.section-dark {
  background: var(--ink);
  color: var(--on-dark-muted);
}

.section-dark h2,
.section-dark h3 {
  color: var(--on-dark);
}

.section-dark .eyebrow {
  color: var(--on-dark-muted);
}

.section-alt {
  background: var(--paper-2);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 2rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-head h2 {
  font-size: clamp(2.25rem, 5.4vw, 4.75rem);
  max-width: 18ch;
  margin: 0;
}

.section-head-aside {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.section-head-aside p {
  max-width: 26rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Services — interactive index
   -------------------------------------------------------------------------- */

.services-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.services-list {
  border-top: 1px solid var(--line-dark);
}

.service-row {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: 0 1.25rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line-dark);
  cursor: default;
}

.service-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}

.service-row.is-active::before {
  transform: scaleX(1);
}

.service-index {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding-top: 0.6rem;
  color: var(--on-dark-muted);
  transition: color 0.4s var(--ease);
}

.service-row h3 {
  font-size: clamp(1.75rem, 3.4vw, 2.85rem);
  margin: 0;
  color: rgba(243, 242, 238, 0.38);
  transition: color 0.4s var(--ease);
}

.service-row p {
  grid-column: 2;
  margin: 0;
  max-width: 34rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease), opacity 0.5s var(--ease), margin 0.6s var(--ease);
}

.service-row .icon-arrow {
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.4rem;
  color: rgba(243, 242, 238, 0.38);
  transform: rotate(-45deg);
  transition: transform 0.5s var(--ease), color 0.4s var(--ease);
}

.service-row.is-active h3 {
  color: var(--on-dark);
}

.service-row.is-active .service-index {
  color: var(--accent);
}

.service-row.is-active p {
  max-height: 10rem;
  opacity: 1;
  margin-top: 0.9rem;
}

.service-row.is-active .icon-arrow {
  color: var(--accent);
  transform: rotate(0deg);
}

.service-row-media {
  display: none;
}

.services-media {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink-2);
}

.services-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.7s var(--ease), transform 1.4s var(--ease);
}

.services-media img.is-active {
  opacity: 1;
  transform: scale(1);
}

.services-media-label {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 2;
  padding: 0.55rem 0.8rem;
  background: var(--ink);
  color: var(--on-dark);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}

.about-media {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.about-figure {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
}

.about-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-badge {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  background: var(--ink);
  color: var(--on-dark-muted);
}

.about-badge-year {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--on-dark);
}

.about-title {
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  max-width: 15ch;
  margin-bottom: 1.5rem;
}

.about-title em {
  color: var(--accent);
}

.about-intro {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  max-width: 36rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.about-steps-title {
  color: var(--muted);
  margin-bottom: 1rem;
}

.about-steps {
  border-top: 1px solid var(--line-strong);
}

.about-step {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease);
}

.about-step:hover {
  padding-left: 0.75rem;
}

.about-step-num {
  padding-top: 0.45rem;
  color: var(--accent);
}

.about-step h4 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.about-step p {
  margin: 0;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: start;
}

.projects-grid > :nth-child(3n + 2) {
  margin-top: clamp(0rem, 6vw, 5rem);
}

.projects-grid > :nth-child(3n + 3) {
  margin-top: clamp(0rem, 3vw, 2.5rem);
}

.project-card {
  position: relative;
}

.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter 0.8s var(--ease);
  filter: grayscale(0.25);
}

.project-card:hover .project-card-media img {
  transform: scale(1.05);
  filter: grayscale(0);
}

.project-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.45rem 0.7rem;
  background: var(--paper);
  color: var(--ink);
}

.project-card-go {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  background: var(--accent);
  color: #fff;
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}

.project-card-go .icon-arrow {
  transform: rotate(-45deg);
}

.project-card:hover .project-card-go {
  transform: scale(1);
  opacity: 1;
}

.project-card-body {
  padding-top: 1.1rem;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.project-card-title {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.6s var(--ease);
  display: inline;
}

.project-card:hover .project-card-title {
  background-size: 100% 1px;
}

.project-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.75rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.9rem;
  color: var(--muted);
}

.project-card-meta li + li::before {
  content: "/";
  margin-right: 1rem;
  color: var(--line-strong);
  opacity: 0.35;
}

/* Fallback when no CPT entries */
.project-block {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: end;
}

.project-media {
  overflow: hidden;
  aspect-ratio: 16 / 11;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-copy h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.project-copy p {
  color: var(--muted);
}

.project-meta {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.project-meta li {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.project-meta strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2rem;
}

.projects-empty {
  padding: 2.5rem;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

.projects-pagination {
  margin-top: 4rem;
}

.projects-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.projects-pagination a,
.projects-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.projects-pagination a:hover,
.projects-pagination .current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}

/* --------------------------------------------------------------------------
   BIM band
   -------------------------------------------------------------------------- */

.bim-band {
  position: relative;
  min-height: clamp(420px, 70vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--on-dark);
  background: var(--ink);
}

.bim-band > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.bim-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 23, 27, 0.1) 0%, rgba(21, 23, 27, 0.85) 100%);
}

.bim-band-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, transparent, #000 60%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
}

.bim-band .wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 4rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
}

.bim-band h2 {
  font-size: clamp(2.5rem, 7vw, 6.25rem);
  color: var(--on-dark);
  margin: 0;
}

.bim-band h2 em {
  color: var(--accent);
}

.bim-band p {
  color: var(--on-dark-muted);
  font-size: 1.1rem;
  margin: 0;
  max-width: 28rem;
}

.bim-band .eyebrow {
  color: var(--on-dark-muted);
  font-size: 0.72rem;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.contact-details {
  border-top: 1px solid var(--line-strong);
}

.contact-details li {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-details .mono {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
}

.contact-details a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
}

.contact-details a:hover {
  color: var(--accent);
}

.contact-details .big {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.75rem;
}

.contact-form .field-full {
  grid-column: 1 / -1;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
}

.contact-form label > span {
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 0.6rem 0 0.75rem;
  font: inherit;
  font-size: 1.2rem;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.3s var(--ease);
}

.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

.contact-form-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-form-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-section {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.contact-map {
  margin-top: clamp(4rem, 8vw, 6rem);
  height: clamp(300px, 38vw, 520px);
  background: var(--paper-2);
  overflow: hidden;
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(1.05);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-left: 3px solid currentColor;
  font-size: 0.98rem;
}

.form-alert--success {
  background: #e7efe7;
  color: #2f5d34;
}

.form-alert--error {
  background: #f8e6df;
  color: var(--accent-ink);
}

.contact-form {
  position: relative;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Archive & single projet
   -------------------------------------------------------------------------- */

.page-hero {
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  margin: 0;
}

.page-hero h1 em {
  color: var(--accent);
}

.page-hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: 2rem;
}

.page-hero-foot p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-hero-foot .mono {
  color: var(--muted);
}

.project-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  text-decoration: none;
  color: var(--muted);
}

.project-back .icon-arrow {
  transform: rotate(180deg);
}

.project-back:hover {
  color: var(--ink);
}

.project-back:hover .icon-arrow {
  transform: rotate(180deg) translateX(4px);
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  border-bottom: 1px solid var(--line);
}

.project-facts li {
  padding: 1.4rem 1.25rem 1.4rem 0;
  border-right: 1px solid var(--line);
}

.project-facts li + li {
  padding-left: 1.25rem;
}

.project-facts li:last-child {
  border-right: 0;
}

.project-facts .mono {
  display: block;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.project-facts strong {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.project-single-cover {
  margin: clamp(2rem, 5vw, 4rem) 0;
  overflow: hidden;
  max-height: 78vh;
}

.project-single-cover img {
  width: 100%;
  height: 100%;
  max-height: 78vh;
  object-fit: cover;
}

.project-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.project-single-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  align-self: start;
}

.project-single-aside dl {
  margin: 0 0 2rem;
  border-top: 1px solid var(--line-strong);
}

.project-single-aside dl div {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.project-single-aside dt {
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.project-single-aside dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

.project-single-lead {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.entry-content {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 44rem;
}

.entry-content p {
  margin-bottom: 1.25rem;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2.5rem;
}

.entry-content img {
  margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding-top: clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
}

.footer-cta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding-bottom: clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line-dark);
}

.footer-cta h2 {
  font-size: clamp(2.25rem, 5.5vw, 4.75rem);
  color: var(--on-dark);
  margin: 0;
  max-width: 12ch;
}

.footer-cta h2 em {
  color: var(--accent);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 3rem;
  height: 3rem;
  outline: 1px solid var(--line-dark);
}

.footer-brand p {
  margin: 0;
  max-width: 18rem;
  font-size: 0.95rem;
}

.footer-col h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 1.1rem;
}

.footer-links,
.footer-col .nav-list,
.footer-contact {
  display: grid;
  gap: 0.55rem;
}

.footer-col .nav-list a::after {
  display: none;
}

.footer-links a,
.footer-col .nav-list a,
.footer-contact a,
.social-link {
  color: var(--on-dark);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 400;
  padding: 0;
  transition: color 0.3s var(--ease);
}

.footer-links a:hover,
.footer-col .nav-list a:hover,
.footer-contact a:hover,
.social-link:hover {
  color: var(--accent);
}

.footer-contact li {
  font-size: 0.95rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.social-link .icon-arrow {
  transform: rotate(-45deg);
}

.footer-wordmark {
  display: block;
  font-size: clamp(5rem, 23vw, 22rem);
  font-weight: 600;
  line-height: 0.75;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 242, 238, 0.18);
  white-space: nowrap;
  user-select: none;
  margin-left: -0.04em;
}

.footer-wordmark-wrap {
  overflow: hidden;
  height: 0.74em;
  font-size: clamp(5rem, 23vw, 22rem);
}

.footer-wordmark-wrap .footer-wordmark {
  font-size: 1em;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-dark);
}

.footer-bottom p {
  margin: 0;
}

.to-top {
  color: var(--on-dark);
  text-decoration: none;
}

.to-top:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Pages intérieures
   -------------------------------------------------------------------------- */

.page-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 8vw, 7rem);
}

.page-shell h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
}

.page-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-404 .code {
  font-size: clamp(6rem, 22vw, 16rem);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.07em;
  color: var(--ink);
}

.page-404 .code em {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .footer-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .section-head,
  .about-layout,
  .services-layout,
  .contact-layout,
  .project-block,
  .project-single-layout,
  .bim-band .wrap,
  .hero-foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head-aside {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-scroll {
    display: none;
  }

  .services-media {
    display: none;
  }

  .service-row-media {
    display: block;
    grid-column: 2 / -1;
    margin-top: 1.25rem;
    overflow: hidden;
    aspect-ratio: 16 / 10;
  }

  .service-row-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .service-row h3 {
    color: var(--on-dark);
  }

  .service-row p {
    max-height: none;
    opacity: 1;
    margin-top: 0.75rem;
  }

  .service-row .icon-arrow {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(3) {
    padding-left: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid > :nth-child(n) {
    margin-top: 0;
  }

  .projects-grid > :nth-child(2n) {
    margin-top: 3rem;
  }

  .project-single-aside {
    position: static;
    order: 2;
  }

  .about-media {
    position: relative;
    top: 0;
  }

  .about-figure {
    aspect-ratio: 16 / 11;
  }

  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .brand-tag {
    display: none;
  }

  .primary-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem;
    background: var(--paper);
    overflow-y: auto;
    overscroll-behavior: contain;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.6s var(--ease), visibility 0s linear 0.6s;
  }

  .primary-nav.is-open {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path 0.6s var(--ease), visibility 0s;
  }

  .primary-nav .nav-list {
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .primary-nav .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .primary-nav .nav-list a {
    display: block;
    padding: 1rem 0;
    font-size: clamp(2rem, 9vw, 3rem);
    letter-spacing: -0.04em;
    color: var(--ink);
  }

  .primary-nav .nav-list a::after {
    display: none;
  }

  .btn-nav {
    min-height: 52px;
    padding: 1.1rem 1.25rem;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .hero-title .indent {
    padding-left: 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-visual-caption {
    left: 1rem;
    bottom: 1rem;
  }

  .stat {
    padding: 1.4rem 1rem 1.4rem 0;
  }

  .stat + .stat {
    padding-left: 1rem;
  }

  .stat:nth-child(3) {
    padding-left: 0;
  }

  .service-row {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .projects-grid,
  .contact-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .projects-grid > :nth-child(n) {
    margin-top: 0;
  }

  .project-meta li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .page-hero-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-facts li,
  .project-facts li + li {
    padding: 1.1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Touch devices: comfortable tap targets (~44px) */
@media (pointer: coarse) {
  .nav-toggle {
    min-height: 44px;
  }

  .nav-list a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-links a,
  .footer-col .nav-list a,
  .footer-contact a,
  .social-link,
  .contact-details a,
  .to-top,
  .hero-scroll {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-links,
  .footer-col .nav-list,
  .footer-contact {
    gap: 0;
  }

  .link-arrow,
  .project-back {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal],
  .js .hero-title .line > span {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none;
  }
}

.project-single .page-hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 6rem);
  max-width: 18ch;
}
