/* Good Butter, v3 one-pager. Tokens from Figma "Good Butter Site (v1 + v2)" v3 frame. */
:root {
  --cream: #FFF9ED;
  --ink: #0B1C1F;
  --butter: #FFFD74;
  --olive: #435C32;
  --ink-68: rgba(11, 28, 31, .68);
  --ink-12: rgba(11, 28, 31, .12);
  --ink-07: rgba(11, 28, 31, .07);

  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 24px;
  --space: clamp(104px, 13.9vw, 220px);   /* 200 at 1440 */
  --ease: cubic-bezier(.2, .7, 0, 1);
}

@media (max-width: 700px) {
  :root { --gutter: 16px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; }
a { color: inherit; }
::selection { background: var(--butter); color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--butter); color: var(--ink); padding: 10px 14px;
  font-weight: 700; text-decoration: none; border-radius: 6px;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- Shared type ---------- */
.label-xl {
  font-weight: 700;
  font-size: clamp(30px, 2.99vw, 50px);        /* 43 at 1440 */
  line-height: 1;
  text-transform: uppercase;
}
.link-lg {
  font-size: clamp(18px, 2.22vw, 36px);        /* 32 */
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: .14em;
}
.link-lg:hover, .say a:hover, .footer a:hover { text-decoration-thickness: 2px; }
.lead {
  font-size: clamp(20px, 1.81vw, 30px);        /* 26 */
  line-height: 1.25;
}
.dim { color: var(--ink-68); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  padding: 0 var(--gutter);
  overflow: hidden;
  background: #2b291c;
  color: var(--cream);
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 0 0;
  transform: scale(1.2467);          /* matches the Figma crop at 1440 x 900 */
  transform-origin: 0 0;
}
@media (max-aspect-ratio: 5/4) {
  .hero-media video { object-position: 42% 50%; transform: none; }
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(11,28,31,.38) 0%, rgba(11,28,31,0) 22%),
    linear-gradient(to top, rgba(11,28,31,.5) 0%, rgba(11,28,31,0) 26%);
  pointer-events: none;
}

.nav {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px;
}
.nav a {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:not(.nav-butto):hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 2px; }
.nav-butto img { width: 53px; height: 46px; transition: transform .5s var(--ease); }
.nav-butto:hover img { transform: rotate(-8deg) scale(1.06); }

.hero-wordmark { position: relative; z-index: 2; color: var(--butter); }
.wordmark { width: 100%; height: auto; overflow: hidden; }

.hero-spacer { flex: 1 1 auto; min-height: 24px; }

.hero-bottom {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding: 32px 0 20px;
  font-size: 15px; line-height: 1.4;
}
.hero-note { max-width: 360px; }
.hero-toggle {
  margin-left: auto;
  appearance: none; background: none; border: 0; padding: 0;
  color: inherit; font: inherit; opacity: .8; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: from-font;
}
.hero-toggle:hover { opacity: 1; }

/* Wordmark rise. Letters start below the baseline and are clipped by the SVG box. */
.js .wordmark path { transform-box: fill-box; }
.js .wordmark.is-armed path { transform: translateY(105%); }
.js .wordmark.is-in path {
  transform: none;
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms + 120ms);
}

/* ---------- Intro ---------- */
.intro { padding: 44px var(--gutter) var(--space); }
.intro p {
  max-width: 82%;
  font-size: clamp(24px, 2.64vw, 46px);        /* 38 */
  line-height: 1.16;
  letter-spacing: -.012em;
  text-align: justify;
}

/* ---------- Horizontal rows ---------- */
.row {
  display: flex; gap: 8px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--gutter);
  scrollbar-width: none;
  cursor: grab;
}
.row::-webkit-scrollbar { display: none; }
.row::after { content: ""; flex: 0 0 calc(var(--gutter) - 8px); }
.row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.row.is-dragging * { pointer-events: none; }
.row:focus-visible { outline-offset: -2px; }
.row img { -webkit-user-drag: none; user-select: none; }

.row-track {
  position: relative; height: 1px;
  margin: 20px var(--gutter) 0;
  background: var(--ink-12);
}
.row-track span {
  position: absolute; left: 0; top: -1px; height: 3px;
  width: 30%; background: var(--ink);
  transform: translateX(0);
  will-change: transform;
}
.row-track.is-static { visibility: hidden; }

