/* ==========================================================================
   Jumoo brand for checkout.jumoo.co.uk
   Tokens, header, footer and page head copied from simple-site
   (src/assets/css/site.css), the jumoo.co.uk design system. The pages under
   them are still Bootstrap (3 for the checkout, 5 for quote acceptance), so
   the rest of this file restyles Bootstrap's pieces with the same tokens.
   Light only: simple-site's dark theme needs its footer toggle, and the
   checkout doesn't carry it.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/barlow-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/barlow-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow", var(--font-body);
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.83rem, 0.81rem + 0.1vw, 0.89rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.42rem);
  --step-2: clamp(1.44rem, 1.32rem + 0.6vw, 1.8rem);
  --step-3: clamp(1.73rem, 1.53rem + 1vw, 2.27rem);
  --step-4: clamp(2.07rem, 1.75rem + 1.6vw, 2.86rem);

  --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: 4rem;
  --space-9: 6rem;

  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1140px;

  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #101a28;
  --ink-2: #46536a;
  --ink-3: #6c7a91;
  --line: #dde3ec;
  --accent: #2f6fe4;
  --accent-ink: #1c4899;
  --accent-wash: #eaf1fe;
  --buy: #2e7d4f;
  --buy-ink: #1f5c39;
  --buy-wash: #e9f5ee;
  --warn-wash: #fdf4e3;
  --warn-line: #e9d9ae;
  --orange: #e8590c;
  --orange-ink: #b4460f;
  --orange-wash: #fdefe6;

  --shadow: 0 1px 2px rgba(16, 26, 40, 0.06), 0 8px 24px -12px rgba(16, 26, 40, 0.18);
  --shadow-lg: 0 2px 4px rgba(16, 26, 40, 0.06), 0 24px 48px -20px rgba(16, 26, 40, 0.28);
}

/* --- Elements ------------------------------------------------------------- */

/* Bootstrap 3 sets html to 10px; the tokens above are in rem. Bootstrap's own
   components size in px, so restoring 16px doesn't move them. */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding-block: var(--space-7) var(--space-8);
}

h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4, .h5 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

h2, .h2 { font-size: var(--step-3); }
h3, .h3 { font-size: var(--step-1); }
h4, .h4 { font-size: var(--step-0); font-weight: 600; }

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
}

code {
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 5px;
}

hr {
  border-top-color: var(--line);
}

.lead {
  font-size: var(--step-1);
  color: var(--ink-2);
}

.text-muted {
  color: var(--ink-3) !important;
}

/* --- Utilities ------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.muted {
  color: var(--ink-3);
  font-size: var(--step--1);
}

.plain {
  list-style: none;
  padding: 0;
}

.plain li {
  margin-bottom: var(--space-2);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  color: #fff;
}

/* --- Header / nav --------------------------------------------------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  color: var(--accent-ink);
  text-decoration: none;
  line-height: 1;
}

.wordmark__svg {
  display: block;
  height: 2.6rem;
  width: auto;
}

.wordmark:hover,
.wordmark:focus {
  color: var(--accent);
}

.wordmark--footer {
  display: inline-block;
  margin-bottom: var(--space-3);
}

.site-nav ul {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  display: inline-block;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--ink);
  text-decoration: none;
}

/* CSS-only mobile nav: checkbox toggles, no JavaScript. */
.nav-toggle,
.nav-toggle__label {
  display: none;
}

@media (max-width: 800px) {
  .nav-toggle__label {
    display: block;
    cursor: pointer;
    padding: var(--space-3);
    margin: 0 calc(-1 * var(--space-3)) 0 0;
  }

  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    content: "";
  }

  .nav-toggle__bars::before {
    transform: translateY(-7px);
  }

  .nav-toggle__bars::after {
    transform: translateY(5px);
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
  }

  .nav-toggle:checked ~ .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding-bottom: var(--space-4);
  }

  .site-nav li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    padding: var(--space-3) 0;
    border-bottom: 0;
    font-size: var(--step-0);
    text-transform: none;
  }
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: var(--space-8) var(--space-6);
  font-size: var(--step--1);
}

.site-footer__cols {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.site-footer h2 {
  font-size: var(--step--1);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: 0 0 var(--space-4);
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer__legal {
  margin: var(--space-8) 0 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.site-footer__legal p {
  margin: 0;
}

/* --- Bootstrap: buttons --------------------------------------------------- */

.btn {
  font-family: var(--font-head);
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 1.125rem;
  padding: 0.7em 1.4em;
  border-radius: var(--radius);
}

.btn-primary,
.btn-info {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-info:hover,
.btn-info:focus,
.btn-info:active {
  background: var(--accent-ink) !important;
  border-color: var(--accent-ink) !important;
  color: #fff;
}

.btn-success {
  background: var(--buy);
  border-color: var(--buy);
  color: #fff;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background: var(--buy-ink) !important;
  border-color: var(--buy-ink) !important;
  color: #fff;
}

.btn-default,
.btn-outline-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-default:hover,
.btn-default:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Bootstrap: forms ----------------------------------------------------- */

label,
.form-label,
.control-label {
  font-family: var(--font-head);
  font-weight: 600;
}

.form-control,
.form-select {
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.input-lg {
  font-size: 1rem;
}

/* --- Bootstrap: cards, panels, tables, alerts ------------------------------ */

.card,
.panel,
.well {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.card-header,
.panel-heading {
  font-family: var(--font-head);
  border-color: var(--line);
}

.card-header:first-child {
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
}

.table > thead > tr > th,
.table th {
  font-family: var(--font-head);
  font-weight: 600;
}

.table > :not(caption) > * > *,
.table > tbody > tr > td,
.table > thead > tr > th {
  border-color: var(--line);
}

.alert {
  border-radius: var(--radius);
}

.alert-info {
  background: var(--accent-wash);
  border-color: var(--line);
  color: var(--ink);
}

.alert-warning {
  background: var(--warn-wash);
  border-color: var(--warn-line);
  color: var(--ink);
}

.alert-success {
  background: var(--buy-wash);
  border-color: var(--buy);
  color: var(--buy-ink);
}

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }
}
