:root {
  color-scheme: light;
  --ink: #101820;
  --ink-soft: #324052;
  --paper: #f6f8fb;
  --white: #ffffff;
  --line: #d7dde5;
  --blue: #1b5f8c;
  --teal: #0f766e;
  --amber: #c66b24;
  --green: #7c9f35;
  --shadow: 0 18px 48px rgba(16, 24, 32, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px 32px;
  color: var(--white);
  background: rgba(16, 24, 32, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  background: var(--blue);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.nav {
  display: flex;
  gap: 22px;
  justify-content: center;
}

.nav a,
.header-link,
.site-footer a,
.text-link {
  text-decoration: none;
  font-weight: 700;
}

.nav a,
.header-link {
  font-size: 0.95rem;
}

.nav a:hover,
.header-link:hover,
.site-footer a:hover,
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background-image:
    linear-gradient(90deg, rgba(16, 24, 32, 0.96) 0%, rgba(16, 24, 32, 0.88) 45%, rgba(16, 24, 32, 0.38) 100%),
    url("/assets/gordon-brown-profile.jpg");
  background-size: cover;
  background-position: center right;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(180deg, rgba(246, 248, 251, 0), var(--paper));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 168px 0 150px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0b36f;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: 4.25rem;
  line-height: 0.98;
}

h2 {
  font-size: 2.55rem;
  line-height: 1.08;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.18rem;
  margin-bottom: 10px;
}

.hero-copy {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.24rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
}

.button.primary {
  color: var(--ink);
  background: var(--white);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.09);
}

.section-pad {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0;
}

.intro {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: center;
}

.intro-photo {
  width: 320px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--white);
}

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-copy p {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.metrics div,
.proof-item,
.work-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics div {
  padding: 20px;
}

.metrics strong,
.proof-item strong {
  display: block;
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
}

.metrics span,
.proof-item p,
.work-item p,
.system-row p {
  color: var(--ink-soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.work-item {
  overflow: hidden;
}

.work-item img {
  width: 100%;
  aspect-ratio: 4 / 1;
  object-fit: contain;
  background: var(--ink);
}

.work-content {
  padding: 24px;
}

.work-content.no-image {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.work-content.no-image::before {
  content: "";
  width: 52px;
  height: 8px;
  margin-bottom: 32px;
  background: var(--teal);
  border-radius: 8px;
}

.work-item:nth-child(3) .work-content.no-image::before {
  background: var(--green);
}

.text-link {
  display: inline-flex;
  margin-top: auto;
  color: var(--blue);
}

.systems {
  width: 100%;
  max-width: none;
  padding-left: max(24px, calc((100% - 1120px) / 2));
  padding-right: max(24px, calc((100% - 1120px) / 2));
  background: var(--ink);
  color: var(--white);
}

.systems .section-heading {
  margin-left: 0;
}

.systems-list {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.system-row {
  display: grid;
  grid-template-columns: 72px minmax(220px, 340px) 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.system-row span {
  color: #f0b36f;
  font-weight: 800;
}

.system-row p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.proof-item {
  min-height: 190px;
  padding: 24px;
}

.proof-item p {
  margin: 18px 0 0;
}

.links-band {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 32px;
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto 92px;
  padding: 40px;
  color: var(--white);
  background: var(--blue);
  border-radius: 8px;
}

.links-band .eyebrow {
  color: #f0d099;
}

.links-band h2 {
  margin-bottom: 0;
}

.link-list {
  display: grid;
  gap: 12px;
}

.link-list a {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 0 18px;
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
}

.link-list a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px;
  color: var(--white);
  background: var(--ink);
}

.site-footer p {
  margin-bottom: 0;
}

.simple-page {
  width: min(760px, calc(100% - 48px));
  min-height: 100vh;
  display: grid;
  align-content: center;
  margin: 0 auto;
}

.not-found {
  background: var(--paper);
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: 48px 1fr;
    padding: 10px 20px;
  }

  .nav {
    display: none;
  }

  .header-link {
    justify-self: end;
  }

  .hero {
    min-height: 680px;
    background-position: 68% center;
  }

  .hero-inner {
    width: min(100% - 36px, 760px);
    padding-bottom: 112px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .intro,
  .work-grid,
  .links-band {
    grid-template-columns: 1fr;
  }

  .intro-photo {
    width: min(320px, 100%);
  }

  .metrics,
  .proof-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .system-row {
    grid-template-columns: 56px 1fr;
  }

  .system-row p {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 64px;
  }

  .brand {
    width: 40px;
    height: 40px;
  }

  .hero {
    min-height: 740px;
    background-image:
      linear-gradient(180deg, rgba(16, 24, 32, 0.58) 0%, rgba(16, 24, 32, 0.92) 47%, rgba(16, 24, 32, 0.98) 100%),
      url("/assets/gordon-brown-profile.jpg");
    background-position: top center;
  }

  .hero-inner {
    padding-top: 260px;
    padding-bottom: 92px;
  }

  h1 {
    font-size: 2.32rem;
    line-height: 1.04;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero-copy {
    font-size: 1.04rem;
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .link-list a {
    width: 100%;
  }

  .section-pad {
    width: min(100% - 36px, 760px);
    padding: 68px 0;
  }

  .metrics,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .systems {
    padding-left: 18px;
    padding-right: 18px;
  }

  .system-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .system-row p {
    grid-column: auto;
  }

  .links-band {
    width: min(100% - 36px, 760px);
    padding: 28px;
  }
}
