:root {
  --cream: #f2ede7;
  --cream-2: #e9e2d7;
  --paper: #faf8f4;
  --ink: #40311c;
  --brown: #6a4638;
  --muted: #8a7863;
  --olive: #58673b;
  --night: #241b12;
  --line: rgba(64, 49, 28, 0.18);
  --serif: "DM Serif Display", "Playfair Display", Georgia, serif;
  --mono: "Fira Code", "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--cream) url("../img/linen.webp") repeat;
  background-size: 512px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: italic; }

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

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
}

/* ── nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* reach up under the status bar / notch so the bar fills the safe area instead of floating below it */
  padding: calc(18px + env(safe-area-inset-top)) var(--gutter) 18px;
  color: var(--paper);
  transition: background 0.4s ease, color 0.4s ease, padding 0.4s ease;
}
.nav.solid {
  background: rgba(242, 237, 231, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.nav-logo { display: block; line-height: 0; text-decoration: none; }
/* the wordmark is a mask, so it takes the text colour of wherever it sits */
.logo-mark { display: inline-block; height: 22px; aspect-ratio: 87.42 / 25.2; background: currentColor; -webkit-mask: url("../img/logo.svg") center / contain no-repeat; mask: url("../img/logo.svg") center / contain no-repeat; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; font-size: 12px; letter-spacing: 0.08em; text-transform: lowercase; opacity: 0.85; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.nav-right { display: flex; align-items: center; gap: 28px; }
.lang { display: flex; gap: 2px; }
.lang button {
  font: inherit; font-size: 11px; letter-spacing: 0.1em;
  background: none; border: 0; color: inherit; cursor: pointer;
  padding: 5px 9px 5px 6px; opacity: 0.55; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 6px;
}
/* small flag icons in their real colours, with a thin edge in the text colour */
.flag { width: 16px; height: 16px; flex: none; }
.flag .edge { fill: none; stroke: currentColor; stroke-opacity: 0.35; stroke-width: 0.6; }
.lang button[aria-pressed="true"] { opacity: 1; outline: 1px solid currentColor; }
.menu-btn { display: none; font: inherit; font-size: 12px; background: none; border: 0; color: inherit; cursor: pointer; letter-spacing: 0.1em; }

/* ── hero ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: var(--paper);
  overflow: hidden;
  background: var(--night);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.05);
  transform: scale(1.06);
  animation: drift 18s ease-out forwards;
}
@keyframes drift { to { transform: scale(1); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20, 14, 8, 0.35) 0%, rgba(20, 14, 8, 0.1) 40%, rgba(20, 14, 8, 0.55) 100%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 0 var(--gutter); }
.hero-word { line-height: 0; }
.hero-word .logo-mark { height: auto; width: clamp(240px, 44vw, 600px); }
.hero-sub { margin-top: 18px; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; }
.hero-foot {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 var(--gutter); font-size: 12px; letter-spacing: 0.06em;
}
.hero-tag { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 29px); line-height: 1.05; letter-spacing: 0; }

/* ── manifesto ── */
.manifesto { padding-top: clamp(96px, 14vw, 200px); padding-bottom: clamp(80px, 10vw, 140px); }
.manifesto .label { margin-bottom: 36px; }
.manifesto-text { font-family: var(--serif); font-size: clamp(30px, 4.7vw, 70px); line-height: 1.08; letter-spacing: -0.01em; max-width: 27ch; }
.manifesto-text em { color: var(--brown); }
.manifesto-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 64px; max-width: 1080px; margin-left: auto; }

/* ── section heads ── */
.sec { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: clamp(40px, 6vw, 72px); flex-wrap: wrap; }
.sec-title { font-size: clamp(40px, 6.6vw, 100px); }
.sec-note { max-width: 48ch; color: var(--brown); }
/* alternating full-width grounds so neighbouring sections don't run together; the linen stays, only the colour shifts */
.tone-soft, .tone-dark { position: relative; isolation: isolate; }
.tone-soft::before, .tone-dark::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1;
  background: var(--tone) url("../img/linen.webp") repeat; background-size: 512px; background-blend-mode: multiply;
}
.tone-soft { --tone: var(--cream-2); }
.tone-dark { --tone: transparent; color: var(--paper); }
/* dark ground: the same linen, darkened with filters (a colour wash flattens its weave, and the
   film grain reads as sand on dark, so these sections sit above the grain) */
.tone-dark::before { background-blend-mode: normal; filter: brightness(0.54) contrast(3) brightness(0.3) sepia(0.8) hue-rotate(-12deg); }
.tone-dark, .contact { z-index: 51; }
.tone-dark .label, .tone-dark .stat-who { color: rgba(250, 248, 244, 0.55); }
.tone-dark .sec-note, .tone-dark .stat-what { color: rgba(250, 248, 244, 0.78); }
.tone-dark .stats, .tone-dark .stat + .stat { border-color: rgba(250, 248, 244, 0.2); }

/* ── experience: numbers from client accounts ── */
#experience .label { margin-bottom: 28px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.stat { display: grid; gap: 10px; padding: clamp(28px, 4vw, 48px) 0 clamp(8px, 2vw, 20px); }
.stat + .stat { border-left: 1px solid var(--line); padding-left: clamp(24px, 4vw, 56px); }
.stat-num { font-family: var(--serif); font-size: clamp(72px, 12.4vw, 184px); line-height: 0.9; letter-spacing: -0.02em; }
.stat-what { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brown); }
.stat-who { font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }

