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

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

body {
  margin: 0;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--sel-bg); color: var(--sel-fg); }

[id] { scroll-margin-top: 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 20;
  padding: 12px 20px; border-radius: 999px;
  background: var(--skip-bg); color: var(--skip-fg); font-weight: 500;
}
.skip:focus { top: 16px; }

/* ---------- Page shell ---------- */
.page {
  position: relative;
  overflow: hidden;
  overflow: clip; /* clip, not hidden, so the sticky section bar can stick */
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
}

.grain {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.grain--film { mix-blend-mode: overlay; opacity: var(--grain, .5); }
.grain--flecks { opacity: .4; }

.wrap {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: 32px 48px 96px;
}

/* ---------- Navigation ---------- */
/* Baseline alignment: the bottoms of the wordmark and the links share one line.
   (Centering them made the taller wordmark look like it sat lower.) */
.navlinks {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 8px 40px;
}
.navlink {
  --pad-b: 10px;
  position: relative; display: inline-block; padding: 10px 0 var(--pad-b);
  /* Bold and tightly spaced like the first version of the site, one step smaller */
  font-weight: 700; text-transform: uppercase; font-size: 18px; letter-spacing: .06em;
}
/* Nav underline: a 2px line about 6px below the text. On hover it draws in from the
   left; on the current page it is always fully drawn. (.47em is the space between the
   baseline and the bottom of the text box in this font and line height.) */
.navlink:not(.brand)::after {
  content: ""; position: absolute; left: 0; right: 0;
  bottom: calc(var(--pad-b) + .47em - 8px); height: 2px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.navlink:not(.brand):hover::after,
.navlink[aria-current="page"]::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .navlink::after { transition: none; } }
.brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700; font-size: 29px; line-height: 1; letter-spacing: .2em;
}

/* Work page: the big name in the hero already says who this is, so the wordmark is hidden
   there. It keeps its place, so the four links stay where they are on every page. */
.brand--hidden { visibility: hidden; }

@media (max-width: 960px) {
  .navlinks { gap: 8px 16px; }
  .navlink { font-size: 16px; letter-spacing: .04em; }
  .brand { font-size: 24px; letter-spacing: .16em; }
}

@media (max-width: 560px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  /* Two rows: the wordmark on top, the four links spread across the row below */
  .navlinks { gap: 4px 12px; }
  .brand { order: -1; flex-basis: 100%; text-align: center; padding-bottom: 6px; font-size: 22px; letter-spacing: .18em; }
  /* on phones the wordmark has its own row; drop the row instead of leaving it empty */
  .brand--hidden { display: none; }
  .navlink:not(.brand) { font-size: 14px; letter-spacing: .08em; --pad-b: 12px; padding: 12px 0 var(--pad-b); }
}
/* The smallest phones (320px): keep the four links on one row */
@media (max-width: 360px) {
  .navlinks { column-gap: 8px; }
  .navlink:not(.brand) { font-size: 13px; letter-spacing: .04em; }
}

/* ---------- Shared type ---------- */
/* Three roles across all pages:
   display  page headline (hero name, Services and Contact headlines)
   title    piece titles, mixed case (section headings are small capitals)
   label    small uppercase metadata (nav, work labels) */
.display {
  margin: 0;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.05; letter-spacing: -.02em;
  text-wrap: balance;
}
/* Section headings: small spaced capitals, as in the first version of the site */
.section-title {
  margin: 0 0 24px;
  font-size: 25px; font-weight: 700; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase;
  text-wrap: balance;
}
.section-title[id] { scroll-margin-top: 88px; }

/* ---------- Work page ---------- */
/* Work background: "moss" (chosen 2026-10-28). The previous bright emerald version is
   kept below, commented out; to go back, swap the two blocks. */
