:root {
  --navy: #353375;
  --navy-dark: #25235a;
  --accent: #e8590c;
  --bg: #f4f5fa;
  --line: #e3e4ee;
  --ink: #1d1f2b;
  --muted: #5b5f73;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(37, 35, 90, .05), 0 8px 24px rgba(37, 35, 90, .06);
  --wrap: 1120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

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

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--navy-dark);
}

p {
  margin: 0 0 1em;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--navy);
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

strong {
  color: inherit;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow);
  transition: top .15s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--navy);
}

/* Header and navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  height: 56px;
  width: auto;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.menu-toggle:hover {
  border-color: var(--navy);
}

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.menu-toggle-icon {
  position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-icon::before {
  top: -6px;
}

.menu-toggle-icon::after {
  top: 6px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 8px 2px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--navy);
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current] {
  color: var(--navy);
  border-bottom-color: var(--accent);
}

/* Hero (home page) */

.hero {
  position: relative;
  padding: 92px 0 100px;
  color: var(--white);
  background-color: var(--navy-dark);
  background-image:
    linear-gradient(135deg, rgba(37, 35, 90, .88), rgba(37, 35, 90, .68)),
    url("/assets/img/home/hero.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffd8c2;
}

.hero h1 {
  max-width: 20ch;
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.12;
  color: var(--white);
}

.lead {
  max-width: 62ch;
  margin: 0 0 30px;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: #ececf7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 7px;
}

.btn:hover,
.btn:focus-visible {
  color: var(--white);
  filter: brightness(1.08);
}

.btn--ghost {
  color: var(--white);
  background: transparent;
  border-color: var(--white);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--navy-dark);
  background: var(--white);
  filter: none;
}

/* Inner page band and breadcrumb */

.page-band {
  padding: 52px 0 46px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
}

.page-band h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  color: #cbccdf;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: #a9abd0;
}

.breadcrumb a {
  color: var(--white);
  text-decoration-color: rgba(255, 255, 255, .45);
}

.breadcrumb a:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

.breadcrumb [aria-current="page"] {
  color: #e4e4f2;
}

/* Sections and layouts */

section {
  padding: 64px 0;
}

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

.section-tight {
  padding: 40px 0;
}

.section-cta {
  padding: 0 0 72px;
}

.intro {
  max-width: 72ch;
}

/* When .intro is combined with .wrap, the container itself must keep the
   shared container width (otherwise its own max-width narrows it and its
   `margin: 0 auto` from .wrap centres the whole block — the section then
   starts further right than every other section). Constrain the content
   inside instead, so headings and paragraphs share the same left edge. */
.wrap.intro {
  max-width: var(--wrap);
}

.wrap.intro > * {
  max-width: 72ch;
}

.intro p {
  color: var(--muted);
}

.lead-in {
  max-width: 68ch;
  margin: 0 0 32px;
  font-size: 1.1rem;
  color: var(--muted);
}

.cols {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.split {
  display: grid;
  gap: 32px;
  align-items: center;
}

.split > * {
  min-width: 0;
}

.split-media img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (min-width: 780px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
  }

  .split--media-left .split-media {
    order: -1;
  }
}

/* Cards */

.cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  height: auto;
  border-bottom: 1px solid var(--line);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
}

.card-body p {
  margin: 0;
  color: var(--muted);
}

.card-link {
  margin-top: auto;
  padding-top: 4px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.card-link:hover,
.card-link:focus-visible {
  color: var(--navy);
  text-decoration: underline;
}

.cards--plain .card {
  border-top: 4px solid var(--navy);
}

.cards--plain .card-body {
  padding: 20px 22px;
}

.cards--plain h3 {
  margin: 0;
}

/* Lists */

.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullets li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 22px;
}

.bullets li:last-child {
  margin-bottom: 0;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.numbered {
  counter-reset: item;
  margin: 0;
  padding: 0;
  list-style: none;
}

.numbered li {
  position: relative;
  min-height: 36px;
  margin-bottom: 18px;
  padding-left: 52px;
  counter-increment: item;
}

.numbered li:last-child {
  margin-bottom: 0;
}

.numbered li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
  border-radius: 50%;
}

.plain {
  margin: 0;
  padding-left: 1.2em;
}

.plain li {
  margin-bottom: 8px;
}

/* Figures */

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

figcaption {
  margin-top: 8px;
  font-size: .88rem;
  color: var(--muted);
}

/* Brand logos */

.brand-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-grid li {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand-grid img {
  display: block;
  width: 100%;
  max-width: 160px;
  height: auto;
}

.brand-grid .brand-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
}