/* ── services: one row each ── */
.svc { list-style: none; border-top: 1px solid var(--line); }
.svc li { display: grid; grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) 120px; gap: clamp(16px, 3vw, 40px); align-items: baseline; padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid var(--line); }
.svc-num { font-family: var(--serif); font-size: 20px; color: var(--muted); }
.svc h3 { font-size: clamp(26px, 3vw, 44px); }
.svc p { color: var(--brown); max-width: 58ch; }
.svc-tag { justify-self: end; font-size: 11px; letter-spacing: 0.16em; color: var(--muted); }

/* ── sectors ── */
.sector-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.1em 0; font-family: var(--serif); font-size: clamp(34px, 5.3vw, 80px); line-height: 1.1; }
.sector-list li:not(:last-child)::after { content: "·"; color: var(--muted); padding: 0 0.28em; }
.sector-list li:nth-child(even) { font-style: italic; color: var(--brown); }

/* ── stance: plain linen ground, so it does not run into the photo in the contact footer ── */
.band { padding: clamp(110px, 14vw, 200px) 0; }
.band-title em { color: var(--brown); }
.band-title { font-size: clamp(46px, 8.2vw, 128px); }
.band-lines { margin-top: 40px; font-size: 13px; line-height: 2; letter-spacing: 0.04em; color: var(--brown); }

/* ── team ── */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.4vw, 36px); }
.member .ph { aspect-ratio: 4 / 5; overflow: hidden; background: var(--cream-2); }
.member img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.02); transition: filter 0.6s ease, transform 0.8s ease; }
.member:hover img { filter: grayscale(0); transform: scale(1.03); }
.member h4 { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.1; margin-top: 16px; }
.member p { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }

