/* ==========================================================================
   Ewoke Coffee: homepage
   Tokens mirror the Figma "01 Foundations" page (Plus Jakarta Sans, espresso,
   cherry red, jute, cream). Components only use the semantic tokens.
   ========================================================================== */

:root {
  /* Primitives */
  --espresso-950: #270e0a;
  --espresso-900: #1f120d;
  --cherry-700: #7e2416;
  --cherry-600: #9e2f1e;
  --cherry-100: #f3ded6;
  --jute-500: #b08d5e;
  --jute-400: #cab19b;
  --jute-300: #d6c1a0;
  --jute-100: #ede2cf;
  --cream-50: #fbf8f2;
  --cream-100: #f4eee4;
  --cream-200: #e7ddcc;
  --stone-600: #6f655c;

  /* Semantic */
  --surface-page: var(--cream-50);
  --surface-subtle: var(--cream-100);
  --surface-card: #fff;
  --surface-inverse: var(--espresso-950);
  --surface-tan: var(--jute-400);
  --surface-jute: var(--jute-100);
  --surface-brand: var(--cherry-700);
  --text-primary: var(--espresso-900);
  --text-secondary: var(--stone-600);
  --text-inverse: var(--cream-50);
  --text-inverse-muted: var(--jute-300);
  --text-accent: var(--cherry-600);
  --action-primary: var(--cherry-600);
  --action-secondary: var(--espresso-900);
  --border-default: var(--cream-200);

  /* Layout */
  --margin: 120px;
  /* Vertical padding of every section and band. One value, stepped down on smaller screens. */
  --space-section: 96px;
  /* Horizontal page gutter. Percentages resolve against the real layout width
     (scrollbar excluded), so the 1200px content column always fits and never
     overflows between ~1280px and 1440px wide windows. */
  --gutter: max(32px, calc((100% - 1200px) / 2));
  --content: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Reset ------------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 26px;
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--jute-500);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: #fff;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

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

/* Type ------------------------------------------------------------------- */
.eyebrow {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 1.44px;
  text-transform: uppercase;
  color: var(--text-accent);
}
.eyebrow--muted { color: var(--text-inverse-muted); }
.eyebrow--dark { color: var(--text-primary); }

.h1 {
  font-size: 48px;
  line-height: 56px;
  font-weight: 600;
  letter-spacing: -0.96px;
}
.h3 {
  font-size: 26px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.26px;
}
.h4 {
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.09px;
}
.body-l { font-size: 18px; line-height: 30px; }
.body-s { font-size: 14px; line-height: 22px; }
.caption { font-size: 12px; line-height: 18px; }

/* Layout helpers --------------------------------------------------------- */
.section { padding: var(--space-section) var(--gutter); }
.section--hero-gap { padding-block: var(--space-section); }
.container { max-width: var(--content); margin-inline: auto; }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.section-head--left { align-items: flex-start; text-align: left; }

.bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.78px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--action-primary); color: var(--text-inverse); }
.btn--primary:hover { background: var(--cherry-700); }
.btn--secondary { background: var(--action-secondary); color: var(--text-inverse); }
.btn--secondary:hover { background: var(--cherry-700); }
.btn--light { background: #fff; color: var(--text-primary); }
.btn--light:hover { background: var(--jute-100); }
.btn--outline { background: transparent; color: var(--text-inverse); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55); }
.btn--outline:hover { background: rgba(255, 255, 255, 0.14); }

/* Text links: sentence case, shifting to a darker red on hover/focus. */
.link-arrow {
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--text-accent);
  transition: color 0.2s;
}
.link-arrow:hover,
.link-arrow:focus-visible { color: var(--cherry-700); }

/* Keyboard focus ring for every link and button. */
a:focus-visible, button:focus-visible { outline: 2px solid var(--jute-500); outline-offset: 3px; border-radius: 4px; }

/* Plain links inside page copy turn red on hover. */
main p a:not([class]),
main dd a:not([class]),
main li a:not([class]) { transition: color 0.2s; }
main p a:not([class]):hover,
main dd a:not([class]):hover,
main li a:not([class]):hover { color: var(--text-accent); }
/* Standalone "Link" button variant keeps the button's 16px vertical padding */
.faq > .link-arrow,
.catalogue__actions .link-arrow { padding-block: 16px; }
.link-arrow--light { color: var(--text-inverse); }
.link-arrow--light:hover, .link-arrow--light:focus-visible { color: var(--jute-300); }

/* Header ----------------------------------------------------------------- */
/* Over image on hero pages (transparent, light text); solid cream once the page scrolls. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
}
/* The glass lives on a layer behind the header, not on the header itself: a blur or transform on the header would
   trap the full-screen mobile menu (which sits inside it) and make it drift with the page. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transition: background-color 0.3s, box-shadow 0.3s;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--gutter);
  margin-top: 8px;
  transition: margin 0.3s;
}
.site-header__logo img { width: 44px; height: 56px; object-fit: contain; }
/* The logo file is white artwork on a transparent background (no box behind it). The header stays a glass
   bar all the way down the page, so the logo stays white. */

