/* ===========================================================
   Jean-Pierre Boutros — Sound Engineer
   Design tokens → components
   =========================================================== */

:root {
  /* ── Color ── */
  --bg: #0b0b0b;            --bg-rgb: 11, 11, 11;
  --bg-alt: #0e0e0e;
  --surface: #0d0d0d;       /* name-wall cells */
  --surface-hover: #141414; /* card / cell hover */
  --surface-active: #161310;/* active name-wall cell */
  --pop-bg: #141210;
  --pop-border: #2a2620;
  --border: #1c1c1c;
  --text: #e9e7e2;          --text-rgb: 233, 231, 226;
  --text-2: #d8d4cc;
  --text-3: #cfcbc2;
  --muted: #8c8780;
  --muted-2: #b0aba2;
  --muted-3: #a8a39a;
  --dim: #857f74;           /* lifted from #57534c → ~4.7:1 on --bg (WCAG AA) */
  --accent: #c8a96e;        --accent-rgb: 200, 169, 110;
  --overlay: rgb(8 8 8 / .96);
  --shadow-pop: 0 20px 50px rgb(0 0 0 / .55);
  --shadow-lightbox: 0 20px 80px rgb(0 0 0 / .6);

  /* ── Type ── */
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --fs-hero: clamp(3.2rem, 11vw, 9rem);
  --fs-h2: clamp(2rem, 4vw, 3.2rem);
  --fs-h2-lg: clamp(2.2rem, 5vw, 3.6rem);
  --fs-lede: clamp(1rem, 1.4vw, 1.2rem);
  --fs-namecell: clamp(1rem, 1.5vw, 1.3rem);
  --fs-3xs: .68rem;
  --fs-2xs: .72rem;
  --fs-xs: .76rem;
  --fs-sm: .85rem;
  --fs-base: .95rem;
  --fs-md: 1rem;
  --fs-lg: 1.05rem;
  --fs-brand: 1.15rem;
  --fs-xl: 1.4rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.7rem;
  --fs-4xl: 1.8rem;

  /* ── Spacing ── */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.4rem;
  --space-6: 2rem;
  --space-7: 2.4rem;
  --space-8: 3rem;
  --maxw: 1180px;
  --pad: clamp(1.5rem, 4vw, 3.5rem);
  --section-pad: clamp(5rem, 10vw, 9rem);

  /* ── Radius ── */
  --radius-sm: 2px;
  --radius-md: 15px;
  --radius-full: 50%;

  /* ── Motion ── */
  --t-fast: .25s;
  --t-card: .3s;
  --t-med: .4s;
  --t-slow: .9s;
  --ease: ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Focus (keyboard) ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }
:focus:not(:focus-visible) { outline: none; }

/* ── Shared ── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--section-pad) 0; scroll-margin-top: 4rem; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); }
#about, #credits, #contact, #gallery { border-top: 1px solid var(--border); }

.eyebrow {
  font-size: var(--fs-xs); letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 var(--space-5);
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-h2); line-height: 1.08;
  letter-spacing: -.01em; margin: 0 0 1.6rem;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-title--tight { margin-bottom: 1.2rem; max-width: 18ch; }
.section-title--lg { font-size: var(--fs-h2-lg); line-height: 1.04; margin-bottom: 1.2rem; }
.section-intro { color: var(--muted); font-size: var(--fs-lg); margin: 0 0 var(--space-8); max-width: 56ch; }

/* ── Progress bar ── */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent); z-index: 250; transition: width .12s linear;
}

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--pad);
  background: rgb(var(--bg-rgb) / 0);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.nav.scrolled { background: rgb(var(--bg-rgb) / .88); border-bottom-color: var(--border); }
.nav-brand {
  text-decoration: none; color: var(--text); font-family: var(--serif);
  font-size: var(--fs-brand); letter-spacing: .02em;
  display: flex; align-items: center; gap: .55rem;
}
.nav-logo { height: 32px; width: auto; display: block; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-7); }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: var(--fs-xs);
  letter-spacing: .14em; text-transform: uppercase; transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-contact { color: var(--accent); }
.nav-links a.nav-contact:hover { opacity: .7; }
.nav-links a.active { color: var(--accent); }

.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  padding: var(--space-2); width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-burger span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: transform var(--t-card), opacity var(--t-card); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile menu ── */
.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: rgb(var(--bg-rgb) / .97); backdrop-filter: blur(8px);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-7);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: var(--text); text-decoration: none; font-family: var(--serif); font-size: var(--fs-4xl); }
.mobile-menu a.mm-contact { color: var(--accent); }

