/* ==========================================================================
   multiprofencc.ca — design tokens
   Palette derived from the Multiprofen logo (navy, grey) and the
   M-Line packaging (blue).
   ========================================================================== */
:root {
  --navy: #335fb6;
  --navy-dark: #182f63;
  --blue: #0a6bbf;
  --blue-hover: #085a9f;
  --blue-tint: #e8f1fb;
  --grey: #8a97a8;
  --grey-dark: #2f3744;
  --ink: #172033;
  --muted: #566275;
  --surface: #f5f7fb;
  --line: #e1e6ef;
  --white: #ffffff;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  --text-h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --text-h1: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(23, 32, 51, 0.06), 0 8px 24px rgba(23, 32, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(34, 68, 136, 0.22);
  --container: 1120px;
  --gutter: 1rem;
}

@media (min-width: 768px) {
  :root { --gutter: 1.5rem; }
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0 0 var(--space-4); line-height: 1.15; color: var(--navy); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 var(--space-4); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-2) var(--space-4); background: var(--navy); color: var(--white); border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-4); }

/* Layout ----------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-7); }
.section--tint { background: var(--surface); }
.section__title { font-size: var(--text-h2); }
.eyebrow {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue);
}
@media (min-width: 768px) {
  .section { padding-block: var(--space-8); }
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0.7rem 1.4rem;
  font-weight: 600; font-size: 1rem; line-height: 1.2; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-hover); color: var(--white); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--small { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.95rem; }

.link-arrow { font-weight: 600; }
.link-arrow::after { content: ' \2192'; }

/* Header ----------------------------------------------------------------- */
/* Floating white pill, inset from the page edges, over the hero. Slides in on
   load (.is-ready, set by site.js), only deepens its shadow once the page
   scrolls (.is-scrolled), keeping its size and expands into a menu on small screens. */
:root { --header-top: 16px; --header-pill-h: 64px; }
@media (min-width: 768px) { :root { --header-top: 24px; --header-pill-h: 72px; } }

.site-header {
  position: fixed; top: var(--header-top); left: 0; right: 0; z-index: 50;
  pointer-events: none; /* only the pill itself should catch clicks */
  opacity: 0; transform: translateY(-16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-header.is-ready { opacity: 1; transform: none; }
.site-header__bar {
  pointer-events: auto;
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: var(--header-pill-h); padding: 0 var(--space-3) 0 var(--space-5);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.06), 0 12px 32px rgba(23, 32, 51, 0.14);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled .site-header__bar {
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.08), 0 18px 44px rgba(23, 32, 51, 0.22);
}
.main--offset { padding-top: calc(var(--header-top) + var(--header-pill-h) + var(--space-5)); }

.site-logo { display: flex; align-items: center; }
.site-logo img { width: 118px; height: auto; transition: transform 0.3s ease; }
@media (min-width: 768px) { .site-logo img { width: 140px; } }
.site-logo:hover img { transform: scale(1.04); }

/* Links: centred on wide screens, animated underline on hover */
.site-nav__list { display: flex; align-items: center; gap: var(--space-2); }
.site-nav__link {
  position: relative; display: block; padding: var(--space-2) var(--space-3);
  font-weight: 500; color: var(--ink); border-radius: var(--radius);
  transition: color 0.2s ease;
}
.site-nav__link::after {
  content: ''; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 4px; height: 2px;
  background: var(--blue); border-radius: 2px;
  transform: scaleX(0); transform-origin: center; transition: transform 0.25s ease;
}
.site-nav__link:hover { color: var(--navy); text-decoration: none; }
.site-nav__link:hover::after, .site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--navy); font-weight: 600; }

/* Right side: phone (secondary) + Contact Us (primary) */
.site-header__actions { display: flex; align-items: center; gap: var(--space-2); }
.btn--soft { background: var(--surface); color: var(--navy); }
.btn--soft:hover { background: var(--blue-tint); color: var(--navy); }
.site-header__phone { display: none; }
.site-header__cta { white-space: nowrap; box-shadow: 0 6px 16px rgba(34, 68, 136, 0.28); }
.site-header__cta:hover { box-shadow: 0 10px 22px rgba(34, 68, 136, 0.36); }
.site-header__cta[aria-current="page"] { background: var(--blue); }

/* Entrance stagger for links and actions */
.site-nav__list li, .site-header__actions > * {
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  transition-delay: calc(0.25s + var(--i, 0) * 0.07s);
}
.site-nav__list li:nth-child(1) { --i: 0; }
.site-nav__list li:nth-child(2) { --i: 1; }
.site-nav__list li:nth-child(3) { --i: 2; }
.site-header__actions > * { --i: 3; }
.site-header.is-ready .site-nav__list li, .site-header.is-ready .site-header__actions > * { opacity: 1; transform: none; }

