:root {
  --dark: #1f1e1d;
  --light: #e4e4e4;
  --blue: #44bbff;
  --lilac: #a098ab;

  /* text on the current section, flipped by [data-theme="light"] */
  --fg: var(--light);
  --fg-soft: rgba(228, 228, 228, 0.84);
  --fg-dim: rgba(228, 228, 228, 0.62);
  --fg-faint: rgba(228, 228, 228, 0.32);
  --line: rgba(228, 228, 228, 0.16);
  --link: var(--blue);
  --chip: var(--lilac);

  --display: "Italiana", "Didot", "Bodoni 72", serif;
  --sans: "Ubuntu Sans", "Ubuntu", ui-sans-serif, system-ui, sans-serif;
  --mono: "Ubuntu Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 6vw, 104px);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --fg: var(--dark);
  --fg-soft: rgba(31, 30, 29, 0.84);
  --fg-dim: rgba(31, 30, 29, 0.66);
  --fg-faint: rgba(31, 30, 29, 0.36);
  --line: rgba(31, 30, 29, 0.18);
  --link: #0d6fae;
  --chip: #6f6680;
  color: var(--fg);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--dark);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

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

/* ───────── fixed layers ───────── */

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 40;
  pointer-events: none;
  opacity: 0.06;
  background-image: 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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
}

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span {
  display: block;
  height: 100%;
  background: var(--blue);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* header */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  pointer-events: none;
  color: var(--light);
  mix-blend-mode: difference;
}
.chrome > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark { width: 34px; height: 34px; }
.brand__name, .chrome__right {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.chrome__right { display: flex; align-items: center; gap: 28px; }
.clock { opacity: 0.7; font-family: var(--mono); letter-spacing: 0.12em; }
.chrome__cta { position: relative; }
.chrome__cta::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.3);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease);
}
.chrome__cta:hover::after { transform: scaleX(1); }

/* the stack: vertical section index */
.stack {
  position: fixed;
  right: calc(var(--gutter) * 0.42);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  color: var(--light);
  mix-blend-mode: difference;
}
.stack ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stack a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.4;
  transition: opacity 0.4s;
}
.stack a span {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  white-space: nowrap;
}
.stack a i {
  order: 2;
  display: block;
  width: 12px;
  height: 1px;
  background: currentColor;
  transition: width 0.5s var(--ease);
}
.stack a:hover, .stack a:focus-visible, .stack a.is-active { opacity: 1; }
.stack a:hover span, .stack a:focus-visible span, .stack a.is-active span { opacity: 1; transform: none; }
.stack a.is-active i { width: 30px; }

/* ───────── shared type ───────── */

main { position: relative; z-index: 1; }

.kicker {
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.kicker .idx { font-family: var(--mono); letter-spacing: 0.1em; color: var(--link); margin-right: 14px; }
.kicker .sub { font-family: var(--mono); letter-spacing: 0.1em; color: var(--fg-faint); margin-left: 10px; }

.title {
  margin: 0 0 26px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 6.6vw, 140px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* sentences that carry the substance: sentence case, readable size, bright */
.line {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 350;
  line-height: 1.6;
  color: var(--fg-soft);
}

.chips, .links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.chips li, .links a {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.chips li { color: var(--chip); }
.links a { position: relative; color: var(--link); }
.links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0.3em; bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--ease);
}
.links a:hover::after, .links a:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }

/* char reveal */
[data-chars] { display: block; }
[data-chars] .wd { display: inline-block; white-space: nowrap; overflow-x: visible; overflow-y: clip; padding-bottom: 0.06em; margin-bottom: -0.06em; }
[data-chars] .ch {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.2s var(--ease);
  transition-delay: calc(var(--i) * 32ms);
}
[data-chars].is-in .ch { transform: none; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: 0.3s;
}
.reveal.is-in { opacity: 1; transform: none; }