/* ── Hero ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(2rem, 6vw, 5rem) var(--pad) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 38%;
  transform: scale(1.12); transform-origin: center; will-change: transform;
}
.hero-grad-1 { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(var(--bg-rgb) / .72) 0%, rgb(var(--bg-rgb) / .32) 38%, rgb(var(--bg-rgb) / .78) 82%, rgb(var(--bg-rgb) / .98) 100%); }
.hero-grad-2 { position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 30%, transparent 40%, rgb(var(--bg-rgb) / .55) 100%); }

.hero-content {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; width: 100%;
  animation: jpbRise 1s cubic-bezier(.2,.7,.2,1) both;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: .9rem;
  font-size: var(--fs-xs); letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.6rem;
}
.hero-rule { display: inline-block; width: 36px; height: 1px; background: var(--accent); }
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--fs-hero); line-height: .94;
  letter-spacing: -.02em; margin: 0 0 1.8rem;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-bottom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2.5rem; justify-content: space-between; }
.hero-lede { color: var(--muted-2); font-size: var(--fs-lede); max-width: 30ch; margin: 0; }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 1rem 1.9rem;
}
.btn-primary { background: var(--accent); color: var(--bg); transition: opacity var(--t-fast); }
.btn-primary:hover { opacity: .85; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgb(var(--text-rgb) / .28); transition: border-color var(--t-fast), color var(--t-fast); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-wave {
  position: absolute; left: var(--pad); right: var(--pad); bottom: var(--space-5);
  display: flex; align-items: flex-end; gap: 3px; height: 44px; opacity: .16; z-index: 1;
}
.hero-wave span { flex: 1; background: var(--accent); border-radius: var(--radius-sm); animation: jpbWave 1.5s ease-in-out infinite; }

.hero-scroll {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  text-decoration: none; color: rgb(var(--text-rgb) / .65);
}
.hero-scroll span { font-size: var(--fs-3xs); letter-spacing: .24em; text-transform: uppercase; }
.hero-scroll svg { animation: jpbCue 1.8s ease-in-out infinite; }

/* ── Reveal ── */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 440px 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.about-photos { display: flex; flex-direction: column; gap: 4px; }
.about-photo { overflow: hidden; border: 1px solid var(--border); }
.about-photo img { width: 100%; height: 360px; object-fit: cover; object-position: center 20%; filter: grayscale(12%) contrast(1.04); }
.about-photo--2 img { height: 300px; object-position: center 12%; }
.about-text { display: flex; flex-direction: column; gap: 2.6rem; padding-top: var(--space-2); }
.about-text .lead { color: var(--muted-2); font-size: var(--fs-lg); margin: 0 0 1.1rem; max-width: 58ch; }
.about-text p { color: var(--muted); font-size: var(--fs-md); margin: 0 0 1.1rem; max-width: 58ch; }
.about-text p:last-child { margin-bottom: 0; }
.about-text .hl { color: var(--text-2); }
.skills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.skills li { padding: .95rem .2rem; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted-3); letter-spacing: .02em; }
.skills li:nth-child(odd) { border-right: 1px solid var(--border); }
.skills li:nth-child(even) { padding-left: 1.2rem; }

/* ── Card (shared: Zynforge + TV) ── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.card { background: var(--bg-alt); display: flex; flex-direction: column; transition: background var(--t-card); }
.card:hover { background: var(--surface-hover); }
.card h3 { font-family: var(--serif); font-weight: 400; color: var(--text); }
.card p { color: var(--muted); margin: 0; }

.card--zyn { padding: clamp(2rem, 3vw, 2.6rem); gap: .9rem; min-height: 180px; }
.card--zyn h3 { font-size: var(--fs-2xl); margin: 0; }
.card--zyn p { font-size: var(--fs-sm); line-height: 1.6; }
.zyn-icon { width: 64px; height: 64px; border-radius: var(--radius-md); }

.card--tv { padding: clamp(2rem, 3vw, 2.8rem); gap: var(--space-4); }
.card--tv h3 { font-size: var(--fs-3xl); margin: .3rem 0 0; }
.card--tv p { font-size: var(--fs-sm); max-width: 44ch; }
.tv-channel { align-self: flex-start; font-size: var(--fs-3xs); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); padding: .3rem .7rem; }

/* ── Studio strip ── */
.studio-strip { width: 100%; height: clamp(240px, 38vw, 460px); overflow: hidden; position: relative; }
.studio-strip img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; filter: grayscale(10%) contrast(1.05); }
.studio-strip-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(var(--bg-rgb) / .45), rgb(var(--bg-rgb) / .15) 50%, rgb(var(--bg-rgb) / .55)); }

