/* =========================================================
   CALBRA SOURCING — base
   Tokens, typography, buttons, header, footer.
   Type: Outfit (geometric grotesque, closest free match to
   the Gilroy/Poppins look in the reference UI kit).
   Colour is taken straight from the logo.
   ========================================================= */

:root {
  /* colour */
  --ink:        #250505;   /* logo wordmark — deep oxblood-black */
  --ink-soft:   #3a0c0c;
  --clay:       #8b5e3c;   /* "SOURCING" sienna — primary accent */
  --clay-deep:  #6f4527;
  --clay-tint:  #f0e4d8;
  --gold:       #c9a25f;   /* bright accent on dark surfaces */
  --paper:      #f6f2ec;
  --surface:    #fffdfa;
  --alt:        #efe8de;
  --line:       #e3d9cb;
  --muted:      #6f655c;
  /* a warm brick rather than a pure red, so errors read as part
     of the palette rather than a browser default */
  --error:      #a8402c;
  --muted-dark: rgba(246,242,236,.66);

  /* radius — the kit is very round */
  --r-xl: 34px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  --maxw: 1180px;
  --gut: clamp(18px, 4vw, 48px);

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 2px 10px rgba(37,5,5,.05);
  --shadow-md: 0 18px 40px -22px rgba(37,5,5,.28);
  --shadow-lg: 0 40px 90px -45px rgba(37,5,5,.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;          /* guards against any stray absolute element */
  padding-top: 78px;           /* clears the fixed header */
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

/* Browsers apply `margin: 1em 40px` to <figure> by default. Left
   unreset it shifted the full-bleed photo bands 40px right (so they
   ran off the screen) and stole 80px of width from every photograph
   in a split layout, which is why they rendered small on phones. */
figure, figcaption, blockquote, form, fieldset { margin: 0; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }

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

/* ---------- typography ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.025em; line-height: 1.08; }
h1 { font-size: clamp(2.25rem, 5.2vw, 4.05rem); }
h2 { font-size: clamp(1.85rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
p  { margin: 0; }

.lead { font-size: 1.02rem; color: var(--muted); line-height: 1.65; max-width: 48ch; }

/* section scaffolding — class based, avoids element-selector clashes */
.section { padding: clamp(2.5rem, 6vw, 5.5rem) 0; }
.section--tight { padding-top: clamp(1.2rem, 3vw, 2.5rem); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-size: .95rem; font-weight: 500; letter-spacing: -.01em;
  padding: 1.05rem 1.7rem;
  border: 1px solid transparent; border-radius: var(--r-pill);
  cursor: pointer; white-space: nowrap; line-height: 1.1;
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.btn:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.btn--dark  { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--ink-soft); transform: translateY(-2px); }
.btn--clay  { background: var(--clay); color: #fff; }
.btn--clay:hover { background: var(--clay-deep); transform: translateY(-2px); }
/* restored: this modifier is used on dark sections and had lost its
   background in an earlier rewrite, leaving ink text on an ink panel */
.btn--gold  { background: var(--gold); color: var(--ink); font-weight: 600; }
.btn--gold:hover { background: #d9b473; transform: translateY(-2px); }
.btn--light { background: var(--surface); color: var(--ink); }
.btn--light:hover { transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.section--dark .btn--outline,
.footer-cta .btn--outline { color: var(--paper); border-color: rgba(246,242,236,.42); }
.section--dark .btn--outline:hover { border-color: var(--paper); background: rgba(246,242,236,.08); }
.btn--block { width: 100%; }
.btn--sm { padding: .82rem 1.35rem; font-size: .9rem; }
.btn--lg { padding: 1.2rem 2.1rem; font-size: 1rem; }

/* icon tile inside a button — same rounded-square shape as the
   contact and stat tiles, so every icon on the page reads alike */
.btn .disc {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.18);
  display: grid; place-items: center; margin: -.35rem -.35rem -.35rem -.7rem;
  flex: 0 0 auto;
}

/* ---------- header ----------
   Fixed rather than sticky. `overflow-x: hidden` on body (kept as a
   guard against stray absolute elements) turns body into the scroll
   container, and a sticky header inside it scrolls away with the
   page. Fixed is measured against the viewport, so it is immune to
   that — the body offset below reserves its space. */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  background: rgba(246,242,236,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 78px;
}
.brand img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 2.1rem; }
.nav__link { font-size: .93rem; color: var(--muted); }
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 500; }

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: none;
  width: 42px; height: 42px; padding: 0;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line);
  border-radius: var(--r-sm); cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.nav-toggle__bars { position: relative; width: 18px; height: 12px; display: block; }
.nav-toggle__bars i {
  position: absolute; left: 0; width: 100%; height: 2px;
  border-radius: 2px; background: var(--ink);
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .2s ease;
}
.nav-toggle__bars i:first-child { top: 0; }
.nav-toggle__bars i:last-child { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:first-child { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:last-child { transform: translateY(-5px) rotate(-45deg); }

/* ---------- mobile drawer ----------
   Starts below the header so the logo and the close control stay
   on the light bar; no logo inversion tricks needed. */
.mobile-nav {
  position: fixed; inset: 0; z-index: 70;
  margin-top: 0;
  background: radial-gradient(120% 90% at 50% 0%, #4a241c 0%, var(--ink) 48%, #160303 100%);
  padding: calc(78px + 2rem) var(--gut) 2rem;
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .32s ease, transform .32s cubic-bezier(.16,1,.3,1), visibility .32s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }

.mobile-nav__list { display: flex; flex-direction: column; }
.mobile-nav__list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0; font-size: 1.55rem; font-weight: 500;
  letter-spacing: -.02em; color: var(--paper);
  border-bottom: 1px solid rgba(246,242,236,.13);
  opacity: 0; transform: translateY(14px);
  transition: opacity .4s ease, transform .4s cubic-bezier(.16,1,.3,1), color .2s ease;
}
.mobile-nav__list a::after {
  content: ""; width: 8px; height: 8px;
  border-right: 2px solid var(--gold); border-top: 2px solid var(--gold);
  transform: rotate(45deg); opacity: .6;
}
.mobile-nav__list a[aria-current="page"] { color: var(--gold); }
.mobile-nav.is-open .mobile-nav__list a { opacity: 1; transform: none; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(1) { transition-delay: .06s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(2) { transition-delay: .12s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(3) { transition-delay: .18s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(4) { transition-delay: .24s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(5) { transition-delay: .30s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(6) { transition-delay: .36s; }

.mobile-nav__foot { margin-top: auto; padding-top: 2rem; display: grid; gap: .9rem; }
.mobile-nav__wa {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  color: var(--paper); font-size: .95rem;
  border: 1px solid rgba(246,242,236,.25); border-radius: var(--r-pill);
  padding: 1rem 1.5rem;
}
.mobile-nav__wa:hover { border-color: var(--paper); }
.mobile-nav__note { font-size: .82rem; color: var(--muted-dark); text-align: center; }

/* scroll lock while the drawer is open */
html.nav-open, html.nav-open body { overflow: hidden; }
/* the drawer covers the page, so its own top offset already accounts
   for the header — no extra body padding compensation needed */

@media (max-width: 940px) {
  .nav__link { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 941px) {
  .mobile-nav { display: none; }
}
@media (max-width: 520px) {
  body { padding-top: 68px; }
  .site-header .wrap { height: 68px; }
  .brand img { height: 21px; }
  .nav .btn { display: none; }          /* the drawer carries the CTA */
  .mobile-nav { padding-top: calc(68px + 1.6rem); }
  .mobile-nav__list a { font-size: 1.35rem; padding: .95rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav__list a, .nav-toggle__bars i { transition: none; }
}

/* ---------- footer ---------- */
.footer-zone { padding: 0 0 clamp(1.2rem, 3vw, 2rem); }

.footer-cta {
  position: relative;
  background: radial-gradient(120% 130% at 50% -10%, #6d3a2a 0%, var(--ink) 55%, #140202 100%);
  color: var(--paper);
  border-radius: var(--r-xl);
  padding: clamp(2.6rem, 7vw, 5.5rem) clamp(1.2rem, 4vw, 3rem);
  text-align: center;
  overflow: hidden;
}
.footer-cta h2 { max-width: 18ch; margin: 0 auto; }
.footer-cta p { color: var(--muted-dark); max-width: 46ch; margin: 1rem auto 2rem; font-size: 1rem; }

/* clear separation from the CTA panel above */
.footer-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-xl);
  margin-top: clamp(14px, 2vw, 22px);
  padding: clamp(2rem, 4vw, 3.2rem) clamp(1.3rem, 4vw, 3rem) 1.8rem;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem; align-items: start;
  position: relative; z-index: 2;
}
.footer-brand img { height: 24px; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 34ch; }
.footer-col h4 { font-size: .93rem; margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-col a { font-size: .89rem; color: var(--muted); }
.footer-col a:hover { color: var(--clay); }

.footer-base {
  position: relative; z-index: 2;
  margin-top: 2.4rem; padding-top: 1.4rem;
  display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted);
}
.footer-base a:hover { color: var(--clay); }

/* regulatory wording now sits inside the footer, centred */
.footer-legal {
  position: relative; z-index: 2;
  margin: 1.5rem auto 0; max-width: none;
  padding-top: 1.3rem; border-top: 1px solid var(--line);
  text-align: center;
  font-size: .77rem; line-height: 1.7; color: var(--muted);
}
.footer-legal strong { color: var(--ink); font-weight: 600; }

/* giant watermark wordmark, as in the reference footer */
.watermark {
  position: absolute; left: 50%; bottom: -.34em; transform: translateX(-50%);
  font-size: clamp(4rem, 16vw, 13rem); font-weight: 600; letter-spacing: -.05em;
  color: var(--ink); opacity: .04; white-space: nowrap; pointer-events: none;
  line-height: .8; z-index: 1;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { justify-content: center; text-align: center; }
  .footer-cta .btn { width: 100%; }
}

/* ---------- floating WhatsApp ----------
   Brand green is used by default because people recognise it
   instantly, which is the whole point of the button. To make it
   sit quieter in the palette, change --wa to var(--ink) — the
   glyph stays legible either way. */
:root {
  --wa: #25d366;
  --wa-deep: #1da851;
}

.wa-fab {
  position: fixed; z-index: 90;
  right: clamp(14px, 3vw, 26px);
  bottom: calc(clamp(14px, 3vw, 26px) + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center;
  width: 56px; height: 56px; padding: 0;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--wa); color: #fff;
  box-shadow: 0 14px 30px -12px rgba(37,5,5,.45);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
  transition: opacity .35s ease, transform .35s cubic-bezier(.16,1,.3,1),
              visibility .35s, background .2s ease,
              width .35s cubic-bezier(.16,1,.3,1),
              padding .35s cubic-bezier(.16,1,.3,1);
}
.wa-fab.is-visible { opacity: 1; visibility: visible; transform: none; }

/* The button sits above the header (z-index 90 vs 80) so it stays
   reachable while scrolling — which means it would also float over
   the open mobile drawer. Pull it out of the way while that is open. */
html.nav-open .wa-fab {
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.9);
  pointer-events: none;
}
.wa-fab:hover { background: var(--wa-deep); }
.wa-fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wa-fab svg { flex: 0 0 auto; }

/* The label is collapsed until hover. No gap while collapsed — a
   flex gap still occupies space next to a zero-width child, which
   is what made the circle read as an oval. */
.wa-fab__label {
  font-size: .92rem; font-weight: 500; white-space: nowrap;
  max-width: 0; overflow: hidden; opacity: 0; margin-left: 0;
  transition: max-width .35s cubic-bezier(.16,1,.3,1),
              margin-left .35s cubic-bezier(.16,1,.3,1),
              opacity .25s ease;
}
.wa-fab:hover,
.wa-fab:focus-visible { width: auto; padding: 0 20px 0 16px; }
.wa-fab:hover .wa-fab__label,
.wa-fab:focus-visible .wa-fab__label { max-width: 190px; opacity: 1; margin-left: .6rem; }

/* on touch there is no hover, so it simply stays a round button */
@media (hover: none) {
  .wa-fab { width: 54px; height: 54px; }
  .wa-fab__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-fab { transition: none; }
}

/* ---------- reveal ----------
   Superseded by css/animations.css (data-reveal variants). */

/* =========================================================
   MOBILE BREATHING ROOM
   Every spacing token is a clamp, and on a narrow screen the
   clamp resolves to its minimum — so the page arrived at its
   tightest just where it had the least room. These raise the
   floor rather than the ceiling.
   ========================================================= */
@media (max-width: 780px) {
  :root { --gut: 24px; }

  .section { padding: clamp(3.4rem, 9vw, 5.5rem) 0; }
  .section--tight { padding-top: clamp(2.2rem, 6vw, 2.5rem); }

  .panel { padding: 2rem 1.5rem; }
  .panel__head { margin-bottom: 2.4rem; }
  .panel__head p { margin-top: 1.1rem; }

  .footer-cta { padding: 3.2rem 1.5rem; }
  .footer-card { padding: 2.4rem 1.5rem 2rem; }
  .footer-grid { gap: 2.2rem; }
  .footer-base { margin-top: 2.6rem; }
  .footer-legal { margin-top: 1.8rem; padding-top: 1.5rem; line-height: 1.75; }
}

@media (max-width: 520px) {
  :root { --gut: 20px; }
  .panel { padding: 1.8rem 1.3rem; }
}

/* =========================================================
   COOKIE CONSENT BANNER
   "Reject all" is deliberately the same element and the same
   size as "Accept all" — the spec requires equal prominence on
   the first layer, so they must not be styled as primary and
   secondary.
   ========================================================= */
.cc {
  position: fixed; z-index: 120;
  left: 0; right: 0; bottom: 0;
  background: var(--ink); color: var(--paper);
  border-top: 1px solid rgba(246,242,236,.16);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
  max-height: 92vh; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cc.is-open { transform: none; }

.cc__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 1.8rem) var(--gut);
  display: grid; grid-template-columns: 1fr auto; gap: 1rem clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.cc__main { min-width: 0; }
.cc__title { font-size: 1.05rem; margin-bottom: .4rem; color: var(--paper); }
.cc__text { font-size: .88rem; line-height: 1.6; color: rgba(246,242,236,.74); max-width: 72ch; }
.cc__text a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

.cc__actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cc__btn {
  background: var(--paper); color: var(--ink);
  min-width: 132px;
}
.cc__btn:hover { background: #fff; }
.cc__link {
  background: none; border: 0; cursor: pointer;
  color: rgba(246,242,236,.8); font-size: .88rem;
  text-decoration: underline; text-underline-offset: 3px;
  padding: .6rem .4rem;
}
.cc__link:hover { color: var(--paper); }

.cc__choices {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(246,242,236,.16);
  padding-top: 1.2rem; margin-top: .4rem;
  display: grid; gap: .8rem;
}
.cc__row {
  display: grid; grid-template-columns: 20px 1fr; gap: .8rem;
  align-items: start; cursor: pointer;
}
.cc__row input { margin-top: .25rem; accent-color: var(--gold); }
.cc__row input:disabled { opacity: .55; cursor: not-allowed; }
.cc__row-label { display: block; font-size: .92rem; font-weight: 500; color: var(--paper); }
.cc__row-desc { display: block; font-size: .82rem; color: rgba(246,242,236,.66); line-height: 1.5; }
.cc__choices-actions { margin-top: .4rem; }

@media (max-width: 820px) {
  .cc__inner { grid-template-columns: 1fr; }
  .cc__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cc__btn { min-width: 0; width: 100%; }
  .cc__link { grid-column: 1 / -1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cc { transition: none; }
}
