/*
 * MediBloom base: tokens, reset, type, buttons, header, footer, banner.
 * Every other stylesheet in the theme builds on these tokens; page sections
 * live in home.css / pages.css / shop.css / commerce.css.
 */

:root {
  /* Brand colours (from the original design's global palette). */
  --mb-sky: #a3cdd4;          /* header links, light accents */
  --mb-teal: #3eb1b0;         /* headings accent, quotes */
  --mb-teal-strong: #189a92;  /* solid buttons */
  --mb-teal-ink: #115f74;     /* footer headings */
  --mb-deep: #1e4347;         /* dark headings */
  --mb-night: #0e2629;        /* dark panels */
  --mb-ink: #000;
  --mb-text: #333;
  --mb-muted: #7a7a7a;
  --mb-grey: #717171;
  --mb-soft: #a2a8ab;         /* footer copy */
  --mb-olive: #607669;        /* legal bar copy */
  --mb-bg: #f1eeea;           /* page */
  --mb-white: #fff;
  --mb-danger: #c0392b;
  --mb-success: #2e7d4f;

  --mb-silver: linear-gradient(to right, #a1a0a2 0%, #eeedee 14%, #a1a0a2 27%, rgba(153, 216, 223, .5) 40%, #ddd 54%, #ddd 67%, #99d8df 83%, #99989d 100%);
  --mb-rule-gradient: linear-gradient(to right, rgba(113, 194, 122, 0) 0%, #049b90 48%, rgba(113, 194, 122, 0) 100%);

  --mb-font: "Poppins", sans-serif;
  --mb-font-alt: "Montserrat", sans-serif;

  /* Type scale (desktop; stepped down below). */
  --mb-fs-display: 80px;   /* page banner / big uppercase */
  --mb-fs-h2: 54px;
  --mb-fs-h3: 26px;
  --mb-fs-lead: 18px;

  --mb-shell: 1312px;
  --mb-gutter: 15px;
  --mb-radius: 10px;
  --mb-radius-lg: 20px;
}

@media (max-width: 1366px) { :root { --mb-fs-display: 65px; --mb-fs-h2: 48px; --mb-fs-lead: 16px; } }
@media (max-width: 1200px) { :root { --mb-fs-display: 60px; --mb-fs-h2: 42px; --mb-fs-h3: 20px; } }
@media (max-width: 1024px) { :root { --mb-fs-display: 55px; --mb-fs-h2: 38px; } }
@media (max-width: 767px)  { :root { --mb-fs-display: 38px; --mb-fs-h2: 36px; --mb-fs-h3: 18px; } }

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--mb-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--mb-text);
  background: var(--mb-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--mb-teal); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mb-skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--mb-white); color: var(--mb-ink); border-radius: 8px; }
.mb-skip:focus { top: 16px; }

.mb-main { display: block; outline: none; }

/* Content width: 1312px with 15px gutters, like the original containers. */
.mb-shell { width: 100%; max-width: calc(var(--mb-shell) + 2 * var(--mb-gutter)); margin-inline: auto; padding-inline: var(--mb-gutter); }

/* ------------------------------------------------------------------ type helpers */
.mb-upper { text-transform: uppercase; }
.mb-teal { color: var(--mb-teal); }

/* Heading with the gradient rule underneath (the design's "lineGradient"). */
.mb-rule { position: relative; padding-bottom: 15px; }
.mb-rule::before {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; max-width: 560px; height: 2px;
  background: var(--mb-rule-gradient);
}

/* ------------------------------------------------------------------ buttons */
/* The silver pill with the play-arrow ("SHOP NOW ▸"). */
.mb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 84px;
  padding: 26px; border: 0; border-radius: var(--mb-radius-lg);
  background: var(--mb-silver); color: var(--mb-ink);
  font-family: var(--mb-font-alt); font-size: 24px; font-weight: 700; line-height: 1;
  text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: filter .2s ease, transform .2s ease;
}
.mb-btn::after {
  content: ""; flex: none; width: 11px; height: 17px;
  background: url("../img/brand/btn-arrow.png") center / 100% no-repeat;
}
.mb-btn:hover { filter: brightness(1.05); }
.mb-btn--md { gap: 36px; padding: 17px 22px; }
/* Text-only variant ("SHOP NOW ▸" with no pill). */
.mb-btn--plain { background: none; padding: 0; gap: 36px; font-size: 20px; }
.mb-btn--block { width: 100%; }