/* ── contact ── */
.contact { position: relative; background: var(--night); color: var(--paper); overflow: hidden; padding: clamp(110px, 14vw, 200px) 0 calc(48px + env(safe-area-inset-bottom)); }
.contact-bg { position: absolute; right: -4%; top: 0; height: 100%; width: 46%; object-fit: cover; opacity: 0.42; filter: sepia(0.25); mask-image: linear-gradient(90deg, transparent, #000 40%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); }
.contact .wrap { position: relative; z-index: 1; }
.contact .label { color: rgba(250, 248, 244, 0.6); }
.contact-title { font-size: clamp(34px, 4.7vw, 70px); margin: 22px 0 48px; max-width: 14ch; }
/* contact form: quiet lines on the dark ground, no boxes */
.cform { max-width: 760px; display: grid; gap: 26px; margin-bottom: 56px; }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.cform label { display: grid; gap: 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(250, 248, 244, 0.6); }
.cform input, .cform textarea {
  font: 16px/1.5 var(--mono); color: var(--paper); background: transparent;
  border: 0; border-bottom: 1px solid rgba(250, 248, 244, 0.35); border-radius: 0;
  padding: 8px 0; outline: none; resize: vertical; text-transform: none; letter-spacing: 0;
  transition: border-color 0.3s ease;
}
.cform input:focus, .cform textarea:focus { border-bottom-color: var(--paper); }
.cform-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform-foot { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.cform-send {
  font: 500 13px var(--mono); letter-spacing: 0.1em; text-transform: lowercase;
  color: var(--night); background: var(--paper); border: 0; border-radius: 99px;
  padding: 14px 30px; cursor: pointer; transition: opacity 0.3s ease;
}
.cform-send:hover, .cform-send:focus-visible { opacity: 0.85; }
.cform-send:disabled { opacity: 0.5; cursor: default; }
.cform-status { font-size: 13px; color: rgba(250, 248, 244, 0.85); min-height: 1.5em; }
.cform-note { font-size: 11px; color: rgba(250, 248, 244, 0.5); }
.contact-alt { font-size: 12px; letter-spacing: 0.06em; color: rgba(250, 248, 244, 0.7); display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.contact-alt .contact-mail { font-size: clamp(22px, 2.4vw, 32px); }
.contact-mail { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 48px); text-decoration: none; border-bottom: 1px solid rgba(250, 248, 244, 0.4); padding-bottom: 4px; transition: border-color 0.3s; }
.contact-mail:hover { border-color: var(--paper); }
.contact-langs { margin-top: 36px; font-size: 12px; letter-spacing: 0.08em; color: rgba(250, 248, 244, 0.7); }
.footer { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(90px, 12vw, 160px); padding-top: 22px; border-top: 1px solid rgba(250, 248, 244, 0.18); font-size: 11px; color: rgba(250, 248, 244, 0.55); flex-wrap: wrap; }
.footer .logo { color: var(--paper); line-height: 0; }
.footer .logo-mark { height: 21px; }

/* ── reveal ── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── responsive ── */
@media (max-width: 960px) {
  .svc li { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .svc-tag { grid-column: 3; grid-row: 1; }
  .svc p { grid-column: 2 / -1; grid-row: 2; }
  .team { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); color: var(--ink); padding: 24px var(--gutter);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { background: var(--cream); color: var(--ink); }
  /* phones: an opaque bar in both states. iOS tints the status bar from it, so the
     bar and the safe area above it read as one piece instead of two bands */
  .nav { background: #1f1812; }
  /* soft fade from the dark bar into the hero photo, so there is no hard edge */
  .nav:not(.solid):not(.open)::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 28px; background: linear-gradient(#1f1812, rgba(31, 24, 18, 0)); pointer-events: none; }
  .nav.solid { background: #f2ede7; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .lang button { padding: 5px 6px; gap: 5px; }
  .nav-links a { font-size: 15px; }
  .nav-right { gap: 14px; }
  .manifesto-cols { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .svc li { grid-template-columns: 36px minmax(0, 1fr); row-gap: 8px; }
  .svc p, .svc-tag { grid-column: 2; grid-row: auto; }
  .svc-tag { justify-self: start; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  /* the tagline's hand-set desktop line breaks give way to natural wrapping */
  .hero-tag { max-width: 18ch; text-wrap: balance; }
  .hero-tag .hb { display: none; }
  .contact-bg { width: 100%; right: 0; opacity: 0.22; mask-image: none; -webkit-mask-image: none; }
  .cform-row { grid-template-columns: 1fr; }
}
