/* =========================================================================
   Cumbred School of Motoring - clean rebuild (cumbredx.org)
   Tokens from brand.json (sky-blue #2ea3d2, navy #04052f, Inter + Lato, 1200px).
   Includes a lightweight compatibility layer for the scraped UIkit/YOOtheme
   utility classes so the original body markup lays out cleanly without
   shipping the full YOOtheme CSS.
   ========================================================================= */

:root {
  --brand: #2ea3d2;
  --brand-dark: #2589b4;
  --ink: #04052f;
  --ink-soft: rgba(4, 5, 47, 0.72);
  --ink-faint: rgba(4, 5, 47, 0.15);
  --white: #ffffff;
  --paper: #f4f8fb;
  --line: #e2eaf1;
  --accent: #fc1263;
  --green: #00d082;

  --font-head: "Inter", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;

  --container: 1200px;
  --gutter: 20px;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(4, 5, 47, 0.1);
  --shadow-sm: 0 2px 10px rgba(4, 5, 47, 0.07);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 1.4em; }
h3 { font-size: 1.35rem; margin-top: 1.2em; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img, picture, video, svg { max-width: 100%; height: auto; }
img { display: block; border-radius: var(--radius); }

ul, ol { padding-left: 1.3em; margin: 0 0 1.1em; }
li { margin-bottom: 0.4em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  background: var(--brand);
  color: var(--ink);
  padding: 0.2em 0.45em;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  align-self: center;
}
.brand-word { font-size: 1.25rem; letter-spacing: 0.01em; }
.brand-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.6);
  align-self: center;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--brand); }

.nav-toggle, .nav-toggle-btn { display: none; }

/* -------------------------------------------------------------------- hero */
.page-hero {
  background: linear-gradient(135deg, var(--ink) 0%, #0a0c52 100%);
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-bottom: 4px solid var(--brand);
}
.page-hero h1 { color: var(--white); margin: 0; }
.page--home .page-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-bottom-color: var(--ink);
}
.page--home .page-hero h1 { color: var(--white); }

/* -------------------------------------------------------------- page body */
.page-body { padding: clamp(2rem, 5vw, 3.5rem) var(--gutter); }
.page-body img { box-shadow: var(--shadow-sm); }

/* Constrain long-form article prose for readability, but let the richer
   builder pages (home + section pages) use the full width for their grids. */
.page--article .page-body { max-width: 820px; }

/* ============================================================ UIkit compat
   Minimal, modern reinterpretation of the utility classes present in the
   scraped body_html. Not a full UIkit port - just enough for clean layout. */

.uk-container { width: 100%; max-width: var(--container); margin-inline: auto; }
.page-body .uk-container { padding-inline: 0; }