/* ── Name wall ── */
.namewall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); position: relative; }
.namewall-cell {
  background: var(--surface); padding: var(--space-5) var(--space-4); min-height: 88px;
  display: flex; align-items: center; justify-content: center; text-align: center; gap: var(--space-2);
  font-family: var(--serif); font-weight: 400; font-size: var(--fs-namecell);
  color: var(--text-3); border: none; cursor: pointer; width: 100%; position: relative;
  transition: background var(--t-card), color var(--t-card);
}
.namewall-cell:hover { background: var(--surface-hover); color: var(--accent); }
.namewall-plus { font-size: var(--fs-sm); opacity: .4; color: var(--accent); display: inline-block; line-height: 1; transition: transform var(--t-card); }
.namewall-cell.active { background: var(--surface-active); color: var(--accent); z-index: 20; }
.namewall-cell.active .namewall-plus { transform: rotate(45deg); opacity: 1; }

.namewall-pop {
  display: none; position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: min(300px, 80vw); background: var(--pop-bg); border: 1px solid var(--pop-border); border-top: 2px solid var(--accent);
  padding: var(--space-5) var(--space-5) 1.5rem; text-align: left; z-index: 30; cursor: default;
  box-shadow: var(--shadow-pop); animation: jpbPop var(--t-fast) ease both;
}
.namewall-cell.active .namewall-pop { display: block; }
.namewall-pop-arrow { position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 13px; height: 13px; background: var(--accent); }
.namewall-pop-close { position: absolute; top: .7rem; right: .85rem; color: var(--muted); font-size: var(--fs-base); cursor: pointer; font-family: var(--sans); line-height: 1; }
.namewall-pop-role { display: block; font-size: var(--fs-3xs); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 .55rem; }
.namewall-pop-name { display: block; font-family: var(--serif); font-weight: 400; font-size: var(--fs-xl); line-height: 1.1; margin: 0 0 .7rem; color: var(--text); }
.namewall-pop-desc { display: block; font-family: var(--sans); font-weight: 300; font-size: var(--fs-base); line-height: 1.65; color: var(--muted-2); margin: 0; }

/* ── Gallery ── */
.container--gallery { margin-bottom: var(--space-8); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 20vw, 280px); gap: 3px; }
.gallery-item { overflow: hidden; cursor: pointer; position: relative; padding: 0; border: none; background: none; }
.gallery-item--tall { grid-row: span 2; }
.gallery-item--wide { grid-column: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(18%); transition: transform var(--t-med) var(--ease), filter var(--t-med) var(--ease); }
.gallery-item:hover img { transform: scale(1.05); filter: grayscale(0%); }

/* ── Contact ── */
.contact-actions { display: flex; flex-direction: column; gap: .9rem; max-width: 420px; }
.contact-link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  color: var(--text); text-decoration: none; font-size: var(--fs-base); letter-spacing: .04em;
  padding: 1.05rem var(--space-5); border: 1px solid rgb(var(--text-rgb) / .16);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.contact-link:hover { border-color: var(--accent); background: rgb(var(--accent-rgb) / .05); }
.contact-tag { color: var(--accent); font-size: var(--fs-2xs); letter-spacing: .14em; text-transform: uppercase; }
.social { margin-top: var(--space-6); display: flex; gap: var(--space-6); }
.social a { color: var(--muted); text-decoration: none; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; transition: color var(--t-fast); }
.social a:hover { color: var(--accent); }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 3.2rem var(--pad); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }
.footer-logo { height: 56px; width: auto; display: block; opacity: .95; }
.footer-name { font-family: var(--serif); font-size: var(--fs-lg); color: var(--text); letter-spacing: .02em; }
.footer-meta { color: var(--dim); font-size: var(--fs-xs); letter-spacing: .06em; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: var(--overlay); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: clamp(1rem, 5vw, 4rem); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: default; box-shadow: var(--shadow-lightbox); }
.lightbox-close { position: absolute; top: var(--space-5); right: 1.6rem; background: none; border: none; color: var(--text); font-size: var(--fs-3xl); cursor: pointer; line-height: 1; padding: var(--space-2); }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 1px solid rgb(var(--text-rgb) / .25); color: var(--text); width: 48px; height: 48px; border-radius: var(--radius-full); cursor: pointer; font-size: var(--fs-xl); }
.lightbox-prev { left: clamp(.6rem, 2vw, 2rem); }
.lightbox-next { right: clamp(.6rem, 2vw, 2rem); }

/* ── Keyframes ── */
@keyframes jpbWave { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.32); } }
@keyframes jpbRise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes jpbPop { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes jpbCue { 0% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(7px); opacity: 1; } 100% { transform: translateY(0); opacity: .35; } }

/* ── Responsive ── */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .namewall { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .card-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .namewall { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--tall { grid-row: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
