/* Dean Barlow home page concept. One stylesheet, no framework.
   Palette (sources in /workspace/dean-concept/README.md):
   paper #F4EEDC  ink #1C1814  pink #E59AAE  rose #B8475F
   blush #F6DDE3  olive #4A5E3A  sage #93A07A  sepia #9C6B3E */

@font-face { font-family: "Otez"; src: url(../fonts/ZTOtez-Regular.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Otez"; src: url(../fonts/ZTOtez-Italic.woff2) format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "Picaflor"; src: url(../fonts/Picaflor-36pt.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Picaflor Display"; src: url(../fonts/Picaflor-96pt.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "ZT Nature"; src: url(../fonts/ZTNature-Light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "ZT Nature"; src: url(../fonts/ZTNature-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "ZT Nature"; src: url(../fonts/ZTNature-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #F4EEDC; --ink: #1C1814; --pink: #E59AAE; --rose: #B8475F;
  --blush: #F6DDE3; --olive: #4A5E3A; --sage: #93A07A; --sepia: #9C6B3E;
  --sans: "ZT Nature", system-ui, sans-serif;
  --display: "Picaflor", "Didot", serif;
  --serif: "Otez", Georgia, serif;
  --bar-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Film grain: one static SVG noise tile over everything, never blocks clicks */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .06;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Top bar ----------
   Fixed from the first paint with a fixed height, so switching to frosted
   never moves anything. Only the ::before backdrop fades/slides in. */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 2rem; padding: 0 clamp(1rem, 4vw, 3rem);
  color: var(--paper); transition: color .25s var(--ease);
}
.bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgb(244 238 220 / .72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgb(156 107 62 / .2);
  opacity: 0; translate: 0 -100%;
  transition: opacity .2s var(--ease), translate .2s var(--ease);
}
.bar.is-frosted { color: var(--ink); }
.bar.is-frosted::before { opacity: 1; translate: 0 0; }

.logo { display: block; width: 66px; height: 43px; flex: none;
  background: currentColor; -webkit-mask: url(../img/bb-logo.png) center / contain no-repeat; mask: url(../img/bb-logo.png) center / contain no-repeat; }

.nav { margin-left: auto; }
.nav ul { display: flex; gap: clamp(1rem, 2.2vw, 2.25rem); margin: 0; padding: 0; list-style: none; }
.nav a {
  /* Two labels stacked in one grid cell: the cell is as wide as the wider
     label, so the italic swap on hover can't shift its neighbours. */
  position: relative; display: inline-grid; overflow: hidden; padding: .35rem 0;
  font: 500 .95rem/1.2 var(--sans); text-decoration: none; letter-spacing: .01em;
}
.nav a > span, .nav a::before { grid-area: 1 / 1; text-align: center; transition: translate .35s var(--ease), opacity .35s var(--ease); }
.nav a::before { content: attr(data-label); font: italic 400 1.05rem/1.1 var(--serif); color: var(--pink); translate: 0 110%; opacity: 0; }
.bar.is-frosted .nav a::before { color: var(--rose); }
.nav a::after { /* underline draws in from the left, leaves to the right */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  scale: 0 1; transform-origin: right; transition: scale .35s var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after { scale: 1 1; transform-origin: left; }
.nav a:hover > span, .nav a:focus-visible > span { translate: 0 -110%; opacity: 0; }
.nav a:hover::before, .nav a:focus-visible::before { translate: 0 0; opacity: 1; }

.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; cursor: pointer; transition: background-color .2s; }
.icon-btn:hover { background: rgb(229 154 174 / .2); }
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

/* ---------- Hero: DEAN / BARLOW cut out of black, video behind ---------- */
.hero { position: relative; height: 340vh; background: #000; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(1.1) contrast(1.05); }
.shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }

/* Black sheet with white letters; multiply turns white into windows onto the video */
.cutout {
  position: absolute; inset: 0; display: grid; place-content: center;
  background: #000; color: #fff; mix-blend-mode: multiply;
  transform-origin: var(--ox, 50%) var(--oy, 50%);
}
.cutout h1 { margin: 0; font: 400 1px/1 var(--serif); text-align: center; text-transform: uppercase; }
/* Each word is sized to fill the width: advance widths from the font file
   (DEAN 2.708em, BARLOW 4.324em). Height capped so both lines fit. */
.cutout h1 > span { --fit: min(95vw, 175vh); display: block; line-height: .74; }
.cutout .w1 { font-size: calc(var(--fit) / 2.708); }
.cutout .w2 { font-size: calc(var(--fit) / 4.324); margin-top: .06em; }
.cutout .r { display: inline-block; }

.tagline {
  position: absolute; left: 0; right: 0; bottom: 14vh; margin: 0; padding: 0 1.5rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .2em .5em;
  font: 400 clamp(2rem, 6vw, 5.5rem)/1 var(--display); color: var(--paper); text-transform: uppercase;
  text-shadow: 0 2px 30px rgb(0 0 0 / .5); pointer-events: none;
}
.tagline span { opacity: 0; translate: 0 .4em; }

.play-btn { position: absolute; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 2;
  color: var(--paper); background: rgb(28 24 20 / .45); border: 1px solid rgb(244 238 220 / .35); }
.play-btn:hover { background: rgb(184 71 95 / .6); }
.play-btn .i-play, .play-btn[aria-pressed="true"] .i-pause { display: none; }
.play-btn[aria-pressed="true"] .i-play { display: block; }
.scroll-hint { position: absolute; left: 50%; bottom: 2rem; translate: -50% 0; margin: 0;
  font: 500 .75rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgb(244 238 220 / .7); }
.anchor { position: absolute; top: 58%; }

/* ---------- Shared headings: Picaflor caps, Otez italic accent ---------- */
.h2 { margin: 0 0 1.5rem; font: 400 clamp(2.6rem, 6vw, 5.25rem)/.95 var(--display); text-transform: uppercase; text-wrap: balance; }
.h2 em { font: italic 400 1.02em/1 var(--serif); text-transform: none; color: var(--rose); padding: 0 .16em 0 .04em; }
.wrap { width: min(1200px, 100% - 2 * clamp(1.25rem, 5vw, 4rem)); margin-inline: auto; }

/* ---------- Dance with Dean ---------- */
.dance { position: relative; z-index: 1; padding: clamp(5rem, 12vw, 10rem) 0; background: var(--paper); }
.dance .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.dance figure { margin: 0; position: relative; }
/* Oval cameo, like an old studio print, with a blush offset behind it */
.dance figure::before { content: ""; position: absolute; inset: 0 0 2.2rem; border-radius: 50%; background: var(--blush); translate: 18px 14px; }
.dance figure::after { content: ""; position: absolute; inset: -10px -10px calc(2.2rem - 10px); border-radius: 50%; border: 1px solid rgb(156 107 62 / .45); pointer-events: none; }
.dance img { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%;
  border-radius: 50%; filter: sepia(.15); transform-origin: 50% 90%; }
.dance figure:hover img { animation: shuffle .6s var(--ease) 1; }
@keyframes shuffle {
  25% { rotate: -2deg; translate: 0 -4px; }
  50% { rotate: 2deg; translate: 0 0; }
  75% { rotate: -1deg; translate: 0 -2px; }
}
.dance figcaption { position: relative; margin-top: 1rem; height: 1.2rem; font: italic 400 .95rem/1.4 var(--serif); color: var(--sepia); text-align: center; }
.dance p { max-width: 34em; margin: 0 0 2rem; font-weight: 300; font-size: 1.125rem; }
.btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .9rem 1.6rem; border: 1px solid var(--ink);
  border-radius: 999px; font: 500 .95rem/1 var(--sans); text-decoration: none;
  background: linear-gradient(var(--ink), var(--ink)) left / 0 100% no-repeat;
  transition: background-size .45s var(--ease), color .45s var(--ease);
}
.btn:hover, .btn:focus-visible { background-size: 100% 100%; color: var(--paper); }
.btn svg { width: 18px; height: 18px; transition: translate .3s var(--ease); }
.btn:hover svg { translate: 4px 0; }

/* ---------- Roosevelt: B&W parallax ---------- */
.roosevelt { margin: 0; position: relative; z-index: 1; height: min(80vh, 720px); overflow: clip; background: var(--ink); }
.roosevelt img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.roosevelt figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6rem clamp(1.25rem, 5vw, 4rem) 2.5rem;
  background: linear-gradient(transparent, rgb(28 24 20 / .85)); color: var(--paper);
}
.roosevelt figcaption b { display: block; font: 400 clamp(2.2rem, 5vw, 4.5rem)/1 var(--display); text-transform: uppercase; }
.roosevelt figcaption span { font: italic 400 1.1rem/1.4 var(--serif); color: var(--blush); }
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  .roosevelt img { animation: drift linear both; animation-timeline: view(); }
  @keyframes drift { from { translate: 0 -9%; } to { translate: 0 9%; } }
}

/* ---------- Gallery: two endless rows ---------- */
.gallery { position: relative; z-index: 1; padding: clamp(5rem, 10vw, 8rem) 0; background: var(--paper); overflow: clip; }
.gallery header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 3rem; }
.gallery header .h2 { margin: 0; }
.link { font: 500 .95rem/1 var(--sans); color: var(--olive); text-underline-offset: .35em; text-decoration-thickness: 1px; }
.link:hover { color: var(--rose); }
.rows { display: grid; gap: 14px; }
.track { --row: clamp(170px, 24vw, 300px); display: flex; width: max-content; animation: slide 70s linear infinite; }
.track.rev { animation-direction: reverse; animation-duration: 80s; }
.rows:hover .track, .rows:focus-within .track { animation-play-state: paused; }
.track img { height: var(--row); width: auto; margin-right: 14px; background: #e6dcc4;
  filter: sepia(.18) contrast(1.02); transition: filter .4s var(--ease); }
.track img:hover { filter: none; }
@keyframes slide { to { translate: -50% 0; } }

/* ---------- Quotes ---------- */
.quotes { position: relative; z-index: 1; padding: clamp(4.5rem, 9vw, 7rem) 0; background: var(--olive); color: var(--paper); text-align: center; }
.quotes .stack { display: grid; max-width: 60rem; margin: 0 auto; }
.quotes figure { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s var(--ease), visibility 1.2s; }
.quotes figure.is-on { opacity: 1; visibility: visible; }
.quotes .mark { display: block; height: .5em; font: italic 400 clamp(7rem, 16vw, 12rem)/1 var(--serif); color: var(--pink); }
.quotes blockquote { margin: 0; font: italic 400 clamp(1.7rem, 3.6vw, 3rem)/1.2 var(--serif); text-wrap: balance; }
.quotes figcaption { margin-top: 1.75rem; font: 400 .95rem/1.4 var(--sans); color: var(--blush); }
.quotes figcaption i { font: italic 400 1.05rem var(--serif); color: #C9D2B4; }

/* ---------- Footer ---------- */
.foot { position: relative; z-index: 1; padding: 3.5rem 0 2.5rem; background: var(--ink); color: var(--paper); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.foot .logo { width: 80px; height: 52px; }
.social { display: flex; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgb(244 238 220 / .3); border-radius: 50%; transition: background-color .25s, border-color .25s; }
.social a:hover { background: var(--rose); border-color: var(--rose); }
.social svg { width: 18px; height: 18px; }
.foot small { width: 100%; padding-top: 1.5rem; border-top: 1px solid rgb(156 107 62 / .35); font-size: .85rem; color: rgb(244 238 220 / .65); }

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  :root { --bar-h: 64px; }
  .logo { width: 56px; height: 36px; }
  .menu-btn { display: grid; margin-left: auto; }
  .bar > .search { order: 3; }
  .nav { position: fixed; inset: var(--bar-h) 0 auto; margin: 0; padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem;
    background: rgb(244 238 220 / .96); color: var(--ink); border-bottom: 1px solid rgb(156 107 62 / .2);
    opacity: 0; visibility: hidden; translate: 0 -8px; transition: opacity .2s, translate .2s, visibility .2s; }
  .bar.menu-open .nav { opacity: 1; visibility: visible; translate: 0 0; }
  .bar.menu-open { color: var(--ink); }
  .bar.menu-open::before { opacity: 1; translate: 0 0; }
  .nav ul { flex-direction: column; gap: .5rem; }
  .nav a { font-size: 1.25rem; }
  .nav a > span, .nav a::before { text-align: left; }
  .nav a::before { font-size: 1.35rem; color: var(--rose); }
  .dance .wrap { grid-template-columns: 1fr; }
  .dance figure { max-width: 380px; margin-inline: auto; }
  .tagline { bottom: 18vh; }
}

/* ---------- Reduced motion: still frame, no zoom, no drift ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .stage { position: relative; }
  .tagline span { opacity: 1; translate: none; }
  .tagline { bottom: 5vh; font-size: clamp(1.3rem, 3.2vw, 2.75rem); }
  .cutout { padding-bottom: 10vh; }
  .track { animation: none; }
  .rows { overflow-x: auto; }
  .dance figure:hover img { animation: none; }
  .roosevelt img { animation: none; }
  .scroll-hint { display: none; }
}
.track .set { display: flex; }