.card, .person { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; }
.card { width: clamp(280px, 32.78vw, 560px); }   /* 472 at 1440 */
.card-img {
  position: relative; overflow: hidden; border-radius: 3px;
  aspect-ratio: 472 / 416;
  background: var(--ink-07);
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.card:hover .card-img img { transform: scale(1.03); }
figcaption, .person-cap { display: flex; flex-direction: column; font-size: 16px; line-height: 1.35; }

/* ---------- Work ---------- */
.work { padding-bottom: var(--space); }
.work-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter) 20px;
}
.also {
  max-width: 980px;
  padding: 48px var(--gutter) 0;
  color: var(--ink-68);
  font-size: clamp(20px, 1.81vw, 30px); line-height: 1.3;
  box-sizing: content-box;
}

/* ---------- What we do ---------- */
.what { padding: 0 var(--gutter) var(--space); }
.services {
  max-width: 90%;
  padding-top: 35px;
  font-family: var(--serif);
  font-size: clamp(54px, 8.2vw, 140px);        /* 118 */
  line-height: .98;
  letter-spacing: -.02em;
}
.what .lead { max-width: 672px; padding-top: 28px; text-align: justify; }
.model {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px;
  padding-top: 86px;
  font-size: 19px;
}
.model h4 { margin: 0 0 8px; font-size: inherit; font-weight: 700; line-height: 1.3; text-transform: uppercase; }
.nw { white-space: nowrap; }
@media (min-width: 901px) { .work-head h2 { white-space: nowrap; } }
.work-head .link-lg { font-size: 16px; line-height: 1.35; text-align: right; }
@media (max-width: 700px) { .work-head .link-lg { text-align: left; } }
.model p { line-height: 1.45; }

/* ---------- Who we are ---------- */
.who {
  position: relative; overflow: hidden;
  padding: 24px var(--gutter) 144px;
  background: var(--ink);
  color: var(--butter);
  text-align: center;
}
.who-photo { position: absolute; inset: 0; }
.who-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: saturate(.85); }
.who-photo::after { content: ""; position: absolute; inset: 0; background: rgba(11,28,31,.35); }
.who > *:not(.who-photo) { position: relative; }
.eyebrow { text-align: left; font-weight: 700; font-size: 14px; line-height: 1.3; }
.feature {
  padding-top: 115px;
  font-family: var(--serif);
  font-size: clamp(44px, 6.6vw, 112px);        /* 95 */
  line-height: .98;
  letter-spacing: -.02em;
}
.tm { font-size: .5em; line-height: 0; vertical-align: .78em; margin-left: .03em; }
.ingredients {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  padding-top: 130px;
}
.ingredients h3 {
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 2.99vw, 50px); line-height: 1;
  margin-bottom: 28px;
}
.ingredients p {
  max-width: 400px; margin: 0 auto; text-wrap: balance;
  font-size: 20px; line-height: 1.45;
}