/* Pill menu: the links sit in one rounded, softly blurred bar */
.nav {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.3s, border-color 0.3s;
}
.nav__item { position: relative; }
/* invisible bridge so the dropdown stays open while the pointer crosses the gap */
.nav__item.has-panel::after { content: ""; position: absolute; left: -12px; right: -12px; top: 100%; height: 16px; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-inverse);
  transition: background-color 0.2s, color 0.3s;
}
.nav__link:hover { background: rgba(255, 255, 255, 0.16); }
.nav__link[aria-current="page"] { background: rgba(255, 255, 255, 0.24); }
/* house icon on the link that points at the home page (marked in main.js) */
.nav__link--home::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3 2 12h3v8h5v-5h4v5h5v-8h3L12 3z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3 2 12h3v8h5v-5h4v5h5v-8h3L12 3z'/></svg>") center / contain no-repeat;
}

/* Dropdown (mega-menu showing each hub's child pages) */
.nav__panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 12px);
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
  padding: 6px;
  /* same frosted glass as the pill while the header sits over the hero */
  background: rgba(38, 20, 14, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 40px rgba(20, 8, 5, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.nav__item:hover > .nav__panel,
.nav__item:focus-within > .nav__panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav__panel a {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-inverse);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.nav__panel a:hover { background: rgba(255, 255, 255, 0.16); }
/* over the cream header the panel turns white, with a deeper shadow so it lifts off the page */

/* Desktop header: three equal-weight columns keep the menu on the page centre line. */
@media (min-width: 1024px) {
  .site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .site-header__logo { justify-self: start; }
  .site-header .btn--header { justify-self: end; }
}

.site-header .btn--header {
  padding: 12px 24px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  line-height: 20px;
  background: #fff;
  color: var(--text-primary);
  transition: background-color 0.3s, color 0.3s;
}
.site-header .btn--header:hover { background: var(--jute-100); }
.site-header .btn--header-short { display: none; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-inverse);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s, background-color 0.25s;
}
.menu-toggle span { position: relative; }
.menu-toggle span::before,
.menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
/* the close button inside the overlay is always an "x" */
.menu-toggle--close span { background: transparent; }
.menu-toggle--close span::before { top: 0; transform: rotate(45deg); }
.menu-toggle--close span::after { top: 0; transform: rotate(-45deg); }

/* Once the page scrolls the header becomes a glass bar: a dark tint with a blur, so the white menu stays readable
   over both the dark photos and the cream sections. It never turns solid or white, and it never slides away. */
.site-header.is-solid::before {
  background: rgba(31, 18, 13, 0.6);
  /* A light blur is cheap to redraw while scrolling over photos and video. */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}
.site-header.is-solid .site-header__inner { margin-top: 0; padding-block: 10px; }

/* Mobile menu: full-screen overlay (hidden on desktop) */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  flex-direction: column;
  padding: 0 24px 32px;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-menu__bar { display: flex; align-items: center; justify-content: space-between; height: 72px; flex: none; }
.mobile-menu__logo img { width: 32px; height: 42px; object-fit: contain; }
.mobile-menu__list { list-style: none; margin: 0; padding: 24px 0 0; }
.mobile-menu__item { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.mobile-menu__row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 300 24px/32px var(--font);
  letter-spacing: -0.24px;
  text-align: left;
  cursor: pointer;
}
.mobile-menu__row i {
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--jute-300);
  border-top: 2px solid var(--jute-300);
  transform: rotate(45deg);
  transition: transform 0.25s;
}
.mobile-menu__row[aria-expanded="true"] i { transform: rotate(135deg); }
.mobile-menu__sub { display: none; flex-direction: column; padding: 0 0 18px; }
.mobile-menu__row[aria-expanded="true"] + .mobile-menu__sub { display: flex; }
.mobile-menu__sub a { padding: 10px 0; font-size: 16px; line-height: 24px; color: var(--text-inverse-muted); }
.mobile-menu__foot { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }
.mobile-menu__foot .btn { width: 100%; }
.mobile-menu__foot p { margin: 0; font-size: 12px; line-height: 18px; color: var(--text-inverse-muted); }
html.menu-lock { overflow: hidden; }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 900px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 160px var(--gutter) 80px;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  text-align: center;
  overflow: hidden;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(38, 14, 10, 0.9) 0%,
    rgba(38, 14, 10, 0.55) 55%,
    rgba(38, 14, 10, 0.15) 100%
  );
}
.hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.hero__title {
  max-width: 916px;
  font-size: 72px;
  line-height: 80px;
  font-weight: 500;
  letter-spacing: -1.8px;
}
.hero__lede { max-width: 624px; color: var(--text-inverse-muted); }
.hero__trust {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--content);
  margin: 64px auto 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
  text-align: left;
}
.hero__trust li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 22px; }
.hero__trust li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--jute-300); }

