/* Timeline — shared base + landing page. Black and white; the work is the only colour. */
:root {
  --bg: #000;
  --fg: #fff;
  --dim: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .16);
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 3vw, 44px);
  --top: 88px;
  /* the one accent: used for headline full stops, the main call to action and selections */
  --accent: #FF4D1F;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #000; }
/* a headline's closing full stop, in the accent */
:is(h1, h2) span.pt { color: var(--accent); }   /* beats the dimmed second line */

.logo {
  display: block;
  aspect-ratio: 353.57 / 73.81;
  background: currentColor;
  -webkit-mask: url(assets/timeline-logo.svg) center / contain no-repeat;
          mask: url(assets/timeline-logo.svg) center / contain no-repeat;
}

/* Header */
.top {
  position: fixed; inset: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  z-index: 10;
  color: #fff;
  mix-blend-mode: difference;   /* at the very top: inverts over whatever is behind it */
  transition: background-color .3s ease, color .3s ease, padding .3s ease, box-shadow .3s ease;
}
/* once scrolled: a solid bar in the colour of the section underneath, so headlines pass under it cleanly */
.top.is-solid {
  mix-blend-mode: normal;
  padding-top: 16px; padding-bottom: 16px;
  background: #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .1);
}
.top.is-solid[data-tone="light"] {
  --fg: #000;
  --dim: rgba(0, 0, 0, .5);
  background: #fff;
  color: #000;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.brand .logo { width: 116px; transition: background-color .25s ease; }
.brand:hover .logo, .brand:focus-visible .logo { background-color: var(--accent); }
.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { color: var(--dim); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }

/* Tagline: one line per sentence. The longer sentence is ~12.2em wide. */
.tagline {
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.tagline span { color: var(--dim); }

/* Landing */
.landing {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--top) var(--gutter) 28px;
}
.landing .tagline { font-size: min(7vw, 120px); }
.landing__foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  margin-top: clamp(28px, 5vh, 56px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--dim);
}
.landing__foot a { transition: color .2s; }
.landing__foot a:hover { color: var(--fg); }
.landing__foot .cta { color: var(--fg); }
.landing__contact { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.landing__down { display: none; }
/* phones: just the call to action and a nudge down; the contact details live in the footer */
@media (max-width: 800px) {
  .landing__foot { align-items: center; }
  .landing__contact { display: none; }
  .landing__down { display: block; font-size: 22px; line-height: 1; color: var(--fg); animation: nudge 1.8s ease-in-out infinite; }
}
@keyframes nudge { 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .landing__down { animation: none; } }

/* Introduction: greeting and copy on the left, the moonstone half off the right edge as in the deck */
.intro {
  position: relative; overflow: hidden;
  min-height: 86svh;
  display: flex; align-items: center;
  padding: clamp(56px, 8vh, 96px) calc(var(--gutter) * 2);
}
.intro__text { position: relative; z-index: 1; max-width: 36em; }
.intro__greet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: clamp(28px, 5vh, 48px); }
.intro__greet [lang="si"] { font: 500 clamp(28px, 2.6vw, 44px)/1.3 'Noto Sans Sinhala', var(--sans); }
.intro__title { font-weight: 500; font-size: min(5vw, 88px); line-height: 1.02; letter-spacing: -.03em; }
.intro__title > span { color: var(--dim); }
.intro__body { max-width: 32ch; margin-top: clamp(24px, 4vh, 40px); font-size: clamp(18px, 1.6vw, 24px); line-height: 1.4; color: var(--dim); }
.intro__link { display: inline-block; margin-top: clamp(28px, 5vh, 48px); font-size: 15px; border-bottom: 1px solid var(--dim); padding-bottom: 2px; transition: border-color .2s; }
.intro__link:hover { border-color: var(--fg); }
.intro__link i { font-style: normal; display: inline-block; transition: transform .25s; }
.intro__link:hover i { transform: translateX(4px); }
.intro__art {
  position: absolute; top: 50%; right: 0;
  width: min(112vh, 68vw); aspect-ratio: 1;
  transform: translate(42%, -50%);
}
/* the deck's line drawing, used as a mask so it takes the page colour */
.moonstone {
  display: block; width: 100%; height: 100%;
  background: var(--fg); opacity: .62;
  -webkit-mask: url(assets/illustrations/moonstone.webp) center / contain no-repeat;
          mask: url(assets/illustrations/moonstone.webp) center / contain no-repeat;
  transform: rotate(var(--turn, 0deg));   /* scroll adds its turn on top of the constant spin */
  animation: spin 160s linear infinite;
  will-change: transform, rotate;
}
@keyframes spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .moonstone { animation: none; } }

