/* ==========================================================================
   Milk Before 7 - base styles
   Tokens, reset, type, layout helpers, buttons, caps, colour schemes, motion.
   Section-only styles live inside each section's {% stylesheet %} tag.
   Colours and font files come from snippets/css-variables.liquid (Theme settings > Brand).
   ========================================================================== */


:root {
  --font-display: 'MB7 Arrows', 'Caprasimo', Georgia, serif;
  --font-body: 'MB7 Arrows', 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-hand: 'MB7 Arrows', 'Reenie Beanie', 'Segoe Print', cursive;

  --container: 1320px;
  --gutter: clamp(16px, 4vw, 24px);

  --gap-1: 8px;
  --gap-2: 12px;
  --gap-3: 16px;
  --gap-4: 22px;
  --gap-5: 28px;
  --gap-6: 48px;

  --radius-pill: 999px;
  --radius-card: 22px;
  --radius-panel: 28px;
  --radius-note: 6px;

  --shadow-card: 0 4px 0 var(--navy);
  --shadow-panel: 0 8px 0 var(--navy);
  --shadow-note: 8px 8px 0 var(--navy);

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-pop: cubic-bezier(0.3, 1.5, 0.5, 1);

  /* colour scheme defaults (paper) */
  --bg: var(--paper);
  --fg: var(--navy);
  --kicker: var(--red);
  --accent: var(--red);
  --panel: var(--cream);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}
svg {
  flex: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
a {
  color: var(--navy);
  text-decoration: none;
}
a:hover {
  color: var(--red);
}
h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}
ul[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.mb7-scheme--navy :focus-visible,
.mb7-scheme--blue :focus-visible,
.mb7-footer :focus-visible {
  outline-color: var(--cream);
}
[hidden] {
  display: none !important;
}

.mb7-skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--navy);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 800;
}
.mb7-skip-link:focus {
  top: 12px;
  color: var(--cream);
}
.mb7-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mb7-main:focus {
  outline: none;
}
body.mb7-has-basket-bar {
  padding-bottom: 96px;
}
body.mb7-scroll-lock {
  overflow: hidden;
}

/* ---------- colour schemes (section setting: color_scheme) ---------- */
.mb7-scheme--paper {
  --bg: var(--paper);
  --fg: var(--navy);
  --kicker: var(--red);
  --accent: var(--red);
  --panel: var(--cream);
}
.mb7-scheme--cream {
  --bg: var(--cream);
  --fg: var(--navy);
  --kicker: var(--red);
  --accent: var(--red);
  --panel: var(--paper);
}
.mb7-scheme--navy {
  --bg: var(--navy);
  --fg: var(--paper);
  --kicker: var(--gold);
  --accent: var(--gold);
  --panel: var(--cream);
}
.mb7-scheme--gold {
  --bg: var(--gold);
  --fg: var(--navy);
  --kicker: var(--navy);
  /* the brand red on gold measures 2.5:1, so accents on gold use a deeper red (3.3:1) */
  --accent: #a82b16;
  --panel: var(--cream);
}
.mb7-scheme--blue {
  --bg: var(--blue);
  --fg: var(--cream);
  --kicker: var(--gold);
  --accent: var(--gold);
  --panel: var(--cream);
}
.mb7-section {
  background: var(--bg);
  color: var(--fg);
  /* design rule: clamp(72px, 10vw, 120px). The floor never goes above 72px and never above the chosen padding. */
  padding-top: clamp(min(calc(var(--pt, 120) * 1px), 72px), 10vw, calc(var(--pt, 120) * 1px));
  padding-bottom: clamp(min(calc(var(--pb, 120) * 1px), 72px), 10vw, calc(var(--pb, 120) * 1px));
}
.mb7-section.mb7-scheme--gold,
.mb7-section.mb7-scheme--blue {
  border-top: 2px solid var(--navy);
}
.mb7-section.mb7-scheme--blue {
  border-bottom: 2px solid var(--navy);
}
.mb7-section a:not([class]) {
  color: inherit;
}