.theme-work {
  --bg:
    radial-gradient(ellipse 35% 10% at 70% 6%, rgba(200,200,130,.40), transparent 70%),
    radial-gradient(ellipse 50% 13% at 18% 9%, rgba(230,220,170,.29), transparent 70%),
    radial-gradient(ellipse 40% 12% at 15% 55%, rgba(180,190,120,.23), transparent 70%),
    /* extra light blobs, spread down the page on alternating sides */
    radial-gradient(ellipse 46% 12% at 85% 26%, rgba(210,215,150,.42), transparent 70%),
    radial-gradient(ellipse 42% 11% at 62% 42%, rgba(225,220,170,.34), transparent 70%),
    radial-gradient(ellipse 44% 12% at 82% 66%, rgba(200,205,140,.38), transparent 70%),
    radial-gradient(ellipse 48% 11% at 25% 78%, rgba(220,215,165,.3), transparent 70%),
    radial-gradient(ellipse 44% 10% at 75% 96%, rgba(200,205,140,.28), transparent 70%),
    linear-gradient(180deg, #455E45 0%, #4A6449 50%, #2E4130 100%);
  --fg: #F2F6F8;
  --focus: #F2F6F8;
  --sel-bg: #F2F6F8; --sel-fg: #4A6449;
  --skip-bg: #F2F6F8; --skip-fg: #2E4130;
  --grain: .4;
}
body.theme-work { background: #4A6449; }
/* Previous Work background (bright emerald), saved:
.theme-work {
  --bg:
    radial-gradient(ellipse 35% 10% at 70% 6%, rgba(130,205,60,.8), transparent 70%),
    radial-gradient(ellipse 50% 13% at 18% 9%, rgba(236,232,110,.45), transparent 70%),
    radial-gradient(ellipse 45% 14% at 70% 85%, rgba(28,52,18,.75), transparent 70%),
    radial-gradient(ellipse 40% 12% at 15% 55%, rgba(130,205,60,.35), transparent 70%),
    linear-gradient(180deg, #1B6E52 0%, #167961 50%, #22502A 100%);
  --sel-fg: #167961; --skip-fg: #0E5A48;
}
body.theme-work { background: #167961; }
*/

.work-main { padding-top: 112px; }

/* Hero: who she is, before any video. Centered: a large name and the roles as a small
   spaced uppercase line (like the nav). The section links sit right under it and act
   as the hero's last line, listing what is on the page. */
.hero { margin: 0 0 52px; text-align: center; }
/* The name uses the section-title style (bold uppercase, spaced), only larger, set in
   Urbanist: a rounder, geometric cousin of Figtree (loaded on the Work page only) */
.hero__title {
  margin: 0; font-family: 'Urbanist', 'Figtree', system-ui, sans-serif;
  font-size: clamp(32px, 4.6vw, 66px); font-weight: 700; line-height: 1.05; letter-spacing: .06em;
  text-transform: uppercase; text-wrap: balance;
}
.hero__roles {
  margin: 22px 0 0;
  font-size: 15px; font-weight: 600; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase;
  text-wrap: balance;
}
@media (max-width: 560px) {
  .work-main { padding-top: 64px; }
  .hero { margin-bottom: 28px; }
  .hero__roles { margin-top: 16px; font-size: 13px; letter-spacing: .1em; }
}

/* Section bar: plain underlined links, like the main nav. It sticks to the top while
   you scroll; once stuck it gets a moss band (set from main.js) so the links stay
   readable over the videos. The current section is underlined like the current page. */
.chips {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 16px;
  /* Full browser width, so the band spans the window; the side padding keeps the
     links inside the page column (.wrap is 1280px with 48px or 20px gutters) */
  width: 100vw; margin: 0 0 72px calc(50% - 50vw);
  padding: 0 max(48px, calc(50vw - 592px));
  overflow-x: auto; scrollbar-width: none;
  transition: background-color .2s ease;
}
.chips::-webkit-scrollbar { display: none; }
/* Centered when it fits, scrollable from the left edge when it does not */
.chip:first-child { margin-left: auto; }
.chip:last-child { margin-right: auto; }
/* Once stuck: frosted moss glass that blurs what scrolls under it, with a soft bottom
   edge instead of a hard line. The links get a little shorter so the bar stays light.
   The extra bottom padding is the fade zone; the margin shrinks to match. */
.chips.is-stuck {
  background: rgba(52,74,52,.5);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
          backdrop-filter: blur(10px) saturate(1.15);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
          mask-image: linear-gradient(180deg, #000 70%, transparent);
  padding-bottom: 16px; margin-bottom: 64px; /* 72 - 16 + 8 (shorter links), so nothing below jumps */
}
.chips.is-stuck .chip { min-height: 46px; }
/* Uppercase, spaced out like the first version of the site, one step smaller */
.chip {
  flex: none;
  display: inline-flex; align-items: center; min-height: 54px; padding: 0 32px;
  font-weight: 500; font-size: 17px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .06em;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px;
  text-decoration-color: rgba(242,246,248,.5);
  transition: text-decoration-color .2s ease;
}
.chip:hover,
.chip[aria-current="true"] {
  text-decoration-color: #F2F6F8; text-decoration-thickness: 2px;
}
@media (max-width: 960px) {
  .chip { padding: 0 16px; }
}
@media (max-width: 560px) {
  .chips { gap: 8px; margin-bottom: 48px; padding: 0 20px; }
  .chips.is-stuck { padding-bottom: 12px; margin-bottom: 38px; }
  .chip { min-height: 48px; padding: 0 8px; font-size: 15px; letter-spacing: .04em; }
}
@media (prefers-reduced-motion: reduce) { .chip, .chips { transition: none; } }

.intro { margin: -8px 0 32px; max-width: 34em; }

.grid { display: grid; gap: 48px 32px; }
.grid--tall   { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid--single { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--wide   { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 56px 32px; }
.work { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grid--wide .work { gap: 16px; }

.media {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 20px;
  background: #050807; object-fit: contain;
  transition: transform .25s ease, box-shadow .25s ease;
}
.media--tall { aspect-ratio: 9 / 16; object-fit: cover; background: #243324; }
.work:hover > .media, .work:hover > .player,
.work:focus-within > .media, .work:focus-within > .player {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(4,30,22,.45);
}

/* Video player: poster, play button and duration until pressed, then native controls */
.player {
  position: relative; border-radius: 20px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.player > .media { transition: none; }
.player__start {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: inherit; cursor: pointer; color: #F2F6F8;
  background: linear-gradient(180deg, rgba(5,8,7,0) 45%, rgba(5,8,7,.55) 100%);
}
.player__start:focus-visible { outline-offset: -4px; }
.play-disc {
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(242,246,248,.18);
  border: 1px solid rgba(242,246,248,.45);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
          backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 8px 24px rgba(5,8,7,.25);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background-color .35s ease;
}
.play-disc svg { width: 26px; height: 26px; }
.player__start:hover .play-disc,
.yt__play:hover .play-disc { transform: scale(1.08); background-color: rgba(242,246,248,.3); }
.player__time {
  position: absolute; left: 16px; bottom: 14px;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .play-disc { width: 64px; height: 64px; }
  .play-disc svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .media, .player, .play-disc { transition: none; }
  .work:hover > .media, .work:hover > .player,
  .work:focus-within > .media, .work:focus-within > .player { transform: none; }
  .player__start:hover .play-disc, .yt__play:hover .play-disc { transform: none; }
}

.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: #2E4130; color: #C9DDD6; font-size: 15px;
}

/* YouTube: click-to-load player (no YouTube code loads until a visitor presses play) */
.yt {
  position: relative; overflow: hidden;
  background-color: #243324; background-position: center; background-size: cover; background-repeat: no-repeat;
}
.yt__play {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; cursor: pointer; color: #F2F6F8;
  background: linear-gradient(180deg, rgba(5,8,7,0) 40%, rgba(5,8,7,.45) 100%);
}
.yt__play:focus-visible { outline-offset: -4px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }

.work__label {
  margin: 0; font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: #DCE9E4;
}
.work__title { margin: 4px 0 0; font-size: 20px; font-weight: 700; line-height: 1.25; }
.grid--wide .work__title { font-size: 26px; line-height: 1.2; }
/* Latin spelling after a Russian title: lighter and quieter */
.translit { font-weight: 400; opacity: .7; }
.work__role { margin: 6px 0 0; font-size: 16px; }

.section + .section { margin-top: 96px; }

.more { margin: 40px 0 0; font-size: 16px; }
.more a {
  display: inline-block; padding: 12px 0; font-weight: 500;
  text-decoration: underline; text-underline-offset: 5px;
}

/* ---------- About page ---------- */
/* Colours as in the first version of the site: dark text on desktop, light text on
   phones. Phones use this stretched gradient; wider screens use the one below. */
.theme-about {
  --bg:
    radial-gradient(ellipse 100% 25% at 40% 82%, rgba(255,150,70,.42) 0%, rgba(255,120,80,.2) 40%, transparent 80%),
    radial-gradient(ellipse 60% 20% at 78% 78%, rgba(255,95,60,.25) 0%, transparent 75%),
    radial-gradient(ellipse 70% 45% at 50% 50%, #C8A6D8 0%, rgba(200,166,216,.6) 35%, transparent 75%),
    linear-gradient(180deg, #3E7F8E 0%, #4F7F9A 35%, #3B4B6A 75%, #161B2C 100%);
  --fg: #F2F6F8;
  --focus: #F2F6F8;
  --sel-bg: #151A2B; --sel-fg: #F2F6F8;
  --skip-bg: #F2F6F8; --skip-fg: #3B3E67;
  --grain: .6;
}
body.theme-about { background: #3B4B6A; }
/* On the first site this page was exactly one screen tall, so the gradient fitted the
   screen. The footer makes it longer now, which stretched everything down. On wider screens
   the colours are placed by screen height (vh) instead, so the first screen looks like the
   old page (lilac behind the text, a blue band, then orange right under Tools). The orange
   then carries on down behind the footer to just under the email. */
@media (min-width: 761px) {
  .theme-about {
    --bg:
      radial-gradient(ellipse 100% 25vh at 40% 82vh, rgba(255,150,70,.42) 0%, rgba(255,120,80,.2) 40%, transparent 80%),
      radial-gradient(ellipse 60% 20vh at 78% 78vh, rgba(255,95,60,.25) 0%, transparent 75%),
      /* one continuous orange band from under Tools (screen-based) down to just under the
         email (page-based), so there is no darker gap between them on any screen height */
      linear-gradient(180deg, transparent 76vh, rgba(255,140,75,.3) 86vh, rgba(255,130,80,.3) calc(100% - 170px), transparent calc(100% - 40px)),
      radial-gradient(ellipse 60% 26% at 78% 78%, rgba(255,95,60,.22) 0%, transparent 75%),
      radial-gradient(ellipse 70% 45vh at 50% 50vh, #C8A6D8 0%, rgba(200,166,216,.6) 35%, transparent 75%),
      linear-gradient(180deg, #3E7F8E 0, #4F7F9A 35vh, #3B4B6A 75vh, #343F60 calc(100% - 140px), #161B2C 100%);
  }
}

.about-main {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 64px;
  padding-top: 96px;
  color: #0B0E1A;
}
@media (max-width: 760px) {
  .about-main { color: #F4F1F6; text-shadow: 0 1px 12px rgba(21,26,43,.45); }
}
.about-photo { flex: 0 1 384px; width: 384px; max-width: 100%; min-width: 0; }
/* Photo stack: the front photo is shown in full, the next one peeks out behind it.
   Tapping brings the next photo to the front. */
.photo-stack {
  position: relative; display: block; width: calc(100% - 24px); aspect-ratio: 1 / 1;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 20px;
}
.photo-stack img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 20px;
  transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .4s ease, filter .4s ease;
  box-shadow: 0 10px 30px rgba(21,26,43,.22);
}
.photo-stack img[data-pos="0"] { z-index: 3; transform: none; }
.photo-stack img[data-pos="1"] { z-index: 2; transform: translate(22px, 14px) rotate(3.5deg) scale(.96); filter: brightness(.92); }
.photo-stack img[data-pos="2"] { z-index: 1; transform: translate(34px, 24px) rotate(6deg) scale(.92); filter: brightness(.85); }
.photo-stack:hover img[data-pos="1"] { transform: translate(30px, 16px) rotate(5deg) scale(.96); }
.photo-stack:focus-visible { outline-offset: 8px; }
@media (prefers-reduced-motion: reduce) { .photo-stack img { transition: none; } }
.about-text { flex: 1 1 280px; min-width: 0; max-width: 620px; }
.about-text p { margin: 0 0 16px; font-weight: 450; }
.about-text .lead { margin: 0 0 20px; font-size: 25px; line-height: 1.4; font-weight: 500; }
.about-main .tools {
  flex: 1 1 100%; color: #F4F1F6; /* the bottom of the About background is dark */
  margin: 8px 0 0; padding-top: 20px; border-top: 1px solid currentColor;
  display: grid; gap: 6px;
  font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.9;
}
.about-main .tools div { display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; }
.about-main .tools dt { font-weight: 800; }
.about-main .tools dd { margin: 0; }
/* Phones: smaller, tighter caps so the lists read as two light rows, not a block */
@media (max-width: 560px) {
  .about-main .tools { font-size: 12px; letter-spacing: .04em; line-height: 1.75; gap: 10px; }
  .about-main .tools div { grid-template-columns: 5em 1fr; gap: 8px; }
}

/* "1 / 3" counter under the photo stack (added by js/about.js) */
.photo-count {
  margin: 20px 0 0; width: calc(100% - 24px); text-align: center;
  font-size: 14px; font-weight: 600; letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}


/* ---------- Services page ---------- */
.theme-services {
  /* Light palette from Evgenia's "Kindness" reference: off-white paper, periwinkle, lemon, mint */
  --bg: #F1F1EC;
  --fg: #17181C;
  --focus: #17181C;
  --sel-bg: #8A9BEA; --sel-fg: #17181C;
  --skip-bg: #17181C; --skip-fg: #F1F1EC;
  --grain: .35;
}
body.theme-services { background: #F1F1EC; }

.services-main { padding-top: 96px; }
/* Headline in uppercase, as on the first version of the site */
.services-main .display {
  margin: 20px 0 40px; text-align: center; color: #3E4767;
  text-transform: uppercase; font-size: clamp(28px, 3.6vw, 48px); letter-spacing: .01em;
  font-weight: 500; /* lighter than the bold default, same weight as the card titles */
}
.services { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; position: relative; isolation: isolate; margin-top: -86px; }
/* Each service sits inside a big, very soft colour blob (like out-of-focus light) */
.service {
  position: relative;
  flex: 1 1 260px; min-width: 0; max-width: 400px; min-height: 380px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 12px; text-align: center;
}
.service::before,
.service::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: 50%; width: 600px; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
}
.service::before {
  background: var(--blob);
  filter: blur(78px); opacity: .9;
}
.service::after {
  width: 730px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' seed='5' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='linear' slope='2.2' intercept='-0.6'/><feFuncG type='linear' slope='2.2' intercept='-0.6'/><feFuncB type='linear' slope='2.2' intercept='-0.6'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 200px 200px; mix-blend-mode: overlay; opacity: .5;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent);
          mask-image: radial-gradient(closest-side, #000 40%, transparent);
}
/* Colours: periwinkle, lemon and mint from her "Kindness" reference */
.service:nth-child(1) { --blob: radial-gradient(circle at 42% 40%, #F7F28C 0 16%, #8597EC 42%, #CDEFD0 78%); }
.service:nth-child(2) { --blob: radial-gradient(circle at 55% 62%, #F7F28C 0 12%, #7F92EA 40%, #CDEFD0 80%); }
.service:nth-child(3) { --blob: radial-gradient(circle at 42% 40%, #F7F28C 0 16%, #8597EC 42%, #CDEFD0 78%); }
/* Text sits above every blob layer */
.service > * { position: relative; z-index: 1; }
/* Stagger the blobs a little, like scattered lights */
@media (min-width: 900px) {
  .service:nth-child(2) { margin-top: 80px; }
  .service:nth-child(3) { margin-top: 30px; }
}
/* The blobs drift slowly, like out-of-focus lights; the text stays still.
   Each blob has its own speed and start so they never move in step.
   The noise layer (::after) uses the same motion so it stays on its blob. */
@keyframes drift {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33%      { transform: translate(calc(-50% + 28px), calc(-50% - 18px)) scale(1.04); }
  66%      { transform: translate(calc(-50% - 20px), calc(-50% + 22px)) scale(.97); }
}
.service::before,
.service::after { animation: drift 18s ease-in-out infinite; will-change: transform; }
.service:nth-child(2)::before,
.service:nth-child(2)::after { animation-duration: 22s; animation-delay: -7s; }
.service:nth-child(3)::before,
.service:nth-child(3)::after { animation-duration: 20s; animation-delay: -13s; animation-direction: reverse; }
@media (prefers-reduced-motion: reduce) {
  .service::before, .service::after { animation: none; }
}
.service h2 {
  /* each title breaks onto two lines (a <br> in services.html), so the three cards match */
  margin: 0 0 12px; font-weight: 600; text-transform: uppercase; font-size: clamp(24px, 2.3vw, 33px); line-height: 1.1; color: #4F4B66;
}
.service p { margin: 0; max-width: 18em; color: #4F4B66; }
.cta-row { margin-top: 72px; }
.cta {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px;
  border-radius: 999px; background: #0F1A2A; color: #F2F6F8; font-weight: 500;
}

/* ---------- Contact page ---------- */
.theme-contact {
  --bg: #A2BDB7;
  --fg: #1C2B27;
  --focus: #1C2B27;
  --sel-bg: #1C2B27; --sel-fg: #A2BDB7;
  --skip-bg: #1C2B27; --skip-fg: #F2F6F8;
  --grain: .5;
}
body.theme-contact { background: #A2BDB7; }

.contact-main { padding-top: 112px; max-width: 980px; margin: 0 auto; text-align: center; }
.contact-main .display { margin-bottom: 48px; }
/* Contact: the email is the main element, the other channels sit under it */
.contacts { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.email--hero { font-size: clamp(26px, 3.6vw, 44px); font-weight: 600; letter-spacing: -.01em; }
.contacts__more {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 36px;
  margin: 0; padding: 0; list-style: none;
  font-size: 20px; font-weight: 500;
}
/* Channel links and the email (footer and Contact): a faint resting line shows they are
   links; on hover a solid line draws over it from the left, like the nav.
   --pad-b: bottom padding, --u-gap: space between baseline and line, --u-h: thickness.
   (.47em is the space between the baseline and the bottom of the text box.) */
.contacts__more a,
.outro__links a { --pad-b: 8px; display: inline-block; padding: 8px 0 var(--pad-b); }
.contacts__more a,
.outro__links a,
.email__link { --u-gap: 6px; --u-h: 1.5px; position: relative; }
.email__link { --pad-b: 0px; --u-gap: .16em; --u-h: max(1.5px, .045em); display: inline-block; }
/* Channel links carry a small icon before the name; the underline starts after it */
.contacts__more a,
.outro__links a { display: inline-flex; align-items: center; gap: .4em; --u-left: 1.4em; }
.channel-icon { flex: none; width: 1em; height: 1em; }
:is(.contacts__more a, .outro__links a, .email__link)::before,
:is(.contacts__more a, .outro__links a, .email__link)::after {
  content: ""; position: absolute; left: var(--u-left, 0); right: 0;
  bottom: calc(var(--pad-b) + .47em - var(--u-gap) - var(--u-h)); height: var(--u-h);
  background: currentColor;
}
:is(.contacts__more a, .outro__links a, .email__link)::before { opacity: .35; }
:is(.contacts__more a, .outro__links a, .email__link)::after {
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
:is(.contacts__more a, .outro__links a, .email__link):is(:hover, :focus-visible)::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  :is(.contacts__more a, .outro__links a, .email__link)::after { transition: none; }
}

/* Email (assembled by js/email.js): address link plus a Copy button */
.email { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; overflow-wrap: anywhere; }
.email__copy {
  min-height: 36px; padding: 0 16px;
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .02em;
  color: inherit; background: transparent; cursor: pointer;
  border: 1.5px solid currentColor; border-radius: 999px;
  transition: background-color .2s ease, color .2s ease;
}
.email__copy:hover,
.email__copy.is-done { background: var(--fg); color: var(--bg-solid); }
@media (prefers-reduced-motion: reduce) { .email__copy { transition: none; } }
@media (max-width: 560px) { .contacts__more { font-size: 18px; gap: 4px 28px; } }

/* Solid page colour for each theme, used where text sits on the foreground colour */
.theme-work     { --bg-solid: #2E4130; }
.theme-about    { --bg-solid: #161B2C; }
.theme-services { --bg-solid: #F1F1EC; }
.theme-contact  { --bg-solid: #A2BDB7; }

/* ---------- Shared footer ---------- */
.outro {
  position: relative; z-index: 1;
  margin-top: 160px; padding-top: 56px;
  border-top: 1px solid currentColor;
}
.outro__title { margin: 0; font-size: clamp(44px, 7vw, 96px); font-weight: 700; line-height: 1; letter-spacing: -.025em; }
.outro__title a { display: inline-flex; align-items: center; gap: .18em; text-decoration: none; }
.outro__arrow { width: .7em; height: .7em; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.outro__title a:hover .outro__arrow,
.outro__title a:focus-visible .outro__arrow { transform: translateX(.12em); }
.outro__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px;
  margin-top: 40px;
}
.outro .email { justify-content: flex-start; font-size: clamp(20px, 2vw, 26px); font-weight: 500; }
.outro__links { display: flex; flex-wrap: wrap; gap: 4px 32px; margin: 0; padding: 0; list-style: none; font-size: 18px; font-weight: 500; }
.outro__legal { margin: 56px 0 0; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .outro__arrow { transition: none; } }
@media (max-width: 560px) {
  .outro { margin-top: 112px; padding-top: 40px; }
  .outro__row { margin-top: 28px; }
  .outro__links { gap: 4px 24px; }
  .outro__legal { margin-top: 40px; }
}
/* About: the bottom of that page is dark, so the footer uses light text. The Tools list
   above already has a divider line, so the footer drops its own to avoid two lines. */
.theme-about .outro { color: #F4F1F6; border-top: 0; padding-top: 0; }
/* Services: footer text in the page's ink colour, above the blobs */
.theme-services .outro { color: #2E2B45; }

.services-note { margin-top: 23px; text-align: center; }
.services-main .display,
.services-note { position: relative; z-index: 1; }
.services-note p {
  margin: 0;
  font-family: 'DM Mono', ui-monospace, monospace; font-weight: 400; font-size: 18px; line-height: 1.5; letter-spacing: .02em;
  text-wrap: balance;
}
.services-note p { color: #57506E; }
.services-note strong { font-weight: 500; }
@media (max-width: 560px) { .services-note p { font-size: 17px; } }