.uk-section,
.uk-section-default,
.uk-section-muted,
.uk-section-primary { padding: clamp(1.5rem, 4vw, 2.75rem) 0; }
.uk-section-muted { background: var(--paper); border-radius: var(--radius); padding-inline: clamp(1rem, 3vw, 2rem); }
.uk-section-primary {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.uk-section-primary h1, .uk-section-primary h2, .uk-section-primary h3,
.uk-section-primary h4 { color: var(--white); }
.uk-section-primary a { color: var(--brand); }
/* On the dark section, the scraped text-colour utilities (which assume a light
   background) must flip to light so body copy stays legible on navy. */
.uk-section-primary,
.uk-section-primary p,
.uk-section-primary li,
.uk-section-primary .uk-text-emphasis,
.uk-section-primary .uk-text-lead,
.uk-section-primary .uk-text-large,
.uk-section-primary .uk-panel { color: rgba(255, 255, 255, 0.92); }
.uk-section-primary .uk-text-muted { color: rgba(255, 255, 255, 0.66); }
.uk-section-large { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.uk-position-relative { position: relative; }
.uk-position-cover { position: absolute; inset: 0; }

/* Grids: UIkit uk-grid is a flex row; uk-width-*@m set the column basis. */
.uk-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  align-items: flex-start;
}
.uk-grid-column-large { gap: clamp(1.5rem, 4vw, 3rem); }
.uk-flex-middle { align-items: center; }
.uk-grid-item-match { align-items: stretch; }

/* Column widths (flex-basis). @m/@s/@l suffixes all collapse to one scale;
   they already stack on narrow screens via the min() floor + wrap. */
[class*="uk-width-1-1"] { flex: 1 1 100%; }
[class*="uk-width-1-2"] { flex: 1 1 min(100%, calc(50% - 1.5rem)); }
[class*="uk-width-1-3"] { flex: 1 1 min(100%, calc(33.333% - 1.7rem)); }
[class*="uk-width-2-3"] { flex: 1 1 min(100%, calc(66.666% - 1.7rem)); }
[class*="uk-width-1-4"] { flex: 1 1 min(100%, calc(25% - 1.9rem)); }
[class*="uk-width-3-4"] { flex: 1 1 min(100%, calc(75% - 1.9rem)); }
[class*="uk-width-1-5"] { flex: 1 1 min(100%, calc(20% - 2rem)); }
[class*="uk-width-2-5"] { flex: 1 1 min(100%, calc(40% - 2rem)); }
[class*="uk-width-3-5"] { flex: 1 1 min(100%, calc(60% - 2rem)); }
[class*="uk-width-auto"] { flex: 0 1 auto; }
[class*="uk-width-expand"] { flex: 1 1 0; }

.uk-child-width-1-1 > * { flex-basis: 100%; }
.uk-child-width-1-2\@m > * { flex: 1 1 min(100%, calc(50% - 1.5rem)); }
.uk-child-width-1-3\@m > * { flex: 1 1 min(100%, calc(33.333% - 1.7rem)); }

/* Panels / cards */
.uk-panel { position: relative; }
.uk-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.uk-card-body { padding: 1.5rem; }
.uk-card-default { background: var(--white); }
.uk-card-primary { background: var(--brand); color: var(--ink); }
.uk-card-primary h1, .uk-card-primary h2, .uk-card-primary h3 { color: var(--ink); }

/* Spacing helpers */
.uk-margin, .uk-margin-top { margin-top: 1rem; }
.uk-margin-bottom { margin-bottom: 1rem; }
.uk-margin-large-top { margin-top: 2.5rem; }
.uk-margin-large-bottom { margin-bottom: 2.5rem; }
.uk-margin-medium-top { margin-top: 1.75rem; }
.uk-margin-medium-bottom { margin-bottom: 1.75rem; }
.uk-margin-small-top { margin-top: 0.5rem; }
.uk-margin-small-bottom { margin-bottom: 0.5rem; }
.uk-margin-remove-top { margin-top: 0; }
.uk-margin-remove-bottom { margin-bottom: 0; }
.uk-padding { padding: 1.75rem; }
.uk-padding-small { padding: 0.75rem; }

/* Text helpers */
.uk-text-center { text-align: center; }
.uk-text-right { text-align: right; }
.uk-text-left { text-align: left; }
.uk-text-lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); }
.uk-text-large { font-size: 1.2rem; }
.uk-text-small { font-size: 0.875rem; }
.uk-text-muted { color: var(--ink-soft); }
.uk-text-emphasis { color: var(--ink); }
.uk-text-primary { color: var(--brand-dark); }
.uk-text-bold, .uk-text-bolder { font-weight: 700; }
.uk-heading-medium { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.uk-heading-small { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
.uk-heading-large { font-size: clamp(2.4rem, 5.5vw, 3.4rem); }
.uk-font-secondary { font-family: var(--font-head); }

/* Buttons */
.uk-button {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.uk-button:hover { text-decoration: none; transform: translateY(-1px); }
.uk-button-primary { background: var(--brand); color: var(--ink); }
.uk-button-primary:hover { background: var(--brand-dark); color: var(--white); }
.uk-button-default { background: transparent; color: var(--ink); border-color: var(--ink-faint); }
.uk-button-default:hover { border-color: var(--brand); color: var(--brand-dark); }
.uk-button-secondary { background: var(--ink); color: var(--white); }

/* Lists / accordion / misc */
.uk-list > li { margin-bottom: 0.5rem; }
.uk-list-divider > li:not(:first-child) { border-top: 1px solid var(--line); padding-top: 0.5rem; }
.uk-accordion { list-style: none; padding: 0; }
.uk-accordion-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  display: block;
}
.uk-accordion-content { padding: 0.5rem 0 1rem; }

.uk-inline { position: relative; display: inline-block; max-width: 100%; }
.tm-mask-default, .el-image { border-radius: var(--radius); overflow: hidden; }
.uk-overlay {
  padding: 1.25rem;
  background: rgba(4, 5, 47, 0.6);
  color: var(--white);
}
.uk-flex { display: flex; }
.uk-flex-center { justify-content: center; }
.uk-visible\@m { }

/* Kill leftover UIkit spinners / toggles that need JS */
[uk-icon], .uk-icon { display: inline-block; }

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 3rem;
}
.site-footer h2 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}
.footer-brand-mark { margin-bottom: 1rem; }
.footer-brand p { color: rgba(255, 255, 255, 0.6); max-width: 40ch; }
.footer-links ul, .footer-partners { list-style: none; padding: 0; margin: 0; }
.footer-links li, .footer-partners li { margin-bottom: 0.55rem; }
.footer-links a, .footer-contact a, .footer-partners a { color: rgba(255, 255, 255, 0.75); }
.footer-links a:hover, .footer-contact a:hover, .footer-partners a:hover { color: var(--white); }
.footer-partners-heading { margin-top: 1.75rem; }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-base p { margin: 0; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .nav-toggle-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 6px;
  }
  .nav-toggle-btn span {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--white);
    transition: transform 0.2s, opacity 0.2s;
  }
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a { padding: 0.85rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-toggle:checked ~ .site-nav { max-height: 460px; }
}