/* About ------------------------------------------------------------------ */
.about {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  min-height: 680px;
  padding-block: calc(var(--space-section) * 1.35);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  overflow: hidden;
  text-align: center;
}
.about > * { position: relative; z-index: 1; }
.about__title { max-width: 900px; font-size: clamp(40px, 5.2vw, 68px); line-height: 1.08; letter-spacing: -0.03em; }
.about__cols {
  display: flex;
  gap: 56px;
  max-width: 1000px;
  text-align: left;
  font-size: 18px;
  line-height: 30px;
  color: var(--text-inverse-muted);
}
.about__cols p { flex: 1; }
.about__button { margin-top: 8px; }
.about__bean {
  position: absolute;
  z-index: 0 !important;
  width: 260px;
  height: 395px;
  object-fit: cover;
  pointer-events: none;
}
.about__bean--right { left: auto; right: -50px; top: 3px; }
.about__bean--left { left: -70px; top: 261px; transform: scaleX(-1); }

/* Numbers ---------------------------------------------------------------- */
.numbers { display: flex; flex-direction: column; gap: 56px; align-items: center; }
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 24px;
  width: 100%;
  max-width: var(--content);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 0 40px;
  border-top: 1px solid var(--border-default);
}
.stat__num {
  font-size: 56px;
  line-height: 64px;
  font-weight: 300;
  letter-spacing: -1.4px;
}
.stat__desc { color: var(--text-secondary); max-width: 480px; }

/* Quality ---------------------------------------------------------------- */
.quality {
  position: relative;
  display: flex;
  justify-content: center;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  overflow: hidden;
}
.quality__shade { position: absolute; inset: 0; z-index: 1; background: rgba(38, 14, 10, 0.72); }
.quality__inner {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 96px;
  max-width: var(--content);
}
.quality__intro { display: flex; flex-direction: column; gap: 20px; width: 440px; flex: none; }
.quality__intro p:last-child { color: var(--text-inverse-muted); }
.quality__grid {
  display: grid;
  grid-template-columns: repeat(2, 308px);
  gap: 56px 48px;
}
.quality__item { display: flex; flex-direction: column; gap: 14px; }
.quality__item img { width: 40px; height: 40px; }
.quality__item p { color: var(--text-inverse-muted); }

/* Origins ---------------------------------------------------------------- */
.origins { display: flex; flex-direction: column; align-items: center; gap: 56px; }
.origins .section-head p:last-child { max-width: 756px; color: var(--text-secondary); }
.origins .section-head .h1 { max-width: 1100px; }
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 24px;
  width: 100%;
  max-width: var(--content);
}
.region-card { display: flex; flex-direction: column; }
.region-card__img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform 0.4s;
}
.region-card__media { overflow: hidden; border-radius: var(--radius-sm); }
.region-card:hover .region-card__img { transform: scale(1.03); }
/* Body fills the card so the Explore link can sit on the same line in every card. */
.region-card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding-top: 20px; }
.region-card__body .link-arrow {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 20px;
  border: 1px solid var(--cherry-600);
  border-radius: var(--radius-pill);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.region-card__body .caption { margin-bottom: 12px; }
.region-card__body .link-arrow:hover,
.region-card__body .link-arrow:focus-visible { opacity: 1; background: var(--cherry-600); color: var(--text-inverse); }
.region-card__body .body-s { color: var(--text-secondary); }
.region-card__body .caption { color: var(--text-secondary); line-height: 18px; }

/* Farm to roastery ------------------------------------------------------- */
.roastery { background: var(--surface-tan); }
.roastery__inner {
  display: flex;
  gap: 96px;
  align-items: flex-start;
  max-width: var(--content);
  margin-inline: auto;
}
.roastery__copy { display: flex; flex-direction: column; gap: 20px; width: 520px; flex: none; }
.steps { width: 100%; }
.step { border-bottom: 1px solid rgba(38, 14, 10, 0.15); }
.step__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}
.step__head::-webkit-details-marker { display: none; }
.step__head::marker { content: ""; }
.step__head:hover .step__num { background: #fff; color: var(--text-primary); }
.step__head:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 4px; border-radius: var(--radius-sm); }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}
.step.is-open .step__num,
.step[open] .step__num { background: #fff; color: var(--text-primary); }
.step p { padding: 0 0 14px 56px; max-width: 464px; }
.roastery__copy .btn { align-self: flex-start; margin-top: 8px; }
.roastery__media {
  flex: none;
  width: 584px;
  height: 809px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Process ---------------------------------------------------------------- */
.process {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 96px;
  /* Same space above and below, a little tighter than the other sections. */
  padding-block: calc(var(--space-section) * 0.85);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  overflow: hidden;
}
.process__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(38, 14, 10, 0.78) 0%,
    rgba(38, 14, 10, 0.6) 45%,
    rgba(38, 14, 10, 0.94) 100%
  );
}
.process > :not(.bg-photo):not(.process__shade) { position: relative; z-index: 2; }
.process__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
  max-width: var(--content);
}
.process__head > div { display: flex; flex-direction: column; gap: 20px; }
.process__head p:last-child { width: 480px; color: var(--text-inverse-muted); flex: none; }
.process__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  max-width: var(--content);
}
.process__col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.process__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-pill);
  font-size: 12px;
  line-height: 18px;
}
.process__col p { color: var(--text-inverse-muted); }
.process__col .h3 { color: var(--text-inverse); }
/* Titles can wrap to two lines ("Anaerobic fermentation"); reserve both lines so the text beneath starts level in every column. */
@media (min-width: 1024px) { .process__col .h3 { min-height: 68px; } }
.process__col .link-arrow { margin-top: auto; }

