/* ============================================================
   Bean Shipper — Wholesale Landing (from the BS design system)
   ============================================================ */

/* Licensed brand faces (Athena / Gotham). Drop the font files into ./fonts/
   and uncomment — the token stacks below pick them up automatically.
@font-face { font-family: "Athena"; src: url("fonts/Athena-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("fonts/Gotham-Light.otf") format("opentype");  font-weight: 300; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("fonts/Gotham-Book.otf") format("opentype");   font-weight: 400; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("fonts/Gotham-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
*/

/* ---------- Tokens ---------- */
:root {
  --bs-red:        #B61F2E;
  --bs-red-80:     #C44C56;
  --bs-red-60:     #D27E84;
  --bs-red-40:     #E1AEB1;
  --bs-red-20:     #F0DEDF;

  --bs-black:      #000000;
  --bs-white:      #FFFFFF;

  --bs-ink:        #1A1A1A;
  --bs-ink-2:      #4A4A4A;
  --bs-ink-3:      #8A8A8A;
  --bs-rule:       #E8E8E8;
  --bs-rule-soft:  #F2F2F2;
  --bs-paper:      #FAFAFA;

  --font-display:  "Athena", "Italiana", "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans:     "Gotham", "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --s-1:  4px;  --s-2:  8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px;  --s-7: 48px;  --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --container: 1240px;
  --gutter: 32px;

  --shadow-2: 0 4px 16px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);

  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bs-ink);
  background: var(--bs-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography ---------- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: 1.05; }
.eyebrow {
  font-family: var(--font-sans); font-weight: 500; font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--bs-red);
}
.kicker {
  font-family: var(--font-sans); font-weight: 500; font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--bs-ink-3);
}
.lede { font-family: var(--font-sans); font-weight: 300; font-size: 18px; line-height: 1.6; color: var(--bs-ink-2); max-width: 56ch; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s-10); position: relative; }
.section-head { text-align: center; margin-bottom: var(--s-8); }
.section-head .eyebrow { display: inline-block; margin-bottom: var(--s-4); }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1; margin-bottom: var(--s-5); color: var(--bs-red);
  font-weight: 400;
}
.section-head p { margin: 0 auto; max-width: 60ch; color: var(--bs-ink-2); font-size: 15px; line-height: 1.7; }

/* Responsive grids (the .dc canvas used inline desktop grids) */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s-7); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-5); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px)  { .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--bs-rule);
}
.nav__inner {
  max-width: var(--container); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6);
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__brand img { height: 32px; width: auto; margin: -2px 0; }
.nav__brand-text { font-family: var(--font-display); font-size: 22px; color: var(--bs-red); letter-spacing: .01em; white-space: nowrap; }
.nav__counter {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: .22em;
  color: var(--bs-ink-3); text-transform: uppercase;
  border-left: 1px solid var(--bs-rule); padding-left: 12px;
}
.nav__links { display: flex; align-items: center; gap: var(--s-5); }
.nav__link {
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bs-ink-2); padding: 6px 2px; border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease); white-space: nowrap;
}
.nav__link:hover { color: var(--bs-red); border-bottom-color: var(--bs-red); }
/* The in-menu CTA is a mobile-only duplicate of .nav__cta-desktop */
.nav__links .btn { display: none; }

/* Hamburger — hidden on desktop, drives the mobile sheet */
.nav__toggle {
  display: none; width: 44px; height: 44px; margin-right: -10px;
  align-items: center; justify-content: center; color: var(--bs-ink);
}
.nav__toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; position: relative; transition: background .2s var(--ease); }
.nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 1.5px; background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after { top: 7px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 900px) {
  /* .nav prefix keeps these above the later `.btn { display:inline-flex }` rule */
  .nav .nav__toggle { display: flex; }
  .nav .nav__cta-desktop { display: none; }
  .nav__inner { gap: var(--s-3); }
  .nav__brand { min-width: 0; flex-shrink: 1; }
  .nav__brand img { flex-shrink: 0; }
  .nav__brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav__toggle { flex-shrink: 0; }
  .nav__links {
    position: fixed; inset: var(--nav-h, 69px) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bs-white); border-bottom: 1px solid var(--bs-rule);
    padding: var(--s-3) var(--gutter) var(--s-5);
    box-shadow: 0 18px 40px rgba(0,0,0,.10);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
    max-height: calc(100dvh - var(--nav-h, 69px)); overflow-y: auto;
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link {
    font-size: 13px; padding: 15px 0; border-bottom: 1px solid var(--bs-rule-soft);
  }
  .nav__links .btn { display: inline-flex; margin-top: var(--s-4); width: 100%; padding: 15px 22px; font-size: 12px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--bs-red); color: var(--bs-white); overflow: hidden; isolation: isolate; }
