/* theadefioye.com - one stylesheet for every page.
   Breakpoints: mobile < 768, tablet 768-1199, desktop >= 1200. Nav collapses below 1024. */

/* Fallback faces sized to the web fonts, so text does not re-wrap when the fonts arrive. */
@font-face { font-family: "Bricolage Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 700 800; size-adjust: 108%; }
@font-face { font-family: "Bricolage Fallback XL"; src: local("Arial"), local("ArialMT"); font-weight: 700 800; size-adjust: 103%; }
@font-face { font-family: "Instrument Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 400 600; size-adjust: 101.5%; }

:root {
  --royal: #5A24E6;
  --night: #1E0B4D;
  --ember: #FF4F1F;
  --lime: #C6F432;
  --ink: #0C0C0D;
  --bone: #F2EDE4;
  --white: #FFFFFF;
  --grey: #3F3F40;

  /* Derived for contrast (AA) and card grounds, from P01. */
  --ember-text: #D23C10;   /* Ember text on white cards */
  --royal-on-ink: #7347F2; /* large Royal numbers on Ink */
  --on-royal: #E2DAF8;     /* body text on Royal */
  --on-night: #D2CBDA;     /* body text on Royal Night */
  --on-ink: #C4C0B9;       /* body text on Ink */
  --mist: #E7E1F7;         /* light card media ground */
  --night-2: #2A1666;      /* role board ground */
  --chip: #3A2680;
  --chip-ink: #1F1F22;
  --line-ink: #2C2C2F;

  --display: "Bricolage Grotesque", "Bricolage Fallback", Arial, sans-serif;
  --text: "Instrument Sans", "Instrument Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --pad: 80px;
  --max: 1440px;
  --u: min(1vw, 14.4px);
  --r-card: 28px;
  --r-frame: 16px;
  --section: 120px;
}

@media (max-width: 1199px) { :root { --pad: 48px; --section: 96px; } }
@media (max-width: 767px)  { :root { --pad: 20px; --r-card: 24px; --section: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

/* Focus: Lime on dark grounds, Royal on light grounds. */
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.light :focus-visible { outline-color: var(--royal); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--lime); color: var(--ink); padding: 12px 20px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* Grounds */
.royal { background: var(--royal); color: var(--bone); }
.night { background: var(--night); color: var(--bone); }
.ink-bg { background: var(--ink); color: var(--bone); }
.bone { background: var(--bone); color: var(--ink); }
.white { background: var(--white); color: var(--ink); }

.section { padding-block: var(--section); }

/* Type */
.label {
  font-family: var(--text); font-weight: 600; font-size: 16px; line-height: 1.2;
  letter-spacing: .18em; text-transform: uppercase; color: var(--royal);
}
.royal .label, .night .label, .ink-bg .label { color: var(--lime); }
.h1, .h2, .h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; }
.h1 { font-size: clamp(44px, calc(var(--u) * 5.84), 84px); line-height: .9; letter-spacing: -.045em; }
.h2 { font-size: clamp(30px, calc(var(--u) * 4.45), 64px); line-height: 1.02; }
.h2--m { font-size: clamp(28px, calc(var(--u) * 3.62), 52px); line-height: 1.06; }
.h3 { font-weight: 700; font-size: clamp(26px, calc(var(--u) * 2.8), 40px); line-height: 1.05; letter-spacing: -.025em; }
.label + .h1, .label + .h2, .label + .h2--m { margin-top: 16px; }
@media (min-width: 1200px) { .h1 { font-family: "Bricolage Grotesque", "Bricolage Fallback XL", Arial, sans-serif; } }
.lead { font-size: 22px; line-height: 1.5; }
@media (max-width: 767px) {
  .label { font-size: 13px; }
  .lead { font-size: 17px; }
  .label + .h1, .label + .h2, .label + .h2--m { margin-top: 10px; }
}

/* Long and short copy: the short lines are P03 (mobile). */
@media (min-width: 768px) { .sm { display: none !important; } }
@media (max-width: 767px) { .lg { display: none !important; } }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 0 30px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--text); font-weight: 600; font-size: 18px; line-height: 1; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--bone); }
.btn--bone { background: var(--bone); color: var(--ink); }
.btn--bone:hover { background: var(--lime); }
.btn--line { border-color: var(--bone); color: var(--bone); }
.btn--line:hover { background: var(--bone); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--bone); }
.btn--ink:hover { background: var(--royal); color: var(--white); }
.btn--line-ink { border-color: var(--ink); color: var(--ink); }
.btn--line-ink:hover { background: var(--ink); color: var(--bone); }
@media (max-width: 767px) {
  .btn { min-height: 52px; padding: 0 22px; font-size: 16px; }
}

.arrow { display: inline-block; width: 1em; height: 1em; vertical-align: -.14em; flex: none; }
.go {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none;
  transition: color .15s ease;
}
.go:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Crown Line mark */
.crown { display: block; overflow: visible; }

/* Signature: CSS mask, colour from background-color */
.sig {
  display: block; aspect-ratio: 640 / 331; background-color: var(--lime);
  -webkit-mask: url("assets/img/signature.png") center / contain no-repeat;
  mask: url("assets/img/signature.png") center / contain no-repeat;
}
.sig--ink { background-color: var(--ink); }