/* ---------- layout ---------- */
.mb7-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.mb7-container--narrow {
  max-width: 1180px;
}
.mb7-stack {
  display: flex;
  flex-direction: column;
}
.mb7-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.mb7-lede {
  max-width: 380px;
  font-size: 17px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- headings: Caprasimo, kicker is a span INSIDE the heading ---------- */
.mb7-h {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--h-size, clamp(40px, 5.1vw, 72px));
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: normal;
  hyphens: none;
  color: inherit;
}
.mb7-h--hero {
  --h-size: clamp(42px, 5.4vw, 75px);
}
.mb7-h--xl {
  --h-size: clamp(40px, 5.1vw, 72px);
}
.mb7-h--lg {
  --h-size: clamp(32px, 3.7vw, 52px);
  line-height: 1;
}
.mb7-h--md {
  --h-size: clamp(30px, 3.3vw, 46px);
  line-height: 1;
}
.mb7-h em,
.mb7-accent {
  color: var(--accent);
  font-style: normal;
}
.mb7-kicker {
  display: block;
  margin-bottom: clamp(4px, 0.6vw, 8px);
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--kicker);
  transform: rotate(-2deg);
  transform-origin: 0 50%;
  text-wrap: balance;
}
.mb7-hand {
  font-family: var(--font-hand);
  font-weight: 400;
  line-height: 1;
}

/* ---------- buttons ---------- */
.mb7-btn {
  --btn-bg: var(--red);
  --btn-fg: var(--cream);
  --btn-border: var(--navy);
  --btn-shadow: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 5px 0 var(--btn-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.mb7-btn:hover {
  color: var(--btn-fg);
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--btn-shadow);
}
.mb7-btn:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--btn-shadow);
}
.mb7-btn[disabled],
.mb7-btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 5px 0 var(--btn-shadow);
}
.mb7-btn--lg {
  min-height: 60px;
  padding: 0 30px;
  font-size: 18px;
  box-shadow: 0 6px 0 var(--btn-shadow);
}
.mb7-btn--sm {
  min-height: 46px;
  padding: 0 20px;
  font-size: 15px;
  box-shadow: 0 3px 0 var(--btn-shadow);
}
.mb7-btn--full {
  display: flex;
  width: 100%;
}
.mb7-btn--red {
  --btn-bg: var(--red);
  --btn-fg: var(--cream);
}
.mb7-btn--navy {
  --btn-bg: var(--navy);
  --btn-fg: var(--cream);
  --btn-shadow: var(--red);
}
.mb7-btn--gold {
  --btn-bg: var(--gold);
  --btn-fg: var(--navy);
  --btn-shadow: var(--red);
}
.mb7-btn--blue {
  --btn-bg: var(--blue);
  --btn-fg: var(--cream);
}
.mb7-btn--pink {
  --btn-bg: var(--pink-deep);
  --btn-fg: #fff;
}
.mb7-btn--orange {
  --btn-bg: var(--orange-deep);
  --btn-fg: #fff;
}
.mb7-btn--green {
  --btn-bg: var(--green);
  --btn-fg: var(--cream);
}
.mb7-btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-border: var(--navy);
  box-shadow: none;
}
.mb7-btn--outline:hover {
  background: var(--navy);
  color: var(--cream);
  box-shadow: none;
}
.mb7-btn--on-dark {
  --btn-border: var(--cream);
}
.mb7-btn--arrow::after {
  content: '→';
  content: '→' / '';
  font-family: var(--font-display);
  font-weight: 400;
}
.mb7-btn__arrow {
  font-family: var(--font-display);
  font-weight: 400;
}
.mb7-link-plain {
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 5px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ---------- bottle cap motif (snippets/bottle-cap.liquid) ---------- */
.mb7-cap {
  --cap: var(--red);
  --cap-size: 46px;
  display: inline-block;
  flex: none;
  width: var(--cap-size);
  height: var(--cap-size);
  border-radius: 50%;
  background: var(--cap);
  border: 3px dashed var(--cream);
  outline: 2px solid var(--cap);
  vertical-align: middle;
}

/* ---------- cards, notes, panels ---------- */
.mb7-card {
  background: var(--cream);
  border: 2px solid var(--navy);
  border-radius: var(--radius-card);
  color: var(--navy);
}
.mb7-panel {
  background: var(--cream);
  border: 3px solid var(--navy);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
  color: var(--navy);
}
.mb7-note {
  background: var(--cream);
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: var(--radius-note);
  box-shadow: var(--shadow-note);
  background-image: repeating-linear-gradient(var(--cream) 0 39px, rgba(31, 63, 168, 0.15) 39px 40px);
}
.mb7-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- forms ---------- */
.mb7-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mb7-field label {
  font-weight: 800;
  font-size: 15px;
}
.mb7-input,
.mb7-textarea,
.mb7-select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--navy);
  border-radius: 16px;
  background: var(--cream);
  color: var(--navy);
  font-weight: 600;
  font-size: 17px;
}
.mb7-textarea {
  min-height: 140px;
  resize: vertical;
}
.mb7-select {
  border-radius: var(--radius-pill);
  padding-inline: 20px;
}
.mb7-form-message {
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--navy);
  font-weight: 700;
}
.mb7-form-message--ok {
  background: #d2e2d0;
  border-color: var(--green);
}
.mb7-form-message--error {
  background: var(--tint-milk);
  border-color: var(--red);
}