/* Hamburger (small screens) */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: var(--surface); border: 0; border-radius: 50%; cursor: pointer; color: var(--navy);
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ''; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

/* Small screens: the menu drops out of the pill */
@media (max-width: 899px) {
  .site-nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(-8px);
    pointer-events: none;
    background: rgba(255, 255, 255, 0.98); border-radius: 24px; box-shadow: var(--shadow);
    transition: grid-template-rows 0.3s ease, opacity 0.25s ease, transform 0.3s ease;
  }
  .site-nav.is-open { grid-template-rows: 1fr; opacity: 1; transform: none; pointer-events: auto; }
  .site-nav__list { overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav.is-open .site-nav__list { padding: var(--space-3) var(--space-3) var(--space-4); }
  .site-nav__link { padding: var(--space-3) var(--space-4); }
  .site-nav__link::after { display: none; }
  .site-nav__link[aria-current="page"] { background: var(--blue-tint); }
  .site-nav__list li:last-child .site-nav__link { border-radius: var(--radius); }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .site-header__phone { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header, .site-nav__list li, .site-header__actions > *, .site-logo img, .site-nav__link::after, .site-nav {
    transition: none;
  }
}

/* Hero (photo background) ------------------------------------------------ */
/* Lab photo with the product on the right; a white gradient fades out towards
   the right so the navy copy reads on the left and the product keeps its colours. */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface);
  /* top padding clears the fixed floating header */
  padding-block: calc(var(--header-top) + var(--header-pill-h) + var(--space-6)) var(--space-7);
  /* phones: tall enough to show the portrait photo below the copy */
  min-height: 560px;
}
.hero__bg, .hero__overlay { position: absolute; inset: 0; z-index: -1; }
.hero__bg { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__overlay {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.46) 26%, rgba(255, 255, 255, 0) 65%);
}
.hero__grid { display: grid; gap: var(--space-6); align-items: center; }
.hero__copy { color: var(--navy); max-width: 40rem; }
/* phones: title only, smaller; the lead comes back from 768px up */
.hero__title { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0; color: var(--navy); }
.hero__lead { display: none; font-size: var(--text-lg); color: var(--navy); max-width: 60ch; margin-bottom: 0; }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-dark); color: var(--white); }

@media (min-width: 768px) {
  .hero { padding-block: calc(var(--header-top) + var(--header-pill-h) + var(--space-7)) var(--space-8); min-height: 720px; display: flex; align-items: center; }
  .hero__bg { object-position: center 52%; }
  .hero__overlay {
    background: linear-gradient(97deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 32%, rgba(255, 255, 255, 0.35) 52%, rgba(255, 255, 255, 0.05) 68%, rgba(255, 255, 255, 0) 100%);
  }
  .hero__copy { max-width: 34rem; }
  .hero__title { font-size: var(--text-h1); margin-bottom: var(--space-4); }
  .hero__lead { display: block; }
}

/* Feature (image + copy) ------------------------------------------------- */
.feature__grid { display: grid; gap: var(--space-6); align-items: center; }
.feature__media { position: relative; display: flex; justify-content: center; align-items: center; min-height: 260px; }
.feature__media img { position: relative; width: min(85%, 460px); }
.feature__media .feature__img--small { width: min(60%, 300px); filter: drop-shadow(0 18px 28px rgba(23, 32, 51, 0.25)); }
.feature__blob { position: absolute; inset: 6% 10%; }
.feature__blob--soft {
  background: linear-gradient(160deg, var(--blue-tint), rgba(10, 107, 191, 0.18));
  border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
}
.feature__blob--navy {
  background: var(--navy);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 24px 50px rgba(34, 68, 136, 0.28);
}
.feature__blob--navy::after {
  content: ''; position: absolute; top: -8%; right: -8%; width: 45%; height: 45%;
  background-image: radial-gradient(rgba(34, 68, 136, 0.35) 1.5px, transparent 1.6px);
  background-size: 14px 14px; z-index: -1;
}
.feature__copy p { color: var(--muted); font-size: var(--text-lg); }
.feature__copy .btn { margin-top: var(--space-2); }
@media (min-width: 768px) {
  .feature__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .feature__media { min-height: 380px; }
  .feature--reverse .feature__media { order: 2; }
  .feature--reverse .feature__copy { order: 1; }
}