/* Packing ---------------------------------------------------------------- */
.packing { display: flex; flex-direction: column; align-items: center; gap: 56px; background: var(--surface-jute); }
.packing .section-head p:last-child { max-width: 680px; color: var(--text-secondary); }
.packing .section-head .h1 { max-width: 1000px; }
.bags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: var(--content);
}
.bag {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}
/* Same jute-bag icon at three sizes (small, bigger, biggest), all standing on one baseline. */
.bag img { --s: 56px; width: var(--s); height: var(--s); margin-top: calc(72px - var(--s)); }
.bags .bag:nth-child(1) img { --s: 40px; }
.bags .bag:nth-child(2) img { --s: 56px; }
.bags .bag:nth-child(3) img { --s: 72px; }
.bag p:last-child { color: var(--text-secondary); }
.packing__note { color: var(--text-secondary); text-align: center; }

/* Catalogue -------------------------------------------------------------- */
.catalogue { display: flex; flex-direction: column; gap: 56px; }
.catalogue .section-head p:last-child { max-width: 680px; color: var(--text-secondary); }
.catalogue .section-head .h1 { max-width: 760px; }
.table-wrap {
  overflow-x: auto;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}
.table { width: 100%; min-width: 820px; border-collapse: collapse; text-align: left; }
.table th {
  padding: 16px 24px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-default);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 1.44px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.table td { padding: 22px 24px; border-bottom: 1px solid var(--border-default); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-size: 18px; font-weight: 600; letter-spacing: -0.09px; }
.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  font-size: 14px;
  line-height: 22px;
  white-space: nowrap;
}
.chip--booking { background: var(--surface-jute); }
.catalogue__actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* FAQ -------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; align-items: center; gap: 56px; background: var(--surface-subtle); }
.faq__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
  max-width: var(--content);
  align-items: stretch;
}
.faq-item {
  padding: 32px;
  background: var(--surface-card);
  border-radius: var(--radius-sm);
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .h4 { flex: 1; }
.faq-item__icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background-color: var(--surface-subtle);
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-size: 12px 2px, 2px 12px;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-size 0.25s;
}
.faq-item[open] .faq-item__icon { background-size: 12px 2px, 2px 0; }
.faq-item__answer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
  color: var(--text-secondary);
}

/* Banner ----------------------------------------------------------------- */
.banner-section { padding: var(--space-section) var(--gutter) 0; }
.banner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 560px;
  max-width: var(--content);
  margin-inline: auto;
  padding: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-inverse);
  color: var(--text-inverse);
}
.banner__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(38, 14, 10, 0.85) 0%,
    rgba(38, 14, 10, 0.35) 60%,
    rgba(38, 14, 10, 0.1) 100%
  );
}
.banner > :not(.bg-photo):not(.banner__shade) { position: relative; z-index: 2; }
.banner__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; max-width: 560px; }
.banner__copy p { color: var(--text-inverse-muted); max-width: 520px; }
.banner__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