/* ───────── hero ───────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 330px);
  align-items: end;
  gap: 40px;
  padding: 120px var(--gutter) 108px;
}
.hero__title { margin: 0; font-weight: 400; line-height: 0.9; white-space: nowrap; }
.hero__a {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(30px, 6.2vw, 120px);
  text-transform: uppercase;
  line-height: 0.92;
}
.hero__b {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 64px);
  line-height: 1.2;
  padding-left: 0.12em;
  margin-top: 0.1em;
}
.hero__c {
  font-family: var(--display);
  font-size: clamp(60px, 10.6vw, 204px);
  text-transform: uppercase;
  line-height: 0.84;
  margin-left: -0.04em;
}
.hero__aside { display: grid; gap: 26px; padding-bottom: 12px; }
.hero__who { margin: 0; display: grid; gap: 10px; }
/* the name is a fact, so it is set in the sans; the serif belongs to the statement */
.hero__who b {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero__who span {
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 350;
  line-height: 1.4;
  color: var(--fg);
}

.cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transform: translateX(-50%);
}
.cue__line { position: relative; width: 1px; height: 40px; background: var(--line); overflow: hidden; }
.cue__line::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--fg);
  transform: translateY(-100%);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { 60%, 100% { transform: translateY(100%); } }

/* ───────── panels ───────── */

.panel {
  position: relative;
  min-height: 130vh;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
}
.panel--work { min-height: 115vh; }
.panel--tall { min-height: 140vh; }
.panel--tall .line { max-width: 46ch; }
.panel--tall .title { margin-bottom: 20px; font-size: clamp(48px, 5.2vw, 112px); }
.panel__inner { position: relative; z-index: 2; max-width: min(560px, 42vw); }

.path {
  margin: 22px 0 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  line-height: 2;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.path i { font-style: normal; color: var(--link); margin: 0 4px; }
.path b { font-weight: 400; color: var(--fg); }
.path em { display: block; font-style: normal; color: var(--fg-soft); }
.path a { color: var(--link); }
.path a:hover { text-decoration: underline; text-underline-offset: 4px; }


/* a statement in the hero's three tiers: thin sans, small serif, big serif */
.statement { margin: 0 0 22px; font-weight: 400; line-height: 0.9; white-space: nowrap; }
.statement__a {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(26px, 3.3vw, 60px);
  text-transform: uppercase;
  line-height: 0.95;
}
.statement__b {
  font-family: var(--display);
  font-size: clamp(22px, 2.8vw, 50px);
  line-height: 1.25;
  padding-left: 0.08em;
}
.statement__c {
  font-family: var(--display);
  font-size: clamp(50px, 6vw, 116px);
  text-transform: uppercase;
  line-height: 0.86;
  margin-left: -0.03em;
}

/* work: the domains; the active one drives the pixel art */
.work { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--line); counter-reset: work; }
.work li {
  counter-increment: work;
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 11px 0 12px;
  border-bottom: 1px solid var(--line);
  cursor: default;
  opacity: 0.5;
  outline: none;
  transition: opacity 0.5s var(--ease);
}
.work li::before {
  content: counter(work, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--link);
}
.work li.is-active, .work li:focus-visible { opacity: 1; }
.work li::after {
  content: "";
  position: absolute;
  left: 40px; right: 0; bottom: -1px;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.work.is-cycling li.is-active::after { animation: work-fill var(--cycle, 5s) linear forwards; }
@keyframes work-fill { to { transform: scaleX(1); } }
.work li > b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 1.9vw, 28px);
  line-height: 1.1;
  text-transform: uppercase;
}
/* only the active story shows its line: it opens as the figure arrives */
.work li > span {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 15px;
  font-weight: 350;
  line-height: 1.55;
  color: var(--fg-soft);
  transition: max-height 0.7s var(--ease), opacity 0.5s, margin 0.7s var(--ease);
}
.work li.is-active > span, .work li:focus-visible > span { max-height: 12em; margin-top: 5px; opacity: 1; }

/* the tech capability under each business capability */
.work .tags {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link);
}

/* points: principles on the mindset page, features on the after-hours page */
.points { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line); counter-reset: point; }
.points li {
  counter-increment: point;
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 8px 0 9px;
  border-bottom: 1px solid var(--line);
}
.points li::before {
  content: counter(point, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--link);
}
.points li > b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.15;
  text-transform: uppercase;
}
.points li > span {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 350;
  line-height: 1.5;
  color: var(--fg-soft);
}

