@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --chalk: #F9FAF9;
  --slate: #181A1B;
  --moss: #2D4B43;
  --mist: #E3EAE7;
  --steel: #8A9490;
  --line: color-mix(in srgb, var(--steel) 45%, var(--chalk));
  /* Functional colour for form errors only; not part of the brand palette. */
  --error: #A12B22;
  --gutter: clamp(20px, 5vw, 72px);
  --gap: 24px;
  --section: clamp(96px, 11vw, 168px);
  --header: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

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

html {
  background: var(--chalk);
  color: var(--slate);
  font-family: "Albert Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  overflow-x: clip;
}

::selection {
  background: var(--moss);
  color: var(--chalk);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color 160ms var(--ease-out), text-decoration-color 160ms var(--ease-out);
}

a:hover {
  color: var(--moss);
}

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--slate);
  color: var(--chalk);
  border-radius: 4px;
}

.skip:focus {
  top: 12px;
}

.skip:hover {
  color: var(--chalk);
}

/* Header */

.site-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "brand langs"
    "nav nav";
  align-items: center;
  row-gap: 8px;
  padding: max(16px, env(safe-area-inset-top)) var(--gutter) 0;
}

.brand {
  grid-area: brand;
  display: block;
  width: fit-content;
}

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

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
}

.nav a,
.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  white-space: nowrap;
  text-decoration: none;
}

.nav a:hover,
.langs a:hover {
  text-decoration: underline;
}