/* Request a quote -------------------------------------------------------- */
.quote { padding-bottom: var(--space-section); }
.quote__inner {
  display: flex;
  align-items: center;
  gap: 64px;
  max-width: var(--content);
  margin-inline: auto;
}
.quote__copy { display: flex; flex-direction: column; gap: 20px; width: 512px; flex: none; }
.quote__copy p:nth-of-type(2) { color: var(--text-secondary); }
.quote__copy p:nth-of-type(3) { color: var(--text-secondary); }
.quote__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  padding: 40px;
  background: var(--surface-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
}
.form-row { display: flex; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label,
.field > legend {
  padding: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-inverse-muted);
}
.input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 26px;
}
.input::placeholder { color: var(--text-secondary); opacity: 1; }
textarea.input { min-height: 112px; resize: vertical; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%236f655c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.input:focus-visible { outline: 2px solid var(--jute-500); outline-offset: 2px; }
.input[aria-invalid="true"] { border-color: #e5604d; }

/* A <legend> ignores the fieldset's flex gap, so give it the same 8px a <label> gets. */
.field > legend { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-option { position: relative; }
.chip-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-option span {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 22px;
  transition: background-color 0.2s, border-color 0.2s;
}
.chip-option:hover span { border-color: rgba(255, 255, 255, 0.6); }
.chip-option input:checked + span { background: var(--action-primary); border-color: var(--action-primary); }
.chip-option input:focus-visible + span { outline: 2px solid var(--jute-500); outline-offset: 2px; }

.privacy { display: flex; gap: 10px; align-items: flex-start; color: var(--text-inverse-muted); }
.privacy img { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.form-foot p { color: var(--text-inverse-muted); }
.form-status { color: var(--text-inverse-muted); }
.form-status:empty { display: none; }

/* Footer ----------------------------------------------------------------- */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  padding: 96px var(--gutter) 40px;
  background: var(--surface-brand);
  color: var(--text-inverse);
}
.footer__cols { display: flex; gap: 64px; align-items: flex-start; width: 100%; }
.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__col--nav { flex: 1; gap: 20px; }
.footer__col--about { width: 440px; flex: none; gap: 20px; }

.footer__nav-link { font-size: 24px; line-height: 32px; font-weight: 300; letter-spacing: -0.24px; }
/* Every footer link (columns, social, legal) shifts colour and underlines on hover and focus. */
.site-footer a:not(.btn) {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.site-footer a:not(.btn):hover,
.site-footer a:not(.btn):focus-visible { color: var(--jute-300); text-decoration-color: currentColor; }
.footer__spacer { height: 10px; }
.subscribe { display: flex; gap: 8px; align-items: center; }
.subscribe .input { flex: 1; border-radius: var(--radius-pill); padding: 14px 20px; font-size: 14px; line-height: 22px; }
.subscribe .btn { padding: 14px 24px; background: var(--surface-inverse); color: var(--text-inverse); }
.subscribe .btn:hover { background: var(--espresso-900); }
.footer__col--res { width: 200px; flex: none; }
.footer__logo { width: 180px; height: 238px; object-fit: contain; }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-inverse-muted);
}
.footer__bottom nav { display: flex; gap: 12px; }

/* Inner-page hero + CTA band (origins, export) --------------------------- */
.page-hero {
  position: relative;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Bottom padding so the buttons never sit on the edge of the photo. */
  padding: 160px var(--gutter) var(--space-section);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  text-align: center;
  overflow: hidden;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(38, 14, 10, 0.9) 0%,
    rgba(38, 14, 10, 0.55) 60%,
    rgba(38, 14, 10, 0.2) 100%
  );
}
.page-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.breadcrumb { color: var(--text-inverse-muted); white-space: pre; }
.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--text-inverse); }
.page-hero__back {
  position: absolute;
  z-index: 2;
  top: 112px;
  left: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(38, 14, 10, 0.35);
  color: var(--text-inverse);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.page-hero__back:hover { background: rgba(38, 14, 10, 0.6); transform: translateX(-2px); }
.page-hero__back:focus-visible { outline: 2px solid var(--text-inverse); outline-offset: 2px; }
.page-hero__title { max-width: 700px; }
.page-hero__lede { max-width: 580px; color: var(--text-inverse-muted); }

/* CTA band --------------------------------------------------------------- */
.cta-band {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: var(--space-section) var(--gutter);
  background: var(--surface-inverse);
  color: var(--text-inverse);
  text-align: center;
  overflow: hidden;
}
.cta-band .bg-photo { opacity: 0.25; }
.cta-band > :not(.bg-photo) { position: relative; z-index: 1; }
.cta-band p { max-width: 640px; color: var(--text-inverse-muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
  :root { --margin: 64px; --gutter: 64px; --space-section: 88px; }
  .nav__link { padding-inline: 12px; }
  .quality__inner { gap: 48px; }
  .quality__intro { width: 360px; }
  .quality__grid { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .roastery__inner { gap: 48px; }
  .roastery__copy { width: 480px; }
  .roastery__media { width: auto; flex: 1; min-width: 0; }
  .quote__inner { gap: 40px; }
  .quote__copy { width: 380px; }
}

@media (max-width: 1023px) {
  :root { --margin: 40px; --gutter: 40px; --space-section: 80px; }

  .site-header__inner { padding-inline: var(--gutter); gap: 0; }
  .nav { display: none; }
  .site-header .btn--header { display: none; }
  .site-header .btn--header-short { display: inline-flex; margin-left: auto; padding: 11px 16px; font-size: 13px; font-weight: 600; letter-spacing: 0.78px; text-transform: uppercase; line-height: 18px; }
  .menu-toggle { display: inline-flex; margin-left: 10px; }
  .mobile-menu { display: flex; }
  .menu-open .mobile-menu { opacity: 1; visibility: visible; }

  .hero { min-height: 760px; }
  .page-hero { min-height: 640px; }
  .hero__title { font-size: 56px; line-height: 64px; letter-spacing: -1.4px; }

  .about__cols { flex-direction: column; gap: 24px; }
  .about__bean { opacity: 0.55; }

  .quality__inner { flex-direction: column; }
  .quality__intro { width: auto; max-width: 560px; }

  .region-grid { grid-template-columns: repeat(2, 1fr); }

  .roastery__inner { flex-direction: column; }
  .roastery__copy { width: 100%; }
  .roastery__media { width: 100%; height: 480px; flex: none; }

  .process { gap: 72px; }
  .process__head { flex-direction: column; align-items: flex-start; }
  .process__head p:last-child { width: auto; max-width: 560px; }
  .process__cols { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .hero__trust { flex-direction: column; gap: 12px; margin-top: 40px; }

  .bags { grid-template-columns: repeat(2, 1fr); }
  .faq__grid { grid-template-columns: 1fr; }

  .banner { padding: 40px; }
  .quote__inner { flex-direction: column; align-items: stretch; }
  .quote__copy { width: auto; }

  .footer__cols { flex-wrap: wrap; gap: 48px; }
  .footer__col--nav { flex: 1 1 200px; }
  .footer__col--about { flex: 1 1 320px; width: auto; }
  .footer__col--res { flex: 1 1 200px; width: auto; }
}

@media (max-width: 639px) {
  /* Catalogue table becomes stacked cards so no column is hidden off-screen */
  .table-wrap { overflow: visible; background: none; border: 0; border-radius: 0; }
  .table { display: block; min-width: 0; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table tbody { display: grid; gap: 12px; }
  .table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding: 20px;
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
  }
  .table td { padding: 0; border: 0; }
  .table td:first-child { grid-column: 1 / -1; }
  .table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: 1.44px;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .table td:first-child::before { display: none; }

  /* Keep copy readable over photos and decoration */
  .about__bean { opacity: 0.22; }
  .about { min-height: 0; }
  .about__cols { font-size: 16px; line-height: 26px; }
  .banner__shade { background: linear-gradient(to bottom, rgba(38, 14, 10, 0.82), rgba(38, 14, 10, 0.62)); }

  :root { --margin: 24px; --gutter: 24px; --space-section: 64px; }
  .h1 { font-size: 36px; line-height: 44px; letter-spacing: -0.72px; }
  .body-l { font-size: 16px; line-height: 26px; }

  .site-header__logo img { width: 36px; height: 46px; }
  .hero { min-height: 680px; padding-bottom: 56px; }
  .page-hero { min-height: 600px; }
  .hero__title { font-size: 40px; line-height: 46px; letter-spacing: -1px; }
  .hero__copy { gap: 20px; }

  .stats { grid-template-columns: 1fr; }
  .stat__num { font-size: 40px; line-height: 48px; }

  .quality__grid { grid-template-columns: 1fr; }
  .region-grid { grid-template-columns: 1fr; }
  .process__cols { grid-template-columns: 1fr; }
  .bags { grid-template-columns: 1fr; }
  .region-card__img { height: 320px; }

  .step p { padding-left: 0; }
  .roastery__media { height: 360px; }

  .process { gap: 56px; }

  .banner { padding: 28px; min-height: 520px; }
  .banner__foot { flex-direction: column; align-items: flex-start; gap: 6px; }

  .quote__form { padding: 24px; }
  .form-row { flex-direction: column; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; text-align: center; }

  .subscribe { flex-direction: column; align-items: stretch; }
  .footer__logo { width: 140px; height: 185px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .site-footer { gap: 48px; padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ==========================================================================
   WordPress
   ========================================================================== */
/* The header is fixed, so keep it below the admin bar when you are logged in */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* Photo frames: on hover the image zooms and tilts slightly inside its clipped frame,
   a soft overlay fades in and the caption (copied from the photo's alt text by main.js)
   slides up. Hover devices only. */
.zoom { position: relative; overflow: hidden; }
.zoom > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (hover: hover) {
  .zoom::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(38, 14, 10, 0.7) 0%, rgba(38, 14, 10, 0.15) 55%, rgba(38, 14, 10, 0) 100%);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
  }
  .zoom[data-caption]::after {
    content: attr(data-caption);
    position: absolute;
    z-index: 2;
    left: 16px;
    right: 16px;
    bottom: 16px;
    color: var(--text-inverse);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease 0.1s, transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s;
    pointer-events: none;
  }
  .zoom:hover > img { transform: scale(1.12) rotate(1.2deg); }
  .zoom:hover::before { opacity: 1; }
  .zoom:hover::after { opacity: 1; transform: none; }
}
.step-card__rule { transition: max-width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1); }
.step-card:hover .step-card__rule { max-width: 210px; }

/* Cup profile toggle (washed / natural) ------------------------------------ */
.cup {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  padding: 20px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}
.cup__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cup__label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 1.44px; text-transform: uppercase; color: var(--text-accent); }
.cup__toggle { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-subtle); border-radius: var(--radius-pill); }
.cup__toggle button {
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-primary);
  font: 500 14px/20px var(--font);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.cup__toggle button[aria-selected="true"] { background: var(--action-secondary); color: var(--text-inverse); }
.cup__notes { margin: 0; font-size: 16px; line-height: 26px; color: var(--text-primary); }
.compare__note { margin: 20px auto 0; max-width: var(--content); font-size: 14px; line-height: 22px; color: var(--text-secondary); }

/* Accordion cards (contact + FAQs) --------------------------------------- */
.accordion { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.accordion__item {
  max-width: 800px;
  padding: 24px 28px;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color 0.25s;
}
.accordion__item[open] { border-color: var(--cherry-600); }
.accordion__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.09px;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
  content: "";
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background-color: var(--surface-subtle);
  color: var(--text-primary);
  /* Plus drawn as two bars so it sits dead centre; a "+" glyph rides off-centre in most fonts. */
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-size: 12px 2px, 2px 12px;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-color 0.25s, color 0.25s, background-size 0.25s;
}
.accordion__item[open] summary::after { background-color: var(--action-primary); color: var(--text-inverse); background-size: 12px 2px, 2px 0; }
.accordion__item p { margin: 16px 0 0; color: var(--text-secondary); }

/* Motion (js/motion.js) ---------------------------------------------------
   Calm by design: text never moves on scroll. Photos get one gentle effect, chosen per
   page group through html[data-reveal-style] ("fade" or "settle"; other pages have none).
   Hidden states only apply once the script has added .js-motion to <html>. */
:root { --rv-ease: cubic-bezier(0.22, 1, 0.36, 1); }

.js-motion [data-reveal] {
  opacity: 0;
  transition: opacity 1s ease var(--reveal-delay, 0ms), transform 1.6s var(--rv-ease) var(--reveal-delay, 0ms);
}
html[data-reveal-style="settle"] [data-reveal] { transform: scale(1.05); }
.js-motion [data-reveal].is-in { opacity: 1; transform: none; }

.js-motion .hero > .bg-photo,
.js-motion .page-hero > .bg-photo { will-change: transform; transform: scale(1.15); }

@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes soft-in { from { opacity: 0; } to { opacity: 1; } }
.js-motion .hero__copy > *,
.js-motion .page-hero__copy > *,
.js-motion .page-hero__back { animation: soft-in 0.9s ease both; }
.js-motion .hero__copy > :nth-child(2),
.js-motion .page-hero__copy > :nth-child(2) { animation-delay: 0.1s; }
.js-motion .hero__copy > :nth-child(3),
.js-motion .page-hero__copy > :nth-child(3) { animation-delay: 0.2s; }
.js-motion .hero__copy > :nth-child(n + 4),
.js-motion .page-hero__copy > :nth-child(n + 4) { animation-delay: 0.3s; }

/* Photo hover zoom */
.js-motion .region-card__img { transition: transform 0.9s var(--rv-ease); }
.js-motion .region-card:hover .region-card__img { transform: scale(1.05); }

/* Coffee beans (About): slow sway while floating. Scroll drift is set by js/motion.js
   through the separate translate property, so the two never fight. */
@keyframes bean-sway {
  0%, 100% { rotate: -4deg; scale: 1; }
  50% { rotate: 5deg; scale: 1.06; }
}
.js-motion .about__bean { animation: bean-sway 9s ease-in-out infinite; will-change: translate, rotate; }
.js-motion .about__bean--left { animation-duration: 11s; animation-delay: -4s; }

/* Lenis */
html.has-lenis { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Polish layer (js/motion.js) ---------------------------------------------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; z-index: 200; height: 3px; background: var(--cherry-600); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; will-change: transform; }

.site-header { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s, box-shadow 0.3s; }
.site-header.is-hidden { transform: translateY(-110%); }

.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--action-secondary); color: var(--text-inverse); box-shadow: 0 10px 26px rgba(38, 14, 10, 0.28); cursor: pointer; opacity: 0; visibility: hidden; translate: 0 12px; transition: opacity 0.3s, visibility 0.3s, translate 0.3s, background-color 0.2s; }
.to-top.is-on { opacity: 1; visibility: visible; translate: 0 0; }
.to-top:hover { background: var(--cherry-700); }
.to-top:focus-visible { outline: 2px solid var(--cherry-600); outline-offset: 3px; }

.stat__num { font-variant-numeric: tabular-nums; }

/* Soft fade between pages */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.js-motion body { animation: page-in 0.6s ease backwards; }
.is-leaving body { opacity: 0; transition: opacity 0.26s ease; }

/* Hover lift, only where there is a real pointer */
@media (hover: hover) {
  .btn--primary, .btn--secondary, .btn--light, .btn--outline { transition: background-color 0.2s, color 0.2s, transform 0.2s, translate 0.3s, box-shadow 0.3s; }
  .btn--primary:hover, .btn--secondary:hover, .btn--light:hover { translate: 0 -2px; box-shadow: 0 10px 24px rgba(38, 14, 10, 0.22); }
  .btn--outline:hover { translate: 0 -2px; }
  .tile, .step-card, .acard, .bag, .check, .term, .featured { transition: translate 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s; }
  .tile:hover, .step-card:hover, .acard:hover, .bag:hover, .featured:hover { translate: 0 -4px; box-shadow: 0 16px 36px rgba(38, 14, 10, 0.1); }
  /* These three have no card background or corners, so a shadow on the whole block shows as a sharp rectangle.
     Lift the block and put the soft shadow on its rounded photo instead. */
  .step-card:hover, .acard:hover, .featured:hover { box-shadow: none; }
  .step-card:hover .step-card__img, .acard:hover .acard__img, .featured:hover .featured__img { box-shadow: 0 16px 32px rgba(38, 14, 10, 0.16); }
  .step-card__img, .acard__img, .featured__img { transition: box-shadow 0.4s; }
  .acard--static:hover { translate: none; box-shadow: none; }
}
.acard--static { cursor: default; }

@media (max-width: 639px) { .to-top { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .site-header, .to-top, .btn { transition: none; }
  .scroll-progress { display: none; }
}

/* Section heads: the paragraph sits right beside the heading instead of drifting to the far edge */
@media (min-width: 1024px) {
  body .process__head, body .grading__head, body .facilities__head, body .bento-sec__head { justify-content: flex-start; gap: 56px; }
  body .process__head > div, body .grading__head > div, body .facilities__head > div, body .bento-sec__head > div { flex: 0 1 auto; max-width: 560px; }
  body .bento-sec__head > p { width: 440px; }
  /* Drop the paragraph so its first line lines up with the heading, not the small label above it:
     label (16px) + gap (16px, 20px on .process__head) + half the difference between the 56px heading line and the 40px text line. */
  body .grading__head > p, body .facilities__head > p, body .bento-sec__head > p { padding-top: 40px; }
  body .process__head > p { padding-top: 44px; }
  body .faq-groups__layout { gap: 72px; }
}
@media (min-width: 1200px) {
  body .process__head, body .grading__head, body .facilities__head, body .bento-sec__head { gap: 72px; }
}

/* Quality: the intro stays pinned while the four checks scroll past one by one.
   overflow: clip keeps the photo cropped without making .quality a scroll container, which would stop sticky. */
@media (min-width: 1024px) {
  body .quality { overflow: clip; }
  body .quality__inner { align-items: flex-start; }
  body .quality__intro { position: sticky; top: 140px; }
  body .quality__grid { grid-template-columns: minmax(0, 340px); gap: 0; }
  /* Same padding on every item, no min-height, so the gap from text to divider is identical whatever the copy length. */
  body .quality__item {
    padding-block: 28px 56px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }
  body .quality__item:first-child { border-top: 0; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body .quality__intro { position: static; }
}

/* Card hover: a springy lift with a slight tilt, a deeper shadow and a little icon wiggle.
   Uses the individual translate / scale / rotate properties so the pieces animate independently.
   Only for devices with a real pointer, and switched off for people who prefer reduced motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body .tile, body .help__card, body .overview__card, body .bag {
    transition: translate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s, border-color 0.3s;
  }
  body .tile:hover, body .help__card:hover, body .overview__card:hover, body .bag:hover {
    translate: 0 -10px;
    scale: 1.025;
    rotate: -0.6deg;
    box-shadow: 0 26px 48px rgba(38, 14, 10, 0.18);
  }
  body .tile:nth-child(even):hover, body .help__card:nth-child(even):hover, body .overview__card:nth-child(even):hover, body .bag:nth-child(even):hover { rotate: 0.6deg; }

  body .tile__icon, body .help__icon, body .bag img { transition: scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
  body .tile:hover .tile__icon, body .help__card:hover .help__icon { scale: 1.18; rotate: -10deg; }
  body .bag:hover img { rotate: -8deg; }

  /* Cards without a box: lift higher, and the photo gets the deeper shadow. */
  body .step-card, body .acard, body .featured { transition: translate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s; }
  body .step-card:hover, body .acard:hover, body .featured:hover { translate: 0 -8px; }
  body .step-card:hover .step-card__img, body .acard:hover .acard__img, body .featured:hover .featured__img { box-shadow: 0 24px 44px rgba(38, 14, 10, 0.24); }
}
