/* ==========================================================================
   Caledonian Software Solutions — design system
   Direction: polished tech-company look (ref: TechIT template kit).
   Navy + royal blue, white/light-grey alternating sections, rounded cards
   with soft shadows, Poppins headings, Inter body. Fonts self-hosted.
   ========================================================================== */

/* ---- Fonts (self-hosted, latin subsets) --------------------------------- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-500-latin.woff2") format("woff2");
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --navy: #0b1236;
  --navy-soft: #17204f;
  --blue: #2b4eff;
  --blue-dark: #1d3ad9;
  --blue-tint: #ebefff;
  --bg-alt: #f5f7fc;
  --text: #4d566e;
  --text-on-dark: #c3c9e4;
  --border: #e4e8f3;
  --error: #cc3a54;

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(11, 18, 54, 0.08);
  --shadow-lg: 0 18px 44px rgba(11, 18, 54, 0.12);
  --wrap: 72rem;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main {
  flex: 1;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 1rem;
  text-wrap: balance;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  letter-spacing: -0.02em;
}
h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.01em;
}
h3 {
  font-weight: 600;
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Utility ------------------------------------------------------------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 50;
}

.skip-link:focus {
  left: 0;
}

/* Eyebrow label above headings; also reused for small captions/counters. */
.label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
}

.label--muted {
  color: #8b93ad;
}

.prose {
  max-width: 44rem;
}

.prose p {
  margin-bottom: 1.15rem;
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
  background: #fff;
  box-shadow: 0 1px 0 var(--border), 0 6px 24px rgba(11, 18, 54, 0.04);
  position: relative;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.05rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 1.9rem;
  height: 1.9rem;
  flex-shrink: 0;
}

.wordmark:hover {
  color: var(--navy);
  text-decoration: none;
}

.wordmark .dot {
  color: var(--blue);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--navy);
  text-decoration: none;
  padding-block: 0.3rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--blue);
  text-decoration: none;
}

.site-nav .nav-cta {
  background: var(--blue);
  color: #fff;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-sm);
  transition: background-color 150ms ease;
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"] {
  background: var(--blue-dark);
  color: #fff;
}

.nav-toggle {
  display: none; /* shown only on small screens when JS is available */
  font: 500 0.9rem var(--font-body);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--navy);
  padding: 0.45rem 1rem;
  cursor: pointer;
}

@media (max-width: 47.99rem) {
  .js .nav-toggle {
    display: block;
  }
  .js .site-nav {
    display: none;
    width: 100%;
  }
  .js .site-nav.is-open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 0.5rem;
  }
  .site-nav li {
    border-top: 1px solid var(--border);
  }
  .site-nav a {
    display: block;
    padding-block: 0.85rem;
  }
  .site-nav .nav-cta {
    display: inline-block;
    margin-block: 0.75rem;
    text-align: center;
  }
}

/* ---- Hero (dark navy with geometric decoration) -------------------------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #101b57 60%, #16247a 100%);
  color: var(--text-on-dark);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* Large soft ring, upper right */
.hero::before {
  width: 34rem;
  height: 34rem;
  right: -10rem;
  top: -14rem;
  border: 3rem solid rgba(43, 78, 255, 0.18);
}

/* Small filled circle, lower left */
.hero::after {
  width: 11rem;
  height: 11rem;
  left: -4rem;
  bottom: -5rem;
  background: rgba(43, 78, 255, 0.22);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 9vw, 7.5rem);
  max-width: 46rem;
}

