/* ============================================================
   PLAQ '&' JOINT — Design System
   Sobre, fidèle à la carte de visite : noir / blanc cassé
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;0,6..96,800;0,6..96,900;1,6..96,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --ink-mute: #2a2a2a;
  --paper: #f5f1e8;
  --paper-warm: #ede7d8;
  --paper-line: #e0d8c4;
  --stone: #8a857a;
  --stone-light: #b8b3a6;
  --rule: rgba(10, 10, 10, 0.12);
  --rule-on-dark: rgba(245, 241, 232, 0.15);

  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button { font-family: inherit; cursor: pointer; }

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

/* ----------- Layout ----------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hairline {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.hairline-dark { border-top-color: var(--rule-on-dark); }

/* ----------- Type ----------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stone);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "opsz" 18;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

/* Use display optical size only on the very largest titles */
h1 { font-size: clamp(48px, 8vw, 112px); line-height: 0.96; font-weight: 500; font-variation-settings: "opsz" 36; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; font-variation-settings: "opsz" 28; }
h3 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; font-variation-settings: "opsz" 16; }

.lede {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 14;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
}

p { text-wrap: pretty; }

/* ----------- Header / Nav ----------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand__logo {
  height: 52px;
  width: auto;
  display: block;
}
.brand__sub {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--stone);
  border-left: 1px solid var(--rule);
  padding-left: 16px;
  line-height: 1.4;
  max-width: 130px;
}
.footer-logo {
  height: 64px;
  width: auto;
  margin-bottom: 20px;
}
@media (max-width: 720px) {
  .brand__sub { display: none; }
  .brand__logo { height: 44px; }
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 0;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tel-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background 0.2s;
}
.tel-pill:hover { background: var(--ink-soft); }
.tel-pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--paper);
  display: inline-block;
}

@media (max-width: 880px) {
  .nav { display: none; }
}

/* ----------- Buttons ----------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover {
  background: transparent;
  color: var(--ink);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn--on-dark {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}
.btn--on-dark:hover {
  background: transparent;
  color: var(--paper);
}
.btn--ghost-on-dark {
  background: transparent;
  border-color: var(--paper);
  color: var(--paper);
}
.btn--ghost-on-dark:hover {
  background: var(--paper);
  color: var(--ink);
}
.btn__arrow {
  width: 14px; height: 10px;
  display: inline-block;
}

/* ----------- Sections ----------- */
section {
  padding: clamp(72px, 9vw, 128px) 0;
  position: relative;
}
.section--dark {
  background: var(--ink);
  color: var(--paper);
}
.section--dark .eyebrow { color: var(--stone-light); }
.section--dark .lede { color: var(--paper); opacity: 0.85; }
.section--dark .hairline { border-top-color: var(--rule-on-dark); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}
.section--dark .section-head { border-bottom-color: var(--rule-on-dark); }

.section-head__index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}
.section-head__title h2 { margin-bottom: 0; }
.section-head__copy { padding-bottom: 8px; }

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; padding-bottom: 32px; margin-bottom: 40px; }
}

/* ----------- Footer ----------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule-on-dark);
}
.footer-brand h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 20;
  font-size: 32px;
  margin-bottom: 8px;
}
.footer-brand p {
  font-size: 14px;
  opacity: 0.7;
  max-width: 280px;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  opacity: 0.6;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { font-size: 14px; opacity: 0.85; }
.footer-col a:hover { opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
}
.footer-bottom a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-bottom a:hover { opacity: 0.4; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ----------- Placeholder image ----------- */
.ph {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 14px,
    rgba(245, 241, 232, 0.04) 14px,
    rgba(245, 241, 232, 0.04) 15px
  );
  pointer-events: none;
}
.ph__label {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  border: 1px solid rgba(245, 241, 232, 0.3);
  background: rgba(0, 0, 0, 0.4);
  text-align: center;
  max-width: 80%;
}
.ph--paper {
  background: var(--paper-warm);
  color: var(--ink);
}
.ph--paper::before {
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 14px,
    rgba(10, 10, 10, 0.05) 14px,
    rgba(10, 10, 10, 0.05) 15px
  );
}
.ph--paper .ph__label {
  border-color: rgba(10, 10, 10, 0.2);
  background: rgba(245, 241, 232, 0.6);
}


