/* ===========================================================
   Baptiste Hombreux — Portfolio
   Editorial-minimal. Light only. Vanilla CSS.
   =========================================================== */

:root {
  --bg: #FAFAF7;
  --ink: #1A1A1A;
  --ink-mute: #6B6B6B;
  --ink-faint: #9A968E;
  --hairline: #E5E5E0;
  --accent: #B45309;
  --accent-soft: #B45309;
  --max-w: 1180px;
  --pad-x: clamp(20px, 5vw, 56px);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ----- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ----- Top bar --------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms ease, background 250ms ease;
}
.topbar.is-scrolled { border-bottom-color: var(--hairline); }
.wordmark {
  font: 400 17px/1 var(--serif);
  letter-spacing: -0.005em;
}
.topnav {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px; color: var(--ink-mute);
}
.topnav a {
  position: relative; padding: 4px 0;
  transition: color 200ms ease;
}
.topnav a:hover { color: var(--ink); }
.lang { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 13px; }
.lang button {
  padding: 4px 2px;
  color: var(--ink-faint);
  transition: color 200ms ease;
  letter-spacing: 0.04em;
}
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang button:hover { color: var(--ink); }

/* ----- Hero ------------------------------------------------- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--pad-x) clamp(80px, 12vh, 140px);
  display: flex; flex-direction: column;
  gap: 28px;
}
.hero__role {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero__name {
  margin: 0;
  font: 400 clamp(56px, 9vw, 112px)/1.02 var(--serif);
  letter-spacing: -0.015em;
}
.hero__manifesto {
  margin: 12px 0 0;
  max-width: 720px;
  font: 400 clamp(22px, 2.4vw, 30px)/1.4 var(--serif);
  color: var(--ink);
  letter-spacing: -0.005em;
}
.hero__manifesto span { display: block; }
.hero__manifesto span:last-child { color: var(--ink-mute); }
.hero__cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 8px;
}

/* ----- Buttons --------------------------------------------- */
.btn {
  display: inline-flex; align-items: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--hairline);
  background: #fff;
  color: var(--ink);
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; }