/* mirrored page: art on the left, words on the right half */
@media (min-width: 821px) {
  .panel--mirror .panel__inner {
    margin-left: calc(50vw - var(--gutter));
    max-width: min(560px, calc(50vw - var(--gutter) - 90px));
  }
}

/* the mindset loop: four steps in a 2x2 cycle, read clockwise, arrows going round */
.loop {
  list-style: none;
  display: grid;
  --gx: 46px;
  --gy: 34px;
  grid-template-columns: 1fr 1fr;
  gap: var(--gy) var(--gx);
  margin: 34px 0 0;
  padding: 0;
}
.loop li { position: relative; display: grid; gap: 6px; align-content: start; }
.loop li:nth-child(3) { grid-area: 2 / 2; }
.loop li:nth-child(4) { grid-area: 2 / 1; }
.loop b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1;
  text-transform: uppercase;
}
.loop span { font-size: 14px; font-weight: 350; line-height: 1.5; color: var(--fg-soft); }
/* each arrow is centred in the gap it crosses */
.loop li::after {
  position: absolute;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1;
  color: var(--link);
}
.loop li:nth-child(1)::after, .loop li:nth-child(3)::after { top: 0; width: var(--gx); height: 1.4em; }
.loop li:nth-child(2)::after, .loop li:nth-child(4)::after { left: 0; width: 1.4em; height: var(--gy); }
.loop li:nth-child(1)::after { content: "→"; right: calc(-1 * var(--gx)); }
.loop li:nth-child(2)::after { content: "↓"; bottom: calc(-1 * var(--gy)); }
.loop li:nth-child(3)::after { content: "←"; left: calc(-1 * var(--gx)); }
.loop li:nth-child(4)::after { content: "↑"; top: calc(-1 * var(--gy)); }

/* product page: the star centred on top, the pitch centred under it, selling points in a row */
.product__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 22px 0 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.product__cta a {
  padding: 10px 18px 9px;
  border: 1px solid var(--link);
  border-radius: 99px;
  color: var(--link);
  transition: background 0.3s, color 0.3s;
}
.product__cta a:hover, .product__cta a:focus-visible { background: var(--link); color: var(--light); }

.pillars { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--line); counter-reset: pillar; }
.pillars li { counter-increment: pillar; display: grid; gap: 6px; align-content: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pillars li::before {
  content: counter(pillar, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--link);
}
.pillars b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(19px, 1.5vw, 24px);
  line-height: 1.1;
  text-transform: uppercase;
}
.pillars span { font-size: 14px; font-weight: 350; line-height: 1.5; color: var(--fg-soft); }

@media (min-width: 821px) {
  .panel--product .panel__inner {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 6vh;
  }
  .product__head { max-width: 640px; margin: 0 auto; text-align: center; }
  .product__head .line { margin: 0 auto; max-width: 46ch; }
  .product__cta { justify-content: center; }
  .pillars {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0 28px;
    margin-top: 5vh;
    padding-top: 20px;
    border-bottom: 0;
  }
  .pillars li { padding: 0; border: 0; }
}

/* the line that ties the platforms together */
.under {
  margin: 18px 0 0;
  font-size: 15px;
  font-weight: 350;
  line-height: 1.6;
  color: var(--fg-soft);
}
.under b { font-weight: 400; color: var(--link); }



/* the real photo under the pixel portrait, revealed through a lens */
@property --r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.lens {
  --s: calc(min(19vw, 36vh) * 1.04);
  position: fixed;
  z-index: 1;
  left: calc(27vw - var(--s));
  top: calc(50vh - var(--s));
  width: calc(var(--s) * 2);
  height: calc(var(--s) * 2);
  pointer-events: none;
  clip-path: circle(var(--r) at var(--mx, 50%) var(--my, 50%));
  transition: --r 0.55s var(--ease);
}
.lens img { display: block; width: 100%; height: 100%; }
.lens-ring {
  position: fixed;
  z-index: 1;
  left: -110px;
  top: -110px;
  width: 220px;
  height: 220px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  pointer-events: none;
  scale: 0;
  transition: scale 0.5s var(--ease);
}
.lens-ring.is-on { scale: 1; }

