:root {
  color-scheme: light;
  --ink: #0a0a0a;
  --muted: #5f5f5f;
  --soft: #8c8c8c;
  --line: #d8d8d8;
  --paper: #f7f7f5;
  --panel: #ffffff;
  --panel-soft: #f3f3f1;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, Inter, system-ui, sans-serif;
  line-height: 1.5;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 28px;
  justify-content: flex-end;
  padding: 16px clamp(18px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  border-bottom: 1px solid rgba(10, 10, 10, 0.08);
  backdrop-filter: blur(18px);
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(14px, 2.6vw, 30px);
}

nav a,
.header-cta,
.menu-toggle {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

nav a {
  color: var(--muted);
}

nav a:hover {
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--panel);
}

.mobile-nav-cta,
.menu-toggle {
  display: none;
}

.menu-toggle {
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.hero {
  position: relative;
  display: grid;
  scroll-snap-align: start;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
  align-items: center;
  gap: clamp(34px, 7vw, 96px);
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 72px;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow,
.section-index {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 {
  max-width: 800px;
  margin-bottom: 24px;
  font-size: clamp(52px, 6.3vw, 76px);
  font-weight: 700;
  line-height: 0.96;
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-dark {
  background: var(--ink);
  color: var(--panel);
}

.button-light {
  background: transparent;
  color: var(--ink);
}

.hero-system {
  position: relative;
  justify-self: end;
  width: min(100%, 470px);
  aspect-ratio: 0.78;
  overflow: clip;
  background:
    linear-gradient(90deg, transparent 0, rgba(10, 10, 10, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0, rgba(10, 10, 10, 0.04) 1px, transparent 1px),
    var(--panel);
  background-size: 42px 42px;
  border: 1px solid rgba(10, 10, 10, 0.1);
  isolation: isolate;
}

.hero-system::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(247, 247, 245, 0.9), transparent 20%, transparent 80%, rgba(247, 247, 245, 0.86)),
    linear-gradient(90deg, rgba(247, 247, 245, 0.72), transparent 22%, transparent 78%, rgba(247, 247, 245, 0.72));
}

.hero-system canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 0;
  display: inline-flex;
  width: 24px;
  height: 54px;
  align-items: flex-start;
  justify-content: center;
  border-left: 1px solid var(--ink);
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 22px;
  margin-top: 30px;
  background: var(--ink);
}

.section {
  scroll-snap-align: start;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(84px, 11vw, 138px) 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.section-copy h2,
.contact-copy h2 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.06;
}

.section-copy p,
.contact-copy p,
.note {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.62;
}

.start-panel {
  grid-column: 2;
}

.start-copy {
  max-width: 850px;
}

.start-copy h2 {
  max-width: 850px;
  margin-bottom: 0;
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.06;
}

.method-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 52px);
  margin-top: clamp(52px, 7vw, 86px);
}

.method-timeline::before {
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--ink), var(--line));
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1000ms ease;
}

.is-visible .method-timeline::before {
  transform: scaleX(1);
}

.method-timeline article {
  position: relative;
  padding-top: 48px;
  transition: transform 180ms ease;
}

.method-timeline article:hover {
  transform: translateY(-3px);
}

