:root {
  --paper: #f4f7f7;
  --ink: #1c2729;
  --muted: #586a6d;
  --teal: #3f9294;
  --teal-text: #2b6f71;
  --glow: #6fc0c2;
  --line: #d5dfdf;
  --gutter: clamp(1rem, 5vw, 4rem);
  --measure: 40rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-text); text-underline-offset: 0.2em; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

h2 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}
.skip:focus { top: 1rem; }

.top a:focus-visible, .hero a:focus-visible { outline-color: var(--glow); }

.missing { min-height: 60vh; }
.missing h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 4rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem var(--gutter);
  background: var(--ink);
}

.top-mark {
  color: var(--paper);
  text-decoration: none;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.top-mark span { color: var(--glow); position: relative; top: -0.35em; }

.top-link { color: var(--paper); font-weight: 500; }

main, .foot { padding: 0 var(--gutter); }

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  margin: 0 calc(-1 * var(--gutter));
  padding: clamp(2rem, 7vh, 5rem) var(--gutter) clamp(3rem, 9vh, 6rem);
  color: var(--paper);
  background:
    radial-gradient(40% 60% at 50% 40%, rgb(63 146 148 / 0.28), transparent 70%),
    var(--ink);
  overflow: hidden;
}

.wordmark {
  margin: 0;
  font-size: clamp(4.5rem, 19vw, 14rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  /* room for the raised z so it isn't clipped */
  padding-top: 0.3em;
}

.wordmark .z {
  position: relative;
  display: inline-block;
  margin: 0 0.02em;
  transform: translateY(-0.32em);
  /* The 3D z makes the entrance. The text glyph only shows if WebGL hasn't taken over by then. */
  color: transparent;
  animation: glyph-fallback 0s 2.5s forwards;
}


.lede {
  max-width: 34rem;
  margin: 2rem auto 0;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  color: #c3d2d3;
}

.cta {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  background: var(--glow);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms;
}
.cta:hover { background: var(--paper); animation: none; }

/* A small, occasional double-bounce draws the eye to the main action without nagging. */
@keyframes nudge {
  0%, 84%, 100% { transform: translateY(0); }
  88% { transform: translateY(-5px); }
  92% { transform: translateY(0); }
  95% { transform: translateY(-2px); }
}
.hero .cta { animation: nudge 6s ease-in-out 2.5s infinite; }
.cta:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

@media (min-width: 900px) {
  .hero .wordmark { font-size: clamp(5rem, 20vw, 22rem); }
}

.wordmark .z canvas {
  position: absolute;
  left: 50%;
  /* centres the canvas on the glyph (x-height), not the line box */
  top: 59%;
  width: 2.4em;
  height: 2.4em;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms;
}
.z-hit {
  position: absolute;
  left: 50%;
  top: 59%;
  width: 1.1em;
  height: 1.1em;
  transform: translate(-50%, -50%);
  cursor: grab;
  /* the z takes every drag direction; the hit area is small, so the page still scrolls elsewhere */
  touch-action: none;
}
.z-hit:active { cursor: grabbing; }
.wordmark .z.live { color: transparent; animation: none; }
@keyframes glyph-fallback { to { color: var(--glow); } }
.wordmark .z.live canvas { opacity: 1; }


.work, .contact {
  padding: clamp(3rem, 7vw, 5rem) 0 4rem;
}

.services {
  display: grid;
  gap: 1.75rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.services li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 2.25rem;
  align-items: center;
}
.services img {
  grid-row: span 2;
  /* renders have wide margins for the shadow; white multiplies away, so overlap is invisible */
  width: 135%;
  margin: -17% -25% -17% -10%;
  pointer-events: none;
  height: auto;
  /* rendered on white; multiply lets the page colour through */
  mix-blend-mode: multiply;
}
.services h3 { margin: 0; font-size: 1.25rem; font-weight: 600; align-self: end; }
.services p { margin: 0.25rem 0 0; color: var(--muted); align-self: start; max-width: 32rem; }

.approach {
  margin: 0 calc(-1 * var(--gutter));
  padding: clamp(3.5rem, 9vw, 6rem) var(--gutter);
  background: var(--ink);
  color: var(--paper);
  border-top: 0;
}
.approach h2 { color: #8fb3b4; }
.approach-where { margin: 0 0 3rem; color: #b5c4c6; }
.approach-lead {
  margin: 0 0 1rem;
  max-width: 22ch;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.steps {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 1px solid #3a4a4d; padding-top: 1.25rem; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  color: #6fc0c2;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}
.steps h3 { margin: 0 0 0.4rem; font-size: 1.15rem; font-weight: 600; }
.steps p { margin: 0; color: #b5c4c6; }

.contact { display: grid; gap: 2.5rem; }
.contact h2 {
  margin: 0;
  max-width: 14ch;
  color: var(--ink);
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.contact-side .or { margin-top: 1.25rem; }

@media (min-width: 760px) {
  .services { grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
  .services li { grid-template-columns: 7rem 1fr; column-gap: 3rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

@media (min-width: 900px) {
  .contact { grid-template-columns: 1fr 1fr; gap: 4rem; padding-top: 5rem; }
}

.form {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 1rem;
}

.form input, .form textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
}
.form input:focus-visible, .form textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}

.form button {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--teal-text);
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
}
.form button:disabled { opacity: 0.6; cursor: default; }
.form button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.form-status { margin: 0; min-height: 1.6em; color: var(--muted); }

.or { margin: 1.5rem 0 0; color: var(--muted); }

.social {
  display: flex;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.social a { color: var(--ink); }

.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta { transition: none; }
  .hero .cta { animation: none; }
}
