/* ==========================================================================
   Oistre — design tokens
   ========================================================================== */
:root {
  --paper: #f5f2ec;
  --paper-grey: #e4e1db;
  --ink: #0e0d0b;
  --ink-soft: #2a2925;
  --tone: #57544e;          /* second line of two-tone headings on light */
  --grey: #5f5c56;          /* body grey; 5.9:1 on paper, 5.0:1 on paper-grey */
  --rule: #c4c0b7;
  --dot: rgba(14, 13, 11, .09);

  --dark: #0e0d0b;
  --on-dark: #f5f2ec;
  --tone-dark: #7c7973;     /* 4.6:1 on dark */
  --grey-dark: #a19e96;
  --rule-dark: #34322e;

  --blue: #004aad;          /* logo blue: hover, focus and form accents */
  --error: #9a2a1b;

  --font: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4.4vw, 72px);
  --max: 1520px;
  --section-pad: clamp(88px, 12vw, 192px);
  --header-h: 76px;

  --ease: cubic-bezier(.22, .61, .21, 1);
  --slow: 1.1s;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, .3vw + 15px, 19px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Very fine grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .12;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--on-dark); }

::selection { background: var(--blue); color: var(--paper); }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }
main:focus { outline: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

em { font-style: italic; font-weight: inherit; }

/* Surfaces */
.dots {
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
/* The hero's dot field drifts very slowly */
@media (prefers-reduced-motion: no-preference) {
  .hero.dots { animation: drift 90s linear infinite; }
}
@keyframes drift { to { background-position: 140px 70px; } }
.grey { background: var(--paper-grey); }
.dark { background: var(--dark); color: var(--on-dark); }

/* ==========================================================================
   Type
   ========================================================================== */
.label, .eyebrow, .nav-list a, .mobile-meta {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.label { color: var(--ink-soft); margin-bottom: clamp(40px, 6vw, 88px); }
.dark .label { color: var(--grey-dark); }

.display {
  font-weight: 500;
  font-size: clamp(42px, 7vw, 124px);
  line-height: 1;
  letter-spacing: -.035em;
  max-width: 16ch;
  text-wrap: balance;
}
.display-xl {
  font-weight: 500;
  font-size: clamp(56px, 10vw, 176px);
  line-height: .98;
  letter-spacing: -.04em;
  max-width: 7ch;
}
.display-sm {
  font-weight: 500;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.two-tone span { display: block; }
.tone { color: var(--tone); }
.dark .tone { color: var(--tone-dark); }

.lead {
  font-size: clamp(22px, 2vw, 34px);
  line-height: 1.32;
  letter-spacing: -.015em;
  max-width: 30em;
}
.lead-strong { font-weight: 500; }
.muted-lg {
  font-size: clamp(17px, .7vw + 13px, 22px);
  line-height: 1.75;
  color: var(--grey);
  max-width: 40em;
}
.muted-lg + .muted-lg { margin-top: 1.1em; }

/* ==========================================================================
   Buttons & links
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  min-height: 48px;
  padding: 0 1.5em;
  border: 1px solid var(--ink);
  border-radius: 0;
  font: 500 16px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn-sm { min-height: 46px; padding: 0 1.4em; font-size: 15px; }
.btn-lg { min-height: 60px; padding: 0 2.2em; font-size: 18px; }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); }
.btn-light { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.btn-light:hover { background: var(--blue); border-color: var(--blue); color: var(--paper); }
.btn .arrow { display: inline-block; transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translate(2px, 2px); }
.btn[disabled] { cursor: progress; opacity: .7; }
.btn[disabled]:hover { background: var(--ink); border-color: var(--ink); }

.link-quiet {
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: .35em;
}
.link-quiet:hover { text-decoration-color: var(--ink); }

/* ==========================================================================
   Header & navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule);
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed mobile menu. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.menu-open .site-header::before { background: var(--paper); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark { display: inline-block; line-height: 0; text-decoration: none; }
.wordmark img { height: 34px; width: auto; }
.wordmark-lg img { height: auto; width: min(520px, 72vw); }

.nav { display: flex; align-items: center; gap: clamp(28px, 3.4vw, 64px); }
.nav-list { display: flex; gap: clamp(24px, 3.2vw, 64px); }
.nav-list a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left 100% / 0 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size .5s var(--ease);
}
.nav-list a:hover, .nav-list a[aria-current="true"] { background-size: 100% 1px; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 4px 0 12px;
  background: none;
  border: 0;
  font: 600 13px var(--font);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle-icon { position: relative; width: 22px; height: 12px; }
.menu-toggle-icon span {
  position: absolute; left: 0; right: 0;
  height: 1.5px; background: currentColor;
  transition: transform .45s var(--ease), top .45s var(--ease);
}
.menu-toggle-icon span:first-child { top: 1px; }
.menu-toggle-icon span:last-child { top: 9px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:first-child { top: 5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:last-child { top: 5px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  background: var(--paper);
  overflow-y: auto;
  padding-block: 24px 48px;
}
.mobile-menu[hidden] { display: none; }
.mobile-list li { border-bottom: 1px solid var(--rule); }
.mobile-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  font-size: clamp(34px, 9vw, 48px);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.05;
  text-decoration: none;
}
.mobile-list .idx { font-size: 13px; font-weight: 500; color: var(--grey); letter-spacing: .04em; }
.mobile-meta { margin-top: 32px; color: var(--grey); }

@media (prefers-reduced-motion: no-preference) {
  .mobile-menu.is-open { animation: fade-in .5s var(--ease) both; }
  .mobile-menu.is-open li { animation: rise .6s var(--ease) both; }
  .mobile-menu.is-open li:nth-child(2) { animation-delay: .04s; }
  .mobile-menu.is-open li:nth-child(3) { animation-delay: .08s; }
  .mobile-menu.is-open li:nth-child(4) { animation-delay: .12s; }
  .mobile-menu.is-open li:nth-child(5) { animation-delay: .16s; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(72px, 11vw, 176px) clamp(72px, 9vw, 140px); }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px 40px; margin-bottom: clamp(56px, 9vw, 150px); }
.eyebrow-muted { color: var(--grey); }

.hero-title {
  font-weight: 500;
  font-size: clamp(50px, 8.6vw, 156px);
  line-height: .96;
  letter-spacing: -.04em;
}
@media (min-width: 700px) { .hero-title .line { display: block; } }
.hero-title em { letter-spacing: -.035em; padding-right: .06em; }

.hero-foot {
  display: grid;
  gap: 36px;
  margin-top: clamp(64px, 9vw, 140px);
  padding-top: clamp(36px, 4vw, 64px);
  border-top: 1px solid var(--rule);
}
.hero-lead {
  font-size: clamp(22px, 2.1vw, 36px);
  line-height: 1.32;
  letter-spacing: -.015em;
  max-width: 18em;
}
.hero-side .btn { margin-top: 36px; }
@media (min-width: 900px) {
  .hero-foot { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 120px); }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section-pad); }

.split { display: grid; gap: 40px; }
.ruled { margin-top: clamp(56px, 8vw, 120px); padding-top: clamp(40px, 5vw, 80px); border-top: 1px solid var(--rule); }
.dark .ruled { border-top-color: var(--rule-dark); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 120px); }
}

/* 01 point of view */
.pov-list li {
  font-size: clamp(32px, 4.2vw, 72px);
  line-height: 1.38;
  letter-spacing: -.03em;
  font-weight: 400;
}
.pov-copy > p:first-child { font-size: clamp(18px, 1.2vw, 22px); line-height: 1.75; max-width: 28em; }
.pov-ask {
  margin-top: clamp(32px, 4vw, 56px);
  font-size: clamp(30px, 3vw, 52px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 500;
  max-width: 13em;
}
.pov-answer {
  margin-top: clamp(28px, 3vw, 48px);
  font-size: clamp(22px, 1.9vw, 32px);
  line-height: 1.35;
  letter-spacing: -.015em;
  color: var(--tone-dark);
}

/* 02 approach */
.approach-copy { margin-top: clamp(56px, 8vw, 120px); display: grid; gap: clamp(32px, 4vw, 64px); max-width: 60em; }

.steps {
  display: grid;
  margin-top: clamp(72px, 10vw, 160px);
  border-top: 1px solid var(--rule);
}
.steps li { padding: 28px 0 32px; border-bottom: 1px solid var(--rule); }
.step-no { display: block; font-size: 14px; color: var(--grey); letter-spacing: .04em; margin-bottom: clamp(20px, 3vw, 48px); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: clamp(20px, 1.5vw, 26px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 12px; }
.steps p { color: var(--grey); font-size: 16px; line-height: 1.6; max-width: 22em; }
@media (min-width: 640px) and (max-width: 1099px) {
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(5, 1fr); }
  .steps li { padding: 36px clamp(16px, 1.6vw, 28px) 12px; border-bottom: 0; }
  .steps li:first-child { padding-left: 0; }
  .steps li + li { border-left: 1px solid var(--rule); }
}

/* 03 services */
.services-head { display: grid; gap: 40px; align-items: end; }
.services-head .muted-lg { max-width: 30em; }
@media (min-width: 900px) {
  .services-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 120px); }
}
.service-list { margin-top: clamp(72px, 9vw, 140px); border-top: 1px solid var(--rule); }
.service {
  position: relative;
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr) auto;
  gap: 16px 12px;
  padding: clamp(36px, 4.4vw, 72px) 0;
  border-bottom: 1px solid var(--rule);
}
.service-no { font-size: 14px; color: var(--grey); padding-top: .9em; font-variant-numeric: tabular-nums; }
.service-name {
  font-size: clamp(40px, 5vw, 92px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.035em;
  max-width: 7.5ch;
}
.service-body { grid-column: 2 / 3; max-width: 32em; }
.service-q { font-size: clamp(21px, 1.8vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: var(--ink); margin-bottom: 20px; }
.service-body p:not(.service-q) { color: var(--grey); font-size: clamp(17px, .6vw + 13px, 21px); line-height: 1.75; }
.service-link {
  grid-column: 3; grid-row: 1;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  font-size: 30px; line-height: 1;
  text-decoration: none;
  transition: color .3s var(--ease), transform .45s var(--ease);
}
.service-link::after { content: ""; position: absolute; inset: 0; } /* whole row is clickable */
.service:hover .service-link { color: var(--blue); transform: translate(3px, -3px); }
.service:has(.service-link:focus-visible) { outline: 2px solid var(--blue); outline-offset: 6px; }
.service-link:focus-visible { outline: none; }
@media (min-width: 900px) {
  .service { grid-template-columns: 4em minmax(0, 1fr) minmax(0, 1.25fr) 48px; gap: clamp(24px, 3vw, 56px); }
  .service-no { padding-top: .6em; }
  .service-body { grid-column: auto; }
  .service-link { grid-column: auto; grid-row: auto; }
}

/* 05 work */
.outcomes { margin-top: clamp(56px, 8vw, 120px); display: grid; border-top: 1px solid var(--rule); }
.outcomes > div { padding: 28px 0; border-bottom: 1px solid var(--rule); }
.outcomes dt { font-size: clamp(21px, 1.8vw, 30px); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.outcomes dd { color: var(--grey); margin-top: 8px; }
@media (min-width: 760px) {
  .outcomes { grid-template-columns: 1fr 1fr; column-gap: clamp(40px, 6vw, 120px); }
  .outcomes > div { padding: 36px 0; }
}
.testimonial {
  margin-top: clamp(72px, 9vw, 140px);
  padding-left: clamp(20px, 3vw, 40px);
  border-left: 2px solid var(--blue);
  max-width: 48em;
}
.testimonial blockquote p { font-size: clamp(24px, 2.4vw, 40px); line-height: 1.25; letter-spacing: -.025em; }
.testimonial figcaption { margin-top: 24px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.testimonial figcaption span { color: var(--grey); }

/* 06 about */
.facts { display: grid; margin-top: clamp(56px, 7vw, 100px); border-top: 1px solid var(--rule); }
.facts li { display: grid; grid-template-columns: 10em 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.facts span { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--grey); padding-top: .25em; }

/* Final CTA */
.final .display { max-width: 15ch; margin-bottom: clamp(48px, 6vw, 88px); }

/* ==========================================================================
   Enquiry form
   ========================================================================== */
.enquire-grid { display: grid; gap: 56px; }
@media (min-width: 960px) {
  .enquire-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 140px); }
  .enquire-intro { position: sticky; top: calc(var(--header-h) + 48px); align-self: start; }
}
.enquire-intro .label { margin-bottom: 32px; }
.enquire-intro .display-sm { margin-bottom: 24px; max-width: 12ch; }

.form-hint { font-size: 14px; color: var(--grey); margin-bottom: 32px; }

.form-status {
  margin-bottom: 32px;
  padding: 16px 20px;
  border-left: 3px solid var(--error);
  background: #f6e7e1;
  color: var(--error);
  font-size: 15px;
}

.field-row { display: grid; gap: 0 32px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field { position: relative; margin-bottom: 36px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.opt { font-weight: 400; color: var(--grey); }

.field input, .field textarea, .field select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  padding: 10px 0 12px;
  font: 400 18px/1.5 var(--font);
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.field textarea { resize: vertical; min-height: 9.5em; }
.field input:hover, .field textarea:hover, .field select:hover { border-bottom-color: var(--grey); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: none;
  border-bottom-color: var(--blue);
  box-shadow: 0 1px 0 0 var(--blue);
}
.select { position: relative; }
.select::after {
  content: "";
  position: absolute; right: 4px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}
.field select { padding-right: 28px; cursor: pointer; }

.field-help { margin-top: 8px; font-size: 14px; color: var(--grey); }
.field-error { margin-top: 8px; font-size: 14px; color: var(--error); font-weight: 600; }
.field-error:empty { display: none; }
.field-error::before { content: "— "; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.field.is-valid input, .field.is-valid textarea { border-bottom-color: var(--ink); }

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

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 8px; }
.btn-submit { min-width: 220px; }
.btn-submit[aria-busy="true"] .arrow { animation: busy 1.2s var(--ease) infinite; }
@keyframes busy { 50% { transform: translateX(5px); opacity: .4; } }
.privacy { font-size: 14px; color: var(--grey); }

.form-success { padding: clamp(32px, 4vw, 56px) 0; border-top: 1px solid var(--ink); max-width: 34em; }
.form-success:focus { outline: none; }
.form-success p { margin: 16px 0 28px; color: var(--grey); }
.success-mark { display: block; width: 48px; height: 48px; background: var(--blue); margin-bottom: 28px; }
@media (prefers-reduced-motion: no-preference) {
  .form-success:not([hidden]) { animation: rise .9s var(--ease) both; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--rule); padding-block: clamp(56px, 8vw, 112px) 40px; }
.footer-inner { display: grid; gap: 40px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.footer-nav a { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--grey); }

/* ==========================================================================
   Reveal on scroll (only when JS is running and motion is welcome)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--slow) var(--ease), transform calc(var(--slow) * 1.2) var(--ease);
    transition-delay: var(--reveal-delay, 0s);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
  body::after { display: none; }
  .wordmark img { background: Canvas; }
}
