/* BioRhythm — shares its visual language with cnichols.co:
   pale grey ground, electric-blue Inter, uppercase statements, black video bands. */

:root {
  --bg: #e8e9eb;
  --ink: #0059ff;
  --ink-soft: #4d86ff;
  --black: #0a0a0c;
  --white: #fff;
  --rule: rgba(0, 89, 255, .25);
  --gutter: clamp(16px, 3vw, 40px);
  --step--1: clamp(11px, .75vw, 12px);
  --step-0: clamp(14px, 1vw, 16px);
  --step-1: clamp(18px, 1.6vw, 24px);
  --step-2: clamp(22px, 2.6vw, 40px);
  --step-4: clamp(56px, 11vw, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.45 Inter, system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
figure { margin: 0; }
h1, h2, h3, p, dl, dd, ol { margin: 0; padding: 0; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter);
  font-size: var(--step--1); font-weight: 500; letter-spacing: .02em; text-transform: uppercase;
  color: var(--white); mix-blend-mode: difference;
}
.bar__mark { font-weight: 800; letter-spacing: -.01em; font-size: 15px; text-transform: none; }
.bar__nav { display: flex; gap: clamp(8px, 1.6vw, 22px); }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 480px; background: var(--black); overflow: hidden; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.45)); pointer-events: none; }
.hero__meta { z-index: 1; }
.band { background: var(--black); aspect-ratio: 16 / 9; max-height: 100svh; width: 100%; overflow: hidden; }
.band video { width: 100%; height: 100%; object-fit: cover; }
.hero__meta {
  position: absolute; inset: auto var(--gutter) 18px;
  display: flex; justify-content: space-between; gap: 16px;
  color: var(--white); font-size: var(--step--1); text-transform: uppercase; letter-spacing: .04em;
}

.wordmark {
  display: flex; justify-content: space-between;
  padding: .06em var(--gutter) 0;
  font-size: var(--step-4); font-weight: 800; line-height: .86; letter-spacing: -.055em;
  text-transform: uppercase;
}

/* ---------- shared ---------- */
.eyebrow { font-size: var(--step--1); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.eyebrow--section { padding: 0 var(--gutter); margin: clamp(48px, 7vw, 96px) 0 14px; }
.statement {
  max-width: 30ch;
  font-size: var(--step-2); font-weight: 500; line-height: 1.08; letter-spacing: -.02em;
  text-transform: uppercase;
}
.statement--sm { font-size: var(--step-1); line-height: 1.15; max-width: 36ch; }
.prose { max-width: 58ch; display: grid; gap: 1em; }
.section-title {
  font-size: clamp(48px, 8vw, 140px); font-weight: 800; line-height: .88; letter-spacing: -.05em;
  text-transform: uppercase;
}
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--white);
  font: 500 var(--step-0)/1 Inter, sans-serif; cursor: pointer;
  transition: transform .3s var(--ease), background .3s;
}
.pill:hover { text-decoration: none; transform: translateY(-2px); background: #0047d6; }
.pill--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pill--ghost:hover { background: var(--ink); color: var(--white); }

/* ---------- intro ---------- */
.intro { padding: clamp(80px, 12vw, 180px) var(--gutter) clamp(60px, 8vw, 120px); display: grid; gap: clamp(48px, 7vw, 110px); }
.intro > .statement { max-width: 24ch; font-size: clamp(26px, 3.6vw, 58px); }
.intro__cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: start; }
.intro__cols > :first-child { grid-column: 1 / span 5; }
.intro__cols > :last-child { grid-column: 7 / -1; }
.edition .intro__cols { padding: clamp(48px, 7vw, 100px) var(--gutter); }

.facts { display: grid; border-top: 1px solid var(--rule); }
.facts > div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .06em; padding-top: .2em; }

.pillars { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.pillars li { border-top: 1.5px solid var(--ink); padding-top: 14px; display: grid; gap: 8px; align-content: start; }
.pillars__n { font-size: var(--step--1); }
.pillars h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; }

/* ---------- editions ---------- */
.edition { padding-top: clamp(40px, 6vw, 80px); }
.edition__head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); align-items: end;
  padding: 0 var(--gutter) clamp(28px, 4vw, 56px);
  border-top: 1.5px solid var(--ink); padding-top: 14px;
  margin: 0 var(--gutter); padding-left: 0; padding-right: 0;
}
.edition__head .eyebrow { grid-column: 1 / -1; }
.edition__title { grid-column: 1 / span 8; font-size: clamp(56px, 10vw, 180px); font-weight: 800; line-height: .86; letter-spacing: -.055em; text-transform: uppercase; margin-top: clamp(20px, 3vw, 40px); }
.edition__meta { grid-column: 9 / -1; font-size: var(--step-0); text-transform: uppercase; letter-spacing: .02em; text-align: right; }