.langs {
  grid-area: langs;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.langs span {
  color: var(--slate);
}

.langs a[aria-current] {
  font-weight: 600;
}

/* Hero: the mark sits in the top-right corner with its apex in view, cropped by the right edge. */

.hero {
  --drop: min(52vw, 280px);
  position: relative;
  padding: calc(var(--drop) * 1.207 + 8px) var(--gutter) 0;
}

.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.drop {
  position: absolute;
  top: 24px;
  right: calc(var(--drop) * -0.22);
  width: var(--drop);
  height: auto;
  user-select: none;
}

.hero-copy {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 28px;
}

h1 {
  max-width: 16ch;
  font-size: clamp(34px, 12vw, 96px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-text {
  max-width: 34ch;
  font-size: clamp(19px, 4.6vw, 24px);
  line-height: 1.4;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--moss);
  color: var(--chalk);
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.button:hover {
  background: var(--slate);
  color: var(--chalk);
}

.button:active {
  transform: scale(0.97);
}

.button[aria-disabled="true"],
.button[aria-disabled="true"]:hover {
  background: var(--slate);
  cursor: progress;
}

/* Sections: a hairline, the heading in the left column, the content on the right. */

.section {
  display: grid;
  gap: 28px;
  margin: var(--section) var(--gutter) 0;
  padding-top: 28px;
  border-top: 1px solid var(--line); /* taste-skill-ignore: hairline section dividers are in the owner's brief */
  scroll-margin-top: 24px;
}

.hero + .section {
  margin-top: clamp(48px, 6vw, 96px);
}

h2 {
  font-size: clamp(28px, 7.4vw, 34px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.services {
  display: grid;
  row-gap: 32px;
}

.service {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line); /* taste-skill-ignore: hairline dividers are in the owner's brief */
}

.service:first-child {
  padding-top: 0;
  border-top: 0;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 40px;
}

.step {
  counter-increment: step;
  display: grid;
  align-content: start;
  gap: 8px;
}

.step::before {
  content: counter(step);
  margin-bottom: 8px;
  color: var(--moss);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums;
}

.statement {
  max-width: 30ch;
  font-size: clamp(24px, 5.6vw, 36px);
  line-height: 1.32;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

/* Contact */

.contact .section-body {
  display: grid;
  gap: 56px;
}

.contact-intro {
  display: grid;
  gap: 32px;
}

.direct-label {
  font-size: 15px;
  color: var(--moss);
}

.direct-links {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
}

.direct-links a {
  width: fit-content;
}

/* The form needs the client script (Turnstile, states); without it the direct email and phone remain. */
.enquiry {
  display: none;
  gap: 20px;
}

.js .enquiry {
  display: grid;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 15px;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--moss);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--mist);
  color: var(--slate);
  font: inherit;
  font-size: 17px;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}

.field select {
  appearance: none;
  padding-right: 48px;
  background-image: url("/chevron.svg");
  background-position: calc(100% - 18px) 50%;
  background-size: 12px 8px;
  background-repeat: no-repeat;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

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

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 0;
  background: var(--chalk);
}

.field [aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  font-size: 15px;
  color: var(--error);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px; /* taste-skill-ignore: offscreen honeypot field, not a rule */
  overflow: hidden;
}

.form-end {
  display: grid;
  justify-items: start;
  gap: 20px;
  margin-top: 8px;
}

.turnstile {
  width: 100%;
  max-width: 400px;
}

.turnstile:empty {
  display: none;
}

.form-status {
  font-size: 18px;
  font-weight: 600;
}

/* Focus lands here from script only, to announce the result; it is not a control, so no ring. */
.form-status:focus {
  outline: none;
}

/* Stays in the page while empty so screen readers announce it; out of the grid flow, it takes no row. */
.form-status:empty {
  position: absolute;
}

.form-status[data-kind="success"] {
  color: var(--moss);
}

.form-status[data-kind="error"],
.form-status[data-kind="invalid"] {
  color: var(--error);
}

/* Footer: the legal details, then the name at full width. */

.site-footer {
  display: grid;
  gap: clamp(56px, 8vw, 96px);
  margin-top: var(--section);
  padding: 56px var(--gutter) max(40px, env(safe-area-inset-bottom));
  background: var(--slate);
  color: var(--chalk);
}

.legal {
  display: grid;
  gap: 20px;
}

.legal-name {
  font-size: 18px;
  font-weight: 600;
}

.legal dl {
  display: grid;
  gap: 14px;
}

.legal dt {
  font-size: 14px;
  color: var(--steel);
}

.legal dd {
  font-size: 16px;
  white-space: nowrap;
}

.site-footer a:hover {
  color: var(--mist);
}

.site-footer :focus-visible {
  outline-color: var(--mist);
}

.footer-mark {
  display: block;
  width: 100%;
  height: auto;
}

/* Wide screens: one twelve-column grid for everything. */

@media (min-width: 60em) {
  :root {
    --header: 96px;
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav langs";
    column-gap: 48px;
    padding-top: 28px;
  }

  .brand img {
    height: 32px;
  }

  .nav {
    justify-self: end;
    gap: 36px;
  }

  .hero {
    --drop: min(34vw, 74vh);
    display: grid;
    align-items: center;
    min-height: min(calc(100svh - var(--header)), 820px);
    padding: 64px var(--gutter) 40px;
  }

  .drop {
    top: 56px;
  }

  .hero-copy {
    max-width: 66%;
  }

  h1 {
    font-size: clamp(64px, 7.6vw, 96px);
  }

  .section,
  .contact .section-body {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
  }

  .section {
    padding-top: 32px;
  }

  .section > h2 {
    grid-column: 1 / 4;
    font-size: 17px;
    line-height: 1.4;
    letter-spacing: 0;
  }

  .section > .section-body {
    grid-column: 4 / -1;
  }

  .services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 48px;
  }

  .service,
  .service:first-child {
    padding-top: 20px;
    border-top: 1px solid var(--line); /* taste-skill-ignore: hairline dividers are in the owner's brief */
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--gap);
  }

  .step::before {
    font-size: 72px;
  }

  .contact .section-body {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    row-gap: 72px;
  }

  .contact-intro {
    grid-column: 1 / -1;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: end;
  }

  .contact-intro .statement {
    grid-column: 1 / 6;
  }

  .direct {
    grid-column: 7 / -1;
  }

  .enquiry {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gap);
    row-gap: 24px;
  }

  .field-message,
  .form-end,
  .form-status {
    grid-column: 1 / -1;
  }

  .form-end {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .form-end .button {
    grid-column: 2;
  }

  .legal {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
  }

  .legal-name {
    grid-column: 1 / 4;
  }

  .legal dl {
    grid-column: 4 / -1;
    display: flex;
    flex-wrap: wrap;
    column-gap: 48px;
    row-gap: 16px;
  }
}

/* One page-load moment for the hero, then a quiet reveal as each section enters. */

@media (prefers-reduced-motion: no-preference) {
  .drop {
    animation: rise 1200ms var(--ease-out) both;
  }

  .hero-copy > * {
    animation: settle 800ms var(--ease-out) both;
  }

  .hero-copy > :nth-child(1) { animation-delay: 180ms; }
  .hero-copy > :nth-child(2) { animation-delay: 260ms; }
  .hero-copy > :nth-child(3) { animation-delay: 340ms; }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5%);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media print {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