.hero__bean {
  position: absolute; right: -8%; top: -10%; width: 70%; max-width: 820px;
  opacity: .10; z-index: 0; pointer-events: none;
  filter: brightness(0) invert(1);
  animation: bsFloat 18s ease-in-out infinite alternate;
}
.hero__inner {
  position: relative; z-index: 1; max-width: var(--container); margin: 0 auto;
  padding: 140px var(--gutter) 220px;
  display: grid; grid-template-columns: 1fr; gap: var(--s-7);
}
.hero__eyebrow {
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 14px;
}
.hero__eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: rgba(255,255,255,.6); }
.hero__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(64px, 10vw, 156px);
  line-height: .95; letter-spacing: -.005em; max-width: 14ch;
}
.hero__title em { font-style: italic; color: rgba(255,255,255,.85); }
.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__meta {
  display: grid; grid-template-columns: repeat(4,1fr); gap: var(--s-6);
  margin-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.25); padding-top: var(--s-6);
}
.hero__meta-item .label { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.65); margin-bottom: 6px; }
.hero__meta-item .value { font-family: var(--font-display); font-size: 22px; letter-spacing: .01em; }
@media (max-width: 720px) {
  .hero__meta { grid-template-columns: repeat(2,1fr); }
  .hero__inner { padding: 96px var(--gutter) 170px; }
}
.wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 80px; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; font-family: var(--font-sans); font-weight: 500; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; border-radius: 0;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--bs-red); color: var(--bs-white); border: 1px solid var(--bs-red); }
.btn--primary:hover { background: #9D1827; border-color: #9D1827; }
.btn--ghost { background: transparent; color: var(--bs-ink); border: 1px solid var(--bs-rule); }
.btn--ghost:hover { border-color: var(--bs-ink); }
.btn--ink { background: var(--bs-ink); color: var(--bs-white); border: 1px solid var(--bs-ink); }
.btn--ink:hover { background: #333; border-color: #333; }
.btn--sm { padding: 8px 14px; font-size: 10px; }
.btn--lg { padding: 16px 28px; font-size: 13px; }
.btn--on-red { background: var(--bs-white); color: var(--bs-red); border: 1px solid var(--bs-white); }
.btn--on-red:hover { background: var(--bs-red-20); border-color: var(--bs-red-20); }
.btn--outline-white { background: transparent; color: var(--bs-white); border: 1px solid rgba(255,255,255,.55); }
.btn--outline-white:hover { border-color: var(--bs-white); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--bs-ink-3); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; background: var(--bs-white);
  border: 1px solid var(--bs-rule); font-size: 14px; color: var(--bs-ink);
  border-radius: 0; transition: border-color .2s var(--ease);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--bs-red); }
.input::placeholder { color: var(--bs-ink-3); }

/* ---------- Product cards ---------- */
.product { border: 1px solid var(--bs-rule); background: var(--bs-white); display: flex; flex-direction: column; }
.product__media {
  aspect-ratio: 4/5; background: var(--bs-paper);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.product:hover .product__media img { transform: scale(1.045); }
.product__body { padding: var(--s-5) var(--s-6) var(--s-6); }
.product__origin { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--bs-red); margin-bottom: 6px; }
.product__title { font-family: var(--font-display); font-weight: 400; font-size: 28px; color: var(--bs-ink); line-height: 1.05; margin-bottom: 6px; }
.product__notes { font-size: 12px; color: var(--bs-ink-3); letter-spacing: .04em; margin-bottom: var(--s-4); }
.product__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--bs-rule); padding-top: var(--s-3); margin-top: var(--s-3); }
.product__price { font-family: var(--font-sans); font-weight: 500; font-size: 14px; color: var(--bs-ink); }

/* ---------- Tags ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tag { display: inline-flex; align-items: center; font-size: 11px; padding: 6px 10px; border: 1px solid var(--bs-rule); color: var(--bs-ink-2); background: white; }

/* ---------- Why / process cells ---------- */
.why-cell { border-top: 1px solid var(--bs-rule); padding-top: var(--s-5); }
.why-cell h3 { font-size: 30px; margin: 12px 0 10px; }
.why-cell p, .step p { font-size: 14px; color: var(--bs-ink-2); line-height: 1.7; margin: 0; }
.step .num { font-family: var(--font-display); font-size: 72px; color: var(--bs-red); line-height: 1; }
.step h4 { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin: 14px 0 8px; }