.spread {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter);
  padding: 0 var(--gutter); margin-bottom: var(--gutter); align-items: end;
}
.spread figure, .bleed, .strip figure { overflow: hidden; background: #d6d8dc; }
.spread img, .bleed img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform 1.2s var(--ease); }
.spread figure:hover img { transform: scale(1.025); }
.s-wide { grid-column: span 8; }
.s-tall { grid-column: span 4; }
.s-small { grid-column: span 4; align-self: start; }
.spread--three > * { grid-column: span 4; }
.spread--three .offset, .spread--loop .offset { margin-bottom: clamp(40px, 8vw, 140px); }
.spread--loop > * { grid-column: span 4; }
.loop { overflow: hidden; background: var(--black); aspect-ratio: 9 / 16; }
.loop video { width: 100%; height: 100%; object-fit: cover; }

.edition > .statement { padding: clamp(60px, 9vw, 140px) var(--gutter); margin-left: auto; margin-right: 0; max-width: calc(36ch + 2 * var(--gutter)); box-sizing: content-box; }
.bleed { margin-bottom: var(--gutter); max-height: 92svh; }

.strip {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) 12px; scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.strip figure { flex: 0 0 auto; height: clamp(260px, 38vw, 520px); scroll-snap-align: start; }
.strip img { height: 100%; width: auto; cursor: zoom-in; }
.strip:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.film { position: relative; background: var(--black); margin-top: clamp(60px, 9vw, 140px); }
.film video { width: 100%; max-height: 100svh; margin: 0 auto; aspect-ratio: 16 / 9; object-fit: contain; }
.film__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 16px 30px; }
.film.is-playing .film__play { opacity: 0; pointer-events: none; }
.film:not(.is-playing) video::-webkit-media-controls { display: none !important; }

/* ---------- how it works / commission / faq ---------- */
.how, .commission { padding-top: clamp(80px, 12vw, 180px); }
.how .edition__head, .commission .edition__head { padding-bottom: 0; }
.how__lede { padding: clamp(48px, 7vw, 100px) var(--gutter) clamp(40px, 6vw, 80px); max-width: 26ch; font-size: clamp(24px, 3.2vw, 50px); box-sizing: content-box; }
.how .pillars { padding: 0 var(--gutter); }
.pillars--five { grid-template-columns: repeat(5, 1fr); }
.pillars--five p { font-size: var(--step-0); }
.how .intro__cols, .commission .intro__cols { padding: clamp(56px, 8vw, 120px) var(--gutter) 0; }
.commission .prose .facts { margin: 8px 0 10px; }
.commission .prose .facts > div { grid-template-columns: 7em 1fr; }
.faq { padding-bottom: 0; }
.commission .edition__title { font-size: clamp(48px, 8.6vw, 156px); }

/* ---------- community partner ---------- */
.partner { padding-top: clamp(80px, 12vw, 180px); }
.partner__head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px var(--gutter); align-items: end;
  margin: 0 var(--gutter); padding-top: 14px; border-top: 1.5px solid var(--ink);
}
.partner__head .eyebrow { grid-column: 1 / -1; }
.partner__title { grid-column: 1 / span 6; font-size: clamp(44px, 7vw, 120px); font-weight: 800; line-height: .88; letter-spacing: -.05em; text-transform: uppercase; margin-top: clamp(16px, 2vw, 28px); }
.partner__head .prose { grid-column: 8 / -1; }
.partner .film { margin-top: clamp(32px, 5vw, 64px); }

/* ---------- plants ---------- */
.plants { padding: clamp(80px, 12vw, 180px) var(--gutter) 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.plants__head { grid-column: 1 / span 4; position: sticky; top: 70px; align-self: start; display: grid; gap: 22px; }
.plant-list { grid-column: 6 / -1; border-top: 1.5px solid var(--ink); }
.plant-list details { border-bottom: 1px solid var(--rule); }
.plant-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 16px 0;
}
.plant-list summary::-webkit-details-marker { display: none; }
.pl-name { font-size: var(--step-1); font-weight: 600; letter-spacing: -.02em; text-transform: uppercase; }
.plant-list summary i { font-size: var(--step-0); white-space: nowrap; }
.plant-list summary::after { content: "+"; font-size: var(--step-1); margin-left: 8px; transition: rotate .3s var(--ease); }
.plant-list details[open] summary::after { rotate: 45deg; }
.plant-list summary:hover .pl-name { color: var(--ink-soft); }
.plant-list details p { max-width: 62ch; padding: 0 0 22px; }