/* Client wall: three tracks of logos drifting at their own speeds */
.wall {
  --slot-h: clamp(52px, min(9.5vh, 15vw), 104px);
  --slot-w: calc(var(--slot-h) * 2.1);
  --slot-gap: clamp(10px, 1.2vw, 18px);
  position: relative;
  flex: 1;
  display: flex; align-items: center;
  margin: clamp(16px, 3vh, 32px) calc(-1 * var(--gutter)) clamp(28px, 5vh, 56px);
  min-height: calc(var(--slot-h) * 3 + 60px);
  overflow-x: clip;                  /* lanes may rise past the top as the page scrolls */
}
.wall__lanes { width: 100%; display: grid; gap: var(--slot-gap); }
.lane { overflow: hidden; }
/* parallax: as the hero scrolls away each track rises at its own rate, so they draw apart */
.lane { transform: translate3d(0, calc(var(--py, 0px) * var(--k)), 0); will-change: transform; }
.lane:nth-child(1) { --k: -.34; }
.lane:nth-child(2) { --k: -.2; }
.lane:nth-child(3) { --k: -.08; }
.lane__inner {
  display: flex; gap: var(--slot-gap);
  width: max-content;
  padding-right: var(--slot-gap);    /* so every copy is the same width, gap included */
  animation: drift var(--dur) linear infinite;
}
.lane:nth-child(2) .lane__inner { margin-left: calc(var(--slot-w) * -.55); }
.lane:nth-child(3) .lane__inner { margin-left: calc(var(--slot-w) * -.25); }
@keyframes drift { to { transform: translateX(calc(-100% / var(--copies))); } }

.slot {
  position: relative;
  flex: none;
  width: var(--slot-w); height: var(--slot-h);
  display: grid; place-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, .55);
  text-align: center;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
.slot__name { font-weight: 500; font-size: clamp(13px, 1.15vw, 18px); letter-spacing: -.01em; line-height: 1.15; }
/* logos keep their brand colours (black/grey ink flipped to white) */
.slot__logo { max-width: 66%; max-height: calc(var(--slot-h) * .5); object-fit: contain; opacity: .85; transition: opacity .25s ease; }
.slot__tag {
  position: absolute; left: 10px; bottom: 7px;
  font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em;
  color: inherit; opacity: .8;
}
.slot__tag i { font-style: normal; display: inline-block; transition: transform .25s; }
.slot:hover { color: var(--fg); border-color: rgba(255, 255, 255, .55); }
.slot:hover .slot__logo { opacity: 1; }