/* ───────── contact ───────── */

.contact {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22vh var(--gutter) 26px;
}
.contact__inner { max-width: min(640px, 48vw); }
.contact__title { margin: 0 0 30px; font-weight: 400; }
.contact__line {
  margin: 0 0 40px;
  max-width: 40ch;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 350;
  line-height: 1.6;
  color: var(--fg-soft);
}
.contact__a {
  font-family: var(--display);
  font-size: clamp(56px, 7.4vw, 136px);
  line-height: 0.95;
  text-transform: uppercase;
}
.contact__b {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(30px, 3.6vw, 64px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.3em;
}
.links--big { gap: 14px 40px; }
.links--big a { font-size: 13px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.foot a:hover { color: var(--link); }

a:focus-visible { outline: 1px solid var(--blue); outline-offset: 4px; }

/* short laptop screens: the tall pages tighten so they fit one screen */
@media (min-width: 821px) and (max-height: 780px) {
  .panel--tall .title { font-size: clamp(44px, 4.4vw, 80px); margin-bottom: 14px; }
  .points { margin-top: 16px; }
  .points li { padding: 5px 0 6px; }
  .path { margin-top: 16px; }
  .panel--tall .statement { margin-bottom: 14px; }
  .panel--tall .statement__a { font-size: 2.9vw; }
  .panel--tall .statement__b { font-size: 2.4vw; }
  .panel--tall .statement__c { font-size: 4.8vw; }
  .panel--tall .line { max-width: none; font-size: 15px; }
  .panel--product .panel__inner { padding-bottom: 3vh; }
  .panel--product .pillars { margin-top: 3vh; }
  .product__cta { margin-top: 14px; }
  .loop { margin-top: 24px; --gx: 40px; --gy: 26px; }
  .loop b { font-size: 28px; }
}

/* ───────── small screens: art sits above, text below on a veil ───────── */

@media (max-width: 820px) {
  .stack, .brand__name, .clock { display: none; }

  .hero { grid-template-columns: 1fr; align-items: end; padding-bottom: 90px; }
  .hero__aside { padding-bottom: 0; }
  /* each line sized from the text width so the headline fills the phone screen */
  .hero { gap: 28px; align-content: end; }
  .hero__a { font-size: calc((100vw - 2 * var(--gutter)) / 7.75); }
  .hero__b { font-size: calc((100vw - 2 * var(--gutter)) / 10); }
  .hero__c { font-size: calc((100vw - 2 * var(--gutter)) / 4.68); }
  .lens { --s: calc(min(40vw, 22vh) * 1.04); left: calc(50vw - var(--s)); top: calc(30vh - var(--s)); }

  .panel, .panel--work {
    min-height: 0;
    align-items: flex-start;
    padding-top: 54svh;
    padding-bottom: 16svh;
  }
  .panel__inner {
    max-width: none;
    width: 100%;
    padding: 26px 20px 28px;
    border-radius: 4px;
    background: rgba(31, 30, 29, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .title { font-size: clamp(44px, 12.4vw, 84px); }
  .loop { --gx: 34px; --gy: 30px; }
  .loop b { font-size: 26px; }
  .loop span { font-size: 13px; }
  [data-theme="light"] .panel__inner { background: rgba(228, 228, 228, 0.6); }
  .statement__a { font-size: 7.6vw; }
  .statement__b { font-size: 6.6vw; }
  .statement__c { font-size: 13.4vw; }
  .contact { padding-top: 50svh; }
  .contact__inner { max-width: none; }
}

/* ───────── reduced motion ───────── */

.still [data-chars] .ch, .still .reveal { transform: none !important; opacity: 1 !important; transition: none !important; }
.still html, html.still { scroll-behavior: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .cue__line::after { animation: none; }
  [data-chars] .ch, .reveal { transform: none !important; opacity: 1 !important; transition: none !important; }
}