.hero .label {
  color: #93a5ff;
  margin-bottom: 0.9rem;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero .lede {
  font-size: 1.15rem;
  max-width: 36rem;
  margin-bottom: 2.25rem;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero__note {
  font-size: 0.85rem;
  color: #8f97c0;
}

/* Compact variant for inner pages */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #101b57 70%, #16247a 100%);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  width: 22rem;
  height: 22rem;
  right: -8rem;
  top: -12rem;
  border-radius: 50%;
  border: 2rem solid rgba(43, 78, 255, 0.16);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.page-hero .label {
  color: #93a5ff;
  margin-bottom: 0.6rem;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.page-hero p {
  max-width: 40rem;
  margin: 0;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block;
  font: 500 0.98rem var(--font-body);
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--blue);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease,
    transform 150ms ease;
}

.btn:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn--light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ---- Sections ------------------------------------------------------------ */
.section {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.section--alt {
  background: var(--bg-alt);
}

.section__head {
  max-width: 40rem;
  margin-bottom: 2.75rem;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head .label {
  margin-bottom: 0.6rem;
}

.section__head h2 {
  margin-bottom: 0.6rem;
}

.section__head p {
  margin: 0;
}

/* ---- Cards --------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.9rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 0.5rem;
}

.card__icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.card h3 {
  margin: 0;
}

.card h3 a {
  color: var(--navy);
}

.card h3 a:hover {
  color: var(--blue);
  text-decoration: none;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
}

.card .card__meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b93ad;
}

.card__more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-weight: 500;
  font-size: 0.92rem;
}

/* ---- CTA band ------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, #14205e 100%);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2.5rem, 6vw, 4rem);
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  width: 16rem;
  height: 16rem;
  right: -6rem;
  bottom: -8rem;
  border-radius: 50%;
  border: 1.6rem solid rgba(43, 78, 255, 0.25);
  pointer-events: none;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: var(--text-on-dark);
  max-width: 34rem;
}

.cta-band > * {
  position: relative;
  z-index: 1;
}

/* ---- Fact rows (company record, article lists) ---------------------------- */
.facts {
  margin: 0;
  max-width: 46rem;
}

.facts > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.facts > div:first-child {
  border-top: 1px solid var(--border);
}

.facts dt {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b93ad;
  padding-top: 0.25rem;
}

.facts dd {
  margin: 0;
  color: var(--navy);
}

.facts dd p {
  color: var(--text);
}

@media (max-width: 30rem) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* ---- Empty states ---------------------------------------------------------- */
.empty {
  background: #fff;
  border: 1px dashed #c6cde4;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  max-width: 44rem;
  text-align: center;
}

.empty .label {
  display: block;
  margin-bottom: 0.75rem;
}

.empty p {
  margin: 0 auto;
  max-width: 34rem;
}

/* ---- TODO marker — a visible, honest gap ----------------------------------- */
.todo {
  background: #fff;
  border: 1px dashed var(--error);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  max-width: 44rem;
  font-size: 0.95rem;
}

.todo .label {
  color: var(--error);
  display: block;
  margin-bottom: 0.3rem;
}

/* ---- Forms ------------------------------------------------------------------ */
.form {
  max-width: 38rem;
}

.form .field {
  margin-bottom: 1.4rem;
}

.form label {
  display: block;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 0.45rem;
}

.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--navy);
  background: #fff;
  border: 1px solid #ccd3e8;
  border-radius: var(--radius-sm);
  padding: 0.78rem 1rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form input:focus-visible,
.form textarea:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 78, 255, 0.18);
}

.form .errorlist,
.form .error {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  color: var(--error);
  font-size: 0.9rem;
}

.form .nonfield {
  background: #fdf1f3;
  border: 1px solid var(--error);
  border-radius: var(--radius-sm);
  color: var(--error);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.4rem;
}

.form .help {
  font-size: 0.85rem;
  color: #8b93ad;
  margin-top: 0.3rem;
}

/* Honeypot: removed from visual flow and the tab order, still in the DOM. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Article / meta ---------------------------------------------------------- */
.article-meta {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

/* ---- Pagination ---------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  font-weight: 500;
  font-size: 0.92rem;
}

/* ---- Footer (dark navy, columns + statutory disclosure) ----------------------- */
.site-footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  background: var(--navy);
  color: var(--text-on-dark);
  font-size: 0.95rem;
}

.site-footer a {
  color: #dfe3f6;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.6fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}

@media (max-width: 56rem) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 34rem) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand .wordmark {
  color: #fff;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  margin: 0;
  font-size: 0.92rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

/* Statutory trading disclosure — required on every page. */
.footer-legal {
  font-size: 0.88rem;
  line-height: 1.65;
}

.footer-legal strong {
  color: #fff;
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #8f97c0;
}

/* ---- Error pages ----------------------------------------------------------------- */
.error-page {
  padding-block: clamp(4rem, 12vw, 8rem);
}