/* a case is the only thing on the page that turns to colour */
.slot--case:hover, .slot--case:focus-visible {
  color: #fff;
  border-color: var(--c, #fff);
  background-color: var(--c, #222);
}
.slot--case:hover .slot__tag i { transform: translateX(3px); }
.slot--case:hover .slot__logo { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .lane__inner { animation: none; }
}

/* What we do: five glyphs as windows, lit by the active craft */
/* Sections below the hero share padding and heading style; white blocks flip the tokens */
.services, .results, .team {
  padding: clamp(56px, 8vh, 96px) calc(var(--gutter) * 2) clamp(48px, 7vh, 80px);
  background: var(--bg);
  color: var(--fg);
}
.services, .team {
  --bg: #fff;
  --fg: #000;
  --dim: rgba(0, 0, 0, .5);
  --line: rgba(0, 0, 0, .12);
}
.services ::selection, .team ::selection { background: var(--accent); color: #000; }
.services__head, .block__head { margin-bottom: clamp(32px, 5vh, 56px); }
.kicker { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.services__head .kicker, .block__head .kicker { margin-bottom: 18px; }
.services__title, .block__title {
  font-weight: 500;
  font-size: min(5vw, 88px);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.services__title span, .block__title span { color: var(--dim); }

/* the active column widens so its work and list get room; the rest give way */
.crafts {
  --s: clamp(96px, 9.5vw, 168px);   /* glyph size: side of an equal-area square */
  list-style: none;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  /* every craft carries the card's padding; pull the row out by the same amount so content still lines up with the heading */
  --card-pad: clamp(16px, 1.8vw, 28px);
  margin: 0 calc(-1 * var(--card-pad));
  transition: grid-template-columns .8s cubic-bezier(.2, .8, .2, 1);
}
.crafts[data-active="0"] { grid-template-columns: minmax(0, 1.45fr) repeat(4, minmax(0, 1fr)); }
.crafts[data-active="1"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)); }
.crafts[data-active="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.45fr) repeat(2, minmax(0, 1fr)); }
.crafts[data-active="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.45fr) minmax(0, 1fr); }
.crafts[data-active="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.45fr); }

.craft {
  outline: none; cursor: default;
  padding: var(--card-pad);
  border-radius: 6px;
  background-color: transparent;
  transition: background-color .35s ease;
}
/* hovered / focused / tapped craft: a black card, its contents flipped to white */
.craft.is-card {
  --fg: #fff;
  --dim: rgba(255, 255, 255, .55);
  background-color: #000;
  color: var(--fg);
}
.craft:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #000; }
/* every glyph sits on the same baseline and the same left edge as its name */
.craft__stage {
  height: calc(var(--s) * 1.3);    /* the tallest glyph (Marketing) plus room to grow */
  display: flex; align-items: flex-end;
  margin-bottom: clamp(18px, 2.6vh, 28px);
}
.craft__win {
  position: relative;
  flex: none;
  width: calc(var(--s) * var(--gw));
  height: calc(var(--s) * var(--gh));
  -webkit-mask: var(--glyph) center / contain no-repeat;
          mask: var(--glyph) center / contain no-repeat;
  transform-origin: 0 100%;
  transition: opacity .5s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.craft__line {                 /* the mark at rest: an outline on the glyph's inner edge */
  position: absolute; inset: 0; z-index: 1;
  background: var(--fg);
  -webkit-mask: var(--outline) center / contain no-repeat;
          mask: var(--outline) center / contain no-repeat;
}
.craft__fill {                 /* the active craft fills with a grainy orange-to-yellow gradient that slowly drifts */
  position: absolute; inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='3.2 0 0 0 -1.1 3.2 0 0 0 -1.1 3.2 0 0 0 -1.1 0 0 0 0 .55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(55% 55% at 28% 30%, #FFD21A 0%, rgba(255, 210, 26, 0) 70%),
    radial-gradient(65% 65% at 74% 72%, var(--accent) 0%, rgba(255, 77, 31, 0) 72%),
    linear-gradient(var(--a, 135deg), #FF5A1F, #FF9A0A 55%, #FFC21A);
  background-size: 180px 180px, 200% 200%, 200% 200%, 200% 200%;
  background-blend-mode: overlay, normal, normal, normal;
  opacity: 0;
  transform: scale(1.18);
  transition: opacity .7s ease, transform 1.2s cubic-bezier(.2, .8, .2, 1);
  animation: glow 9s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s);
}
.craft.is-active .craft__fill { opacity: 1; transform: none; }
@keyframes glow {
  from { background-position: 0 0, 0% 0%, 100% 100%, 0% 50%; }
  to   { background-position: 0 0, 100% 80%, 0% 20%, 100% 50%; }
}
@media (prefers-reduced-motion: reduce) { .craft__fill { animation: none; } }

.craft__no { font: 11px var(--mono); letter-spacing: .08em; color: var(--dim); margin-bottom: 8px; }
.craft__name {
  font-weight: 500;
  font-size: clamp(22px, 1.8vw, 26px);
  line-height: 1.1;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: rgba(0, 0, 0, .46);
  transition: color .4s ease;
}
/* room for two lines is always reserved, so the row never jumps as crafts cycle */
.craft__list {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  min-height: calc(2 * 1.4em + 4px);
  margin-top: 14px;
  font-size: 14px;
  color: var(--dim);
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
}

/* active craft: the gradient fills its glyph, name and list come up */
.craft.is-active .craft__win { transform: scale(1.1); }
.craft.is-active .craft__name { color: var(--fg); }
.craft.is-active .craft__list { opacity: 1; transform: none; }
.crafts.has-active .craft:not(.is-active) .craft__win { opacity: .3; }

@media (max-width: 800px) {
  .services__title { font-size: calc((100vw - 2 * var(--gutter)) / 8); }
  .crafts, .crafts[data-active] { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .crafts { --s: clamp(72px, 22vw, 120px); }
  .craft__name { white-space: normal; }
  .craft__list { min-height: calc(3 * 1.4em + 8px); }
}

/* Results: one row per case, a big figure and the line behind it */
/* the punkalasa (pot of plenty) stands to the right of the heading, its lines drawing and redrawing from the pot up */
.results .block__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 32px; }
.results .block__head > :not(.results__art) { grid-column: 1; }
.results__art {
  grid-column: 2; grid-row: 1 / span 2;
  height: clamp(170px, 17vw, 270px); aspect-ratio: 288 / 400;
  margin-bottom: -8px;
}
.punkalasa { display: block; width: 100%; height: 100%; color: var(--fg); opacity: .62; }
/* landing.js measures each line (--len), picks the end nearest the pot to start from (--from) and staggers them (--delay) */
.punkalasa.is-drawing :is(path, circle) {
  stroke-dasharray: var(--len) var(--len);
  animation: draw 7s cubic-bezier(.45, 0, .25, 1) var(--delay) infinite both paused;
}
.punkalasa.is-drawing.is-live :is(path, circle) { animation-play-state: running; }
@keyframes draw {
  0%       { stroke-dashoffset: var(--from); }
  45%, 72% { stroke-dashoffset: 0; }
  100%     { stroke-dashoffset: calc(var(--from) * -1); }
}
.results__list { list-style: none; border-bottom: 1px solid var(--line); }
.result {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  /* the row bleeds into the margin when it fills with colour; the padding keeps text aligned */
  margin: 0 calc(-1 * var(--card-pad, 24px));
  padding: clamp(16px, 2.4vh, 26px) var(--card-pad, 24px);
  border-top: 1px solid var(--line);
  border-radius: 6px;
  background-color: transparent;
  transition: background-color .35s ease, border-color .35s ease;
}
.result__fig {
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 76px);
  line-height: 1;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.result__brand { display: block; font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; margin-bottom: 6px; }
.result__line { display: block; font-size: 15px; line-height: 1.45; color: var(--dim); max-width: 38ch; transition: color .35s ease; }
.result__go { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); white-space: nowrap; transition: color .35s ease; }
.result__go i { font-style: normal; display: inline-block; transition: transform .25s; }
/* the case's colour is the only colour in the block */
.result:hover, .result:focus-visible { background-color: var(--c); border-color: transparent; outline: none; }
.results__list li:hover + li .result { border-top-color: transparent; }
.result:hover .result__line, .result:hover .result__go,
.result:focus-visible .result__line, .result:focus-visible .result__go { color: rgba(255, 255, 255, .85); }
.result:hover .result__go i { transform: translateX(4px); }

/* Team: black-and-white portraits; the bio rises over the photo on hover / focus */
/* the accent rule between the team heading and the portraits */
.team .block__head {
  padding-bottom: clamp(32px, 5vh, 56px);
  border-bottom: 2px solid var(--accent);
}
.team__grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));   /* eight people: two rows of four, edge to edge */
  gap: clamp(28px, 4vh, 48px) clamp(20px, 3vw, 56px);
}
.person { outline: none; }
.person__photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
  margin-bottom: 14px;
}
.person__photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 12%;
  filter: grayscale(1);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.person__bio {
  position: absolute; inset: auto 0 0 0;
  padding: 48px 16px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 14px; line-height: 1.45;
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.person:hover .person__photo img, .person:focus-within .person__photo img { transform: scale(1.04); }
.person:hover .person__bio, .person:focus-within .person__bio { opacity: 1; transform: none; }
.person__name { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.person__role { font-size: 14px; color: var(--dim); margin-top: 2px; }

@media (max-width: 800px) {
  .block__title { font-size: calc((100vw - 2 * var(--gutter)) / 8); }
  .result { grid-template-columns: 1fr; gap: 10px; }
  .result__go { display: none; }
  .results__art { display: none; }
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* the moonstone rises from the bottom edge like a threshold stone */
  .intro { align-items: flex-start; padding-bottom: 78vw; }
  .intro__title { font-size: calc((100vw - 2 * var(--gutter)) / 8); }
  .intro__art { top: auto; bottom: 0; right: 50%; width: 140vw; transform: translate(50%, 45%); }
}

/* Case study page */
.case-page {
  min-height: 100svh;
  padding: calc(var(--top) + 24px) var(--gutter) 40px;
  display: grid; gap: clamp(32px, 6vh, 64px);
  align-content: start;
}
.case-page__back { font-size: 14px; color: var(--dim); transition: color .2s; }
.case-page__back:hover { color: var(--fg); }
.case-page__kicker { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 14px; }
.case-page__title { font-weight: 500; font-size: clamp(40px, 7vw, 120px); line-height: .98; letter-spacing: -.035em; }
.case-page__media {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: 4px;
  background: var(--c, #222);
  display: grid; place-items: center;
  font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .7);
}
.case-page__body {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter);
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.case-page__body h2 { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 12px; font-weight: 400; }
.case-page__body p { font-size: clamp(16px, 1.3vw, 20px); line-height: 1.4; }
.case-page__next {
  display: flex; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--line); padding-top: 20px;
  font-size: 14px; color: var(--dim);
}
.case-page__next a { color: var(--fg); }

@media (max-width: 700px) {
  .case-page__body { grid-template-columns: 1fr; }
  .case-page__media { aspect-ratio: 4 / 3; }
  .brand .logo { width: 96px; }
  .nav { gap: 18px; }
  .landing .tagline { font-size: calc((100vw - 2 * var(--gutter)) / 12.5); }
}

/* ---------- Shared: light block, button ---------- */
.is-light {
  --bg: #fff;
  --fg: #000;
  --dim: rgba(0, 0, 0, .5);
  --line: rgba(0, 0, 0, .12);
  background: var(--bg);
  color: var(--fg);
}
.is-light ::selection { background: var(--accent); color: #000; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font: 500 16px/1 var(--sans);
  border: 1px solid var(--fg);
  cursor: pointer;
  transition: background-color .25s, color .25s;
}
.btn i { font-style: normal; transition: transform .25s; }
.btn:hover { background: transparent; color: var(--fg); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #000; }
.btn--accent:hover { background: transparent; color: var(--accent); }
.btn:hover i { transform: translateX(4px); }

/* ---------- Closing CTA (every page) ---------- */
.closing {
  padding: clamp(72px, 11vh, 128px) calc(var(--gutter) * 2) clamp(40px, 6vh, 72px);
  background: var(--bg);
}
.closing .kicker { margin-bottom: 18px; }
.closing__title {
  font-weight: 500;
  font-size: min(7.4vw, 128px);
  line-height: 1;
  letter-spacing: -.035em;
}
.closing__title span { color: var(--dim); }
.closing__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  margin-top: clamp(36px, 6vh, 64px);
}
.closing__mail { font-size: clamp(18px, 1.6vw, 24px); border-bottom: 1px solid var(--dim); transition: border-color .2s; }
.closing__mail:hover { border-color: var(--fg); }
.closing__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
  margin-top: clamp(56px, 9vh, 104px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px; line-height: 1.6;
}
.closing__grid .kicker { margin-bottom: 10px; }
.closing__grid a { transition: color .2s; }
.closing__grid a:hover { color: var(--dim); }
.closing__aside { color: var(--dim); }

.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding: 24px calc(var(--gutter) * 2) 32px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim);
}
.site-foot .brand .logo { width: 88px; color: var(--fg); }
.site-foot__nav { display: flex; gap: 24px; }
.site-foot a:not(.brand) { transition: color .2s; }
.site-foot a:not(.brand):hover { color: var(--fg); }

/* ---------- Inner page hero (about, contact) ---------- */
.page-hero {
  min-height: 66svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--top) + 40px) calc(var(--gutter) * 2) clamp(56px, 9vh, 96px);
}
.page-hero .kicker { margin-bottom: 20px; }
.page-hero__title {
  font-weight: 500;
  font-size: min(8vw, 140px);
  line-height: .98;
  letter-spacing: -.04em;
}
.page-hero__title span { color: var(--dim); }
.page-hero__intro {
  max-width: 46ch;
  margin-top: clamp(28px, 5vh, 48px);
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.4;
  color: var(--dim);
}
.page-hero__intro b { color: var(--fg); font-weight: 500; }

