/* ==========================================================
   Daniel J. Ruiz, product portfolio
   Vanilla CSS. No framework, no build step, no JavaScript.
   Self-hosted variable fonts. Mobile first.
   No gradients, no patterns. Type and space do the work.
   ========================================================== */

/* ── Fonts ──────────────────────────────────────────────────
   Sora for headlines: geometric, has personality, holds up big.
   Inter for body: gets out of the way across long case studies.
   Both self-hosted variable woff2. No CDN, no external requests.
   ────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Sora';
  src: url('../fonts/sora-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  /* optional, not swap. swap shows the system font first and then reflows the
     whole page into Sora, which reads as a flash. With the preload in each
     page head the real font is almost always ready before first paint. */
  font-display: optional;
}
@font-face {
  font-family: 'InterVar';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --paper:   #FFFFFF;
  --paper-2: #F4F4F2;
  --ink:     #14161A;
  --ink-2:   #52585F;
  --ink-3:   #8A9098;
  --line:    #E4E4E0;

  --accent:      #4B36EF;
  --accent-deep: #3421C4;
  --orange:  #E2571C;
  --red:     #C82740;
  --green:   #12855A;

  --display: 'Sora', 'InterVar', -apple-system, BlinkMacSystemFont, sans-serif;
  --text:    'InterVar', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --wrap: 1240px;

  --s1:.5rem; --s2:1rem; --s3:1.75rem; --s4:2.75rem;
  --s5:4.5rem; --s6:7rem; --s7:10rem;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, .stat-num, .wordmark, .foot-name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.038em;
  line-height: 1.05;
}

em { font-style: normal; color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}

