/*
 * The website's look (designs: docs/website-design/project). Colours and the font come only
 * as var(--name), set by the layout from config/brand.php (`website`): never a colour code here.
 * Sizes follow the designs: header 76 px, content 1200 px wide, buttons 44 px, corners 12 px.
 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-inverse);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Buttons: one kind here, primary (cobalt, white words). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.button--primary { background: var(--primary); color: var(--on-inverse); }
.button--primary:hover { background: var(--primary-dark); }

/* Store buttons */
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.store-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  height: 56px;
  padding: 0 22px;
  border-radius: 12px;
  line-height: 1.15;
  text-decoration: none;
}
.store-button__small { font-size: 11px; }
.store-button__name { font-size: 18px; font-weight: 700; }
.store-button--dark { background: var(--inverse); color: var(--on-inverse); }
.store-button--dark .store-button__small { color: var(--on-inverse-muted); }
.store-button--light { height: 52px; padding: 0 20px; background: var(--surface); color: var(--text); }
.store-button--light .store-button__small { color: var(--text-muted); }
.store-button--light .store-button__name { font-size: 17px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__bar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__logo { flex: none; }
.site-header__logo img { height: 36px; width: auto; }
.site-header__end { display: flex; align-items: center; gap: 36px; }
.site-header__nav { display: flex; align-items: center; gap: 28px; }
.site-header__nav a {
  display: inline-flex;
  align-items: center;
  height: 44px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.site-header__nav a:hover { color: var(--primary); }
.site-header__nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--primary);
}
.site-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.site-header__icon-close { display: none; }
.site-header__toggle[aria-expanded="true"] .site-header__icon-open { display: none; }
.site-header__toggle[aria-expanded="true"] .site-header__icon-close { display: block; }

.phone-menu {
  display: flex;
  flex-direction: column;
  padding: 4px clamp(20px, 4vw, 32px) 24px;
  border-top: 1px solid var(--line);
}
.phone-menu[hidden] { display: none; }
.phone-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}
.phone-menu__link svg { color: var(--text-muted); }
.phone-menu__link[aria-current="page"] { color: var(--primary); font-weight: 700; }
.phone-menu .store-buttons { margin-top: 20px; }

/* On a phone or a narrow window: the menu folds behind the button. */
@media (max-width: 1000px) {
  .site-header__end { gap: 8px; }
  .site-header__nav { display: none; }
  .site-header__cta { padding: 0 16px; font-size: 14px; }
  .site-header__toggle { display: inline-flex; }
}
@media (min-width: 1001px) {
  .phone-menu { display: none; }
}

/* A page's opening (until W3 and W4 bring the sections). */
.page-intro { padding-block: clamp(48px, 7vw, 96px); }
.page-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.page-intro p { margin: 0; max-width: 560px; color: var(--text-soft); font-size: clamp(18px, 1.5vw, 21px); }

/* Footer */
.site-footer { background: var(--inverse); color: var(--on-inverse-muted); }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: clamp(48px, 4.5vw, 64px);
  padding-bottom: 32px;
}
.site-footer__top { display: flex; flex-wrap: wrap; gap: 48px 64px; }
.site-footer__brand { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.site-footer__brand img { height: 52px; width: auto; align-self: flex-start; }
.site-footer__brand p { margin: 0; max-width: 320px; font-size: 16px; line-height: 1.6; }
.site-footer__columns {
  flex: 2 1 460px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
}
.site-footer__columns h2 {
  margin: 0 0 14px;
  color: var(--on-inverse);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer__columns ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-footer__columns a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--on-inverse-muted);
  font-size: 15px;
  text-decoration: none;
}
.site-footer__columns a:hover { color: var(--on-inverse); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--on-inverse-rule);
}
.site-footer__bottom p { margin: 0; font-size: 14px; line-height: 1.5; }
.site-footer__bottom a { color: var(--on-inverse); text-decoration: none; }
.site-footer__social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer__social a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--on-inverse-line);
  color: var(--on-inverse);
  font-size: 13px;
  font-weight: 500;
}
.site-footer__canada { display: inline-flex; align-items: center; gap: 8px; color: var(--on-inverse); font-weight: 500; }
.site-footer__canada img { width: 18px; height: 18px; }