/* ---------- About ---------- */
.block { padding: clamp(56px, 8vh, 96px) calc(var(--gutter) * 2); }
.statement {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  align-items: end;
}
.statement__quote {
  font-weight: 500;
  font-size: min(4.6vw, 80px);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.statement__quote span { color: var(--dim); }
.statement__cols { display: grid; gap: 32px; }
.statement__cols h3 { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 400; margin-bottom: 10px; }
.statement__cols p { font-size: 17px; line-height: 1.5; }

.reasons { list-style: none; border-bottom: 1px solid var(--line); }
.reason {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(24px, 4vh, 40px) 0;
  border-top: 1px solid var(--line);
}
/* the deck's outlined numerals */
.reason__no {
  font-weight: 600;
  font-size: clamp(96px, 15vw, 240px);
  line-height: .8;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}
.reason h3 { font-weight: 500; font-size: clamp(24px, 2.4vw, 40px); line-height: 1.05; letter-spacing: -.02em; margin-bottom: 14px; }
.reason p { font-size: 17px; line-height: 1.55; color: var(--dim); max-width: 48ch; }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.form { display: grid; gap: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.field { display: grid; gap: 8px; }
.field > span, .form legend { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 18px; color: var(--fg);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 8px 0 12px;
  outline: none;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") right 4px center / 12px no-repeat; cursor: pointer; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--fg); }
.field input::placeholder, .field textarea::placeholder { color: rgba(0, 0, 0, .3); }
.form fieldset { border: 0; display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip span:hover { border-color: var(--fg); }
.chip input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip input:focus-visible + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__note { font-size: 13px; color: var(--dim); max-width: 40ch; }
.form__status { font-size: 15px; padding: 14px 18px; border-radius: 6px; background: #f2f2f2; }

.contact__aside { display: grid; gap: 32px; font-size: 16px; line-height: 1.6; }
.contact__aside .kicker { margin-bottom: 8px; }
.contact__aside a { border-bottom: 1px solid var(--line); transition: border-color .2s; }
.contact__aside a:hover { border-color: var(--fg); }

@media (max-width: 800px) {
  .closing__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-hero__title { font-size: calc((100vw - 4 * var(--gutter)) / 7.2); }
  .statement, .reason, .contact, .form__row { grid-template-columns: 1fr; }
  .statement__quote { font-size: calc((100vw - 4 * var(--gutter)) / 9); }
  .reason { gap: 8px; }
}

/* ---------- Blog ---------- */
/* the filter reuses the contact form's chips, as toggle buttons */
button.chip { background: none; border: 0; padding: 0; font: inherit; color: inherit; }
button.chip[aria-pressed="true"] span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.chip:focus-visible { outline: none; }
button.chip:focus-visible span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.blog__filter { margin-bottom: clamp(32px, 5vh, 56px); }
.blog__empty { color: var(--dim); font-size: 17px; }

/* a post's cover: its colour, with its craft's glyph in white */
.post-cover {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  background: var(--c, #222);
}
.post-cover i {
  position: absolute; inset: 22%;
  background: #fff;
  -webkit-mask: var(--glyph) center / contain no-repeat;
          mask: var(--glyph) center / contain no-repeat;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.post-card { display: grid; gap: 20px; align-content: start; outline: none; }
.post-card:hover .post-cover i, .post-card:focus-visible .post-cover i { transform: scale(1.12) rotate(-4deg); }
/* a post with its own cover photo: the yellow figure lifts off it on hover, as on the post itself */
.post-cover--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: opacity .45s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.post-card:hover .post-cover--photo img, .post-card:focus-visible .post-cover--photo img { transform: scale(1.04); }
.post-card:hover .post-cover__figure, .post-card:focus-visible .post-cover__figure { opacity: 0; }
.post-card:focus-visible .post-cover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.post-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 10px; }
.post-card__title { font-weight: 500; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.08; letter-spacing: -.02em; }
.post-card__title { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s ease; display: inline; }
.post-card:hover .post-card__title, .post-card:focus-visible .post-card__title { background-size: 100% 1px; }
.post-card__excerpt { font-size: 16px; line-height: 1.5; color: var(--dim); margin-top: 12px; max-width: 46ch; }
.post-card__go { display: inline-block; margin-top: 24px; font: 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.post-card__go i { font-style: normal; display: inline-block; transition: transform .25s; }
.post-card:hover .post-card__go i { transform: translateX(4px); }

/* the newest post runs wide; the rest sit in a grid beneath it */
.post-card--featured {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-bottom: clamp(48px, 8vh, 88px);
  border-bottom: 1px solid var(--line);
}
.post-card--featured .post-cover { aspect-ratio: 16 / 10; }
.post-card--featured .post-card__title { font-size: min(4vw, 64px); line-height: 1.02; letter-spacing: -.03em; }
.post-card--featured .post-card__excerpt { font-size: clamp(17px, 1.3vw, 20px); }
.blog__grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 6vh, 64px) var(--gutter);
  padding-top: clamp(48px, 8vh, 88px);
}
.blog__grid:empty { display: none; }

/* Post page */
.post-page {
  padding: calc(var(--top) + 24px) var(--gutter) 0;
  display: grid; gap: clamp(32px, 6vh, 64px);
}
.post-page__head .post-card__meta { margin-bottom: 18px; }
.post-page__title { font-weight: 500; font-size: clamp(40px, 6.4vw, 108px); line-height: .98; letter-spacing: -.035em; max-width: 15ch; }
.post-page .post-cover { aspect-ratio: 21 / 9; }
.post-page .post-cover i { inset: 18% 38%; }
.post-page__body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 68ch) minmax(0, 1fr);
  padding: clamp(24px, 4vh, 48px) 0 clamp(56px, 9vh, 104px);
}
.post-page__body > * { grid-column: 2; }
.post-page__lede { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.4; color: var(--fg); margin-bottom: 40px; }
.prose p { font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, .78); }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-weight: 500; font-size: clamp(24px, 2vw, 32px); line-height: 1.1; letter-spacing: -.02em; margin: 2em 0 .7em; }
.prose blockquote {
  margin: 1.6em 0; padding-left: 24px;
  border-left: 2px solid var(--accent);
  font-weight: 500; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.15; letter-spacing: -.02em;
}
.prose a { color: var(--fg); border-bottom: 1px solid var(--dim); transition: border-color .2s; }
.prose a:hover { border-color: var(--accent); }
.prose em { color: var(--fg); }
.post-page__more { border-top: 1px solid var(--line); padding-top: 20px; }
.post-page__more > .kicker { margin-bottom: 28px; }
.post-page__more .blog__grid { padding-top: 0; padding-bottom: clamp(56px, 9vh, 104px); }

@media (max-width: 900px) {
  .blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .post-card--featured { grid-template-columns: 1fr; }
  .post-card--featured .post-card__title { font-size: clamp(28px, 8vw, 40px); }
  .blog__grid { grid-template-columns: 1fr; }
  .post-page__body { grid-template-columns: 1fr; }
  .post-page__body > * { grid-column: 1; }
  .post-page .post-cover { aspect-ratio: 4 / 3; }
  .post-page .post-cover i { inset: 22%; }
  .prose p { font-size: 17px; }
}
