/* ==========================================================================
   BDR Group -- design system

   Palette and type are NOT invented: they are the brand's own values, read out
   of the live WordPress site's Astra/Elementor global tokens before it was
   retired (--ast-global-color-0..4, plus the roboto.css / rubik.css that
   Elementor was loading). Keeping them means this rebuild reads as the same
   company, not a redesign that erased it. Do not introduce a competing accent
   colour without checking first -- an invented palette on the sibling Imagine2D
   site was rejected by the client for exactly that reason.
   ========================================================================== */

:root {
  /* Brand, from the live site's own tokens. */
  --blue: #6695c5;          /* ast-global-color-0 -- primary */
  --plum: #a94c80;          /* ast-global-color-1 -- secondary accent */
  --navy: #091242;          /* ast-global-color-2 -- dark sections, headings */
  --slate: #334155;         /* ast-global-color-3 -- body text */
  --mist: #f0f5fa;          /* ast-global-color-4 -- light surface */
  --white: #ffffff;
  --line: #d1d5db;          /* ast-global-color-6 */

  /* Derived, for depth only -- not new brand colours. */
  --navy-soft: #16205c;
  --blue-deep: #4a7bb0;
  --blue-wash: rgba(102, 149, 197, 0.12);
  --plum-wash: rgba(169, 76, 128, 0.10);

  --ink: var(--navy);
  --body: var(--slate);
  --muted: #64748b;

  --font-head: "Rubik", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 3px rgba(9, 18, 66, 0.06), 0 1px 2px rgba(9, 18, 66, 0.04);
  --shadow: 0 10px 30px rgba(9, 18, 66, 0.08);
  --shadow-lg: 0 24px 60px rgba(9, 18, 66, 0.14);

  --step: clamp(56px, 8vw, 104px);   /* vertical section rhythm */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--step) 0; }
.section--mist { background: var(--mist); }
.section--navy {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
}
.section--navy h1,
.section--navy h2,
.section--navy h3 { color: var(--white); }

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  margin: 0 0 14px;
}
.section--navy .eyebrow { color: var(--blue); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}
.section--navy .lede { color: rgba(255, 255, 255, 0.72); }

.section-head { max-width: 68ch; margin-bottom: 48px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-deep); }
.btn--plum { background: var(--plum); color: var(--white); }
.btn--plum:hover { background: #93406e; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue-deep); }
.btn--on-navy { border-color: rgba(255, 255, 255, 0.35); color: var(--white); background: transparent; }
.btn--on-navy:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(9, 18, 66, 0.05);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
/* The logo file has no alpha channel -- it is flat white -- so it sits in a
   white pill rather than directly on any tinted surface. */
.brand img { height: 42px; width: auto; border-radius: 6px; background: var(--white); }
.brand span {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--slate);
  padding: 9px 14px;
  border-radius: 8px;
}
.nav a:hover { background: var(--blue-wash); color: var(--navy); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 500; background: var(--blue-wash); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--navy);
  margin: 4px 0;
  border-radius: 2px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: clamp(80px, 12vw, 150px) 0 clamp(72px, 10vw, 128px);
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Text must stay readable whether or not the video paints, so the scrim is on
   its own layer above the video and below the copy. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(9, 18, 66, 0.92) 0%, rgba(9, 18, 66, 0.72) 45%, rgba(9, 18, 66, 0.45) 100%),
    radial-gradient(120% 90% at 85% 15%, var(--plum-wash), transparent 60%);
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: var(--white); max-width: 20ch; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--blue) 0%, #9fc0e2 55%, var(--plum) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 56ch;
  margin-bottom: 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 26px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card__icon {
  width: 54px; height: 54px;
  margin-bottom: 18px;
  object-fit: contain;
}

/* Portfolio company card: the logos are flat-white assets, so each gets a
   white plate rather than sitting on the tinted section background. */
.company { display: flex; flex-direction: column; }
.company__plate {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  min-height: 84px;
  border: 1px solid var(--line);
}
.company__plate img { max-height: 46px; width: auto; }
.company__link {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--blue-deep);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.company__link::after { content: "\2192"; transition: transform 0.18s ease; }
.company:hover .company__link::after { transform: translateX(3px); }

/* ---------- split / media rows ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split--flip .split__media { order: 2; }

/* ---------- audience strip ---------- */
.pathways { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.pathway {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 28px;
  background: rgba(255, 255, 255, 0.04);
}
.pathway h3 { font-size: 1.2rem; margin-bottom: 8px; }
.pathway p { color: rgba(255, 255, 255, 0.7); font-size: 0.96rem; }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-soft) 60%, #2a1c52 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 68px);
  text-align: center;
}
.cta h2 { color: var(--white); }
.cta p { color: rgba(255, 255, 255, 0.75); max-width: 54ch; margin: 0 auto 28px; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-wash);
}
.field-note { font-size: 0.86rem; color: var(--muted); }

.form-message {
  display: none;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.form-message.show { display: block; }
.form-message.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-message.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.62);
  padding: 62px 0 30px;
  font-size: 0.94rem;
}
.site-footer a { color: rgba(255, 255, 255, 0.82); }
.site-footer h4 {
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- scroll reveal ----------
   The hidden state is scoped to .js-reveal, which an inline script in <head>
   adds ONLY when IntersectionObserver exists and reduced motion is not
   requested. Without that class these elements are simply visible.

   This matters: an unscoped `.reveal { opacity: 0 }` means any failure of the
   observer -- JS blocked, a syntax error earlier in the bundle, a zero-size
   viewport -- renders the whole page blank. Reveal animations must degrade to
   visible, never to invisible. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- long-form article + listing pages ---------- */
.prose { max-width: 74ch; }
.prose h3 {
  margin-top: 2.2em;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  color: var(--navy);
}
.prose h3:first-child { margin-top: 0; }
.prose > p:first-of-type { font-size: 1.1rem; color: var(--slate); }
.prose ul { padding-left: 1.15em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.55em; }
.prose li strong { color: var(--navy); }

/* A tinted rule under each section heading, so a long page still has rhythm
   without needing imagery it does not have. */
.prose h3::after {
  content: "";
  display: block;
  width: 46px; height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--plum));
}

.listing-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.listing-card__media { background: var(--mist); aspect-ratio: 16 / 9; overflow: hidden; }
.listing-card__media img { width: 100%; height: 100%; object-fit: cover; }
.listing-card__body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.listing-card__body h3 { font-size: 1.16rem; }
.listing-card__more {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--blue-deep);
}
.listing-card__more::after { content: " 92"; }

.article-meta {
  font-family: var(--font-head);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

/* Video embed: 16:9 without layout shift, whether it is an iframe or a
   self-hosted file. */
.embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.embed > iframe, .embed > video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.embed-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 28px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .nav {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; }
  .nav-toggle { display: block; }
  .split--flip .split__media { order: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