.timeline-marker {
  position: absolute;
  top: 5px;
  left: 0;
  width: 19px;
  height: 19px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.timeline-marker::after {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
  transform: scale(0.7);
  transition: transform 180ms ease;
}

.method-timeline article:hover .timeline-marker::after {
  transform: scale(1);
}

.method-timeline span:not(.timeline-marker) {
  display: block;
  margin-bottom: 18px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.method-timeline p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.compact-grid {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.case-grid {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.team-grid {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.compact-grid article,
.case-grid article,
.team-grid article {
  position: relative;
  min-height: 220px;
  padding: clamp(22px, 3vw, 32px);
  background: var(--panel);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.compact-grid article:hover,
.case-grid article:hover,
.team-grid article:hover {
  z-index: 2;
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(10, 10, 10, 0.07);
}

.case-grid article {
  min-height: 430px;
}

.case-visual,
.case-modal-hero {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 0, rgba(10, 10, 10, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0, rgba(10, 10, 10, 0.045) 1px, transparent 1px),
    var(--panel-soft);
  background-size: 24px 24px;
}

.case-visual {
  height: 138px;
  margin-bottom: 26px;
}

.case-visual img,
.case-modal-hero img {
  display: block;
  width: min(78%, 360px);
  max-height: 72%;
  object-fit: contain;
}

.case-logo,
.case-modal-logo {
  width: fit-content;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.case-grid p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.case-grid h3 {
  min-height: 54px;
}

.case-link,
.case-close,
.case-external {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.case-link:hover,
.case-close:hover,
.case-external:hover {
  background: var(--ink);
  color: var(--panel);
}

.case-modal {
  width: min(860px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}

.case-modal::backdrop {
  background: rgba(10, 10, 10, 0.32);
  backdrop-filter: blur(8px);
}

.case-close {
  float: right;
  margin-bottom: 18px;
}

.case-modal-hero {
  clear: both;
  height: clamp(180px, 34vw, 300px);
  margin-bottom: 28px;
}

.case-modal-hero img {
  width: min(70%, 430px);
}

.case-modal h2 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.06;
}

.case-modal p {
  max-width: 740px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.case-outcomes {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px 28px;
  margin: 28px 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.case-outcomes span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.case-outcomes p {
  margin-bottom: 0;
}

.tool-icon {
  position: relative;
  width: 76px;
  height: 56px;
  margin-bottom: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 0, rgba(10, 10, 10, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0, rgba(10, 10, 10, 0.04) 1px, transparent 1px),
    var(--panel);
  background-size: 16px 16px;
}

.tool-icon::before,
.tool-icon::after {
  position: absolute;
  content: "";
}

.tool-icon::before {
  inset: 12px 14px;
  background:
    linear-gradient(90deg, transparent 0 16px, rgba(10, 10, 10, 0.28) 16px 17px, transparent 17px),
    linear-gradient(135deg, transparent 0 25px, rgba(10, 10, 10, 0.2) 25px 26px, transparent 26px),
    radial-gradient(circle at 0 5px, var(--ink) 0 2px, transparent 2.5px),
    radial-gradient(circle at 21px 5px, var(--ink) 0 2px, transparent 2.5px),
    radial-gradient(circle at 42px 24px, var(--ink) 0 2px, transparent 2.5px);
}

.tool-icon::after {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(10, 10, 10, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 16px rgba(10, 10, 10, 0.08);
  transition: transform 220ms ease;
}

.tool-icon-enquiry::after {
  top: 14px;
  left: 12px;
}

.tool-icon-document::before {
  transform: translate(7px, -1px) rotate(8deg);
}

.tool-icon-document::after {
  top: 21px;
  left: 32px;
}

.tool-icon-knowledge::before {
  transform: translate(0, 7px) scaleX(1.12);
}

.tool-icon-knowledge::after {
  top: 29px;
  left: 44px;
}

.tool-icon-reporting::before {
  transform: translate(11px, 3px) rotate(-10deg);
}

.tool-icon-reporting::after {
  top: 15px;
  left: 48px;
}

.tool-icon-admin::before {
  transform: translate(5px, 5px) rotate(4deg);
}

.tool-icon-admin::after {
  top: 28px;
  left: 19px;
}

.compact-grid article:hover .tool-icon::after {
  transform: translate(7px, 4px);
}

.team-grid article {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.team-photo {
  display: block;
  width: clamp(88px, 8vw, 104px);
  height: clamp(88px, 8vw, 104px);
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  filter: grayscale(1);
  transition: filter 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.team-photo-ali {
  object-position: center 30%;
}

.team-photo-kai {
  object-position: center 26%;
}

.team-photo-david {
  object-position: center 24%;
}

.team-grid article:hover .team-photo {
  border-color: var(--ink);
  filter: grayscale(0.25);
  transform: scale(1.03);
}

.team-role {
  margin: -6px 0 16px;
  color: var(--soft) !important;
  font-size: 12px !important;
  font-weight: 700;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(20px, 1.9vw, 23px);
  font-weight: 700;
  line-height: 1.15;
}

.compact-grid p,
.team-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.note {
  grid-column: 2;
  margin: 26px 0 0;
}

.contact-section {
  position: relative;
  min-height: 58svh;
  align-items: center;
  overflow: hidden;
  padding-top: clamp(72px, 9vw, 112px);
  padding-bottom: clamp(72px, 9vw, 112px);
}

.contact-page-section {
  position: relative;
  min-height: 100svh;
  align-items: center;
  overflow: hidden;
  padding-top: clamp(112px, 13vw, 170px);
  padding-bottom: clamp(80px, 10vw, 130px);
}

.contact-page-section h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.06;
}

.contact-copy {
  position: relative;
  z-index: 2;
}

.contact-copy .button {
  margin-top: 10px;
}

.contact-details {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.contact-details a {
  width: fit-content;
  border-bottom: 1px solid var(--ink);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.1;
}

.contact-form {
  position: relative;
  z-index: 2;
  grid-column: 2;
  display: grid;
  gap: 16px;
  width: min(100%, 560px);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: 0;
  padding: 10px 0;
}

.contact-form textarea {
  min-height: 124px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--ink);
}

.contact-form .button {
  width: fit-content;
  margin-top: 8px;
  cursor: pointer;
  font-family: inherit;
}

.hidden-field {
  display: none;
}

.footer-wordmark {
  position: absolute;
  right: -0.04em;
  bottom: -0.22em;
  z-index: 1;
  color: rgba(10, 10, 10, 0.035);
  font-size: clamp(110px, 24vw, 310px);
  font-weight: 700;
  line-height: 0.8;
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .compact-grid,
  .case-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  html {
    scroll-snap-type: none;
  }

  .site-header {
    gap: 16px;
    justify-content: flex-end;
    padding: 14px 18px;
  }

  nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 18px;
    display: grid;
    width: min(320px, calc(100vw - 36px));
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 96%, transparent);
    box-shadow: 0 18px 45px rgba(10, 10, 10, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
    backdrop-filter: blur(18px);
  }

  .site-header.menu-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  nav a {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
  }

  nav a:last-child {
    border-bottom: 0;
  }

  .mobile-nav-cta {
    display: flex;
    margin-top: 8px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--panel);
  }

  .header-cta {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .menu-toggle {
    display: inline-flex;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    width: min(100% - 32px, var(--max));
    padding-top: 104px;
  }

  .hero-system {
    justify-self: start;
    width: min(100%, 420px);
    aspect-ratio: 1.18;
  }

  .section {
    width: min(100% - 32px, var(--max));
    padding: 76px 0;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .start-panel,
  .compact-grid,
  .case-grid,
  .team-grid,
  .note,
  .contact-form {
    grid-column: auto;
  }

  .method-timeline {
    grid-template-columns: 1fr;
  }

  .method-timeline::before {
    top: 0;
    left: 9px;
    width: 1px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
  }

  .is-visible .method-timeline::before {
    transform: scaleY(1);
  }

  .method-timeline article {
    padding: 0 0 34px 42px;
  }

  .timeline-marker {
    top: 0;
    left: 0;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(42px, 12vw, 52px);
  }

  .hero-lede {
    font-size: 17px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .section-copy h2,
  .start-copy h2,
  .contact-page-section h1,
  .contact-copy h2 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .compact-grid,
  .case-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .compact-grid article,
  .case-grid article,
  .team-grid article {
    min-height: 0;
  }

  .case-visual {
    height: 118px;
  }

  .case-modal {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    padding: 22px;
  }

  .case-outcomes {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .team-photo {
    width: 88px;
    height: 88px;
  }

  .contact-form {
    padding: 20px;
  }

  .footer-wordmark {
    font-size: 104px;
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