@media (max-width: 1366px) { .mb-btn { padding: 20px; gap: 45px; } }
@media (max-width: 1024px) { .mb-btn, .mb-btn--md { padding: 15px 25px; font-size: 24px; gap: 25px; } }
@media (max-width: 767px)  { .mb-btn, .mb-btn--md { padding: 15px 20px; font-size: 20px; } }

/* Solid teal pill (footer "Sign Up"). */
.mb-btn-solid {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 192px; padding: 13px 40px; border: 0; border-radius: 50px;
  background: var(--mb-teal-strong); color: #faf8f2;
  font-family: var(--mb-font); font-size: 14px; font-weight: 500; line-height: 1.45;
}
.mb-btn-solid:hover { filter: brightness(1.08); }
.mb-btn-solid:disabled { opacity: .6; cursor: progress; }

/* ------------------------------------------------------------------ header */
/* Fixed and transparent over the dark hero / banner every page opens with. */
.mb-header { position: fixed; inset: 0 0 auto; z-index: 99; transition: background-color .3s ease, box-shadow .3s ease; }
.mb-header.is-scrolled { background: rgba(14, 38, 41, .92); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); backdrop-filter: blur(6px); }
.mb-header-bar {
  display: grid; grid-template-columns: 1fr 110px 1fr; align-items: center; gap: 24px;
  max-width: calc(var(--mb-shell) + 2 * var(--mb-gutter)); margin-inline: auto;
  padding: 32px var(--mb-gutter);
  transition: padding .3s ease;
}
.mb-header.is-scrolled .mb-header-bar { padding-block: 12px; }
.mb-logo { display: block; width: 110px; justify-self: center; }
.mb-logo img { width: 110px; height: auto; transition: width .3s ease; }
.mb-header.is-scrolled .mb-logo img { width: 72px; margin-inline: auto; }
.mb-nav { display: flex; align-items: center; gap: 21px; }
.mb-nav--right { justify-content: flex-end; }
.mb-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 60px;
  font-family: var(--mb-font-alt); font-size: 14px; font-weight: 600; line-height: 1.5;
  text-transform: uppercase; color: var(--mb-sky);
  transition: color .2s ease;
}
.mb-nav a:hover, .mb-nav a[aria-current="page"] { color: var(--mb-teal); }
.mb-cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px;
  background: var(--mb-teal-strong); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.mb-burger, .mb-icon-btn {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--mb-sky);
}
.mb-icon-btn { display: inline-flex; }

@media (max-width: 1024px) {
  .mb-header-bar { grid-template-columns: 44px 1fr 44px; padding-block: 20px; }
  .mb-nav { display: none; }
  .mb-logo { grid-column: 2; }
  .mb-logo img { width: 80px; }
  .mb-burger { display: inline-flex; grid-column: 3; grid-row: 1; }
}

/* Slide-in mobile menu. */
.mb-mobile-nav {
  margin: 0 0 0 auto; width: min(320px, 86vw); max-width: none; height: 100dvh; max-height: none;
  padding: 20px 24px; border: 0; background: var(--mb-night); color: var(--mb-sky);
}
.mb-mobile-nav::backdrop { background: rgba(0, 0, 0, .55); }
.mb-mobile-nav-head { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.mb-mobile-nav nav { display: flex; flex-direction: column; gap: 6px; }
.mb-mobile-nav nav a {
  padding: 10px 0; font-family: var(--mb-font-alt); font-size: 16px; font-weight: 600;
  text-transform: uppercase; color: var(--mb-sky);
}
.mb-mobile-nav nav a[aria-current="page"] { color: var(--mb-teal); }

/* Toast announcing cart additions. */
.mb-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 140%);
  padding: 12px 20px; border-radius: 50px; background: var(--mb-night); color: #fff; font-size: 14px;
  transition: transform .3s ease; pointer-events: none;
}
.mb-toast.is-visible { transform: translate(-50%, 0); }
.mb-toast:empty { display: none; }