/* === Floating contact buttons (WhatsApp + Instagram) === */
.fab-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.wa-fab,
.ig-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.wa-fab:hover,
.ig-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.12);
  color: var(--paper);
}
.wa-fab__icon,
.ig-fab__icon {
  width: 26px;
  height: 26px;
  color: var(--paper);
}
@media (max-width: 720px) {
  .fab-stack {
    right: 16px;
    bottom: 16px;
    gap: 10px;
  }
  .wa-fab,
  .ig-fab {
    width: 52px;
    height: 52px;
  }
  .wa-fab__icon,
  .ig-fab__icon { width: 24px; height: 24px; }
}


/* ============================================================
   Enhancements — micro-interactions & textures
   ============================================================ */

/* Reveal on scroll — applied via .js-reveal added by JS,
   then .is-visible when element enters viewport */
.js-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.js-reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger children */
.js-reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-reveal-stagger.is-visible > * {
  opacity: 1;
  transform: none;
}
.js-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.04s; }
.js-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.10s; }
.js-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.js-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.22s; }
.js-reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.28s; }
.js-reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.34s; }
.js-reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.40s; }
.js-reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.46s; }
.js-reveal-stagger.is-visible > *:nth-child(9) { transition-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal, .js-reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Nav links — animated underline drawing left→right on hover */
.nav a {
  overflow: visible;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav a:hover::after { transform: scaleX(1); }
.nav a.is-active::after {
  transform: scaleX(1);
  transition: none;
}

/* Service rows — animated arrow + sliding underline accent + soft tint */
.service-row {
  position: relative;
  transition: padding 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.4s ease;
}
.service-row::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--ink);
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.service-row:hover::before { width: 100%; }
.service-row:hover {
  background: linear-gradient(90deg, var(--paper-warm), transparent 70%);
  padding-left: 28px;
}
.service-row__num {
  transition: color 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.service-row:hover .service-row__num {
  color: var(--ink);
  transform: translateX(-4px);
}
.service-row__more {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  transition: gap 0.35s ease, transform 0.35s ease;
}
.service-row:hover .service-row__more {
  gap: 14px;
  transform: translateX(6px);
}

/* Buttons — wipe fill from the side + lift */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(10, 10, 10, 0.12);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: -1;
}
.btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.btn--ghost::before { background: var(--ink); }
.btn--on-dark::before { background: var(--ink); }
.btn--ghost-on-dark::before { background: var(--paper); }

/* Tel pill — subtle pulse on hover */
.tel-pill {
  position: relative;
  overflow: hidden;
}
.tel-pill__dot {
  position: relative;
}
.tel-pill__dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--paper);
  opacity: 0.5;
  animation: telPulse 2.4s ease-out infinite;
}
@keyframes telPulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Paper grain — subtle texture on cream sections */
body {
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* Grain on dark sections — flip to overlay so it lifts the noise instead of muting */
.section--dark, .hero, .site-footer { position: relative; }
.section--dark::after, .hero::after, .site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 0.95  0 0 0 0.13 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Ensure interactive content stays above body grain */
.site-header, main, section, .site-footer { position: relative; z-index: 2; }
.fab-stack { z-index: 100; }

/* Hero strip — soft fade-in of dt/dd */
.hero__strip dt, .hero__strip dd { transition: opacity 0.4s ease; }

/* Gallery hover — already there via realisations.html, but add zoom */
.work__media { overflow: hidden; }
.work__media img {
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
              filter 0.5s ease;
}
.work:hover .work__media img,
.work:focus-within .work__media img {
  transform: scale(1.06);
}
.work__title em {
  transition: color 0.3s ease;
}
.work:hover .work__title em {
  color: var(--stone);
}

/* Footer link hover — slide underline */
.footer-col a {
  position: relative;
  display: inline-block;
}
.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}
.footer-col a:hover::after { transform: scaleX(1); }