/* Contact ---------------------------------------------------------------- */
.hero--compact { min-height: 0; }
.hero--compact .hero__grid { grid-template-columns: 1fr; }
.hero--compact .hero__lead { max-width: 60ch; }
.contact__grid { display: grid; gap: var(--space-7); }
.contact__info { display: grid; gap: var(--space-4); }
.info-card {
  padding: var(--space-5);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.info-card__title { font-size: 1.05rem; margin-bottom: var(--space-2); }
.info-card__list { margin: 0; color: var(--muted); line-height: 1.7; }
.info-card__list li + li { margin-top: var(--space-1); }

.form { display: grid; gap: var(--space-4); }
.form__row { display: grid; gap: var(--space-2); }
.form__label { font-weight: 600; font-size: var(--text-sm); color: var(--navy); }
.form__input {
  width: 100%; padding: 0.8rem 1rem;
  font: inherit; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form__input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 107, 191, 0.15); }
textarea.form__input { resize: vertical; min-height: 140px; }
.form__hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
.form__status { margin: 0; min-height: 1.5em; font-size: var(--text-sm); color: var(--muted); }
.form__status--success { color: #1b7f4b; font-weight: 600; }
.form__status--error { color: #b3261e; font-weight: 600; }
altcha-widget { display: block; }

@media (min-width: 640px) {
  .contact__info { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .contact__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
  .contact__info { grid-template-columns: 1fr 1fr; }
}

/* Error pages -------------------------------------------------------------- */
.error-page { min-height: 60vh; display: flex; align-items: center; }
.error-page__inner { text-align: center; max-width: 560px; }
.error-page__title { font-size: var(--text-h1); }
.error-page__text { color: var(--muted); font-size: var(--text-lg); margin-bottom: var(--space-5); }
.error-page__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

/* "Want to know more?" ----------------------------------------------------- */
.know-more__grid { display: grid; gap: var(--space-6); align-items: center; }
.know-more__media { display: flex; justify-content: center; }
.know-more__media img { width: 100%; max-width: 560px; }
.know-more__copy p { color: var(--muted); font-size: var(--text-lg); }
.know-more__copy .btn { margin-top: var(--space-2); }
@media (min-width: 768px) {
  .know-more__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-7); }
}

/* Cards ------------------------------------------------------------------ */
.cards { display: grid; gap: var(--space-5); }
.cards--2 { grid-template-columns: 1fr; }
.card {
  padding: var(--space-6);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card__icon {
  display: inline-flex; width: 52px; height: 52px; padding: 12px; margin-bottom: var(--space-4);
  border-radius: 14px; background: var(--blue-tint); color: var(--blue);
}
.card__title { font-size: 1.35rem; margin-bottom: var(--space-3); }
.card p { color: var(--muted); }
@media (min-width: 768px) {
  .cards--2 { grid-template-columns: repeat(2, 1fr); }
}

/* Split section ---------------------------------------------------------- */
.split { display: grid; gap: var(--space-6); align-items: center; }
.split__media { display: flex; justify-content: center; }
.split__media img { width: min(45%, 180px); filter: drop-shadow(0 20px 32px rgba(34, 68, 136, 0.25)); }
.split__copy p { color: var(--muted); }
.split__copy .btn { margin-top: var(--space-2); }
@media (min-width: 768px) {
  .split { grid-template-columns: 0.8fr 1.2fr; }
  .split__media img { width: min(60%, 220px); }
}

/* Contact strip ---------------------------------------------------------- */
.contact-strip {
  display: grid; gap: var(--space-5);
  padding: var(--space-6);
  background: var(--navy); color: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.contact-strip__item { display: flex; flex-direction: column; gap: var(--space-1); }
.contact-strip__label { font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.contact-strip a { color: var(--white); font-weight: 600; }
.contact-strip .btn--primary { justify-self: start; }
@media (min-width: 900px) {
  .contact-strip { grid-template-columns: repeat(4, 1fr) auto; align-items: start; }
  .contact-strip .btn--primary { justify-self: end; align-self: center; }
}

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--grey-dark); color: rgba(255, 255, 255, 0.78); }
.site-footer__grid { display: grid; gap: var(--space-6); padding-block: var(--space-7); }
.site-footer__title { font-size: 1.05rem; color: var(--white); margin-bottom: var(--space-3); }
.site-footer__text { color: rgba(255, 255, 255, 0.78); }
.site-footer__list li { padding-block: var(--space-1); }
.site-footer a { color: var(--white); font-weight: 500; }
.site-footer a:hover { color: #9ecbff; }
.site-footer__bottom {
  padding-block: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--text-sm); color: rgba(255, 255, 255, 0.55);
}
.site-footer__bottom p { margin: 0; }
@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 1.2fr 0.8fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { transition: none; }
}