/* ---------- Pricing section ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr 460px; gap: var(--s-8); align-items: center; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 5vw, 64px); color: var(--bs-red); margin: 16px 0 18px; line-height: 1.02; }
.contact-row { display: grid; gap: 10px; font-size: 14px; }
.contact-row .kicker { display: inline-block; width: 110px; }
.contact-row a { font-weight: 500; color: var(--bs-red); }
.lead-card {
  background: var(--bs-white); border: 1px solid var(--bs-rule);
  box-shadow: var(--shadow-2); padding: var(--s-7);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 460px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: var(--bs-red); color: rgba(255,255,255,.9); padding: var(--s-9) 0; position: relative; }
.footer__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-7); align-items: start;
}
.footer__brand p { font-size: 13px; max-width: 38ch; line-height: 1.7; color: rgba(255,255,255,.75); }
.footer__brand-lockup { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s-4); }
.footer__brand-lockup img { height: 40px; filter: brightness(0) invert(1); }
.footer__brand-lockup .name { font-family: var(--font-display); font-size: 28px; color: var(--bs-white); }
.footer__col h5 {
  font-family: var(--font-sans); font-size: 10px; letter-spacing: .24em;
  text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: var(--s-4);
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13px; }
.footer__col a:hover { color: var(--bs-white); text-decoration: underline; text-underline-offset: 3px; }
.footer__bar {
  max-width: var(--container); margin: var(--s-7) auto 0; padding: var(--s-5) var(--gutter) 0;
  border-top: 1px solid rgba(255,255,255,.18); display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.6);
}
@media (max-width: 900px) { .footer__inner { grid-template-columns: 1fr; } }

/* ============================================================
   Mobile — phones (≤640px)
   The .dc canvas was authored desktop-first; these rules bring the
   gutters, rhythm and type down to phone scale and kill the
   horizontal overflow (nav CTA + nowrap button min-widths).
   ============================================================ */
@media (max-width: 640px) {
  :root { --gutter: 20px; }

  /* Vertical rhythm: 128px sections are desktop-only */
  .section { padding-block: var(--s-8); }
  .section-head { margin-bottom: var(--s-7); }
  .section-head h2 { font-size: clamp(36px, 11vw, 48px); }
  .section-head p { font-size: 14px; }

  /* Hero: smaller headline, far less dead space under it */
  .hero__inner { padding: 72px var(--gutter) 120px; gap: var(--s-6); }
  .hero__title { font-size: clamp(46px, 13vw, 64px); max-width: 100%; }
  .hero__eyebrow { font-size: 10px; letter-spacing: .24em; }
  .hero__eyebrow::before { width: 18px; }
  .lede { font-size: 16px; }
  .hero__meta { gap: var(--s-5); margin-top: 0; padding-top: var(--s-5); }
  .hero__meta-item .value { font-size: 19px; }
  .wave { height: 46px; }

  /* Buttons may wrap rather than force the page wide; full-width CTAs */
  .btn { white-space: normal; text-align: center; }
  .hero__ctas { gap: 12px; }
  .hero__ctas .btn { width: 100%; }
  .btn--lg { padding: 15px 22px; font-size: 12px; }

  /* Cards / form: the 48px card padding was the main overflow driver */
  .lead-card { padding: var(--s-5); }
  /* 16px minimum stops iOS Safari zooming the page on field focus */
  .input, .select, .textarea { font-size: 16px; padding: 13px 14px; }
  .pricing-grid { gap: var(--s-6); }
  .pricing-title { margin: 12px 0 14px; }
  .contact-row { gap: var(--s-4); }
  .contact-row > div { display: grid; gap: 3px; }
  .contact-row .kicker { width: auto; }

  /* Product cards: shorter media so 4 stacked cards aren't a mile long */
  .product__media { aspect-ratio: 16/11; }
  .product__body { padding: var(--s-4) var(--s-5) var(--s-5); }
  .product__title { font-size: 24px; }

  .why-cell h3 { font-size: 26px; }
  .step .num { font-size: 56px; }
  .grid-3 { gap: var(--s-6); }

  /* Comfortable tap targets (≥40px) for thumbs */
  .btn--sm { padding: 12px 16px; }
  .footer { padding: var(--s-8) 0; }
  .footer__inner { gap: var(--s-6); }
  .footer__col ul { gap: 2px; }
  .footer__col li a { display: inline-block; padding: 9px 0; }
  .contact-row a { display: inline-block; padding: 5px 0; }
  .footer__bar { flex-direction: column; gap: 6px; font-size: 10px; }
}

/* Very narrow phones (iPhone SE / 320px) */
@media (max-width: 420px) {
  .nav .nav__counter { display: none; }
  .nav__brand-text { font-size: 20px; }
  .hero__meta { grid-template-columns: 1fr 1fr; gap: var(--s-4); }
}

/* Grid children must be allowed to shrink below their content width */
.pricing-grid > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

/* ---------- Motion ---------- */
@keyframes bsUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes bsFloat { 0% { transform: translateY(-10px); } 100% { transform: translateY(18px); } }
.anim-up { animation: bsUp .9s var(--ease) backwards; }
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].is-shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
