/* ============================================================
   AMAURY SANDERS — Code[2KIDZ]
   Minimal white editorial. Reference: miumiu.com
   ============================================================ */
:root {
  --bg: #ffffff;
  --ink: #333333;          /* soft near-black, never pure #000 */
  --muted: #767676;
  --faint: #a3a3a3;
  --line: #e3e3e3;
  --line-soft: #f0f0f0;
  --wash: #f7f7f5;
  --sans: "Work Sans", Arial, Helvetica, sans-serif;
  --nav-h: 68px;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
::selection { background: var(--ink); color: #fff; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Type scale ---------- */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.display {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 10px 0 16px;
}
.lede {
  max-width: 640px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

/* ---------- Header ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(16px, 3vw, 40px);
  color: #fff;                       /* over the video */
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: #fff;
  color: var(--ink);
  border-bottom-color: var(--line);
}
.nav-brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.nav-tabs {
  display: flex;
  gap: clamp(4px, 1.2vw, 20px);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 400;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.25s;
}
.tab::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.tab:hover { opacity: 1; }
.tab:hover::after, .tab.is-active::after { transform: scaleX(1); }
.tab.is-active { opacity: 1; font-weight: 500; }

/* ---------- Hero film ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  background: #ddd;
}
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.05) 30%, rgba(0,0,0,0.05) 60%, rgba(0,0,0,0.35) 100%);
}
.hero-copy {
  position: absolute;
  left: 0; right: 0; bottom: clamp(48px, 9vh, 96px);
  text-align: center;
  color: #fff;
  padding: 0 20px;
  text-shadow: 0 1px 24px rgba(0,0,0,0.35);
}
.hero-copy h1 {
  font-size: clamp(1.9rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}
.hero-copy p {
  margin-top: 12px;
  font-size: clamp(12px, 1.4vw, 15px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}

/* Sound toggle */
.sound-btn {
  position: absolute;
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(20px, 4vh, 40px);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(255,255,255,0.65);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.25s, border-color 0.25s;
}
.sound-btn:hover { background: rgba(0,0,0,0.34); border-color: #fff; }

/* ---------- Sections ---------- */
.section {
  padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 56px);
  scroll-margin-top: var(--nav-h);
  max-width: 1500px;
  margin: 0 auto;
}
.section + .section { padding-top: 0; }
.section-head { max-width: 900px; margin-bottom: clamp(28px, 4vw, 48px); }

.rule { height: 1px; background: var(--line); margin: 0 clamp(16px, 4vw, 56px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  transition: border-color 0.25s, background 0.25s;
}
.chips a:hover { border-color: var(--ink); background: var(--wash); }

/* ---------- Look + triptych ---------- */
.look { margin-top: clamp(48px, 7vw, 88px); scroll-margin-top: var(--nav-h); }
.look:first-of-type { margin-top: clamp(32px, 4vw, 56px); }
.look-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(20px, 3vw, 34px);
}
.look-no {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-top: 6px;
  min-width: 28px;
}
.look-head h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.look-head p { color: var(--muted); margin-top: 6px; max-width: 620px; }

.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.6vw, 24px);
}
.phase-card { cursor: zoom-in; }
.phase-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.phase-label i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.phase-label b {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.phase-img {
  overflow: hidden;
  background: var(--wash);
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-soft);
}
.phase-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.phase-card:hover .phase-img img { transform: scale(1.03); }
.phase-card figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Galleries ---------- */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(240px, 26vw, 380px);
  gap: clamp(10px, 1.6vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip .phase-card { scroll-snap-align: start; }
.strip .phase-img { aspect-ratio: 4 / 5; }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.6vw, 24px);
}
.grid-4 .phase-img { aspect-ratio: 3 / 4; }

/* ---------- Illustrations ----------
   Transparent PNG/WebP artwork on white: never cropped, never boxed.
   Masonry columns so mixed 16:9 / 4:3 / 3:4 pieces each keep their shape. */
.ill-masonry {
  columns: 4;
  column-gap: clamp(14px, 2.2vw, 34px);
}
.ill-item {
  break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 clamp(14px, 2.2vw, 34px);
  cursor: zoom-in;
}
.ill-item img {
  width: 100%;
  height: auto;              /* natural proportions — no cover-cropping */
  background: none;          /* let the transparency read as the page */
  border: 0;
  transition: opacity 0.3s ease;
}
.ill-item:hover img { opacity: 0.62; }

@media (max-width: 1100px) { .ill-masonry { columns: 3; } }
@media (max-width: 760px)  { .ill-masonry { columns: 2; } }
@media (max-width: 440px)  { .ill-masonry { columns: 1; } }

/* ---------- About ---------- */
.about-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}
.about-wrap p { color: var(--muted); margin-bottom: 16px; }
.about-wrap .quote {
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 24px;
}
.studio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
}
.studio-grid .phase-img { aspect-ratio: 1 / 1; }

/* ---------- Contact ---------- */
.contact-inner { max-width: 620px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
  display: inline-block;
  padding: 13px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}
.btn:hover { background: #000; border-color: #000; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--wash); }
.btn.is-placeholder {
  background: transparent;
  border-color: var(--line);
  color: var(--faint);
  cursor: default;
}
.btn.is-placeholder:hover { background: transparent; }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 56px) 0;
  padding: 26px 0 40px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.triptych .phase-card:nth-child(2) { transition-delay: 0.08s; }
.triptych .phase-card:nth-child(3) { transition-delay: 0.16s; }

/* ---------- Lightbox ---------- */
/* Must come first: `display: grid` below would otherwise defeat [hidden]. */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(255,255,255,0.985);
  display: grid;
  place-items: center;
  padding: 68px 5vw 5vh;
}
.lightbox figure { max-width: min(92vw, 560px); text-align: center; }
.lightbox img {
  max-height: 74vh; width: auto; max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
}
/* Artwork with transparency: show the drawing alone — no frame, no fill. */
.lightbox.is-art img { border: 0; background: none; }
.lightbox.is-art { background: #fff; }
.lightbox figcaption { margin-top: 14px; color: var(--muted); font-size: 13px; }
.lightbox figcaption b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.lb-phase {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.25s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--ink); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-wrap { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .triptych {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 74%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .triptych::-webkit-scrollbar { display: none; }
  .triptych .phase-card { scroll-snap-align: center; }
}
@media (max-width: 640px) {
  :root { --nav-h: 92px; }
  .nav { flex-direction: column; justify-content: center; gap: 6px; padding: 8px 12px; }
  .nav-tabs { width: 100%; justify-content: flex-start; }
  .tab { font-size: 12px; padding: 4px 6px; }
  .triptych { grid-auto-columns: 84%; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: 14px; } .lb-next { right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .phase-img img { transition: none; }
}