/* ---------- credits ---------- */
.credits { padding: clamp(80px, 12vw, 180px) var(--gutter); }
.credit-grid { margin-top: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px var(--gutter); }
.credit-grid > div { border-top: 1px solid var(--rule); padding-top: 12px; display: grid; gap: 6px; align-content: start; }
.credit-grid dt { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .06em; }
.credit-grid dd { font-size: var(--step-1); font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--white); padding: clamp(60px, 9vw, 140px) var(--gutter) 20px; display: grid; gap: clamp(60px, 8vw, 120px); }
.foot__cta { display: grid; gap: 22px; justify-items: start; }
.foot__mail { font-size: clamp(24px, 5vw, 84px); font-weight: 700; letter-spacing: -.045em; line-height: 1; overflow-wrap: anywhere; }
.foot__links { display: flex; flex-wrap: wrap; gap: 10px; }
.foot .pill { background: var(--white); color: var(--ink); }
.foot .pill--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px var(--white); }
.foot .pill--ghost:hover { background: var(--white); color: var(--ink); }
.foot__ack { max-width: 70ch; font-size: var(--step-0); opacity: .9; }
.foot__small { display: flex; justify-content: space-between; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .06em; border-top: 1px solid rgba(255,255,255,.35); padding-top: 14px; }

/* ---------- pinterest save ---------- */
.spread figure, .bleed, .strip figure { position: relative; }
.pin-save {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: 8px 14px; border-radius: 999px;
  background: #e60023; color: #fff; font: 600 13px/1 Inter, sans-serif;
  opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s;
}
.pin-save:hover { text-decoration: none; background: #ad081b; }
figure:hover .pin-save, .bleed:hover .pin-save, .pin-save:focus-visible { opacity: 1; transform: none; }
.lightbox__pin { top: auto; bottom: 18px; right: auto; left: 50%; transform: translateX(-50%); opacity: 1; padding: 11px 20px; font-size: 14px; }
@media (hover: none) { .spread .pin-save, .bleed .pin-save, .strip .pin-save { display: none; } }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,12,.94); display: grid; place-items: center; padding: 4vmin; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92svh; width: auto; object-fit: contain; }
.lightbox__close { position: absolute; top: 14px; right: var(--gutter); background: none; border: 0; color: var(--white); font: 500 var(--step--1) Inter, sans-serif; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; translate: 0 24px; transition: opacity 1s var(--ease), translate 1s var(--ease); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .spread img { transition: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  /* one column everywhere: the 12-col grid's gaps alone overflow a phone */
  .intro__cols, .edition__head, .spread, .plants, .partner__head { grid-template-columns: minmax(0, 1fr); }
  .intro__cols > *, .edition__head > *, .spread > *, .plants > *, .partner__head > * { grid-column: 1 / -1 !important; }
  .partner__title { font-size: 14vw; }

  .bar__nav a:nth-child(n+4) { display: none; }
  .hero__meta { flex-direction: column; gap: 2px; }

  /* headings scale with the screen so they never push the page wider */
  .wordmark { font-size: 16.4vw; padding-top: .1em; }
  .intro > .statement { font-size: max(22px, 7.4vw); }
  .statement--sm { font-size: max(17px, 5.2vw); }
  .edition__title { font-size: 17vw; }
  .section-title { font-size: 17vw; }
  .edition__meta { text-align: left; }
  .pillars { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .pillars--five { grid-template-columns: minmax(0, 1fr); }
  .how__lede { font-size: max(22px, 7vw); }
  .commission .edition__title { font-size: 12.6vw; }

  /* photos run edge to edge */
  .spread { padding: 0; gap: 8px; margin-bottom: 8px; }
  .spread > * { margin-bottom: 0 !important; }
  .bleed { margin-bottom: 8px; }
  .loop { aspect-ratio: 4 / 5; }
  .strip { padding: 0 0 12px; gap: 8px; }
  .strip figure { height: 62vw; }
  .edition > .statement { margin-left: 0; }

  .plants__head { position: static; }
  .plant-list summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
  .plant-list summary i { white-space: normal; grid-column: 1; }
  .plant-list summary::after { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .credit-grid { grid-template-columns: 1fr 1fr; }
  .foot__mail { font-size: 8.4vw; }
}