/* ---------- Tagline marquee ---------- */
.tagline {
  overflow: hidden;
  padding: clamp(72px, 8.9vw, 140px) 0;          /* 128 at 1440 */
}
.tagline-track {
  display: flex; align-items: center; gap: 30px;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.tagline:hover .tagline-track { animation-play-state: paused; }
.tagline-track span {
  font-family: var(--serif);
  font-size: clamp(72px, 11.6vw, 200px);        /* 167 */
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.tagline-track span.it { font-style: italic; }
.tagline-track .sep { flex: 0 0 auto; width: auto; height: clamp(56px, 7.6vw, 128px); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Team ---------- */
.team { padding-bottom: var(--space); }
.display {
  padding: 0 var(--gutter) 20px;
  font-family: var(--serif);
  font-size: clamp(56px, 9.4vw, 160px);        /* 135 */
  line-height: .86;
  letter-spacing: -.02em;
}
.person { width: clamp(220px, 21.6vw, 380px); }   /* 311 */
.person-photo {
  position: relative; overflow: hidden; border-radius: 3px;
  aspect-ratio: 311 / 389;
  background: var(--ink-07);
  display: grid; place-items: center;
}
.person-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person-initials {
  font-family: var(--serif);
  font-size: clamp(64px, 7vw, 120px);
  line-height: 1; letter-spacing: -.02em;
  color: rgba(11,28,31,.16);
  transition: color .5s var(--ease);
}
.person:hover .person-initials { color: rgba(11,28,31,.32); }

/* ---------- Contact ---------- */
.contact {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 var(--gutter) var(--space);
}
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  column-gap: .22em; row-gap: 0;
  font-family: var(--serif);
  font-size: clamp(54px, 9.6vw, 164px);        /* 138 */
  line-height: 1;
  letter-spacing: -.02em;
}
.cta-butto {
  position: relative;
  width: 1.22em; height: 1em;
  display: inline-block;
}
.cta-butto img {
  position: absolute; left: 50%; top: 50%;
  width: 1.62em; height: 1.62em; max-width: none;
  transform: translate(-50%, -53%);
}
.lead-center { max-width: 560px; padding-top: 36px; }
.say {
  padding-top: 24px;
  font-size: clamp(22px, 2.22vw, 36px);
  line-height: 1.2;
}
.say a { text-decoration-thickness: from-font; text-underline-offset: .14em; }

/* ---------- Footer ---------- */
.footer { padding: 0 16px 16px; }
.panel {
  background: var(--ink); color: var(--cream);
  border-radius: 12px; padding: 24px;
  overflow: hidden;
}
.cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px;
  font-size: 17px; line-height: 1.4;
}
.col-hello { grid-column: 3; }
.cols p + p { margin-top: 1.4em; }
.cols .flabel { font-weight: 700; font-size: 14px; line-height: 1.3; margin-bottom: 14px; }
.cols .flabel + p { margin-top: 0; }
.footer a { text-decoration-thickness: from-font; text-underline-offset: .16em; }
.footer-wordmark { padding-top: clamp(96px, 13vw, 240px); color: var(--butter); }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
}
.ingredients [data-reveal]:nth-child(2) { transition-delay: .08s; }
.ingredients [data-reveal]:nth-child(3) { transition-delay: .16s; }

/* ---------- NYCC: hidden after the show ---------- */
.is-expired { display: none !important; }

/* ---------- Placeholder labels: add ?slots to the URL ---------- */
.show-slots [data-slot] { outline: 2px dashed var(--butter); outline-offset: -2px; }
.show-slots [data-slot]::before {
  content: attr(data-slot);
  position: absolute; left: 8px; top: 8px; z-index: 5;
  max-width: calc(100% - 16px);
  padding: 4px 8px; border-radius: 4px;
  background: var(--butter); color: var(--ink);
  font: 700 12px/1.3 var(--sans); text-align: left; text-transform: none; letter-spacing: 0;
}
.show-slots .cta-butto::before { top: auto; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; }

/* ---------- Mobile ---------- */

/* ---------- Roboto Mono: short copy, captions, small functional details ---------- */
.nav a, .hero-toggle, figcaption, .person-cap, .cols, .work-head .link-lg, .model h4 { font-family: var(--mono); }
.nav a { font-weight: 500; letter-spacing: 0; }
figcaption, .person-cap { font-size: 14px; }
.cols { font-size: 15px; }

/* ---------- Back to top: Butto, bottom right ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--butter); border: 2px solid var(--ink);
  box-shadow: 0 6px 18px rgba(11,28,31,.18);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top img { width: 58px; height: auto; transition: transform .3s var(--ease); }
.to-top:hover img { transform: translateY(-4px); }
.to-top:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

@media (max-width: 900px) {
  .intro p, .what .lead { max-width: none; text-align: left; }
  .services { max-width: none; }
  .model { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; font-size: 18px; }
  .ingredients { grid-template-columns: 1fr; gap: 56px; padding-top: 80px; }
  .feature { padding-top: 72px; }
  .who { padding-bottom: 96px; }
  .cols { grid-template-columns: 1fr; gap: 32px; }
  .col-hello { grid-column: auto; }
}
@media (max-width: 700px) {
  .nav a { font-size: 12px; letter-spacing: .04em; }
  .to-top { right: 12px; bottom: 12px; width: 60px; height: 60px; }
  .to-top img { width: 46px; }
  .nav-butto img { width: 40px; height: 35px; }
  .hero-bottom { font-size: 14px; }
  .work-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .card { width: 82vw; }
  .person { width: 64vw; }
  .ingredients p { font-size: 18px; }
  .footer { padding: 0 8px 8px; }
  .panel { padding: 20px 16px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .tagline-track { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .wordmark.is-armed path { transform: none; }
  .card-img img, .nav-butto img { transition: none; }
}
