/* ==========================================================================
   Althem Group — design system
   Derived from design/handoff-marca-althem-lumia (brand handoff, 2026-09-11).
   Tokens here are the single source of truth for every Althem page.
   ========================================================================== */

:root {
  /* Brand */
  --navy: #0A2540;
  --lumia: #173E85;
  --lumia-hover: #0F2C5E;

  /* Ink */
  --ink: #14181F;
  --ink-2: #5A6472;
  /* The brand sheet's tertiary ink is #8A93A2, which lands at 3.1:1 on white and
     2.8:1 on surface-2 — below AA for the small text it is used on. Darkened
     along the same hue to clear 4.5:1 on every light surface. The original is
     kept for non-text use such as rules and icons. */
  --ink-3: #686E7A;
  --ink-3-decor: #8A93A2;

  /* Surfaces */
  --canvas: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F1F3F6;

  /* Lines */
  --border: #E6E9EE;
  --border-strong: #D3D8E0;

  /* Type */
  --font-display: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Radii */
  --r-btn: 6px;
  --r-card: 12px;
  --r-card-lg: 14px;

  /* Layout */
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Elevation, tinted with navy rather than flat black */
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(10, 37, 64, 0.07), 0 2px 4px -2px rgba(10, 37, 64, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(10, 37, 64, 0.08), 0 4px 6px -4px rgba(10, 37, 64, 0.04);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--r-btn) 0;
}
.skip-link:focus { left: 0; color: #fff; }

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

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(40px, 6vw, 56px); }
.section--canvas { background: var(--canvas); border-top: 1px solid var(--border); }
.section--navy { background: var(--navy); color: #fff; }

/* ---------- Brand mark & logotype ---------- */

.mark { display: block; flex-shrink: 0; }

.logotype {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--navy);
  white-space: nowrap;
}
.logotype:hover { color: var(--navy); }
.logotype .mark { width: 1.05em; height: 1.05em; margin: 0 0.03em; }

.logotype--header { font-size: 19px; }
.logotype--footer { font-size: 17px; }
.logotype--invert, .logotype--invert:hover { color: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__bar {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 32px);
  font-size: 14.5px;
}

/* `:not(.btn)` matters: a bare `.site-nav a` outranks `.btn--primary` on
   specificity and would paint the navy CTA's label in grey body colour,
   landing at 2.6:1 against its own background. */
.site-nav a:not(.btn) {
  color: var(--ink-2);
  transition: color 160ms var(--ease);
}
.site-nav a:not(.btn):hover { color: var(--navy); }
/* Never recolour the nav CTA: it is a navy button, so the navy current-page
   colour would render its label invisible. */
.site-nav a[aria-current="page"]:not(.btn) { color: var(--navy); font-weight: 600; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.lang-toggle:hover { border-color: var(--navy); color: var(--navy); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-btn);
  color: var(--navy);
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease),
              border-color 180ms var(--ease), transform 180ms var(--spring);
}
.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: #071B2F; color: #fff; }

.btn--ghost { border-color: var(--border-strong); color: var(--navy); background: transparent; }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); background: var(--surface-2); }

.btn--invert { background: #fff; color: var(--navy); }
.btn--invert:hover { background: #EDF1F6; color: var(--navy); }

.btn--lumia { background: var(--lumia); color: #fff; }
.btn--lumia:hover { background: var(--lumia-hover); color: #fff; }

.btn--sm { min-height: 40px; padding: 11px 20px; font-size: 14px; }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 28px;
}

.h1, h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0 0 32px;
  text-wrap: pretty;
}

.h2, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 16px;
  text-wrap: pretty;
}

.h3, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 12px;
}

.lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 44px;
  max-width: 680px;
  text-wrap: pretty;
}

p { color: var(--ink-2); }
.section--navy p, .section--navy .h2, .section--navy h2 { color: #fff; }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* A bare minmax(Npx, 1fr) track cannot shrink below N, so at 320px the gutters
   push the row wider than the viewport. min(Npx, 100%) lets it collapse. */
/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: clamp(24px, 3vw, 32px);
}

.card--feature { border-radius: var(--r-card-lg); padding: clamp(28px, 4vw, 48px); }

.card--link { transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.grid { display: grid; gap: clamp(20px, 3vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid--split { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: clamp(32px, 4vw, 56px); align-items: center; }

.shot {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.shot img { display: block; width: 100%; height: auto; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: clamp(40px, 5vw, 56px) 0 32px;
}

.site-footer__cols {
  display: grid;
  /* Explicit tracks: auto-fit leaves a trailing zero-width track that still
     consumes a gap, pulling the last column short of the right edge. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

@media (max-width: 900px) {
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

.site-footer__col { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

.site-footer h2 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 4px;
}

/* Exclude the logotype: a bare `.site-footer a` outranks `.logotype--footer`
   on specificity and would render the footer mark as small grey body text. */
.site-footer a:not(.logotype) { font-size: 14.5px; color: var(--ink-2); }
.site-footer a:not(.logotype):hover { color: var(--navy); }

.site-footer__base {
  margin-top: clamp(32px, 4vw, 44px);
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-3);
}

/* The legal links sit on one short line, so they need explicit vertical padding
   to reach a usable touch target. The reduced padding-top above absorbs it. */
.site-footer__base a {
  display: inline-block;
  padding-block: 12px;
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 8px var(--gutter) 20px;
  }
  .site-nav[data-open="true"] { display: flex; }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .site-nav .btn { margin-top: 16px; width: 100%; }
  .site-nav .lang-toggle { margin-top: 16px; align-self: flex-start; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .btn { width: 100%; }
  .btn-row .btn { width: auto; flex: 1 1 auto; }
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