/* ------------------------------------------------------------------ banner */
.mb-banner {
  position: relative; display: flex; flex-direction: column;
  min-height: 619px; padding: 0 var(--mb-gutter) 40px;
  background: var(--mb-night) var(--mb-banner-image) 100% 50% / cover no-repeat;
  color: var(--mb-white);
}
.mb-banner-inner { width: 100%; max-width: var(--mb-shell); margin-inline: auto; padding: 285px 0 90px; }
.mb-banner-copy { display: flex; flex-direction: column; gap: 18px; max-width: 565px; }
.mb-banner-title {
  font-family: var(--mb-font); font-size: var(--mb-fs-display); font-weight: 700; line-height: 1.12;
  text-transform: uppercase; color: var(--mb-white);
}
.mb-banner-text {
  max-width: 440px; font-family: var(--mb-font-alt); font-size: 18px; font-weight: 500; line-height: 1.5;
  letter-spacing: 1px; text-transform: uppercase;
}
.mb-banner-photo { display: none; }

@media (max-width: 767px) {
  .mb-banner { min-height: 0; background-image: none; }
  .mb-banner-inner { padding: 150px 0 0; display: flex; flex-direction: column; gap: 40px; }
  .mb-banner-photo { display: block; width: 100%; height: auto; }
}

/* ------------------------------------------------------------------ footer */
.mb-footer-top { padding: 0 var(--mb-gutter); background: #000; }
.mb-footer-grid {
  display: grid; grid-template-columns: 485fr 373.5fr 373.5fr; gap: 24px;
  max-width: 1280px; margin-inline: auto; padding: 80px 0 50px;
}
.mb-footer-news { display: flex; flex-direction: column; gap: 16px; }
.mb-footer-grid--no-news { grid-template-columns: 1fr 1fr; }
.mb-footer-grid--no-news .mb-footer-col:first-child { justify-content: flex-start; }
.mb-footer-col { display: flex; justify-content: flex-end; }
.mb-footer-inner { display: flex; flex-direction: column; gap: 40px; min-width: 204px; }
.mb-footer-info { max-width: 250px; }
.mb-footer-title { font-family: var(--mb-font); font-size: 36px; font-weight: 600; line-height: 1; color: var(--mb-teal-ink); }
.mb-footer-text { font-size: 18px; line-height: 1.7; color: var(--mb-soft); }
.mb-footer-form { display: flex; flex-direction: column; gap: 27px; margin-top: 14px; }
.mb-footer-form input {
  width: 100%; height: 62px; padding: 5px 20px; border: 0; border-radius: var(--mb-radius);
  background: #fff; color: #000;
}
.mb-footer-form .mb-footer-submit { align-self: flex-start; }
.mb-footer-submit {
  min-width: 192px; padding: 13px 40px; border: 0; border-radius: 50px;
  background: var(--mb-teal-strong); color: #faf8f2; font-size: 14px; font-weight: 500; line-height: 1.45;
}
.mb-footer-submit:disabled { opacity: .6; }
.mb-footer-links a { display: flex; align-items: center; min-height: 48px; font-size: 20px; color: var(--mb-soft); transition: color .2s; }
.mb-footer-links a:hover { color: var(--mb-teal); }
/* With customer support the newsletter becomes a full-width band (copy on
   the left, the form on the right) and the three columns sit below it. */
.mb-footer-grid--support { grid-template-columns: repeat(3, 1fr); gap: 56px 32px; }
.mb-footer-grid--support .mb-footer-col { justify-content: flex-start; }
.mb-footer-grid--support .mb-footer-news {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 64px; align-items: center;
  padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.mb-footer-grid--support .mb-footer-news > :not(form) { grid-column: 1; }
.mb-footer-grid--support .mb-footer-form { grid-column: 2; grid-row: 1 / span 2; flex-direction: row; gap: 16px; margin-top: 0; }
.mb-footer-grid--support .mb-footer-form input { flex: 1; min-width: 0; }
.mb-footer-grid--support .mb-footer-form .mb-footer-submit { align-self: stretch; }
.mb-footer-contact { display: flex; flex-direction: column; gap: 14px; }
.mb-footer-contact li { display: flex; flex-direction: column; gap: 2px; font-size: 18px; line-height: 1.5; color: var(--mb-soft); }
.mb-footer-contact-label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mb-teal-ink); }
.mb-footer-contact a { color: var(--mb-soft); overflow-wrap: anywhere; transition: color .2s; }
.mb-footer-contact a:hover { color: var(--mb-teal); }

