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

:root {
  --radius: 5px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Hanken Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #f9f9f9;
  color: #1a1c1c;
}

h1, h2, h3 { font-family: 'Instrument Serif', serif; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ── Nav ── */
#main-nav {
  transition: background 0.3s ease;
}

/* ── Hero ── */
#hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
#hero-image {
  position: absolute;
  inset: 0 0 0 50%;
  overflow: hidden;
}
#hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.9);
}
#hero-h1 { font-size: clamp(3rem, 7vw, 6rem); }

#hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 3.5rem 3rem;
  padding-top: 7rem; /* nav pill clearance */
  max-width: 65%;
}
@media (min-width: 769px) and (max-width: 1024px) {
  #hero { height: 58svh; min-height: 480px; }
  #hero-image { inset: 0 0 0 55%; }
  #hero-text { max-width: 70%; padding: 0 2rem 2.5rem 2.5rem; padding-top: 7rem; }
}
@media (max-width: 768px) {
  #hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: unset;
  }
  #hero-image {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 3/4;
    flex-shrink: 0;
  }
  #hero-image img { filter: brightness(1); }
  #hero-text {
    position: static;
    max-width: 100%;
    padding: 2.5rem 1.5rem 3rem;
    justify-content: flex-start;
  }
  #hero-h1 { font-size: clamp(2rem, 10vw, 3rem); }

  /* Base rem — scale tous les textes proportionnellement */
  html { font-size: 17px; }

  /* Paragraphes courants */
  p { font-size: 1rem; line-height: 1.8; }

  /* Section Nocturne — label et ligne de contexte */
  #work p.uppercase { font-size: 13px !important; }
  #work p.italic { font-size: 13px !important; }

  /* Nocturne — paragraphe de présentation */
  #work > p.font-body:not(.uppercase):not(.italic) { font-size: 1rem !important; }

  /* About — label ABOUT ARNO FAURE */
  #studio p.uppercase { font-size: 12px !important; }

  /* About — accroche principale "At the intersection…" */
  #studio p.font-headline { font-size: clamp(1.4rem, 5vw, 2rem) !important; }
}

/* ── Hero animations ── */
.hero-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.2s;  }
.d3 { animation-delay: 0.35s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1),
              transform 0.85s cubic-bezier(0.16,1,0.3,1);
}
.reveal.on { opacity: 1; transform: translateY(0); }
.rd1 { transition-delay: 0.08s; }
.rd2 { transition-delay: 0.18s; }
.rd3 { transition-delay: 0.28s; }
.rd4 { transition-delay: 0.38s; }

/* ── Interactive hover buttons ── */
.btn-interactive {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start; /* empêche l'étirement dans les flex containers */
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius);
}
.btn-interactive .btn-label {
  display: inline-block;
  position: relative;
  z-index: 2;
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1), opacity 0.32s ease;
}
.btn-interactive:hover .btn-label {
  transform: translateX(3rem);
  opacity: 0;
}
.btn-interactive .btn-hover-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transform: translateX(-2rem);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16,1,0.3,1), opacity 0.32s ease;
  white-space: nowrap;
}
.btn-interactive:hover .btn-hover-content {
  transform: translateX(0);
  opacity: 1;
}
/* Blob : ancré à gauche, centré verticalement, jamais sur le texte */
.btn-interactive .btn-blob {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  transition: left 0.38s cubic-bezier(0.16,1,0.3,1),
              top 0.38s cubic-bezier(0.16,1,0.3,1),
              width 0.38s cubic-bezier(0.16,1,0.3,1),
              height 0.38s cubic-bezier(0.16,1,0.3,1),
              transform 0.38s cubic-bezier(0.16,1,0.3,1),
              border-radius 0.38s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.btn-interactive:hover .btn-blob {
  left: 50%;
  top: 50%;
  width: 250%;
  height: 600%;
  border-radius: 0;
  transform: translate(-50%, -50%);
}
/* Dark button (black bg → white blob → black text on hover) */
.btn-dark {
  background: #000000;
  color: #e2e2e2;
}
.btn-dark .btn-blob { background: #ffffff; }
.btn-dark .btn-hover-content { color: #000000; }
/* Light button (light bg → black blob → white text on hover) */
.btn-light {
  background: #e8e8e8;
  color: #000000;
}
.btn-light .btn-blob { background: #000000; }
.btn-light .btn-hover-content { color: #ffffff; }

/* ── Vision image hover ── */
.vision-img-wrap { cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.vision-img-wrap:hover .vision-img {
  transform: scale(1.03);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.vision-img { transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox.visible { opacity: 1; }
#lightbox img {
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
#lightbox.visible img { transform: scale(1); }
#lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: color 0.2s;
}
#lightbox-close:hover { color: #fff; }

/* ── Mobile menu ── */
#mobile-menu {
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
#mobile-menu.open { opacity: 1; transform: translateY(0); }

/* ── Shared radius on image containers & video ── */
#studio .overflow-hidden,
section video {
  border-radius: var(--radius);
}