/* Call to action strip */

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 40px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  border-radius: 12px;
}

.cta-strip h2 {
  margin: 0 0 6px;
  color: var(--white);
}

.cta-strip p {
  margin: 0;
  color: #e2e3f1;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
}

th {
  color: var(--navy);
  background: var(--bg);
}

/* Footer */

.site-footer {
  padding-top: 52px;
  font-size: .94rem;
  color: #d9daef;
  background: var(--navy-dark);
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  padding-bottom: 36px;
}

.footer-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: var(--white);
}

.site-footer a {
  color: #ececf8;
  text-decoration-color: rgba(236, 236, 248, .4);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--white);
  text-decoration-color: var(--white);
}

.footer-links {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col p {
  margin: 0 0 10px;
}

address {
  font-style: normal;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 18px 24px;
  font-size: .88rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
}

.footer-bottom p {
  margin: 0;
}

/* Mobile navigation */

@media (max-width: 800px) {
  html {
    scroll-padding-top: 80px;
  }

  .site-header .bar {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand img {
    height: 46px;
  }

  .menu-toggle {
    display: none;
  }

  html.js .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    order: 3;
    width: 100%;
    padding: 6px 0 4px;
    border-top: 1px solid var(--line);
  }

  html.js .site-nav:not(.is-open) {
    display: none;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 11px 4px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:hover,
  .site-nav a[aria-current] {
    border-bottom-color: var(--line);
  }

  .site-nav a[aria-current] {
    color: var(--accent);
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .hero {
    padding: 64px 0 72px;
  }

  section {
    padding: 44px 0;
  }

  .section-cta {
    padding: 0 0 52px;
  }

  .cta-strip {
    padding: 28px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Stage 2 additions */

.intro--body p {
  color: var(--ink);
}

.other-projects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.other-projects h2 {
  margin-bottom: 12px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-row a {
  font-weight: 600;
}

/* Gallery */

.gallery-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-grid a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.gallery-grid a:hover img {
  border-color: var(--navy);
}

.gallery-grid figcaption {
  margin-top: 10px;
  font-weight: 700;
  color: var(--navy);
}

/* Content flow */

h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--navy);
}

p + h2,
ul + h2,
ol + h2 {
  margin-top: 48px;
}

.bullets + h3,
.plain + h3,
.numbered + h3,
p + h3 {
  margin-top: 30px;
}

.bullets + p,
.plain + p,
.numbered + p {
  margin-top: 20px;
}

/* Legal pages */

.legal > .wrap > h2 {
  margin-top: 40px;
}

.legal > .wrap > h2:first-of-type {
  margin-top: 32px;
}

.legal h3 {
  margin-top: 26px;
}

.legal h4 {
  margin-top: 20px;
}

.legal > .wrap > p:first-child {
  max-width: 80ch;
}

.legal .bullets {
  max-width: 80ch;
  margin-top: 12px;
}

/* Contact page */

.contact-grid {
  display: grid;
  gap: 36px;
}

.contact-grid > * {
  min-width: 0;
}

@media (min-width: 780px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 48px;
    align-items: start;
  }
}

.contact-form {
  margin-top: 24px;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--navy);
}

.form-field input,
.form-field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #b9bbcd;
  border-radius: 7px;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: var(--muted);
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--navy);
}

.contact-form .btn {
  font: inherit;
  cursor: pointer;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  color: #0f5132;
  background: #d1e7dd;
  border-color: #a3cfbb;
}

.form-status.is-error {
  color: #842029;
  background: #f8d7da;
  border-color: #f1aeb5;
}

.contact-card {
  padding: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-details p {
  margin: 0 0 16px;
}

.contact-details p:last-child {
  margin-bottom: 0;
}

.contact-details a {
  overflow-wrap: anywhere;
}

.contact-card > p:last-child {
  margin: 24px 0 0;
}

@media (max-width: 640px) {
  .contact-card {
    padding: 22px;
  }
}

/* Stage 4 additions */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 8px 16px;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.profile-link {
  margin: 20px 0 0;
  font-weight: 700;
}

.profile-link a {
  color: var(--accent);
}

.card-band {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  border-bottom: 1px solid var(--line);
}

.wide-media {
  margin: 0 0 28px;
}

.wide-media:last-child {
  margin-bottom: 0;
}

.section-gap {
  margin-top: 0;
}

.page-band .status-badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy-dark);
  background: #ffd8c2;
  border-radius: 999px;
}