.btn--copy { position: relative; }
.btn__copied {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.btn--copy.is-copied .btn__copied { opacity: 1; }
.btn--copy.is-copied .btn__label { opacity: 0; }
.btn__label { transition: opacity 150ms ease; }

/* ----- Work section ---------------------------------------- */
.work {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 40px;
}
.section-label {
  margin: 0 0 80px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

/* ----- Scene (project) ------------------------------------- */
.scene {
  position: relative;
  min-height: 760px;
  margin-bottom: clamp(120px, 18vh, 220px);
  padding: 40px 0;
}
.scene__text {
  position: relative;
  z-index: 5;
  max-width: 460px;
  margin: 80px auto;
  text-align: center;
  background: var(--bg);
  padding: 8px 4px;
}
.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.scene__title {
  margin: 0 0 14px;
  font: 400 clamp(40px, 5.4vw, 64px)/1.05 var(--serif);
  letter-spacing: -0.015em;
}
.scene__tagline {
  margin: 0 0 22px;
  font: italic 400 clamp(17px, 1.6vw, 20px)/1.4 var(--serif);
  color: var(--ink-mute);
}
.scene__body {
  margin: 0 auto;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 440px;
}
.scene__body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 150ms ease;
}
.scene__body a:hover { text-decoration-thickness: 2px; }

.pill {
  display: inline-flex; align-items: center;
  margin-top: 22px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background 200ms ease, color 200ms ease;
}
.pill:hover { background: var(--ink); color: var(--bg); }

/* ----- Shots (floating screenshots) ------------------------ */
.shot {
  position: absolute;
  top: var(--top, auto);
  left: var(--left, auto);
  right: var(--right, auto);
  bottom: var(--bottom, auto);
  width: var(--w, 320px);
  margin: 0;
  rotate: var(--rot, 0deg);
  opacity: 0;
  z-index: 1;
  transition: opacity 800ms cubic-bezier(.2,.6,.2,1);
  will-change: opacity, translate;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.scene.in .shot {
  opacity: 1;
  animation: float var(--dur, 9s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes float {
  0%, 100% { translate: 0 -7px; }
  50%      { translate: 0 7px; }
}

/* Placeholder boxes for provence-ortho until screenshots arrive */
.shot--placeholder { aspect-ratio: 3 / 4; }
.placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #F0EFEA,
    #F0EFEA 8px,
    #F5F4EF 8px,
    #F5F4EF 16px
  );
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--ink-mute);
  font-size: 13px;
  text-align: center;
  padding: 16px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.18), 0 12px 24px -12px rgba(0,0,0,0.10);
}
.placeholder span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ----- Footer ---------------------------------------------- */
.footer {
  max-width: var(--max-w);
  margin: 80px auto 0;
  padding: 64px var(--pad-x) 80px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.footer__contact {
  margin: 0 0 24px;
  font: 400 clamp(28px, 3.4vw, 40px)/1.1 var(--serif);
}
.footer__cta {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 48px;
}
.footer__note {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ----- Lightbox -------------------------------------------- */
.shot:not(.shot--placeholder) { cursor: zoom-in; }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.lightbox {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 22px;
  padding: 5vh 4vw;
  background: rgba(250, 250, 247, 0);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 280ms ease, background 280ms ease;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(250, 250, 247, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox img {
  max-width: min(1400px, 92vw);
  max-height: 82vh;
  width: auto; height: auto;
  cursor: zoom-out;
  transform: scale(0.96);
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
  user-select: none;
}
.lightbox.is-open img { transform: scale(1); }
.lightbox__caption {
  margin: 0;
  max-width: min(720px, 88vw);
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-mute);
  letter-spacing: 0.005em;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 280ms ease 120ms, transform 280ms ease 120ms;
}
.lightbox.is-open .lightbox__caption {
  opacity: 1;
  transform: translateY(0);
}
.lightbox__caption[hidden] { display: none; }
.lightbox__close {
  position: absolute;
  top: clamp(14px, 2.5vw, 28px);
  right: clamp(14px, 2.5vw, 28px);
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.08);
  color: var(--ink);
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 200ms ease, transform 200ms ease;
}
.lightbox__close:hover { background: rgba(26, 26, 26, 0.14); }
.lightbox__close:active { transform: scale(0.94); }
@media (max-width: 767px) {
  .lightbox { gap: 14px; padding: 6vh 5vw; }
  .lightbox img { max-height: 72vh; }
  .lightbox__caption { font-size: 13px; }
}

body.no-scroll { overflow: hidden; }

/* ----- Toast (currently unused, but reserved) -------------- */
.toast {
  position: fixed; left: 50%; bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 100;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===========================================================
   Tablet (768 – 1023)
   =========================================================== */
@media (max-width: 1023px) {
  .scene { min-height: 0; padding: 0; }
  .scene__text {
    max-width: 600px;
    margin: 0 auto 56px;
    padding: 0;
  }
  .shot {
    position: relative;
    top: auto; left: auto; right: auto; bottom: auto;
    width: auto;
    margin: 24px 0;
    rotate: 0deg;
  }
  .scene {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 28px;
    align-items: start;
  }
  .scene__text {
    grid-column: 1 / -1;
    text-align: center;
  }
  .shot--placeholder { aspect-ratio: 4 / 3; }
}

/* ===========================================================
   Mobile (≤ 767)
   =========================================================== */
@media (max-width: 767px) {
  .topnav { gap: 18px; font-size: 13px; }
  .topnav a[href="#work"], .topnav a[href="#contact"] { display: none; }
  .hero { padding-top: 64px; padding-bottom: 64px; gap: 22px; }
  .hero__manifesto span { display: inline; }
  .section-label { margin-bottom: 56px; padding-top: 24px; }
  .scene {
    grid-template-columns: 1fr;
    margin-bottom: 96px;
    gap: 16px;
  }
  .scene__text { margin-bottom: 28px; }
  .shot { margin: 12px 0; }
  .scene.in .shot { animation: none; }
  .footer { margin-top: 40px; padding-top: 48px; padding-bottom: 48px; }
}

/* ===========================================================
   Reduced motion
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene.in .shot { animation: none; }
  .shot { transition: opacity 300ms ease; }
}

/* ===========================================================
   Focus
   =========================================================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