.skip { position:absolute; left:-9999px; top:0; background:var(--accent); color:#fff; padding:var(--s2) var(--s3); z-index:30; }
.skip:focus { left: 0; }

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

/* ── Header ─────────────────────────────────────────────────
   Sticky, because a case study runs three thousand words and a
   reader who wants a different one should not have to scroll
   back to the top to find it. Hairline and a blurred backdrop
   so it separates from the page without becoming a slab.
   ────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  padding: var(--s2) 0;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  width: 100%; max-width: var(--wrap);
  margin: 0 auto; padding: 0 var(--s3);
  display: flex; flex-direction: column;
  align-items: center; gap: var(--s2);
}

/* Name only, no monogram. The DR tile lives in the browser tab, where a mark
   earns its place. In the header it read as the initials-in-a-rounded-square
   move every template makes. */
.wordmark { font-size: 1.125rem; text-decoration: none; letter-spacing: -.03em; }

.nav {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: var(--s3);
  font-size: 1.0625rem;
  font-weight: 500;
}
.nav a {
  text-decoration: none; color: var(--ink-2);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.head-cta { display: none; }


/* Shrink on scroll. Driven by a CSS scroll timeline rather than a JavaScript
   scroll listener, so there is no script on the page and nothing to run on
   every frame. Browsers without scroll-driven animations simply keep the
   full size header, which is a fine outcome rather than a broken one. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .site-head {
      animation: head-shrink linear both;
      animation-timeline: scroll(root);
      animation-range: 0 140px;
    }
    .wordmark { animation: mark-shrink linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
    .nav      { animation: nav-shrink  linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
  }
}
@keyframes head-shrink {
  to {
    padding-top: .4rem; padding-bottom: .4rem;
    background: rgba(255,255,255,.9);
    box-shadow: 0 1px 14px rgba(20,22,26,.07);
  }
}
@keyframes mark-shrink { to { font-size: 1rem; } }
@keyframes nav-shrink  { to { font-size: 1rem; } }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: var(--s5) 0 var(--s5); }

.hero-inner {
  width: 100%; max-width: 1120px;
  margin: 0 auto; padding: 0 var(--s3);
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 5.6vw, 4.25rem);
  letter-spacing: -.04em;
  line-height: 1.02;
  max-width: 17ch;
  text-wrap: balance;
  margin-bottom: var(--s3);
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 66ch;
}

.ask {
  display: inline-block;
  margin-top: var(--s4);
  padding: .5rem 1.05rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: .875rem; font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink-2);
}

.actions {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: .75rem;
  margin-top: var(--s4);
}

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 1.0625rem 1.9rem;
  border-radius: 12px;
  font-family: var(--text);
  font-size: 1rem; font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .15s ease, border-color .15s ease,
              color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(75,54,239,.24), 0 10px 24px rgba(75,54,239,.24);
}
.btn-solid:hover {
  background: var(--accent-deep);
  box-shadow: 0 1px 2px rgba(52,33,196,.28), 0 12px 30px rgba(52,33,196,.3);
}

.btn-ghost {
  border-color: var(--line); color: var(--ink);
  background: var(--paper);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }

.btn-sm { padding: .625rem 1.15rem; font-size: .9375rem; border-radius: 10px; }

.btn-solid .arw { transition: transform .18s ease; }
.btn-solid:hover .arw { transform: translateX(3px); }

/* ── Product shot ───────────────────────────────────────────
   Placeholder frames until real screenshots land. Swap the
   .shot-screen contents for <img> and the frames still hold.
   ────────────────────────────────────────────────────────── */
.shot {
  position: relative;
  width: 100%;
  margin-top: var(--s4);
}

.shot-browser {
  max-width: 880px; margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 2px 6px rgba(20,22,26,.05),
              0 24px 60px rgba(20,22,26,.13);
}

.shot-bar {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding-left: 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.shot-bar span {
  width: 11px; height: 11px; border-radius: 50%;
}
.shot-bar span:nth-child(1) { background: #FF5F57; }
.shot-bar span:nth-child(2) { background: #FEBC2E; }
.shot-bar span:nth-child(3) { background: #28C840; }

.shot-screen {
  aspect-ratio: 16 / 9;
  display: grid; place-items: center;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: .8125rem;
  text-align: center; padding: 1rem;
}

/* When a real screenshot is in the frame, let the image set the height. */
.shot-screen-img {
  aspect-ratio: auto;
  padding: 0;
  background: var(--paper);
}
.shot-screen-img img { width: 100%; height: auto; }

.shot-phone { display: none; }

/* ── Credibility band ───────────────────────────────────────
   Dark band with a radial glow. Drop a photo in as
   --cred-image and it sits under the glow automatically.
   ────────────────────────────────────────────────────────── */
.cred {
  position: relative;
  isolation: isolate;
  background-color: #0B0C10;
  color: #fff;
  padding: var(--s6) 0;
  margin-top: var(--s4);
  overflow: hidden;
}

/* fine grid */
.cred::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, #000 10%, transparent 72%);
  pointer-events: none;
}

/* soft flare */
.cred::after {
  content: "";
  position: absolute; z-index: -1;
  left: 50%; top: -55%;
  width: 120vw; max-width: 1400px; aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%,
              rgba(75, 54, 239, .20) 0%,
              rgba(75, 54, 239, .07) 36%,
              rgba(11, 12, 16, 0) 64%);
  pointer-events: none;
}

.cred-inner {
  max-width: 1000px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}

.tagpill-dark {
  color: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.05);
}

.cred-text {
  font-family: var(--display);
  font-size: clamp(1.375rem, 3.2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.22;
  color: #fff;
  max-width: 44ch;
  text-wrap: pretty;
}
.cred-text strong { font-weight: 600; color: #A99BFF; }

.cred-facts {
  width: 100%;
  display: grid; gap: var(--s3);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255,255,255,.82);
  text-align: center;
}
.cred-facts span {
  display: flex; flex-direction: column;
  align-items: center; gap: .4rem;
}
.cred-facts b {
  font-family: var(--display);
  font-size: 1.75rem; font-weight: 700;
  letter-spacing: -.035em;
  color: #fff;
}

/* ── Section heads ──────────────────────────────────────── */
.sec-head { margin-bottom: var(--s4); max-width: 24ch; }

.tagpill {
  display: inline-block;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .85rem;
  margin-bottom: var(--s3);
}

.sec-title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  text-wrap: balance;
}

/* ── Case studies ───────────────────────────────────────── */
.work { padding: var(--s5) 0 0; }

.sec-head-center {
  max-width: none;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}

.tagpill-loud {
  font-size: .875rem;
  letter-spacing: .12em;
  padding: .6rem 1.35rem .65rem;
  color: #fff;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(75,54,239,.28);
}

/* one row per case study */
.cs { --hue: var(--accent); --tint: var(--paper-2); padding: var(--s1) 0; }
.c-orange { --hue: var(--orange); --tint: #FFEEDF; }
.c-red    { --hue: var(--red);    --tint: #FFE7EB; }
.c-green  { --hue: var(--green);  --tint: #E2F3EA; }

/* ONE box holding the product and the copy */
.cs-inner {
  display: grid; gap: var(--s3);
  align-items: center;
  padding: var(--s4) var(--s3);
  border-radius: 24px;
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--hue) 16%, transparent);
}

.cs-media { display: grid; place-items: center; }

/* phone */
/* Corner radius is a tenth of the width. Any more and it stops reading as a
   phone and starts reading as a rounded rectangle.
   The aspect ratio is fixed rather than inherited from the file, because
   screenshots arrive at different heights depending on how much system
   chrome was cropped off, and a short frame looks like an old phone. */
.phone {
  width: 218px; padding: 5px;
  border-radius: 22px;
  background: #16181D;
  box-shadow: 0 2px 4px rgba(20,22,26,.4),
              0 10px 20px rgba(20,22,26,.22),
              0 30px 60px rgba(20,22,26,.28);
}
.phone img {
  width: 100%; display: block;
  border-radius: 18px;
  aspect-ratio: 9 / 19;
  object-fit: cover;
  object-position: top;
}

/* flat product image, no device */
.cs-flat {
  width: 232px; border-radius: 18px;
  box-shadow: 0 2px 4px rgba(20,22,26,.16),
              0 18px 44px rgba(20,22,26,.2);
}

/* browser */
.browser {
  width: 100%; max-width: 300px;
  border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
  background: var(--paper);
  box-shadow: 0 2px 4px rgba(20,22,26,.06),
              0 18px 44px rgba(20,22,26,.14);
}
.browser-screen {
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  background: var(--paper-2);
  color: var(--ink-3);
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
}

/* text side */
.cs-tag {
  display: inline-block;
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  background: var(--hue);
  border-radius: 999px;
  padding: .4rem .9rem .45rem;
  margin-bottom: var(--s2);
}

.cs-name {
  font-family: var(--display);
  font-weight: 700; letter-spacing: -.04em;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.04;
}
.cs-kind {
  font-size: .9375rem; color: var(--ink-3);
  margin: .5rem 0 var(--s3);
}
.cs-line {
  color: var(--ink-2);
  font-size: 1.0625rem; line-height: 1.6;
  max-width: 62ch;
}

.cs-facts {
  display: flex; flex-wrap: wrap;
  gap: .5rem var(--s3);
  margin: var(--s3) 0 var(--s3);
}
.cs-facts li {
  position: relative;
  padding-left: 1.6rem;
  font-size: .9375rem;
  color: var(--ink-2);
}
.cs-facts li::before {
  content: "";
  position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--hue);
}

/* ── Closing ────────────────────────────────────────────── */
.closing { padding: var(--s5) 0 var(--s5); }

.closing-inner {
  max-width: 860px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}

.closing-lead {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: var(--s3) 0 var(--s3);
  max-width: 20ch;
  text-wrap: balance;
}
.closing-body {
  color: var(--ink-2);
  max-width: 48ch;
  font-size: 1.0625rem;
}

.contact {
  display: grid; gap: .75rem;
  width: 100%;
  margin-top: var(--s5);
}
.contact a {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .8rem;
  padding: var(--s3) var(--s2);
  min-height: 150px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  text-decoration: none;
  font-size: .9375rem; font-weight: 600;
  color: var(--ink);
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease,
              transform .15s ease, box-shadow .15s ease;
}
.contact a:hover { box-shadow: 0 12px 28px rgba(20,22,26,.10); }
.contact a:hover {
  border-color: var(--ink);
  background: var(--paper-2);
  transform: translateY(-2px);
}
.contact svg {
  width: 34px; height: 34px; flex: none;
  fill: var(--brand, var(--accent));
  transition: transform .18s ease;
}
.contact a:hover svg { transform: scale(1.08); }

.ct-mail { --brand: #EA4335; }
.ct-li   { --brand: #0A66C2; }
.ct-wa   { --brand: #25D366; }
.ct-cv   { --brand: var(--accent); }

.contact a:hover { border-color: var(--brand, var(--ink)); }
.contact span { word-break: break-word; }

/* ── Footer ─────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: var(--s4) 0; }
.foot-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: var(--s3);
  text-align: center;
}
.foot-name { font-size: 1.125rem; letter-spacing: -.03em; }
.foot-nav {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: var(--s3);
  font-size: .9375rem;
}
.foot-nav a {
  color: var(--ink-2); text-decoration: none;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.foot-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ══ 720px and up ═══════════════════════════════════════ */
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
  .rules { grid-template-columns: repeat(2, 1fr); column-gap: var(--s5); }
  .arc { display: grid; grid-template-columns: 12rem 1fr; column-gap: var(--s4); }
  .arc dt { border-top: 1px solid var(--line); padding-bottom: var(--s4); }
  .arc dd { border-top: 1px solid var(--line); padding-top: var(--s3); padding-bottom: var(--s4); margin: 0; }
  .foot-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ══ 1000px and up ══════════════════════════════════════ */
@media (min-width: 1000px) {
  .head-inner { flex-direction: row; justify-content: space-between; }
  .head-inner .nav { margin-left: auto; margin-right: var(--s5); }
  .head-cta { display: inline-block; }
  .nav { gap: var(--s4); }

  .hero { padding: var(--s6) 0 var(--s6); }
  .lede { font-size: 1.25rem; max-width: 70ch; }

  .shot-phone {
    display: block;
    position: absolute;
    right: 1%; bottom: -10%;
    width: 250px;
    padding: 6px;
    border-radius: 30px;
    background: #16181D;
    box-shadow: 0 1px 2px rgba(20,22,26,.4),
                0 10px 24px rgba(20,22,26,.18),
                0 36px 80px rgba(20,22,26,.26);
  }
  .shot-phone .shot-screen {
    aspect-ratio: 9 / 19;
    font-size: .75rem;
    border-radius: 25px;
    overflow: hidden;
  }
  .shot-phone .shot-screen img { border-radius: 25px; }

  .cred-facts { grid-template-columns: repeat(3, 1fr); gap: var(--s4); }

  .contact { grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 720px; margin-left: auto; margin-right: auto; }
  .contact a { justify-content: center; }

  .cs { padding: var(--s2) 0; }
  .cs-inner {
    grid-template-columns: 300px 1fr;
    gap: var(--s5);
    padding: var(--s4) var(--s5);
  }



  .work { padding: var(--s6) 0 0; }
  .sec-head { margin-bottom: var(--s5); }
  .closing { padding: var(--s6) 0; }
}

/* ══ Motion preference ══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .card:hover { transform: none; }
}

/* ══════════════════════════════════════════════════════════
   CASE STUDY PAGES
   ══════════════════════════════════════════════════════════ */

/* Each case study carries the colour of its card on the homepage, so clicking
   a card lands you somewhere that looks like where you came from.
   --deep is the same hue pushed dark enough to hold white text at AA.
   --tint is the clean version, never the hue mixed into grey. */
.cs-page { --hue: var(--accent); --deep: var(--accent-deep); --tint: #ECE9FD; }
.cs-page.c-orange { --hue: var(--orange); --deep: #9E3D14; --tint: #FFEEDF; }
.cs-page.c-red    { --hue: var(--red);    --deep: #8C1B2D; --tint: #FFE7EB; }
.cs-page.c-green  { --hue: var(--green);  --deep: #0B5D3F; --tint: #E2F3EA; }

/* ── Title ──────────────────────────────────────────────── */
.cshero { padding: var(--s5) 0 var(--s4); }

.backlink {
  display: block; width: fit-content;
  font-size: .9375rem; font-weight: 550;
  color: var(--ink-2); text-decoration: none;
  margin-bottom: var(--s4);
}
.backlink::before { content: "\2190"; margin-right: .45rem; }
.backlink:hover { color: var(--hue); }

.cshero h1 {
  font-size: clamp(2.75rem, 8vw, 5rem);
  letter-spacing: -.045em;
  margin: var(--s2) 0 var(--s3);
}
.cshero-sub {
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 34ch;
}
/* Hero product shot. One job: let the reader picture the thing before they
   read a thousand words about it. Three screens, no captions, no framing
   device. It orients, it does not showcase. */
.cshero-shots {
  display: flex; gap: var(--s2);
  justify-content: center; flex-wrap: wrap;
  margin-top: var(--s5);
}
.cshero-shots .phone { width: 150px; }
@media (min-width: 620px) {
  .cshero-shots { gap: var(--s3); }
  .cshero-shots .phone { width: 190px; }
}
@media (min-width: 1000px) {
  .cshero-shots .phone { width: 218px; }
}

.cshero-link { margin-top: var(--s3); font-size: 1rem; }
.cshero-link a {
  color: var(--hue);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ── Fact band ──────────────────────────────────────────────
   Four facts, four columns, each opened by a coloured rule. The rules are
   what stop these reading as loose words: every entry starts on the same
   line whether its value runs to one row or three. Colour is an accent
   here, not a slab. A solid band was tried and it was too much. */
.meta {
  border-bottom: 1px solid var(--line);
  padding: 0 0 var(--s4);
}
.meta-grid { display: grid; gap: var(--s3); }
.meta-grid > div {
  border-top: 3px solid var(--hue);
  padding-top: var(--s2);
}
.meta-grid dt {
  font-family: var(--display);
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--deep);
  margin-bottom: .5rem;
}
.meta-grid dd {
  margin: 0;
  font-size: .9375rem; line-height: 1.5;
  color: var(--ink-2);
}

/* ── Short version ──────────────────────────────────────── */
.tldr { padding: var(--s5) 0; background: #FAFAF8; }
.tldr-inner { max-width: 900px; }
.tldr-body {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.1875rem, 2.6vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -.02em;
  margin-top: var(--s2);
}

/* ── Body sections ──────────────────────────────────────── */
.body { padding: var(--s5) 0 0; }
.cs-page .body:has(.chunk-life) { padding-top: var(--s3); }

.chunk { padding: var(--s3) 0; }
.chunk-inner { max-width: 860px; }

.chunk-num {
  font-family: var(--display);
  font-weight: 700; font-size: .875rem;
  letter-spacing: .06em;
  color: var(--hue);
  margin-bottom: .75rem;
}
.chunk h2 {
  font-size: clamp(1.75rem, 3.8vw, 2.625rem);
  margin-bottom: var(--s3);
  text-wrap: balance;
}
.chunk p { color: var(--ink-2); margin-bottom: var(--s2); font-size: 1.0625rem; }
.chunk p:last-child { margin-bottom: 0; }

/* pull quote
   A block, unmistakably. Same near-black as the credibility band on the
   homepage, so it is a shape the site already uses. Deliberately carries
   no accent colour: the fewer elements that hang off the hue, the less
   any argument about the hue matters.
   Rejected before this: side bar, hairlines above and below, solid accent
   panel, and large accent-coloured type with no box. */
.pull {
  margin: var(--s5) 0;
  padding: var(--s4) var(--s3);
  border-radius: 22px;
  background: #14161A;
}
.pull blockquote {
  margin: 0;
  font-family: var(--display);
  font-weight: 600; letter-spacing: -.035em;
  font-size: clamp(1.375rem, 3vw, 1.9375rem);
  line-height: 1.2;
  color: #fff;
  text-wrap: balance;
}
@media (min-width: 700px) {
  .pull { padding: var(--s5) var(--s4); }
}

/* landscape figure, for things that are not a phone: a store listing, a
   console screen. Image on top, caption underneath, same tinted card. */
.shotwide {
  margin: var(--s4) 0 0;
  padding: var(--s3);
  border-radius: 24px;
  background: var(--tint);
}
.shotwide img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(20,22,26,.12), 0 14px 30px rgba(20,22,26,.14);
}
.shotwide figcaption {
  margin-top: var(--s3);
  font-size: 1rem; line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.shotwide figcaption b {
  display: block;
  font-family: var(--display);
  font-weight: 700; letter-spacing: -.025em;
  font-size: 1.1875rem; line-height: 1.25;
  color: var(--deep);
  margin-bottom: .5rem;
}
@media (min-width: 760px) { .shotwide { padding: var(--s4); } }

/* hero variant: no caption, centred under the subtitle the same way the
   phone rows are centred on the other case studies */
.cshero-wide {
  margin: var(--s5) auto 0;
  max-width: 900px;
}

/* screenshot figure
   Same shape as the case study rows on the homepage: product on the left,
   what it proves on the right, the pair held in one tinted card. A loose
   screenshot with a caption under it is not scannable. This is. */
.shotfig, .shotpair {
  margin: var(--s4) 0 0;
  padding: var(--s3);
  border-radius: 24px;
  background: var(--tint);
  display: flex; flex-direction: column;
  gap: var(--s3);
}
.shotfig img {
  width: 190px; align-self: center;
  border-radius: 18px;
  aspect-ratio: 9 / 19;
  object-fit: cover; object-position: top;
  box-shadow: 0 2px 4px rgba(20,22,26,.16), 0 16px 36px rgba(20,22,26,.18);
}
.shotpair-imgs {
  display: flex; gap: var(--s2);
  justify-content: center;
}
.shotpair-imgs img {
  width: 150px;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(20,22,26,.16), 0 16px 36px rgba(20,22,26,.18);
}
.shotfig figcaption, .shotpair figcaption {
  align-self: center;
  font-size: 1rem; line-height: 1.6;
  color: color-mix(in srgb, var(--ink) 80%, var(--deep));
  max-width: 46ch;
  text-wrap: pretty;
}
.shotfig figcaption b, .shotpair figcaption b {
  display: block;
  font-family: var(--display);
  font-weight: 700; letter-spacing: -.025em;
  font-size: 1.1875rem; line-height: 1.25;
  color: var(--deep);
  margin-bottom: .5rem;
}

@media (min-width: 760px) {
  .shotfig, .shotpair {
    flex-direction: row; align-items: center;
    gap: var(--s4);
    padding: var(--s4);
  }
  .shotfig img { flex: none; align-self: center; }
  .shotpair-imgs { flex: none; }
  .shotfig figcaption, .shotpair figcaption { align-self: center; }
}

/* callout
   Where the page admits something: how I know it, what I did not plan,
   what I cannot tell you. White card, coloured edge, solid label. Grey
   fill read as unstyled and near-black read as shouting. */
.callout {
  position: relative;
  margin-top: var(--s4);
  padding: var(--s4) var(--s3) var(--s3);
  border: 1.5px solid color-mix(in srgb, var(--hue) 40%, var(--paper));
  border-radius: 18px;
  background: var(--paper);
}
.callout-lab {
  position: absolute;
  top: 0; left: var(--s3);
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #fff !important;
  background: var(--deep);
  padding: .3rem .65rem;
  border-radius: 7px;
  margin: 0 !important;
}
.callout p:last-child { margin-bottom: 0; }

/* the four reasons */
.reasons { display: grid; gap: var(--s2); margin: var(--s3) 0 var(--s4); }
.reasons > div {
  display: flex; gap: var(--s2);
  align-items: baseline;
}
.reasons span {
  font-family: var(--display);
  font-weight: 700; font-size: .8125rem;
  color: var(--hue); flex: none;
}
.reasons p { margin: 0; }

/* what I got wrong */
.chunk-wrong { background: var(--paper-2); padding: var(--s5) 0; margin-top: var(--s4); }
.wrong { margin-top: var(--s3); }
.wrong h3 {
  font-size: 1.1875rem;
  margin-bottom: .5rem;
  color: var(--ink);
}
.wrong p { margin: 0; }

/* ── Next ───────────────────────────────────────────────── */
.nextcs { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.nextcs-link {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700; letter-spacing: -.035em;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-decoration: none;
  margin-top: .5rem;
}
.nextcs-link .arw { display: inline-block; transition: transform .2s ease; }
.nextcs-link:hover { color: var(--accent); }
.nextcs-link:hover .arw { transform: translateX(8px); }

/* ══ 720px and up ══ */
@media (min-width: 720px) {
  .meta-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
}

/* ══ 1000px and up ══ */
@media (min-width: 1000px) {
  .cshero { padding: var(--s6) 0 var(--s5); }
  .meta-grid { grid-template-columns: repeat(4, 1fr); }
  .tldr { padding: var(--s6) 0; }
  .chunk { padding: var(--s4) 0; }
  .chunk-wrong { padding: var(--s6) 0; }
  .shotfig img { width: 210px; }
}

/* case study: question lists and beat lines */
.qlist {
  display: grid; gap: .55rem;
  margin: 0 0 var(--s2);
  padding-left: var(--s3);
}
.qlist li {
  position: relative;
  color: var(--ink-2);
  font-style: italic;
}
.qlist li::before {
  content: "";
  position: absolute; left: calc(-1 * var(--s3) + .4rem); top: .7em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--hue);
}

.beat {
  font-family: var(--display);
  font-weight: 600; letter-spacing: -.03em;
  font-size: 1.25rem; line-height: 1.35;
  color: var(--ink) !important;
  margin: var(--s3) 0 !important;
}

.tldr-body + .tldr-body { margin-top: var(--s3); }
.chunk strong { color: var(--ink); font-weight: 650; }

/* ── Case study jump nav ────────────────────────────────── */
.jump {
  border-bottom: 1px solid var(--line);
  padding: var(--s3) 0;
  background: var(--paper);
}
.jump-list {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}
.jump-list a {
  display: inline-flex; align-items: baseline; gap: .5rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .875rem; font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.jump-list a span {
  font-family: var(--display);
  font-weight: 700; font-size: .75rem;
  color: var(--hue);
}
.jump-list a:hover {
  color: var(--ink);
  border-color: var(--hue);
  background: var(--paper-2);
}

/* scroll offset so an anchored heading isn't jammed to the top */
.chunk-num { scroll-margin-top: 6.5rem; }

/* ── Full-width screenshot gallery ──────────────────────── */
.gallery {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--s5) 0;
  margin: var(--s4) 0;
}
.gallery-title {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  margin: var(--s2) 0 var(--s4);
}
.gal-grid { display: grid; gap: var(--s4); }
.gal-grid > li { display: flex; flex-direction: column; align-items: center; }
.gal-grid p {
  margin-top: var(--s2);
  font-size: .875rem; line-height: 1.5;
  color: var(--ink-3);
  text-align: center;
  max-width: 26ch;
}
.gal-grid .phone { width: 100%; max-width: 210px; }

.phone-empty {
  display: grid; place-items: center;
  aspect-ratio: 9 / 19;
  background: var(--paper);
  border: 1.5px dashed var(--line);
  box-shadow: none;
}
.phone-empty span {
  font-size: .6875rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  text-align: center; padding: 0 .5rem;
}

@media (min-width: 620px) {
  .gal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .gal-grid { grid-template-columns: repeat(3, 1fr); gap: var(--s4) var(--s3); }
  .gallery { padding: var(--s6) 0; }
}


/* About page sections carry no numbers, so a hairline gives the rhythm the
   numbers used to. Tighter top gap too: the hero and the first heading were
   sitting a full screen apart. */
.chunk-life { padding: var(--s3) 0; }
.chunk-life + .chunk-life .chunk-inner { border-top: 1px solid var(--line); padding-top: var(--s4); }
.chunk-life h2 { margin-bottom: var(--s3); }
@media (min-width: 1000px) {
  .chunk-life { padding: var(--s3) 0; }
}

/* personal photographs on the About page. Not product shots: these get a
   plain frame, a soft shadow and nothing else. */
.lifeshot { margin: var(--s4) 0 0; }
.lifeshot img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 2px 4px rgba(20,22,26,.12), 0 16px 40px rgba(20,22,26,.16);
}
.lifeshot figcaption {
  margin-top: var(--s2);
  font-size: .9375rem; line-height: 1.55;
  color: var(--ink-3);
}
/* portrait photo: centred in the column, square corners. Floating it beside
   the text was rejected, and so were the rounded corners. */
.lifeshot-tall { max-width: 420px; margin-left: auto; margin-right: auto; }
.lifeshot-tall img { border-radius: 0; }
.lifeshot-tall figcaption { text-align: center; }

/* ══ ABOUT PAGE ═════════════════════════════════════════════
   The first version of this page was a single narrow column of
   prose, which is a blog post rather than a designed page. It
   needs its own furniture: a timeline, a dark statement band,
   and the convictions as cards rather than stacked paragraphs.
   ═══════════════════════════════════════════════════════════ */

/* career timeline */
.tl { max-width: 880px; }
.tl-row {
  display: grid; gap: .35rem;
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
}
.tl-row:last-child { border-bottom: 1px solid var(--line); }
.tl-yr {
  font-family: var(--display);
  font-weight: 700; font-size: .8125rem;
  letter-spacing: .06em;
  color: var(--hue);
}
.tl-row h3 { font-size: 1.1875rem; letter-spacing: -.025em; }
.tl-row p { color: var(--ink-2); font-size: 1rem; margin: 0; }

@media (min-width: 760px) {
  .tl-row {
    grid-template-columns: 7.5rem 1fr;
    gap: var(--s3);
    align-items: start;
    padding: var(--s4) 0;
  }
  .tl-yr { padding-top: .3rem; }
  .tl-copy h3 { margin-bottom: .4rem; }
}

/* the convictions, as cards */
.rules { display: grid; gap: var(--s3); margin-top: var(--s4); }
@media (min-width: 820px) {
  .rules { grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
}
.rule {
  padding: var(--s4) var(--s3);
  border: 1.5px solid color-mix(in srgb, var(--hue) 38%, var(--paper));
  border-radius: 18px;
  background: var(--paper);
}
.rule-num {
  font-family: var(--display);
  font-weight: 700; font-size: .75rem; letter-spacing: .1em;
  color: var(--hue);
  margin-bottom: .6rem;
}
.rule h3 { font-size: 1.1875rem; line-height: 1.25; margin-bottom: .6rem; }
.rule p { color: var(--ink-2); font-size: 1rem; margin: 0; }

/* dark statement band, same shape as the homepage band */
.band-say { max-width: 780px; margin: 0 auto; text-align: center; }
.band-say .eyebrow { color: rgba(255,255,255,.55); }
.band-say h2 {
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  color: #fff;
  margin: var(--s2) 0 var(--s3);
  text-wrap: balance;
}
.band-say p { color: #B7BCC4; font-size: 1.0625rem; }
.band-say p + p { margin-top: var(--s2); }

/* ── Back to top ────────────────────────────────────────── */
.totop {
  position: fixed;
  right: var(--s3); bottom: var(--s3);
  z-index: 20;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(75,54,239,.3), 0 12px 28px rgba(75,54,239,.3);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.totop svg { width: 22px; height: 22px; fill: #fff; }
.totop:hover {
  transform: translateY(-3px);
  background: var(--accent-deep);
  box-shadow: 0 2px 6px rgba(52,33,196,.34), 0 16px 34px rgba(52,33,196,.34);
}

@media (min-width: 1000px) {
  .totop { right: var(--s4); bottom: var(--s4); width: 52px; height: 52px; }
  .totop svg { width: 22px; height: 22px; }
}