/* ---------- motion: scroll reveal is driven by mb7.js, all of it off for reduced motion ---------- */
@keyframes mb7-bar-in {
  from {
    transform: translateY(140%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes mb7-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}
.mb7-float {
  animation: mb7-bob 3.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .mb7-float {
    animation: none;
  }
}

/* ---------- phone ---------- */
@media (max-width: 759px) {
  body {
    font-size: 16px;
  }
  .mb7-btn {
    font-size: 16px;
  }
}

/* ---------- logo (snippets/mb7-logo.liquid) ---------- */
.mb7-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.mb7-logo__words {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.mb7-logo__word {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 0.8;
  letter-spacing: -0.03em;
}
.mb7-logo__script {
  font-family: var(--font-hand);
  font-size: 26px;
  line-height: 0.7;
  color: var(--red);
  transform: rotate(-6deg) translate(14px, 2px);
}
.mb7-logo__badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--red);
  border: 3px dashed var(--cream);
  outline: 3px solid var(--red);
  box-shadow: 0 4px 0 3px var(--navy);
  transform: rotate(-10deg);
  transition: transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.mb7-logo:hover .mb7-logo__badge,
a:focus-visible .mb7-logo__badge {
  transform: rotate(350deg) scale(1.08);
}
.mb7-logo__num {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 0.8;
  color: var(--cream);
  transform: translateY(-22%);
}
.mb7-logo__am {
  position: absolute;
  bottom: 5px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--cream);
}
.mb7-logo--footer .mb7-logo__word {
  font-size: 40px;
}
.mb7-logo--footer .mb7-logo__script {
  font-size: 30px;
  color: var(--gold);
  transform: rotate(-6deg) translate(16px, 2px);
}
.mb7-logo--footer .mb7-logo__badge {
  width: 58px;
  height: 58px;
  box-shadow: 0 4px 0 3px var(--navy-deep);
  transition-duration: 0.8s;
}
.mb7-logo--footer .mb7-logo__num {
  font-size: 34px;
}
.mb7-logo--footer .mb7-logo__am {
  bottom: 6px;
  font-size: 8px;
  letter-spacing: 0.14em;
}
@media (prefers-reduced-motion: reduce) {
  .mb7-logo:hover .mb7-logo__badge,
  a:focus-visible .mb7-logo__badge {
    transform: rotate(-10deg);
  }
}

/* breadcrumbs: the link keeps its look but the tap area reaches 44px */
.mb7-ps__crumbs a,
.mb7-coll__crumbs a,
.mb7-article__crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  margin-block: -12px;
}