/* ---------- Nav ---------- */
/* The header stays at the top while the page scrolls; anchors land below it. */
body > header { position: sticky; top: 0; z-index: 30; }
html { scroll-padding-top: 118px; }
@media (max-width: 767px) { html { scroll-padding-top: 88px; } }
.nav { position: relative; z-index: 20; }
.nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 30px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: var(--bone);
}
.brand .crown { width: 40px; height: 40px; color: var(--white); }
.nav__links { display: flex; align-items: center; gap: clamp(20px, calc(var(--u) * 3), 44px); }
.nav__links a:not(.btn) {
  text-decoration: none; font-size: 17px; color: var(--on-royal); transition: color .15s ease;
}
.nav__links a:not(.btn):hover { color: var(--white); text-decoration: underline; text-underline-offset: 6px; }
.nav__links .btn { margin-left: clamp(0px, calc(var(--u) * 1), 14px); }
.menu-btn {
  display: none; width: 48px; height: 48px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn span { display: block; width: 26px; height: 2px; background: var(--bone); border-radius: 2px; }
.menu-btn span + span { margin-top: 7px; }
.menu-btn .bars { display: block; }

.menu {
  position: fixed; inset: 0; z-index: 50; background: var(--royal); color: var(--bone);
  display: none; flex-direction: column; padding: 18px 20px 32px; overflow-y: auto;
}
.menu.open { display: flex; }
.menu__top { display: flex; align-items: center; justify-content: space-between; }
.menu__close {
  width: 48px; height: 48px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.menu__close::before, .menu__close::after {
  content: ""; position: absolute; left: 11px; top: 23px; width: 26px; height: 2px; background: var(--bone); border-radius: 2px;
}
.menu__close::before { transform: rotate(45deg); }
.menu__close::after { transform: rotate(-45deg); }
.menu ul { margin-top: 48px; }
.menu li a {
  display: block; padding: 10px 0; text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.1; letter-spacing: -.03em;
}
.menu .btn { margin-top: 32px; align-self: flex-start; }

.brand span { white-space: nowrap; }
/* Seven links from P03 (Motion): tighter between 1024 and 1199 so the brand stays on one line. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav__links { gap: 22px; }
  .nav__links .btn { margin-left: 4px; padding: 0 24px; }
}
@media (max-width: 1023px) {
  .nav__links { display: none; }
  .menu-btn { display: inline-flex; flex-direction: column; }
}
@media (max-width: 767px) {
  .nav__bar { padding-block: 20px; }
  .brand { font-size: 18px; gap: 10px; }
  .brand .crown { width: 30px; height: 30px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__inner { position: relative; max-width: var(--max); margin-inline: auto; min-height: 802px; }
.hero__text { position: relative; z-index: 2; padding: 168px var(--pad) 120px; }
.hero .label { letter-spacing: .2em; }
.hero__text .h1 { max-width: 9.2em; color: var(--bone); }
@media (min-width: 1200px) {
  .hero__text .h1 { font-size: min(84px, calc((100vw - 2 * var(--pad)) * .0656)); }
}
.hero__text .lead { margin-top: 36px; max-width: min(600px, calc(var(--u) * 41.5)); color: var(--on-royal); }
.hero__cta { display: flex; align-items: center; gap: 46px; margin-top: 46px; }
.hero__cta .sig { width: clamp(150px, calc(var(--u) * 13.5), 200px); margin-top: 10px; }

.stage { position: absolute; pointer-events: none; }
.stage__crown { position: absolute; color: var(--ember); }
.stage__crown svg { width: 100%; height: auto; }
.stage__img { position: relative; width: 100%; height: auto; }

.hero .stage {
  --w: calc(var(--u) * 41.7);
  width: var(--w); left: calc(var(--pad) + var(--u) * 50.6 + (1440px - min(100vw, 1440px)) * .16); top: 87px;
}
.hero .stage__crown { width: calc(var(--w) * 1.23); left: calc(var(--w) * -.145); top: calc(var(--w) * -.055); }

/* Crown Line draws once on load (P04). */
.draw path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw .8s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (max-width: 1199px) {
  .hero__inner { min-height: 0; display: flex; flex-direction: column; }
  .hero__text { padding: 40px var(--pad) 0; }
  .hero__text .h1 { font-size: clamp(44px, 8vw, 84px); }
  .hero__text .lead { max-width: 640px; }
  .hero .stage {
    --w: min(72vw, 560px);
    position: relative; left: auto; top: auto; margin: 72px auto -40px; transform: translateX(4%);
  }
}
@media (max-width: 767px) {
  .hero__text { padding-top: 12px; }
  .hero__text .h1 { font-size: clamp(36px, 11.3vw, 52px); line-height: .95; letter-spacing: -.035em; max-width: none; }
  .hero__text .lead { margin-top: 16px; }
  .hero__cta { margin-top: 32px; gap: 10px; }
  .hero__cta .btns { gap: 10px; width: 100%; }
  .hero__cta .btn { flex: 1 1 auto; padding: 0 14px; }
  .hero__cta .sig { display: none; }
  .hero .stage { --w: 79.5vw; margin: 64px 0 -34px 11.5%; transform: none; }
  .hero .stage__crown { width: calc(var(--w) * 1.226); left: calc(var(--w) * -.129); top: calc(var(--w) * -.126); }
}

@media (max-width: 374px) {
  .btn { padding: 0 14px; font-size: 15px; }
}

/* ---------- Proof strip ---------- */
.proof { padding-block: 64px 30px; }
.proof ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof li { padding-right: 24px; }
.proof li + li { border-left: 1px solid rgba(242, 237, 228, .18); padding-left: 30px; }
.proof strong {
  display: block; font-family: var(--display); font-weight: 800; letter-spacing: -.04em;
  font-size: clamp(44px, calc(var(--u) * 5), 72px); line-height: 1;
}
.proof li:first-child strong { color: var(--lime); }
.proof span { display: block; margin-top: 20px; color: var(--on-night); font-size: 18px; line-height: 1.4; max-width: 270px; }
@media (max-width: 1023px) {
  .proof ul { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .proof li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 767px) {
  .proof { padding-block: 40px 50px; }
  .proof ul { column-gap: 20px; row-gap: 32px; }
  .proof li, .proof li + li { border: 0; padding: 0; }
  .proof strong { font-size: 44px; }
  .proof span { margin-top: 6px; font-size: 15px; }
}

/* ---------- Selected work ---------- */
.work .h2 { max-width: 15.5em; }
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px 28px; margin-top: 70px; }

.card { position: relative; border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; min-height: 760px; }
.card__media { position: relative; height: 400px; flex: none; }
.card__body { padding: 32px 32px 40px; flex: 1; }
.card__body .label { font-size: 15px; }
.card--royal .label, .card--night .label { color: var(--lime); }
.card--white .label { color: var(--royal); }
.card__body .h3 { margin-top: 14px; }
.card__status { margin-top: 12px; font-weight: 600; font-size: 17px; line-height: 1.3; }
.card__text { margin-top: 18px; font-size: 18px; line-height: 1.45; }
.card--royal { background: var(--royal); color: var(--bone); }
.card--royal .card__status { color: var(--lime); }
.card--royal .card__text { color: var(--on-royal); }
.card--night { background: var(--night); color: var(--bone); }
.card--night .card__status { color: var(--lime); }
.card--night .card__text { color: var(--on-night); }
.card--white { background: var(--white); color: var(--ink); }
.card--white .card__status { color: var(--ember-text); }
.card--white .card__text { color: var(--grey); }
.media--night { background: var(--night); }
.media--mist { background: var(--mist); }
.media--board { background: var(--night-2); }
.media--deep { background: #1A0943; }
.work__grid .card:nth-child(n + 6) .card__media { height: 380px; }
/* Whole-card links: the title link stretches over the card (one link per card). */
.stretch { text-decoration: none; color: inherit; transition: color .15s ease; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: var(--r-card); }
.card:hover .stretch, .feature:hover .stretch { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.card:hover .card__foot .go, .feature:hover .feature__links .go { text-decoration: underline; text-underline-offset: 4px; }
.stretch:focus-visible { outline: 0; }
.stretch:focus-visible::after { outline: 3px solid var(--lime); outline-offset: -3px; }
.card--white .stretch:focus-visible::after { outline-color: var(--royal); }
.feature :focus-visible, .card--royal :focus-visible, .card--night :focus-visible { outline-color: var(--lime); }
.above { position: relative; z-index: 4; }
.card__body { display: flex; flex-direction: column; }
.card__foot {
  margin-top: auto; padding-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em;
}
.card--white .card__foot { color: var(--ink); }
.card__foot .gh {
  font-family: var(--text); font-weight: 600; font-size: 17px; color: var(--royal);
  text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .15s ease;
}
.card__foot .gh:hover { color: var(--ink); }

/* Device frames */
.phone {
  position: absolute; width: 31.4%; padding: 4px; border-radius: 18px; background: #0B0B0E;
  box-shadow: 0 18px 40px rgba(12, 12, 13, .28);
}
.phone img { width: 100%; height: auto; border-radius: 14px; } /* true ratio from width and height */
.phone--a { left: 17.2%; top: 15%; }
.phone--b { left: 52.7%; top: 25%; }
.phone--hi { top: 15%; }
.phone--lo { top: 25%; }
.phone--bare { padding: 0; background: none; border-radius: 0; box-shadow: none; }
.phone--bare img { border-radius: 0; aspect-ratio: 828 / 1735; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }

.browser {
  position: absolute; border-radius: var(--r-frame); overflow: hidden; background: var(--white);
  box-shadow: 0 20px 50px rgba(12, 12, 13, .18);
}
.browser__bar { display: flex; gap: 8px; align-items: center; height: 32px; padding-inline: 16px; background: #EAE6F2; }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
.browser__bar i:nth-child(2) { background: #FEBC2E; }
.browser__bar i:nth-child(3) { background: #28C840; }
.browser img { width: 100%; height: auto; }
.window__bar {
  height: 34px; display: flex; align-items: center; padding-inline: 12px; background: #2C2C2E; color: #FFFFFF;
  font-size: 12px; font-weight: 600; letter-spacing: -.01em;
}

/* Card media positions (desktop and tablet) */
.card--f2f .browser--page { left: 6%; top: 8%; width: 81%; }
.card--f2f .browser--plugin { left: 41%; top: 42%; width: 54%; }
.card--ebs .browser--site { left: 5%; top: 10%; width: 80%; }
.card--ebs .phone--bare { left: 63%; top: 24%; width: 33%; }

/* Featured: Capital Bread */
.feature { grid-column: 1 / -1; background: var(--night); color: var(--bone); border-radius: var(--r-card); position: relative; overflow: hidden; min-height: 760px; }
.feature__body { width: calc(43.75% - 70px); padding: 56px 0 50px 56px; }
.tag {
  display: inline-block; padding: 7px 16px; border-radius: 999px; background: var(--lime); color: var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase;
}
.feature .h3 { margin-top: 26px; font-size: clamp(32px, calc(var(--u) * 3.4), 48px); }
.feature__text { margin-top: 38px; font-size: 20px; line-height: 1.5; color: var(--on-night); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 450px; margin-top: 56px; }
.stats > div { min-width: 0; }
.stats strong {
  display: block; font-family: var(--display); font-weight: 800; font-size: clamp(36px, calc(var(--u) * 3.4), 48px);
  line-height: 1; letter-spacing: -.04em; color: var(--lime); white-space: nowrap;
}
.stats span { display: block; margin-top: 12px; font-size: 18px; color: var(--on-night); }
.feature__links { margin-top: 64px; display: grid; gap: 8px; font-size: 20px; }
.feature__links .go { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
.feature__links p { color: var(--bone); }
.feature__links p a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.feature__links p a:hover { color: var(--lime); }
.feature__media { position: absolute; inset: 0; }
.feature .browser--main { left: 43.75%; right: 0; top: 90px; }
.feature .browser--main img { aspect-ratio: 1400 / 1200; object-fit: cover; object-position: left top; max-height: 588px; }
.feature .browser--pos { left: 76.5%; width: 23.5%; top: 620px; }
.feature .browser--pos .browser__bar { height: 20px; gap: 5px; padding-inline: 10px; }
.feature .browser--pos .browser__bar i { width: 7px; height: 7px; }

/* PriestlyConnect and EBS cards: phones sized by the media box, true ratio. */
@media (min-width: 768px) {
  .card--pc .card__media, .card--ebs .card__media { container-type: size; }
  .card--ebs .phone--bare { width: min(33cqw, 36cqh); }
}
.card--pc .card__media { --w: min(34.5cqw, 37cqh); }
.card--pc .phone { width: var(--w); padding: 5px; border-radius: 22px; }
.card--pc .phone img { border-radius: 17px; }
.phone--pc1 { left: calc(50% - var(--w) - 1.5px); top: 11%; }
.phone--pc2 { left: calc(50% + 1.5px); top: 21%; z-index: 1; }

/* 768 to 1199 (found in P03): Raregem Studio phones and the Fit to Figma plugin are sized by the media box,
   so they no longer run past its bottom edge. At 1200 and up the sizes are the same as before. */
@media (min-width: 768px) {
  .card--f2f .card__media { container-type: size; }
  .card--f2f .browser--plugin { width: min(54cqw, calc((58cqh - 34px) / .7625)); }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .card--rs .card__media { container-type: size; --w: min(31.4cqw, 33cqh); }
  .card--rs .phone { width: var(--w); }
  .card--rs .phone--a { left: calc(50% - var(--w) - 8px); }
  .card--rs .phone--b { left: calc(50% + 9px); }
}

/* AI card: the neural graph, inline SVG */
.card--ai .card__media svg { display: block; width: 100%; height: 100%; }
.card--ai .ai-wide { display: none; }

/* P03: Omni Harbor, the second wide card, on white. */
.feature--white { background: var(--white); color: var(--ink); }
.feature__status { margin-top: 14px; font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--ember-text); }
.feature--white .feature__text { margin-top: 30px; color: var(--grey); }
.feature--white .stats { grid-template-columns: repeat(3, auto); justify-content: start; max-width: none; column-gap: clamp(24px, calc(var(--u) * 3.6), 52px); }
.feature--white .stats strong { color: var(--royal); }
.feature--white .stats span { color: var(--grey); }
.feature--white .feature__links .go { color: var(--ink); }
.feature--white :focus-visible { outline-color: var(--royal); }
.feature--white .stretch:focus-visible::after { outline-color: var(--royal); }
.feature--white .browser { box-shadow: 0 20px 50px rgba(30, 11, 77, .16); }

/* 1200 to 1279: the featured body column is narrowest, so the figures step down to fit. */
@media (min-width: 1200px) and (max-width: 1279px) {
  .feature .stats strong { font-size: 34px; }
  .feature--white .stats { column-gap: 20px; }
}

/* Lead Radar: one browser frame, anchored to the top and running off the bottom edge. */
.browser--fill { left: 7%; right: 7%; top: 10%; bottom: 0; border-radius: var(--r-frame) var(--r-frame) 0 0; }
.browser--fill img { height: calc(100% - 32px); object-fit: cover; object-position: left top; }

/* Capital Votes: two phones, sized by the media box, true ratio. */
@media (min-width: 768px) {
  .card--cv .card__media { container-type: size; }
}
.card--cv .card__media { --w: min(34.5cqw, 34cqh); }
.card--cv .phone { width: var(--w); padding: 5px; border-radius: 22px; }
.card--cv .phone img { border-radius: 17px; }
.phone--cv1 { left: calc(50% - var(--w) - 1.5px); top: 8%; }
.phone--cv2 { left: calc(50% + 1.5px); top: 18%; z-index: 1; }

/* AI models and agents: the last card, full width, graph left and text right (768 and up). */
@media (min-width: 768px) {
  .work__grid > .card--full { grid-column: 1 / -1; flex-direction: row; min-height: 0; }
  .work__grid .card.card--full .card__media { width: 50%; height: 380px; }
  .card--full .card__body { justify-content: center; padding: 48px 56px; }
  .card--full .card__text { max-width: 520px; }
}
@media (min-width: 1200px) {
  .card--ai.card--full .ai-narrow { display: none; }
  .card--ai.card--full .ai-wide { display: block; }
}

@media (max-width: 1199px) {
  .work__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; margin-top: 48px; }
  .card { min-height: 0; }
  .feature { min-height: 0; display: flex; flex-direction: column-reverse; }
  .feature__media { position: relative; height: clamp(300px, 50vw, 520px); overflow: hidden; }
  .feature .browser--main { left: 48px; right: 0; top: 48px; }
  .feature .browser--pos { left: auto; right: 0; width: 32%; top: auto; bottom: 0; }
  .feature__body { width: auto; padding: 40px 48px 48px; }
  .feature__text { max-width: 720px; }
  .stats { margin-top: 40px; }
  .feature__links { margin-top: 40px; }
}
@media (max-width: 1023px) {
  .work__grid .card .card__media, .work__grid .card:nth-child(n + 6) .card__media { height: 340px; }
}

/* Mobile work list (P03): three full cards, then compact rows. The AI card gives way to the AI section. */
@media (max-width: 767px) {
  .work .h2 { font-size: 32px; }
  .work__grid { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .feature { border-radius: var(--r-card); }
  .feature__media { height: 240px; background: var(--white); }
  .feature .browser--main { inset: 0; border-radius: 0; box-shadow: none; }
  .feature .browser--main .browser__bar, .feature .browser--pos { display: none; }
  .feature .browser--main img { height: 240px; max-height: none; aspect-ratio: auto; object-position: 0 30%; }
  .feature__body { padding: 28px 22px 30px; }
  .feature .tag, .feature .stats, .feature__links p { display: none; }
  .feature .h3 { margin-top: 0; font-size: 28px; }
  .feature__text { margin-top: 14px; font-size: 16px; }
  .feature__links { margin-top: 22px; font-size: 16px; }

  .card { min-height: 0; }
  .card .label, .card__status { display: none; }
  .card__body { padding: 28px 22px 30px; }
  .card__body .h3 { margin-top: 0; font-size: 28px; }
  .card__text { margin-top: 12px; font-size: 16px; }
  .card__foot { padding-top: 22px; font-size: 16px; }

  /* Omni Harbor: a full card after Capital Bread (P03), the top of the overview. */
  .feature--white .feature__status { display: none; }
  .feature--white .feature__text { margin-top: 14px; }
  .feature--white .browser--main img { object-position: 0 0; }
  .feature--white .feature__media { border-bottom: 1px solid rgba(12, 12, 13, .08); }

  .card--rs { order: 1; }
  .card--pc { order: 3; }
  .card--lr { order: 4; }
  .card--ebs { order: 5; }
  .card--cv { order: 6; }
  .card--f2f { order: 7; }
  .card--ai { display: none; }

  /* Raregem Studio: the projects screen, cropped (P03). */
  .work__grid .card--rs .card__media { height: 240px; }
  .card--rs .phone { position: absolute; inset: 0; width: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .card--rs .phone img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; object-position: 50% 0; }
  .card--rs .phone--b { display: none; }


  .card--row { flex-direction: row; align-items: center; gap: 16px; padding: 12px; min-height: 120px; }
  .work__grid .card.card--row .card__media { position: relative; width: 88px; height: 96px; flex: none; border-radius: 12px; overflow: hidden; background: var(--ink); }
  .card--row .card__body { padding: 0 4px 0 0; }
  .card--row .h3 { font-size: 22px; }
  .card--row .card__text { margin-top: 6px; font-size: 15px; line-height: 1.4; }
  .card--row .card__foot { display: none; }
  .card--row .phone, .card--row .browser { position: absolute; inset: 0; width: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .card--row .phone img, .card--row .browser img { width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; object-fit: cover; filter: none; }
  .card--pc .phone--pc1, .card--ebs .browser, .card--f2f .browser--page, .card--row .window__bar { display: none; }
  .card--ebs .phone img { object-position: 50% 40%; transform: scale(1.25); }
  .card--f2f .browser--plugin img { object-position: 0 50%; }
  .card--lr .browser__bar, .card--cv .phone--cv2 { display: none; }
  .card--lr .browser img { object-position: 0 0; }
  .card--cv .phone img { object-position: 50% 12%; }
  /* P03: every compact row is white. */
  .card--row.card--royal { background: var(--white); color: var(--ink); }
  .card--row.card--royal .card__text { color: var(--grey); }
  .card--row.card--royal .stretch:focus-visible::after { outline-color: var(--royal); }
}

/* ---------- AI ---------- */
.ai__top { display: grid; grid-template-columns: minmax(0, 660px) minmax(0, 500px); justify-content: space-between; gap: 40px; }
.ai .h2 { max-width: 10.4em; }
.ai__body { margin-top: 22px; max-width: 620px; font-size: 21px; line-height: 1.52; color: var(--on-night); }
.ai__graph { padding-top: 30px; }
.ai__graph svg { display: block; width: 100%; height: auto; }
.graph__labels text { font-family: var(--text); font-weight: 600; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; fill: var(--on-night); }
.graph__labels .lime { fill: var(--lime); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 30px; }
.pillar { border-radius: var(--r-card); background: var(--night-2); padding: 36px 32px 48px; min-height: 330px; }
.pillar--royal { background: var(--royal); }
.pillar b { display: block; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -.03em; color: var(--ember); }
.pillar--royal b { color: var(--lime); }
.pillar h3 { margin-top: 30px; }
.pillar__k { display: block; font-weight: 600; font-size: 14px; line-height: 1.2; letter-spacing: .18em; text-transform: uppercase; color: var(--lime); }
.pillar__t { display: block; margin-top: 12px; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: -.02em; color: var(--bone); }
.pillar p { margin-top: 24px; font-size: 18px; line-height: 1.5; color: var(--on-night); }
.pillar--royal p { color: var(--on-royal); }
/* Selected AI work: one card (B8). */
.ai-work { margin-top: 72px; }
.ai-card {
  position: relative; margin-top: 24px; border-radius: var(--r-card); background: var(--night-2); padding: 40px 44px 44px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; column-gap: 64px; align-items: start;
}
.ai-card .tag { grid-column: 1; justify-self: start; }
.ai-card .h3 { grid-column: 1; margin-top: 22px; color: var(--bone); }
.ai-card__text { grid-column: 2; grid-row: 1 / 3; font-size: 20px; line-height: 1.5; color: var(--on-night); }
.ai-card .go { grid-column: 2; margin-top: 28px; font-family: var(--display); font-size: 19px; letter-spacing: -.01em; color: var(--bone); }
.ai-card:hover .stretch { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.ai-card:hover .go { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1023px) {
  .ai-card { display: block; }
  .ai-card .h3 { margin-top: 18px; }
  .ai-card__text { margin-top: 16px; }
  .ai-card .go { display: inline-flex; }
}
@media (max-width: 767px) {
  .ai-work { margin-top: 40px; }
  .ai-card { margin-top: 18px; padding: 26px 22px 28px; border-radius: 24px; }
  .ai-card .h3 { font-size: 26px; }
  .ai-card__text { font-size: 16px; }
  .ai-card .go { margin-top: 18px; font-size: 16px; }
}

@media (max-width: 1199px) {
  .ai__top { grid-template-columns: 1fr; }
  .ai__graph { max-width: 480px; padding-top: 16px; }
  .pillars { margin-top: 48px; gap: 20px; }
  .pillar { padding: 32px 28px 36px; min-height: 0; }
  .pillar__t { font-size: 26px; }
}
@media (max-width: 1023px) {
  .pillars { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .ai .h2 { font-size: 32px; }
  .ai__body { margin-top: 44px; font-size: 15px; }
  .ai__graph { display: none; }
  .pillars { margin-top: 40px; gap: 0; }
  .pillar { display: grid; grid-template-columns: 54px 1fr; border-radius: 0; background: none; padding: 26px 0 30px; border-top: 1px solid rgba(242, 237, 228, .16); }
  .pillar--royal { background: none; }
  .pillar b { font-size: 22px; padding-top: 3px; }
  .pillar h3 { margin-top: 0; }
  .pillar__k { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; text-transform: none; color: var(--bone); }
  .pillar__t { margin-top: 6px; font-family: var(--text); font-weight: 400; font-size: 14px; line-height: 1.45; letter-spacing: 0; color: var(--on-night); }
}

/* ---------- Method ---------- */
.method .h2 { max-width: 16em; font-size: clamp(30px, calc(var(--u) * 4.17), 60px); }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 116px; }
.steps3 li { border-top: 2px solid var(--line-ink); padding-top: 38px; }
.steps3 b {
  display: block; font-family: var(--display); font-weight: 800; font-size: 52px; line-height: 1; letter-spacing: -.03em; color: var(--royal-on-ink);
}
.steps3 li:nth-child(3) b { color: var(--ember); }
.steps3 h3 { margin-top: 30px; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }
.steps3 p { margin-top: 14px; color: var(--on-ink); font-size: 18px; line-height: 1.5; max-width: 360px; }

.flow {
  display: grid; grid-template-columns: max-content minmax(40px, 37fr) 260px minmax(40px, 27fr) minmax(max-content, 24fr);
  align-items: center; margin-top: 80px;
}
.flow ul { display: flex; flex-direction: column; align-items: flex-start; }
.flow__in { gap: 4px; padding-right: 16px; }
.flow__out { gap: 10px; }
.flow li {
  font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1; padding: 11px 20px;
  border-radius: 999px; background: var(--chip-ink); color: var(--bone); white-space: nowrap;
}
.flow__out li:first-child { background: var(--lime); color: var(--ink); }
.flow__lines { position: relative; align-self: stretch; }
.flow__lines svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.flow__hub {
  display: flex; align-items: center; justify-content: center; height: 110px; border-radius: 22px;
  background: var(--royal); color: var(--bone); font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -.02em;
}
/* Nodes appear in order once (P04). */
html.js .flow .node, html.js .flow__lines { opacity: 0; transition: opacity .3s ease; transition-delay: calc(var(--i, 0) * 90ms); }
html.js .flow.in .node, html.js .flow.in .flow__lines { opacity: 1; }

@media (max-width: 1199px) {
  .steps3 { margin-top: 72px; gap: 24px; }
  .steps3 h3 { font-size: 26px; }
  .flow { grid-template-columns: max-content minmax(24px, 1fr) 200px minmax(24px, 1fr) max-content; }
  .flow__hub { font-size: 24px; height: 90px; }
  .flow li { font-size: 15px; padding: 10px 16px; }
}
@media (max-width: 767px) {
  .method .h2 { font-size: 34px; }
  .steps3 { grid-template-columns: 1fr; gap: 0; margin-top: 40px; }
  .steps3 li { display: grid; grid-template-columns: 60px 1fr; padding: 24px 0 24px; border-top-width: 1px; }
  .steps3 b { font-size: 26px; grid-row: 1 / 3; padding-top: 2px; }
  .steps3 h3 { margin-top: 0; font-size: 20px; }
  .steps3 p { margin-top: 6px; font-size: 15px; }
  .flow { display: none; }
}

/* ---------- Ideas ---------- */
.ideas__sub { margin-top: 20px; color: var(--grey); font-size: 20px; }
.ideas__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 70px; }
.idea { position: relative; border-radius: var(--r-card); padding: 44px 36px 44px; display: flex; flex-direction: column; min-height: 460px; }
.idea .label { font-size: 15px; letter-spacing: .14em; }
.idea .h3 { margin-top: 16px; font-weight: 700; letter-spacing: -.02em; }
.idea p:not(.label) { margin-top: auto; padding-top: 48px; font-size: 18px; line-height: 1.5; }
.idea .go { margin-top: 48px; font-family: var(--display); font-size: 17px; letter-spacing: -.01em; }
.idea.card--royal p:not(.label) { color: var(--on-royal); }
.idea.card--night p:not(.label) { color: var(--on-night); }
.idea.card--white p:not(.label) { color: var(--grey); }
.idea.card--white .label { color: var(--royal); }
.idea.card--royal .label, .idea.card--night .label { color: var(--lime); }
@media (max-width: 1023px) {
  .ideas__grid { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .idea { min-height: 0; }
  .idea p:not(.label) { padding-top: 24px; }
  .idea .go { margin-top: 28px; }
}
@media (max-width: 767px) {
  .ideas .h2 { font-size: 30px; }
  .ideas__sub { font-size: 16px; margin-top: 12px; }
  .idea { padding: 28px 22px 30px; }
  .idea .h3 { font-size: 26px; }
  .idea p:not(.label) { font-size: 16px; }
}

/* ---------- Speaking ---------- */
.speak { position: relative; overflow: hidden; }
.speak__inner { position: relative; max-width: var(--max); margin-inline: auto; min-height: 860px; }
.speak__text { position: relative; z-index: 2; padding: var(--section) var(--pad) 100px; max-width: calc(var(--pad) + 680px); }
.speak .h2 { font-size: clamp(36px, calc(var(--u) * 5), 72px); line-height: .95; letter-spacing: -.04em; }
.speak__body { margin-top: 74px; font-size: 20px; line-height: 1.5; color: var(--on-royal); }
.topics { margin-top: 40px; display: grid; gap: 14px; }
.topics li { position: relative; padding-left: 24px; font-size: 19px; line-height: 1.6; color: var(--bone); }
.topics li::before { content: ""; position: absolute; left: 0; top: .56em; width: 12px; height: 12px; border-radius: 50%; background: var(--ember); }
.topics li:first-child::before { background: var(--lime); }
.speak .btns { margin-top: 64px; }
.speak__note { margin-top: 18px; font-size: 15px; color: var(--on-royal); }
.speak .stage { --w: calc(var(--u) * 36.1); width: var(--w); left: calc(var(--pad) + var(--u) * 57); bottom: -6px; }
.speak .stage__crown { width: calc(var(--w) * 1.19); left: calc(var(--w) * -.154); top: calc(var(--w) * -.048); }
@media (max-width: 1199px) {
  .speak__inner { min-height: 0; }
  .speak__text { max-width: none; padding-bottom: 0; }
  .speak__body { margin-top: 40px; max-width: 640px; }
  .speak .stage { --w: min(60vw, 460px); position: relative; left: auto; bottom: auto; margin: 72px auto -50px; transform: translateX(6%); }
}
@media (max-width: 767px) {
  .speak .h2 { font-size: 36px; }
  .speak__body { margin-top: 20px; font-size: 16px; }
  .speak .topics, .speak .btn--line { display: none; }
  .speak .btns { margin-top: 30px; }
  .speak .btns .btn { flex: 1; }
  .speak__note { margin-top: 14px; font-size: 14px; }
  .speak .stage { --w: 72vw; margin: 72px 0 -36px 17%; transform: none; }
  .speak .stage__crown { width: calc(var(--w) * 1.25); left: calc(var(--w) * -.19); top: calc(var(--w) * -.03); }
}

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 520px 1fr; gap: 80px; align-items: start; }
.about__photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-card); }
.about .h2 { font-size: clamp(30px, calc(var(--u) * 3.2), 46px); line-height: 1.05; letter-spacing: -.03em; margin-top: 16px; }
.about__body { margin-top: 64px; color: var(--grey); font-size: 19px; line-height: 1.55; }
.timeline { margin-top: 64px; border-top: 1px solid rgba(12, 12, 13, .14); }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 0; padding: 12px 0; border-bottom: 1px solid rgba(12, 12, 13, .14); align-items: baseline; }
.timeline span { color: var(--royal); font-weight: 600; font-size: 16px; }
.timeline p { font-size: 17px; line-height: 1.3; }
.about .btns { margin-top: 48px; }
.about .btn { min-height: 60px; }
@media (max-width: 1199px) {
  .about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
  .about__body { margin-top: 32px; }
  .timeline { margin-top: 40px; }
}
@media (max-width: 1023px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 520px; }
}
@media (max-width: 767px) {
  .about { padding-top: 36px; }
  .about__grid { gap: 36px; }
  .about__photo { aspect-ratio: 350 / 420; border-radius: var(--r-card); object-position: 50% 20%; }
  .about .label { margin-top: 0; }
  .about .h2 { font-size: 26px; line-height: 1.1; margin-top: 10px; }
  .about__body { margin-top: 30px; font-size: 16px; }
  .timeline { display: none; }
  .about .btns { margin-top: 36px; gap: 10px; }
  .about .btn { flex: 1; min-height: 52px; }
}

/* ---------- Contact + footer ---------- */
.contact { padding-top: var(--section); }
.contact__top { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.contact .h1 { max-width: 13em; font-size: clamp(36px, calc(var(--u) * 5.84), 84px); }
.contact .sig { width: clamp(180px, calc(var(--u) * 18), 260px); margin-bottom: 6px; }
.contact__body { margin-top: 40px; max-width: 640px; font-size: 21px; line-height: 1.52; color: var(--on-night); }
.contact__mail {
  display: inline-block; margin-top: 48px; font-family: var(--display); font-weight: 700;
  font-size: clamp(20px, calc(var(--u) * 2.5), 36px); letter-spacing: -.01em; color: var(--lime); text-decoration: none;
}
.contact__mail:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact .btns { margin-top: 30px; }
.foot {
  margin-top: 88px; border-top: 1px solid rgba(242, 237, 228, .16); padding-block: 36px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.foot__id { display: flex; align-items: center; gap: 14px; color: var(--on-night); font-size: 16px; }
.foot__id .crown { width: 30px; height: 30px; color: var(--white); }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-right: 68px; }
.foot ul a { text-decoration: none; color: var(--on-night); font-size: 16px; }
.foot ul a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1199px) {
  .foot ul { margin-right: 0; }
}
@media (max-width: 767px) {
  .contact { padding-top: 56px; }
  .contact__top { grid-template-columns: 1fr; }
  .contact .h1 { font-size: clamp(32px, 10.3vw, 40px); line-height: 1; }
  .contact .sig { display: none; }
  .contact__body { margin-top: 24px; font-size: 16px; }
  .contact__mail { margin-top: 36px; font-size: 18px; }
  .contact .btns { flex-direction: column; gap: 14px; margin-top: 24px; }
  .contact .btns .btn { width: 100%; }
  .foot { margin-top: 64px; flex-direction: column; align-items: flex-start; }
  .foot__id { font-size: 14px; }
}

/* ---------- Case study template (work/*.html) ---------- */
.case-nav .nav__bar { padding-block: 30px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 18px; text-decoration: none; color: var(--bone); margin-right: 35px; }
.back:hover { text-decoration: underline; text-underline-offset: 5px; }
.case-hero { padding-top: 76px; overflow: hidden; }
.case-hero .h1 { max-width: 13.2em; }
.case-hero .label { letter-spacing: .2em; }
.case-hero__lead { margin-top: 64px; color: var(--on-night); font-size: 22px; }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 0; margin-top: 50px; }
.meta > div { padding-right: 24px; }
.meta dt { font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
.meta dd { margin-top: 12px; font-size: 20px; line-height: 1.3; color: var(--bone); max-width: 300px; }
.meta dd a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.meta dd a:hover { color: var(--lime); }
.case-shot { position: relative; margin-top: 62px; height: 560px; border-radius: var(--r-frame) var(--r-frame) 0 0; overflow: hidden; background: var(--white); }
.case-shot .browser__bar { height: 32px; }
.case-shot img { width: 100%; height: calc(100% - 32px); object-fit: cover; object-position: left top; }

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 8fr); gap: 80px; align-items: start; }
.split .h2--m { margin-top: 16px; }
.split__text { padding-top: 40px; font-size: 21px; line-height: 1.52; color: var(--grey); }
.handoffs { margin-top: 56px; display: grid; gap: 66px; }
.handoffs > div { display: grid; grid-template-columns: 150px repeat(5, minmax(0, 1fr)); align-items: center; }
.handoffs h3 { font-family: var(--text); font-weight: 600; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--royal); }
.handoffs ul { display: contents; }
.handoffs li { justify-self: start; padding: 11px 20px; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.3; background: #E2DACB; color: var(--ink); white-space: nowrap; }
.handoffs .after li { background: var(--royal); color: var(--white); }

.modules { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 28px; row-gap: 46px; margin-top: 70px; }
.modules li { position: relative; padding-left: 26px; font-size: 20px; line-height: 1.2; }
.modules li::before { content: ""; position: absolute; left: 0; top: .35em; width: 12px; height: 12px; border-radius: 50%; background: var(--royal); }
.modules li.ember::before { background: var(--ember); }
.shots { display: grid; grid-template-columns: 840fr 400fr; gap: 40px; margin-top: 96px; align-items: start; }
.shots .browser { position: relative; }
.shots__side { display: grid; gap: 50px; }
.shots figcaption { margin-top: 44px; font-size: 18px; color: var(--grey); }

.results ul { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 52px; }
.results li { padding-right: 24px; }
.results strong { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(44px, calc(var(--u) * 5), 72px); line-height: 1; letter-spacing: -.04em; }
.results li:first-child strong { color: var(--lime); }
.results span { display: block; margin-top: 18px; font-size: 18px; color: var(--on-royal); max-width: 290px; }

.case-learned { padding-bottom: 290px; }
.next { padding-block: 100px 128px; }
.next .label { font-size: 15px; letter-spacing: .14em; }
.next a { display: inline-flex; align-items: center; gap: 24px; margin-top: 24px; text-decoration: none; color: var(--bone); }
.next a:hover .h2 { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 3px; }
.next .arrow { width: 56px; height: 56px; }

@media (max-width: 1199px) {
  .meta { grid-template-columns: repeat(2, 1fr); }
  .case-shot { height: 440px; }
  .split { gap: 48px; }
  .shots { grid-template-columns: 1fr; }
  .shots__side { grid-template-columns: 1fr 1fr; gap: 24px; }
  .results ul { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}
@media (max-width: 1023px) {
  .split { grid-template-columns: 1fr; gap: 0; }
  .split__text { padding-top: 28px; }
  .modules { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
}
@media (max-width: 767px) {
  .back { margin-right: 0; font-size: 16px; }
  .case-hero { padding-top: 28px; }
  .case-hero .h1 { font-size: clamp(36px, 11vw, 48px); line-height: .95; }
  .case-hero__lead { margin-top: 24px; font-size: 17px; }
  .meta { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
  .meta dt { font-size: 13px; }
  .meta dd { margin-top: 6px; font-size: 17px; max-width: none; }
  .case-shot { height: 260px; margin-top: 40px; }
  .case-shot .browser__bar { height: 24px; }
  .case-shot img { height: calc(100% - 24px); }
  .split__text, .modules li { font-size: 17px; }
  .handoffs li { white-space: normal; }
  .modules { grid-template-columns: 1fr; row-gap: 18px; margin-top: 36px; }
  .shots { margin-top: 48px; gap: 20px; }
  .shots__side { grid-template-columns: 1fr; gap: 20px; }
  .shots figcaption { margin-top: 20px; font-size: 15px; }
  .results ul { grid-template-columns: repeat(2, 1fr); column-gap: 20px; row-gap: 28px; }
  .results strong { font-size: 40px; }
  .results span { font-size: 15px; margin-top: 8px; }
  .case-learned { padding-bottom: var(--section); }
  .next { padding-block: 56px 72px; }
  .next .arrow { width: 32px; height: 32px; }
  .next a { gap: 14px; }
}

/* ---------- Case pages, P02 additions ---------- */
/* The project: four facts, hairline rows. */
.facts { padding-top: 34px; }
.facts > div { padding-block: 22px; border-top: 1px solid rgba(12, 12, 13, .14); }
.facts > div:first-child { padding-top: 0; border-top: 0; }
.facts dt { font-weight: 600; font-size: 13px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }
.facts dd { margin: 10px 0 0; font-size: 20px; line-height: 1.5; color: var(--ink); }
.pull { margin: 40px 0 0; padding: 4px 0 4px 28px; border-left: 4px solid var(--royal); }
.pull blockquote { margin: 0; }
.pull p { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
.pull figcaption { margin-top: 16px; font-size: 16px; color: var(--grey); }

/* Before and After: columns as wide as their tags (four or three per row). */
.handoffs--fit { grid-template-columns: 110px repeat(var(--cols), max-content); column-gap: clamp(20px, 2.8vw, 40px); row-gap: 66px; align-items: center; }
.handoffs--fit > div { display: contents; }
.handoffs--wrap { grid-template-columns: 110px minmax(0, 1fr); row-gap: 40px; }
.handoffs--wrap ul { display: flex; flex-wrap: wrap; gap: 12px 14px; }

/* Phones in a lavender panel: one height per row, width from each screen's ratio. */
.devices { container-type: inline-size; background: var(--mist); padding: 44px 40px 27px; }
.devices--hero { margin-top: 62px; border-radius: var(--r-card) var(--r-card) 0 0; }
.devices--gallery { border-radius: var(--r-card); padding: 50px 40px; }
.devices__row {
  --g: 56px; --kk: var(--k); --nn: var(--n);
  --h: min(var(--hmax, 489px), (100cqi - (var(--nn) - 1) * var(--g)) / var(--kk));
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 28px var(--g);
}
.dev {
  --p: calc(var(--h) * .012);
  position: relative; flex: none; height: var(--h); padding: var(--p); border-radius: calc(var(--h) * .074);
  background: #0C0C0D; box-shadow: 0 24px 48px rgba(30, 11, 77, .22);
}
.dev img { width: auto; max-width: none; height: calc(var(--h) - 2 * var(--p)); border-radius: calc(var(--h) * .062); }
.case-figure { margin-top: 96px; }
.case-figure figcaption { margin-top: 44px; font-size: 18px; color: var(--grey); }
.board-shot { margin-top: 40px; border-radius: 24px; overflow: hidden; }
.board-shot img { width: 100%; height: auto; }
.shots__pair { display: grid; grid-template-columns: 840fr 400fr; gap: 40px; align-items: start; }
.shots__pair .browser { position: relative; }
.shots__pair--phone { grid-template-columns: 840fr 440fr; }
.crew { width: 69.3%; margin-inline: auto; }
.crew img { width: 100%; height: auto; filter: drop-shadow(0 20px 30px rgba(12, 12, 13, .18)); }

/* In motion: a vertical film, no device frame. */
.film__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 80px; align-items: center; }
.film__title { font-size: clamp(28px, calc(var(--u) * 3.62), 52px); line-height: 1.06; max-width: 12em; }
.film__body { margin-top: 32px; max-width: 560px; font-size: 21px; line-height: 1.52; color: rgba(242, 237, 228, .8); }
.film__frame { position: relative; width: 360px; aspect-ratio: 9 / 16; border-radius: var(--r-card); overflow: hidden; background: var(--night-2); justify-self: end; }
.film__poster, .film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film__video { background: transparent; }

/* Tags wrap below 1280: five or four tags per row need the full desktop width. */
@media (max-width: 1279px) {
  .handoffs, .handoffs--fit { grid-template-columns: 1fr; gap: 32px; }
  .handoffs > div, .handoffs--fit > div { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .handoffs ul { display: flex; flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 1199px) {
  .shots__pair, .shots__pair--phone { grid-template-columns: 1fr; }
  .shots__pair .shots__side { display: block; max-width: 480px; }
  .crew { width: min(305px, 70%); margin-inline: 0; }
  .film__grid { gap: 48px; }
}
@media (max-width: 1023px) {
  .facts { padding-top: 28px; }
}
@media (max-width: 767px) {
  .facts dd { font-size: 17px; }
  .pull { padding-left: 20px; }
  .pull p { font-size: 22px; }
  .devices { padding: 20px 16px 16px; }
  .devices--hero { margin-top: 40px; }
  .devices--gallery { padding: 24px 16px; }
  .devices__row { --g: 10px; --kk: var(--k-sm, var(--k)); --nn: var(--n-sm, var(--n)); row-gap: 16px; }
  .case-figure { margin-top: 48px; }
  .case-figure figcaption { margin-top: 20px; font-size: 15px; }
  .board-shot { margin-top: 20px; border-radius: 16px; }
  .shots__pair { gap: 20px; }
  .film__grid { grid-template-columns: 1fr; gap: 32px; }
  .film__body { margin-top: 20px; font-size: 17px; }
  .film__frame { width: min(360px, 100%); justify-self: start; border-radius: 24px; }
}

/* ---------- Raregem Studio, Addition 3 ---------- */
div.split__text p + p { margin-top: 20px; }
/* How a job runs: eight numbered steps. */
.job__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; counter-reset: none; }
.job__steps li { border-radius: 20px; background: var(--bone); padding: 26px 24px 30px; }
.job__steps b {
  display: block; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 600;
  font-size: 14px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; color: var(--royal);
}
.job__steps h3 { margin-top: 22px; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: -.015em; }
.job__steps p { margin-top: 10px; font-size: 17px; line-height: 1.5; color: var(--grey); }
/* Set up in one step. */
.callout { margin-top: 56px; border-radius: var(--r-card); padding: 40px 44px; max-width: 920px; }
.callout .label { color: var(--lime); font-size: 15px; }
.callout__text { margin-top: 16px; font-size: 21px; line-height: 1.5; color: var(--bone); }
@media (max-width: 1023px) {
  .job__steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .job__steps { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
  .job__steps li { padding: 22px 20px 24px; }
  .job__steps h3 { margin-top: 14px; font-size: 20px; }
  .job__steps p { font-size: 16px; }
  .callout { margin-top: 36px; padding: 26px 22px; border-radius: 24px; }
  .callout__text { font-size: 17px; }
}

/* ---------- P03: case galleries ---------- */
/* Desktop screens: two columns of browser frames, a caption under each. */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; align-items: start; }
.gallery .browser { position: relative; }
.gallery figcaption, .dev-shot figcaption, .crew--below figcaption { margin-top: 16px; font-size: 16px; line-height: 1.4; color: var(--grey); }
/* Phone screens: lavender panels of three, a caption under each phone. */
.devices--captions + .devices--captions { margin-top: 28px; }
.dev-shot { flex: none; }
.dev-shot figcaption { text-align: center; }
.crew.crew--below { width: min(305px, 70%); margin: 72px auto 0; }
.crew--below figcaption { text-align: center; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr; gap: 28px; }
  .gallery figcaption, .dev-shot figcaption, .crew--below figcaption { margin-top: 10px; font-size: 14px; }
  .devices--captions + .devices--captions { margin-top: 16px; }
  .crew.crew--below { margin-top: 40px; }
}

@media (min-width: 1200px) {
  .results--auto ul { grid-template-columns: repeat(4, max-content); column-gap: 96px; }
  .results--auto strong { white-space: nowrap; }
}

/* ---------- P03: home Motion section, two films ---------- */
.motion { border-top: 1px solid rgba(242, 237, 228, .12); }
.motion__grid { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 80px; align-items: center; }
.motion .h2 { max-width: 9em; }
.motion__body { margin-top: 28px; max-width: 520px; font-size: 21px; line-height: 1.52; color: var(--on-night); }
.motion__films { display: flex; gap: 28px; align-items: flex-start; }
.motion__film { width: 300px; }
.film__frame--home { width: 300px; border-radius: 28px; justify-self: auto; }
.motion__film figcaption { margin-top: 20px; font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--bone); }
.motion__film .go { margin-top: 10px; font-family: var(--display); font-size: 17px; letter-spacing: -.01em; color: var(--lime); }
@media (max-width: 1199px) {
  .motion__grid { grid-template-columns: 1fr; gap: 48px; }
  .motion .h2 { max-width: 12em; }
}
@media (max-width: 767px) {
  .motion .h2 { font-size: 32px; }
  .motion__body { margin-top: 16px; font-size: 16px; }
  .motion__grid { gap: 32px; }
  .motion__films { flex-direction: column; gap: 40px; }
  .motion__film { width: min(300px, 100%); }
  .film__frame--home { width: 100%; border-radius: 28px; }
  .motion__film figcaption { margin-top: 14px; font-size: 16px; }
  .motion__film .go { font-size: 16px; }
}

/* ---------- Motion: fade up 12px, 300 ms, once (P04) ---------- */
html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal, html.js .flow .node, html.js .flow__lines { opacity: 1; transform: none; }
}

@media print {
  .nav, .menu, .skip, .stage, .sig { display: none !important; }
  .royal, .night, .ink-bg { background: #fff !important; color: #000 !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