.mb-footer-bottom { padding: 0 var(--mb-gutter); background: var(--mb-bg); }
.mb-footer-bottom-inner {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 1270px; margin-inline: auto; padding: 72px 0; text-align: center; color: var(--mb-olive);
}
.mb-footer-disclaimer { margin-bottom: 20px; }
.mb-footer-legal { display: flex; flex-wrap: wrap; justify-content: center; }
.mb-footer-legal li + li { border-left: 1px solid currentColor; }
.mb-footer-legal a { display: inline-flex; padding: 0 10px; line-height: 24px; color: var(--mb-olive); }
.mb-footer-legal a:hover { color: var(--mb-teal); }

@media (max-width: 1024px) {
  .mb-footer-grid { grid-template-columns: 1fr 1fr; }
  .mb-footer-news { grid-column: 1 / -1; }
  .mb-footer-col { justify-content: flex-start; }
  .mb-footer-grid--support { grid-template-columns: repeat(3, 1fr); }
  .mb-footer-grid--support .mb-footer-news { grid-template-columns: 1fr; padding-bottom: 40px; }
  .mb-footer-grid--support .mb-footer-form { grid-column: 1; grid-row: auto; }
}
@media (max-width: 767px) {
  .mb-footer-grid, .mb-footer-grid--support { grid-template-columns: 1fr; padding: 60px 0 40px; gap: 40px; }
  .mb-footer-grid--support .mb-footer-form { flex-direction: column; }
  .mb-footer-grid--support .mb-footer-form input { flex: none; }
  .mb-footer-grid--support .mb-footer-form .mb-footer-submit { align-self: flex-start; }
  .mb-footer-title { font-size: 28px; }
  .mb-footer-inner { gap: 20px; }
  .mb-footer-bottom-inner { padding: 48px 0; }
  /* Wrapped onto several lines the divider would start a line; stack them. */
  .mb-footer-legal { flex-direction: column; gap: 6px; }
  .mb-footer-legal li + li { border-left: 0; }
}

/* ------------------------------------------------------------------ modal (terms) */
.mb-modal {
  width: min(760px, calc(100vw - 32px)); max-height: min(80vh, 760px); padding: 0;
  border: 0; border-radius: 16px; background: #fff; color: var(--mb-text);
}
.mb-modal::backdrop { background: rgba(0, 0, 0, .55); }
.mb-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #e6e1da; }
.mb-modal-head h2 { font-size: 22px; font-weight: 600; color: var(--mb-deep); }
.mb-modal-head .mb-icon-btn { color: var(--mb-deep); }
.mb-modal-body { max-height: calc(min(80vh, 760px) - 80px); overflow: auto; padding: 24px; }

/* ------------------------------------------------------------------ legal prose */
.mb-legal h2, .mb-legal h3 { margin: 1.4em 0 .5em; color: var(--mb-deep); font-weight: 600; }
.mb-legal h2 { font-size: 24px; }
.mb-legal h3 { font-size: 19px; }
.mb-legal p, .mb-legal ul, .mb-legal ol { margin: 0 0 1em; }
.mb-legal ul { list-style: disc; padding-left: 1.4em; }
.mb-legal ol { list-style: decimal; padding-left: 1.4em; }
.mb-legal a { color: var(--mb-teal-strong); text-decoration: underline; }
