/* ==========================================================
   Luis Leiva · Portfolio
   Visual system matched to the Claura reference (measured at 1440px):
   content column 1072px, header 85px, Halant headlines, Geist body,
   warm dark surfaces, 28px image corners, soft grainy photography.
   ========================================================== */

/* Light theme (hidden). To bring the cream version back, swap these
   values into the :root block below and delete the "Dark theme details" section at the end.
  --page: #fcf6ef;  --band: #f6f0e9;  --chip: #efe7dd;  --chip-hover: #e8ded2;
  --soft: #faf6f2;  --ink: #2b180a;   --muted: #94877c;
*/

:root {
  /* Dark theme (active) */
  --page: #110c08;        /* page background */
  --band: #18120d;        /* header, hero band, footer, info cards */
  --chip: #241b14;        /* pills, inputs, stat cards, secondary buttons */
  --chip-hover: #2e231a;
  --soft: #140e0a;        /* text on cream buttons */
  --ink: #f3eadf;         /* main text */
  --muted: #9a8b7e;
  --white: #ffffff;
  --line: #2a2018;
  color-scheme: dark;

  --serif: "Halant", Georgia, serif;
  --sans: "Geist", -apple-system, "Segoe UI", system-ui, sans-serif;

  --wrap: 1072px;
  --nav-wrap: 1200px;
  --gutter: 24px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.44, 0, .56, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--ink); color: var(--soft); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 8px 14px; border-radius: 12px;
  background: var(--ink); color: var(--soft); font-size: 14px; font-weight: 500;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */

.t-hero   { font-family: var(--serif); font-size: 70px; line-height: 77px; letter-spacing: -0.035em; }
.t-detail { font-family: var(--serif); font-size: 80px; line-height: 80px; letter-spacing: -0.035em; }
.t-h2     { font-family: var(--serif); font-size: 56px; line-height: 1.1; letter-spacing: -0.03em; }
/* titles break into even lines; .keep (set in main.js) holds the last two words together */
.t-hero, .t-h2 { text-wrap: balance; }
.keep { white-space: nowrap; }
p { text-wrap: pretty; }
.t-quote  { font-family: var(--serif); font-size: 48px; line-height: 1.1; letter-spacing: -0.03em; }
.t-h3     { font-family: var(--serif); font-size: 28px; line-height: 1.1; letter-spacing: -0.025em; }
.t-lead   { font-size: 20px; line-height: 30px; letter-spacing: -0.02em; color: var(--muted); }
.t-body   { font-size: 16px; line-height: 24px; letter-spacing: -0.015em; color: var(--muted); }
.t-big    { font-size: 18px; line-height: 27px; letter-spacing: -0.015em; color: var(--muted); }
.t-title  { font-size: 20px; line-height: 30px; letter-spacing: -0.02em; font-weight: 500; }
.t-small  { font-size: 14px; line-height: 21px; letter-spacing: -0.01em; }
.mute     { color: var(--muted); }

/* ---------- pills & buttons ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 33px; padding: 0 12px;
  border-radius: 8px;
  background: var(--chip);
  -webkit-backdrop-filter: blur(32px); backdrop-filter: blur(32px);
  font-size: 14px; line-height: 21px; font-weight: 500;
  white-space: nowrap;
}
.tag {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 10px;
  border-radius: 8px;
  background: var(--chip);
  -webkit-backdrop-filter: blur(32px); backdrop-filter: blur(32px);
  font-size: 12px; line-height: 18px; font-weight: 500;
  white-space: nowrap;
}
.tag-glass { background: rgb(240 231 221 / .32); color: var(--white); }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 0; border-radius: 12px;
  font-size: 16px; line-height: 24px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  overflow: hidden;
  transition: background-color .4s var(--ease-soft), transform .4s var(--ease), box-shadow .4s var(--ease-soft);
}
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .15s; }
.btn-dark { background: var(--ink); color: var(--soft); }
@media (hover: hover) { .btn-dark:hover { background: #3a2414; } }
.btn-light { background: var(--chip); color: var(--ink); }
@media (hover: hover) { .btn-light:hover { background: var(--chip-hover); } }
.btn-sm { height: 37px; padding: 0 16px; font-size: 14px; line-height: 21px; }
.btn-white { background: var(--white); color: var(--ink); }
@media (hover: hover) { .btn-white:hover { background: var(--soft); } }
.btn .dot-ico {
  display: grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); color: var(--soft);
}
.btn .dot-ico svg { width: 9px; height: 9px; transition: transform .4s var(--ease); }
@media (hover: hover) { .btn:hover .dot-ico svg { transform: translateX(2px); } }
/* label stays put on hover; the duplicate copy from the old rolling effect is hidden */
.btn .roll { display: block; }
.btn .roll span[aria-hidden] { display: none; }

/* ---------- header ---------- */

.site-header { position: relative; z-index: 50; background: var(--band); }
.site-header.on-page { background: var(--soft); }
.nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: calc(var(--nav-wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter);
  height: 85px;
}
.nav-links { display: flex; gap: 20px; }
.nav-links a {
  font-size: 14px; line-height: 21px; font-weight: 500;
  padding: 0; border-radius: 8px;
  transition: color .25s;
}
.nav-links a[aria-current="page"] { color: var(--muted); }
@media (hover: hover) { .nav-links a:hover { color: var(--muted); } }
.brand { font-family: var(--serif); font-size: 32px; line-height: 35px; letter-spacing: -0.025em; color: #000; white-space: nowrap; }
.nav-cta { justify-self: end; }
.menu-btn {
  display: none; justify-self: end;
  width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; position: relative;
}
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), top .4s var(--ease); }
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 23px; }
.menu-open .menu-btn span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }
.menu {
  display: none;
  padding: 8px var(--gutter) 28px;
  background: inherit;
}
.menu a.menu-link { display: block; padding: 10px 0; font-family: var(--serif); font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; }
.menu .btn { width: 100%; margin-top: 16px; }
.menu-open .menu { display: block; }

/* ---------- bands & sections ---------- */

.band { background: var(--band); }
.section { padding: 160px 0 0; }
.section-first { padding-top: 80px; }
.page-end { padding-bottom: 160px; }

.head-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 422px; gap: 40px; align-items: end;
  margin-bottom: 48px;
}
.head-row .t-h2 { margin-top: 20px; }
.head-center { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 auto 64px; max-width: 760px; }
.head-center .t-h2 { margin-top: 12px; }
.head-center .t-body { margin-top: 20px; max-width: 534px; }

/* ---------- hero (home) ---------- */

.hero { text-align: center; padding: 74px 0 80px; }
.hero-eyebrow { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 16px; font-size: 14px; line-height: 21px; font-weight: 500; }
.hero .t-hero { max-width: 1000px; margin: 0 auto; }
.hero .t-lead { max-width: 555px; margin: 16px auto 0; }
.actions { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 32px; }
.hero .actions { justify-content: center; }
.hero-media { position: relative; height: 429px; margin-top: 64px; border-radius: 32px; overflow: hidden; }
.dots {
  position: absolute; inset: 36px 40px; z-index: 2;
  background-image: radial-gradient(circle, rgb(255 255 255 / .96) 7px, transparent 7.6px);
  background-size: 43px 43px;
  background-repeat: space;
  pointer-events: none;
}
.trust { display: grid; grid-template-columns: 163px 1fr; gap: 40px; align-items: center; margin-top: 64px; }
.trust p { font-size: 14px; line-height: 21px; color: var(--muted); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 64px; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 32px)); } }
.wordmark { white-space: nowrap; color: #a99d92; font-size: 22px; line-height: 1; display: flex; align-items: center; gap: 8px; }
.wm-a { font-family: var(--sans); font-weight: 600; letter-spacing: -0.04em; }
.wm-b { font-family: var(--serif); font-style: italic; letter-spacing: -0.03em; font-size: 26px; }
.wm-c { font-family: var(--sans); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-size: 17px; }
.wm-d { font-family: var(--serif); letter-spacing: -0.04em; font-size: 26px; }

/* ---------- media / photography ---------- */

.photo { position: relative; overflow: hidden; border-radius: 28px; background: var(--chip); isolation: isolate; }
/* Safari drops the rounded clip while a child animates; a mask keeps the corners round */
.photo, .hero-media { -webkit-mask-image: linear-gradient(#000 0 0); mask-image: linear-gradient(#000 0 0); }
.photo > img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  transition: transform .8s var(--ease), filter .8s var(--ease);
}
.photo::after {           /* fine grain over every photo */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.photo > .over { position: relative; z-index: 2; }

/* ---------- stats over photo (glass) ---------- */

.stats { height: 365px; display: grid; place-items: center; }
.stats-row { display: grid; grid-template-columns: repeat(3, 304px); gap: 16px; }
.glass {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  height: 165px; padding: 24px;
  border-radius: 28px;
  background: rgb(255 255 255 / .32);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  color: var(--white);
}
.glass .num { font-family: var(--serif); font-size: 70px; line-height: 77px; letter-spacing: -0.035em; }
.glass p { margin-top: 16px; font-size: 16px; line-height: 24px; color: rgb(255 255 255 / .9); }

.strip {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: 24px; padding: 24px;
  border-radius: 28px; background: var(--band);
}
.strip-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.strip .t-small { margin-top: 8px; color: var(--muted); max-width: 905px; }

/* ---------- project cards ---------- */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 32px; }
.card { display: flex; flex-direction: column; gap: 24px; }
.card .photo { aspect-ratio: 520 / 376; }
.card .logo {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  color: var(--white);
  text-shadow: 0 1px 24px rgb(0 0 0 / .08);
  pointer-events: none;
}
.card .tag { position: absolute; top: 24px; right: 24px; z-index: 3; }
.card-info {
  position: relative;
  padding: 20px 20px 20px;
  border-radius: 16px; background: var(--band);
  min-height: 124px;
}
.card-info .t-body { margin-top: 6px; max-width: 420px; }
.card-arrow {
  position: absolute; right: 20px; bottom: 20px;
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 6px;
  background: var(--ink); color: var(--soft);
}
.card-arrow svg { width: 9px; height: 9px; transition: transform .45s var(--ease); }
a.card:hover .photo > img.bg, a.card:focus-visible .photo > img.bg { transform: scale(1.1); filter: blur(10px); }
a.card:hover .card-arrow svg, a.card:focus-visible .card-arrow svg { transform: rotate(-45deg); }
a.card:focus-visible { outline: none; }
a.card:focus-visible .photo { outline: 2px solid var(--ink); outline-offset: 3px; }
.card.soon { cursor: default; }

/* white wordmarks used as "client logos" on photos */
.lg { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.lg-tf { font-family: var(--sans); font-weight: 600; font-size: 40px; letter-spacing: -0.06em; }
.lg-tf .tf-mark { height: 34px; width: auto; fill: currentColor; flex: none; }
.lg-ff { font-family: var(--sans); font-weight: 700; font-style: italic; font-size: 42px; letter-spacing: -0.05em; text-transform: uppercase; }
.lg-ds { font-family: var(--serif); font-size: 46px; letter-spacing: -0.06em; }
.lg-ds svg { width: 30px; height: 30px; }
.lg-be { font-family: var(--sans); font-weight: 500; font-size: 36px; letter-spacing: -0.04em; }
.lg-be svg { width: 28px; height: 28px; }

/* ---------- services ---------- */

.services { display: grid; grid-template-columns: 560px 448px; justify-content: space-between; align-items: start; }
.svc-list { display: flex; flex-direction: column; gap: 6px; }
.svc {
  display: flex; align-items: center; gap: 6px;
  height: 84px; padding: 0 16px;
  border: 0; border-radius: 24px;
  background: transparent; text-align: left; cursor: pointer;
  color: var(--muted);
  transition: background-color .4s var(--ease-soft), color .4s var(--ease-soft), padding .4s var(--ease);
}
.svc .t-h2 { white-space: nowrap; }
.svc sup { align-self: flex-start; font-size: 14px; line-height: 1; font-weight: 500; margin-top: 18px; letter-spacing: -0.01em; }
.svc[aria-selected="true"] { background: var(--band); color: var(--ink); padding-left: 32px; }
@media (hover: hover) { .svc:not([aria-selected="true"]):hover { color: var(--ink); } }
.svc-panel .photo { height: 324px; }
.svc-panel .t-title { margin-top: 24px; }
.svc-panel .t-body { margin-top: 4px; min-height: 72px; }
.svc-panel .link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-weight: 500; }
.svc-panel .link svg { width: 14px; height: 14px; }
.fade-swap { transition: opacity .35s var(--ease-soft); }
.fade-swap.out { opacity: 0; }

/* ---------- quote ---------- */

.quote { height: 430px; display: flex; align-items: center; color: var(--white); }
.quote::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgb(20 12 4 / .38), rgb(20 12 4 / .08)); }
.quote .over { padding: 0 64px; max-width: 1008px; }
.quote .qmark { width: 40px; height: 32px; margin-bottom: 24px; }
.quote .who { margin-top: 32px; font-size: 20px; line-height: 30px; font-weight: 500; }
.quote .role { color: rgb(255 255 255 / .56); }

/* ---------- process timeline band ---------- */

.process { padding: 120px 0; margin-top: 160px; }
.process-grid { display: grid; grid-template-columns: 504px 504px; justify-content: space-between; align-items: start; }
.process-grid .t-h2 { margin-top: 20px; }
.process-grid .t-body { margin-top: 20px; }
.steps { position: relative; display: flex; flex-direction: column; gap: 76px; }
.steps::before { content: ""; position: absolute; left: 28px; top: 56px; bottom: 56px; width: 1px; background: #e2d7ca; }
.step { position: relative; z-index: 1; display: grid; grid-template-columns: 56px 1fr; gap: 32px; }
/* hand-drawn connector between the numbers, built in main.js; it draws itself in when the list appears */
.steps.has-path::before { display: none; }
.steps-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.steps-path path {
  fill: none; stroke: #3a2e24; stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: var(--len, 0); stroke-dashoffset: var(--len, 0);
  transition: stroke-dashoffset 1.8s var(--ease-soft);
}
.steps.drawn .steps-path path { stroke-dashoffset: 0; }
.step .circle {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--soft);
  font-family: var(--serif); font-size: 24px; letter-spacing: -0.02em;
}
.step-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step .t-body { margin-top: 6px; max-width: 416px; }

/* ---------- highlight case study ---------- */

.highlight { display: grid; grid-template-columns: 566px 442px; justify-content: space-between; align-items: start; }
.highlight .t-h2 { margin-top: 20px; }
.highlight .copy { margin-top: 24px; display: grid; gap: 16px; max-width: 520px; }
.mini-stats { display: grid; grid-template-columns: repeat(2, 275px); gap: 16px; margin-top: 32px; }
.mini {
  height: 187px; padding: 24px;
  border-radius: 28px; background: var(--chip);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.mini .num { font-family: var(--serif); font-size: 70px; line-height: 77px; letter-spacing: -0.035em; }
.mini .t-title { margin-top: 8px; color: #000; }
.highlight .photo { height: 556px; }
@media (hover: hover) { .highlight a.photo:hover > img.bg { transform: scale(1.06); filter: blur(6px); } }

/* ---------- contact block ---------- */

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.contact-card { min-height: 853px; display: flex; flex-direction: column; justify-content: space-between; color: var(--white); text-align: center; }
.contact-card .over { padding: 32px 32px 0; }
.contact-card .mid { padding: 0 32px; }
.contact-card .mid .t-h2 { margin: 0 auto; max-width: 464px; line-height: 1; }
.contact-card .mid p { margin: 24px auto 0; max-width: 428px; font-size: 18px; line-height: 27px; color: rgb(255 255 255 / .8); }
.contact-card .top { font-size: 14px; line-height: 21px; font-weight: 500; }
.contact-card .bottom { padding: 0 0 32px; }
.contact-card .wordmark { color: rgb(255 255 255 / .9); }
.form {
  display: flex; flex-direction: column; gap: 20px;
  padding: 32px; border-radius: 28px; background: var(--band);
}
.input, .textarea {
  width: 100%; height: 59px; padding: 0 16px;
  border: 0; border-radius: 12px; background: var(--chip);
  font-size: 16px; line-height: 24px; color: var(--ink);
  outline: 1px solid transparent; transition: outline-color .25s, background-color .25s;
}
.textarea { height: 150px; flex: 1 1 auto; min-height: 150px; padding: 16px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .textarea:focus { outline-color: #d9cbbb; background: #ebe2d7; }
.fieldset { border: 0; margin: 0; padding: 0; }
.fieldset legend { padding: 0; margin-bottom: 16px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 16px 0 12px;
  border-radius: 12px; background: var(--chip);
  font-size: 12px; line-height: 18px; font-weight: 500;
  transition: background-color .2s;
}
.chip span::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--soft); transition: background-color .2s, box-shadow .2s; }
.chip input:checked + span::before { background: var(--ink); box-shadow: 0 0 0 2px var(--soft); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .chip:hover span { background: var(--chip-hover); } }
.submit {
  height: 67px; border: 0; border-radius: 50px; cursor: pointer;
  background: var(--ink); color: var(--white);
  font-size: 18px; line-height: 27px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background-color .3s;
}
@media (hover: hover) { .submit:hover { background: #3a2414; } }
.submit svg { width: 14px; height: 14px; }
.form-note { text-align: center; font-size: 12px; line-height: 18px; color: var(--muted); }
.form-note a { color: var(--ink); font-weight: 500; }

/* ---------- footer ---------- */

.footer { background: var(--band); margin-top: 160px; padding: 80px 0 40px; text-align: center; }
.footer .t-h2 { color: var(--ink); }
.footer .tagline { margin-top: 12px; font-size: 18px; line-height: 27px; color: var(--muted); }
.socials { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.socials a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); transition: transform .3s var(--ease); }
@media (hover: hover) { .socials a:hover { transform: translateY(-2px); } }
.socials svg { width: 15px; height: 15px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; max-width: 680px; margin: 64px auto 0; text-align: left; }
.footer-cols h4 { font-size: 16px; line-height: 24px; font-weight: 500; }
.footer-cols ul { margin-top: 16px; display: grid; gap: 16px; }
.footer-cols a { font-size: 14px; line-height: 21px; color: var(--muted); transition: color .2s; }
@media (hover: hover) { .footer-cols a:hover { color: var(--ink); } }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px;
  max-width: 866px; margin: 72px auto 0; padding-top: 24px;
  border-top: 1px solid #e9dfd4;
  font-size: 14px; line-height: 21px; color: var(--muted);
}

/* ==========================================================
   Inner page hero (Projects / About / Contact)
   ========================================================== */

.page-hero { padding: 75px 0 80px; }
.page-hero-grid { text-align: center; }
.page-hero-grid .actions { justify-content: center; }
.page-hero .t-hero { margin: 20px auto 0; line-height: 70px; max-width: 600px; }
.page-hero .t-lead { margin: 16px auto 0; max-width: 460px; }
@keyframes sway { from { transform: rotate(-2.5deg) translateY(0); } to { transform: rotate(2.5deg) translateY(-6px); } }

/* ==========================================================
   Case study detail
   ========================================================== */

.cs-cover { height: 450px; margin-top: 35px; display: flex; flex-direction: column; justify-content: space-between; color: var(--white); }
.cs-cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgb(20 12 4 / 0) 30%, rgb(20 12 4 / .38)); }
.cs-cover .bar { display: flex; justify-content: space-between; padding: 24px; }
.back-pill {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 8px; background: var(--band); color: var(--ink);
  font-size: 14px; line-height: 21px; font-weight: 500;
  transition: background-color .25s;
}
@media (hover: hover) { .back-pill:hover { background: var(--white); } }
.next-dot {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--band); color: var(--ink); transition: background-color .25s;
}
@media (hover: hover) { .next-dot:hover { background: var(--white); } }
.next-dot svg { width: 12px; height: 12px; }
.cs-cover .title { padding: 0 70px 48px; }
.cs-cover .t-lead { color: rgb(255 255 255 / .8); margin-top: 4px; max-width: 520px; }

.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.row { display: grid; grid-template-columns: 268px minmax(0, 804px); padding-top: 80px; }
.row-label { padding-left: 28px; color: var(--muted); font-size: 16px; line-height: 24px; }
.row-body .t-h3 + .t-big { margin-top: 24px; }
.row-body .t-big + .t-big { margin-top: 16px; }
.row-body .chips-static { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.row-body .chips-static .tag { height: 33px; padding: 0 12px; font-size: 14px; line-height: 21px; }
.chip-on { background: var(--ink); color: var(--soft); }

.numbered { margin-top: 28px; display: grid; gap: 12px; }
.numbered li {
  display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: start;
  padding: 20px 24px; border-radius: 16px; background: var(--band);
  font-size: 16px; line-height: 24px; font-weight: 500;
}
.numbered li span { font-family: var(--serif); font-size: 22px; line-height: 24px; color: var(--muted); font-weight: 400; }

.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 80px; }
.figure { display: flex; flex-direction: column; gap: 24px; }
.figure.wide { grid-column: 1 / -1; }
.figure .frame {
  display: grid; place-items: center;
  aspect-ratio: 520 / 376;
  padding: 28px; border-radius: 28px; background: var(--band);
  overflow: hidden;
}
.figure.wide .frame { aspect-ratio: auto; min-height: 420px; }
.figure .frame.dark { background: #1b1714; }
.figure .frame img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 10px; }
.figure.wide .frame img { max-height: 560px; }
.figure .card-info { min-height: 0; }

.screens { height: 640px; display: flex; align-items: flex-end; justify-content: center; }
.screens::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgb(20 12 4 / 0), rgb(20 12 4 / .18)); }
.screens .over { display: flex; align-items: flex-end; justify-content: center; gap: 20px; width: 100%; padding: 0 40px; margin-bottom: -60px; }
.screens .phone { width: 172px; padding: 6px; border-radius: 34px; }
.screens .phone img { border-radius: 28px; }
.screens .phone:nth-child(2), .screens .phone:nth-child(4) { margin-bottom: 40px; }

.phone {
  width: 200px; flex: none;
  padding: 7px; border-radius: 38px;
  background: #151210;
  box-shadow: inset 0 0 0 1.5px #3b3530, 0 40px 60px -24px rgb(20 10 0 / .55);
}
.phone img, .phone video { width: 100%; height: auto; aspect-ratio: 393 / 852; object-fit: cover; border-radius: 31px; background: #fff; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin-top: 32px; padding: 40px; border-radius: 28px; background: var(--band); }
.feature .t-title { margin-top: 16px; }
.feature .t-body { margin-top: 8px; }
.feature .pair { display: flex; justify-content: center; gap: 16px; }
.feature .phone { width: 180px; }

.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.result { min-height: 145px; gap: 12px; padding: 24px; border-radius: 28px; background: var(--chip); display: flex; flex-direction: column; justify-content: space-between; }
.result .num { font-family: var(--serif); font-size: 56px; line-height: 61.6px; letter-spacing: -0.03em; }
.result p { font-size: 18px; line-height: 27px; font-weight: 500; color: var(--muted); letter-spacing: -0.015em; }
.results.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- case study: story format ---------- */

.cs-kicker { font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .72); margin-bottom: 12px; }
.cs-intro { padding: 72px 28px 0; }
.cs-intro .t-h3 { font-size: 32px; line-height: 1.2; }
.cs-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-meta dt { font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cs-meta dd { margin: 8px 0 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.cs-meta dd span { display: block; font-weight: 400; color: var(--muted); }
.cs-meta dd .todo-mark { display: table; margin: 4px 0 0; }

.chapter { padding-top: 140px; }
.chapter > .row-label { position: sticky; top: 110px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.chapter > .row-label b { font-family: var(--serif); font-size: 40px; line-height: 1; font-weight: 400; color: var(--ink); letter-spacing: -0.03em; }
.chapter .row-body > * + * { margin-top: 24px; }
.chapter .row-body > .beat { margin-top: 96px; }
.chapter .row-body > .beat:first-child { margin-top: 0; }
.beat > * + * { margin-top: 20px; }
.label { display: block; font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.beat .t-h2 { font-size: 44px; line-height: 1.1; }
.beat .label + .t-h2 { margin-top: 12px; }
.beat .t-big { max-width: 640px; }
.fig { margin-top: 40px; }
.fig .frame { display: grid; place-items: center; padding: 28px; border-radius: 28px; background: var(--band); border: 1px solid var(--line); overflow: hidden; }
.fig .frame.dark { background: #0a0705; }
.fig .frame img { max-width: 100%; max-height: 520px; object-fit: contain; border-radius: 10px; }
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.fig-grid .fig { margin-top: 0; }
.fig-grid .fig.wide { grid-column: 1 / -1; }
.fig-grid .fig:not(.wide) .frame { height: 300px; }
.fig-grid .fig:not(.wide) .frame img { max-height: 100%; }
figcaption.cap { margin-top: 14px; font-size: 12px; line-height: 18px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
figcaption.cap b { color: var(--ink); font-weight: 500; margin-right: 8px; }
.jump { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
@media (hover: hover) { .jump:hover { color: var(--ink); } }

.pull { padding: 140px 0 0; text-align: center; }
.pull p { max-width: 900px; margin: 0 auto; font-family: var(--serif); font-size: 44px; line-height: 1.15; letter-spacing: -0.03em; }

.map { display: grid; gap: 12px; }
.map li { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 16px; align-items: center; padding: 20px 24px; border-radius: 16px; background: var(--band); border: 1px solid rgb(255 255 255 / .03); }
.map li > span:first-child { color: var(--muted); }
.map li > span:last-child { font-weight: 500; }
.map li svg { width: 16px; height: 16px; color: var(--muted); }
.map .map-head { padding: 0 24px; background: none; border: 0; }

.path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.path .tag { height: 33px; }
.path i { color: var(--muted); font-style: normal; }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; padding: 40px; border-radius: 28px; background: var(--band); border: 1px solid rgb(255 255 255 / .03); }
.stage + .stage { margin-top: 16px !important; }
.stage .t-title { margin-top: 12px; }
.stage .t-body { margin-top: 8px; }
.stage .pair { display: flex; gap: 16px; }
.stage .phone { width: 180px; }

.stage .why { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 21px; color: var(--muted); }
.stage .why b { color: var(--ink); font-weight: 500; }

.flow-frame { overflow-x: auto; }
.flow { display: block; width: 100%; height: auto; }
.flow rect { fill: var(--chip); stroke: var(--line); }
.flow .t { fill: var(--ink); font: 500 15px var(--sans); }
.flow .s { fill: var(--muted); font: 13px var(--sans); }
.flow .a { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.flow .head { fill: var(--muted); }
.flow .w { fill: #e0a064; font: 500 13px var(--sans); }

.decisions { display: grid; gap: 16px; }
.decision { padding: 32px; border-radius: 28px; background: var(--band); border: 1px solid rgb(255 255 255 / .03); }
.decision .t-title { margin-top: 10px; }
.decision .t-body + .t-body { margin-top: 12px; }
.decision .t-body { margin-top: 10px; max-width: 680px; }
.decision .trade { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 23px; color: var(--muted); max-width: 680px; }
.decision .trade b { color: var(--ink); font-weight: 500; }

.lessons { display: grid; gap: 28px; }
.lessons p { font-size: 18px; line-height: 27px; color: var(--muted); max-width: 640px; }
.lessons b { color: var(--ink); font-weight: 500; }

/* "Needs info" markers: placeholders for content still to write. Delete each one once it's filled in. */
.todo { padding: 20px 24px; border: 1.5px dashed #c9853f; border-radius: 16px; background: rgb(201 133 63 / .08); color: var(--ink); font-size: 15px; line-height: 23px; }
.todo::before { content: "Needs info"; display: block; margin-bottom: 6px; font-size: 12px; line-height: 18px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #e0a064; }
.todo ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.todo-fig { display: grid; place-items: center; min-height: 320px; padding: 32px; text-align: center; }
.todo-fig::before { margin-bottom: 8px; }
.todo-mark { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px dashed #c9853f; border-radius: 6px; font-size: 11px; line-height: 18px; font-weight: 600; color: #e0a064; vertical-align: middle; }

/* ---------- about ---------- */

.about-media { display: grid; grid-template-columns: 442px 1fr; gap: 16px; }
.portrait { height: 556px; }
.portrait img.bg { object-position: 50% 28%; }
.about-media .stack { display: grid; gap: 16px; grid-template-rows: 1fr auto; }
.about-media .stats { height: auto; min-height: 365px; }
.about-media .stats-row { grid-template-columns: 1fr; width: 100%; padding: 32px; gap: 12px; }
.about-media .glass { height: auto; padding: 20px 24px; flex-direction: row; justify-content: space-between; text-align: left; }
.about-media .glass .num { font-size: 56px; line-height: 61.6px; }
.about-media .glass p { margin: 0; max-width: 220px; text-align: right; }

/* ---------- reveal & text animation ---------- */

.reveal { opacity: 0; transform: translateY(64px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.split .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(10px); transition: opacity .8s var(--ease), filter .8s var(--ease), transform .8s var(--ease); }
.split.in .w { opacity: 1; filter: blur(0); transform: none; }

/* photos settle from a slight zoom as their block rises */
.reveal:not(.in) .photo > img.bg, .photo.reveal:not(.in) > img.bg { transform: scale(1.08); }

/* lists: the block stays put, its items slide in from the left one by one */
.steps.reveal { transform: none; }
.steps.reveal .step, .reveal .numbered li { opacity: 0; transform: translateX(-30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.steps.reveal.in .step, .reveal.in .numbered li { opacity: 1; transform: none; }
.steps.has-path:not(.drawn) .step { opacity: 0; transform: translateX(-30px); }
.steps.reveal .step:nth-child(3) { transition-delay: .6s; }
.steps.reveal .step:nth-child(4) { transition-delay: 1.2s; }

/* quotes rise in letter by letter */
.chars .cw { display: inline-block; white-space: nowrap; }
.chars .c { display: inline-block; opacity: 0; transform: translateY(7px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.in .chars .c, .chars.in .c { opacity: 1; transform: none; }

.no-js .reveal, .no-js .split .w, .no-js .reveal .step, .no-js .reveal .numbered li { opacity: 1; transform: none; filter: none; }

/* ==========================================================
   Responsive (Framer-style breakpoints: 1199 / 809)
   ========================================================== */

@media (max-width: 1199px) {
  :root { --gutter: 40px; }
  .services { grid-template-columns: 1fr 1fr; gap: 40px; }
  .process-grid, .highlight { grid-template-columns: 1fr 1fr; gap: 48px; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 40px; width: 100%; }
  .row { grid-template-columns: 200px minmax(0, 1fr); }
  .cs-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-media { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 809px) {
  :root { --gutter: 24px; }
  body { font-size: 15px; }
  .t-hero { font-size: 42px; line-height: 46px; }
  .t-detail { font-size: 48px; line-height: 50px; }
  .t-h2 { font-size: 40px; line-height: 44px; }
  .t-quote { font-size: 30px; line-height: 34px; }
  .t-h3 { font-size: 24px; }
  .t-lead { font-size: 16px; line-height: 24px; }

  .nav { height: 64px; grid-template-columns: 1fr auto; }
  .brand { font-size: 28px; }
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: block; }

  .section { padding-top: 112px; }
  .section-first { padding-top: 64px; }
  .hero { padding: 40px 0 56px; }
  .hero-media { height: 420px; margin-top: 48px; border-radius: 28px; }
  .trust { grid-template-columns: 1fr; gap: 16px; text-align: center; margin-top: 48px; }
  .head-row { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  .head-center { margin-bottom: 40px; }

  .stats { height: auto; padding: 32px 0; }
  .stats-row { grid-template-columns: 1fr; padding: 0 32px; }
  .glass { height: 140px; }
  .glass .num { font-size: 48px; line-height: 52px; }
  .glass p { margin-top: 8px; font-size: 14px; }
  .strip { flex-direction: column; align-items: flex-start; }

  .cards { grid-template-columns: 1fr; gap: 24px; }
  .card { gap: 12px; }
  .card .logo .lg { transform: scale(.8); }

  .services { grid-template-columns: 1fr; gap: 32px; }
  .svc-list { gap: 4px; }
  .svc { height: auto; padding: 12px 16px; }
  .svc .t-h2 { font-size: 34px; line-height: 40px; }
  .svc[aria-selected="true"] { padding-left: 20px; }
  .svc-panel .photo { height: 240px; }

  .quote { height: auto; padding: 48px 0; }
  .quote .over { padding: 0 28px; }

  .process { padding: 80px 0; margin-top: 112px; }
  .process-grid, .highlight { grid-template-columns: 1fr; gap: 48px; }
  .steps { gap: 40px; }
  .mini-stats { grid-template-columns: 1fr; }
  .highlight .photo { height: 420px; }

  .contact { grid-template-columns: 1fr; }
  .contact-card { min-height: 560px; }
  .form { padding: 24px; }

  .footer { margin-top: 112px; padding-top: 64px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; max-width: none; }
  .footer-bottom { flex-direction: column; text-align: left; }

  .page-hero { padding: 40px 0 56px; }
  .page-hero .t-hero { line-height: 46px; }

  .cs-cover { height: 420px; margin-top: 16px; }
  .cs-cover .title { padding: 0 24px 32px; }
  .row { grid-template-columns: minmax(0, 1fr); padding-top: 56px; gap: 16px; }
  .row-label { padding-left: 0; }
  .cs-intro { padding: 48px 0 0; }
  .cs-intro .t-h3 { font-size: 24px; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter { padding-top: 96px; }
  .chapter > .row-label { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
  .chapter > .row-label b { font-size: 28px; }
  .chapter .row-body > .beat { margin-top: 64px; }
  .beat .t-h2, .pull p { font-size: 32px; }
  .pull { padding-top: 96px; }
  .fig .frame { padding: 16px; }
  .fig-grid { grid-template-columns: 1fr; }
  .map li { grid-template-columns: 1fr; gap: 4px; }
  .map li svg, .map .map-head { display: none; }
  .stage { grid-template-columns: 1fr; padding: 24px; }
  .decision { padding: 24px; }
  .stage .phone { width: 140px; }
  .figure-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 56px; }
  .screens { height: 460px; }
  .screens .over { gap: 12px; padding: 0 16px; margin-bottom: -40px; }
  .screens .phone { width: 128px; padding: 5px; border-radius: 26px; }
  .screens .phone img { border-radius: 21px; }
  .screens .phone:nth-child(n+4) { display: none; }
  .feature { grid-template-columns: 1fr; padding: 24px; }
  .feature .phone { width: 140px; }
  .results, .results.three { grid-template-columns: 1fr; }

  .about-media { grid-template-columns: 1fr; }
  .portrait { height: 460px; }
}

/* ==========================================================
   Dark theme details
   Adjustments the dark colors need. Primary buttons are cream with dark text.
   ========================================================== */

.site-header.on-page { background: var(--page); }
.brand, .mini .t-title { color: var(--ink); }
@media (hover: hover) { .btn-dark:hover, .submit:hover { background: #ffffff; } }
.btn-dark { box-shadow: 0 8px 24px -12px rgb(243 234 223 / .35); }
.btn-white { color: #2b180a; }
.submit { background: var(--ink); color: var(--soft); }
.step .circle, .socials a { background: var(--chip); color: var(--ink); }
.steps::before { background: var(--line); }
.chip span::before { background: #3a2e24; }
.chip input:checked + span::before { box-shadow: 0 0 0 2px var(--chip); }
.input:focus, .textarea:focus { outline-color: #4a3b2e; background: #2a2018; }
.footer-bottom { border-top-color: var(--line); }
.wordmark { color: #6f6359; }
.figure .frame { border: 1px solid var(--line); }
.figure .frame.dark { background: #0a0705; }
.card-info, .numbered li, .result, .mini, .form, .strip, .feature { border: 1px solid rgb(255 255 255 / .03); }
.card .tag { background: rgb(20 14 10 / .55); color: #f3eadf; }
.photo > img.bg { filter: brightness(.9) saturate(1.05); }
a.card:hover .photo > img.bg, a.card:focus-visible .photo > img.bg { filter: brightness(.9) saturate(1.05) blur(10px); }
.hero-media > img.bg { filter: brightness(.95) saturate(1.05); }
::selection { background: #f3eadf; color: #140e0a; }

/* ================= test-2: real screens on the warm gradients ================= */

/* hero: three phones standing on the gradient */
.hero-app { height: 640px; display: flex; align-items: center; justify-content: center; gap: 36px; }
.hero-app > .phone { position: relative; z-index: 2; width: 204px; box-shadow: inset 0 0 0 1.5px #3b3530, 0 50px 70px -30px rgb(60 25 0 / .55), 0 18px 30px -18px rgb(60 25 0 / .35); }
.hero-app > .phone:nth-child(3) { width: 248px; }
.hero-app > .phone { transition: transform 1s var(--ease), opacity 1s var(--ease); }
.hero-app.reveal:not(.in) > .phone { opacity: 0; transform: translateY(40px); }
.hero-app.reveal > .phone:nth-child(2) { transition-delay: .12s; }
.hero-app.reveal > .phone:nth-child(4) { transition-delay: .24s; }

/* project cards: phones or panels over the card's own photo */
.shots { display: flex; align-items: flex-end; justify-content: center; gap: 16px; padding: 0 24px; }
.shots::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgb(20 12 4 / 0) 45%, rgb(20 12 4 / .22)); }
.shots > .phone, .shots > .panel { position: relative; z-index: 2; }
.shots .phone { width: 31%; padding: 5px; border-radius: 26px; margin-bottom: -22%; transition: transform .5s var(--ease); }
.shots .phone img { border-radius: 21px; }
.shots .phone:nth-of-type(2) { margin-bottom: -5%; }
.shots-ds { display: block; padding: 0; }
.shots-ds .panel { position: absolute; border-radius: 12px; box-shadow: 0 30px 60px -18px rgb(30 12 0 / .6), 0 0 0 1px rgb(255 255 255 / .08); transition: transform .5s var(--ease); }
.shots-ds .panel-1 { left: 8%; top: 17%; width: 58%; }
.shots-ds .panel-2 { right: 8%; top: 31%; width: 32%; }
.shots-cx .panel-1 { left: 5%; top: 19%; width: 70%; }
.shots-cx .panel-2 { right: 5%; top: 47%; width: 42%; }
@media (hover: hover) {
  a.card:hover .shots .phone { transform: translateY(-8px); }
  a.card:hover .shots-ds .panel { transform: translateY(-6px); }
}

/* featured case study */
.feature-cs { display: block; margin-bottom: 32px; color: inherit; text-decoration: none; }
.fc-screens { height: 520px; }
.fc-screens .tag { position: absolute; top: 24px; right: 24px; z-index: 3; background: rgb(20 14 10 / .55); color: #f3eadf; }
.fc-screens .phone { transition: transform .6s var(--ease); }
.fc-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; margin-top: 24px; padding: 28px 32px; border-radius: 20px; background: var(--band); border: 1px solid rgb(255 255 255 / .03); }
.fc-copy .t-body { margin-top: 8px; max-width: 420px; }
.fc-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 15px; font-weight: 500; color: var(--ink); }
.fc-link .card-arrow { position: static; }
.fc-stats { display: grid; grid-template-columns: repeat(3, 156px); gap: 12px; }
.fc-stats > div { padding: 18px 18px 16px; border-radius: 16px; background: var(--chip); min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; }
.fc-stats .num { font-family: var(--serif); font-size: 44px; line-height: 46px; letter-spacing: -0.035em; color: var(--ink); }
.fc-stats p { margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
@media (hover: hover) {
  .feature-cs:hover .fc-screens .phone { transform: translateY(-10px); }
  .feature-cs:hover .card-arrow svg { transform: rotate(-45deg); }
  .feature-cs:hover .fc-screens > img.bg { transform: scale(1.06); filter: brightness(.9) saturate(1.05) blur(6px); }
}
.feature-cs:focus-visible { outline: none; }
.feature-cs:focus-visible .fc-screens { outline: 2px solid var(--ink); outline-offset: 3px; }

/* case study cover with the screens inside it */
.cover-app { height: auto; justify-content: flex-start; padding-bottom: 56px; }
.cover-app .title { padding: 24px 70px 0; }
/* the screens sit fully under the cover */
.cover-screens { position: relative; z-index: 3; display: flex; align-items: flex-end; justify-content: center; gap: 18px; margin-top: 40px; padding: 0 40px; pointer-events: none; }
.cover-screens .phone { width: 150px; padding: 5px; border-radius: 30px; }
.cover-screens .phone img { border-radius: 25px; }
.cover-screens .phone:nth-child(2), .cover-screens .phone:nth-child(4) { margin-bottom: 32px; }

/* decisions: a screen, or a before / after flow */
.decision.has-shot { display: grid; grid-template-columns: minmax(0, 1fr) 190px; column-gap: 40px; }
.decision.has-shot > * { grid-column: 1; }
.decision.has-shot .decision-shot { grid-column: 2; grid-row: 1 / span 5; align-self: start; margin: 0; }
.decision-shot .phone { width: 100%; padding: 5px; border-radius: 28px; }
.decision-shot .phone img { border-radius: 23px; }
.decision-shot figcaption { margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.ba { display: grid; gap: 10px; margin-top: 22px; }
.ba-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--chip); border: 1px solid rgb(255 255 255 / .04); }
.ba-row.after { background: #1f2414; border-color: rgb(160 210 60 / .16); }
.ba-tag { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ba-row.after .ba-tag { color: #b9d86a; }
.ba-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ba-steps > i { font-style: normal; color: var(--muted); }
.ba-step { padding: 7px 12px; border-radius: 999px; background: rgb(255 255 255 / .06); font-size: 13.5px; line-height: 18px; color: var(--ink); }
.ba-step.bad { background: rgb(224 110 70 / .16); color: #f0a184; }
.ba-step.good { background: rgb(160 210 60 / .16); color: #c9e37f; }
.ba-opts { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* page headers without the flower */
.page-hero-grid { grid-template-columns: 1fr; text-align: center; }
.page-hero .t-hero, .page-hero .t-lead { margin-left: auto; margin-right: auto; }
.page-hero-grid .actions { justify-content: center; }

@media (max-width: 1100px) {
  .fc-info { grid-template-columns: 1fr; gap: 24px; }
  .fc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero-app { height: 430px; gap: 12px; }
  .hero-app > .phone { width: 118px; flex: none; padding: 4px; border-radius: 22px; }
  .hero-app > .phone img { border-radius: 18px; }
  .hero-app > .phone:nth-child(3) { width: 160px; padding: 5px; border-radius: 28px; }
  .hero-app > .phone:nth-child(3) img { border-radius: 23px; }
  .fc-screens { height: 380px; }
  .fc-info { padding: 22px 20px; margin-top: 12px; }
  .fc-stats { grid-template-columns: 1fr; }
  .fc-stats > div { min-height: 0; }
  .feature-cs { margin-bottom: 24px; }
  .cover-app { height: auto; padding-bottom: 32px; }
  .cover-app .title { padding: 16px 24px 0; }
  .cover-screens { gap: 10px; padding: 0 12px; margin-top: 24px; }
  .cover-screens .phone { width: 104px; padding: 4px; border-radius: 22px; }
  .cover-screens .phone img { border-radius: 18px; }
  .cover-screens .phone:nth-child(2), .cover-screens .phone:nth-child(4) { margin-bottom: 22px; }
  .cover-screens .phone:nth-child(n+4) { display: none; }
  .decision.has-shot { grid-template-columns: 1fr; }
  .decision.has-shot .decision-shot { grid-column: 1; grid-row: auto; order: 9; width: 170px; margin: 24px auto 0; }
  .ba-row { grid-template-columns: 1fr; gap: 8px; }
}


/* ================= test-2: shorter Tu Financiera case study ================= */
.users { display: grid; gap: 12px; }

/* image boxes waiting for the author's own screens */
.slot { margin: 0; }
.slot-box {
  aspect-ratio: 393 / 852; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px; text-align: center; border-radius: 24px;
  border: 1.5px dashed rgb(243 234 223 / .28); background: rgb(243 234 223 / .035); color: var(--muted);
}
.slot-box svg { width: 28px; height: 28px; margin-bottom: 4px; color: rgb(243 234 223 / .5); }
.slot-box b { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.slot-box span { font-size: 12.5px; line-height: 17px; }
.slot figcaption { margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.slot.wide { margin-top: 16px !important; }
.slot.wide .slot-box { aspect-ratio: 16 / 7; border-radius: 28px; }

.decision.has-slots { display: grid; grid-template-columns: minmax(0, 1fr) 316px; column-gap: 40px; }
.decision.has-slots.one { grid-template-columns: minmax(0, 1fr) 190px; }
.decision.has-slots > * { grid-column: 1; }
.decision.has-slots .decision-slots { grid-column: 2; grid-row: 1 / span 6; align-self: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.decision.has-slots.one .decision-slots { grid-template-columns: 1fr; }

/* final experience: four steps side by side instead of four tall cards */
.journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 28px; border-radius: 28px; background: var(--band); border: 1px solid rgb(255 255 255 / .03); }
.step-card .phone { width: 100%; padding: 5px; border-radius: 26px; margin-bottom: 20px; }
.step-card .phone img { border-radius: 21px; }
.step-card .t-title { margin-top: 8px; font-size: 16px; line-height: 22px; }
.step-card .t-body { margin-top: 6px; font-size: 14px; line-height: 21px; }

@media (max-width: 1100px) {
  .decision.has-slots, .decision.has-slots.one { grid-template-columns: 1fr; }
  .decision.has-slots .decision-slots { grid-column: 1; grid-row: auto; order: 9; margin-top: 24px; max-width: 340px; }
  .decision.has-slots.one .decision-slots { max-width: 170px; }
}
@media (max-width: 760px) {
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; gap: 24px 14px; }
  .decision.has-slots .decision-slots { margin-left: auto; margin-right: auto; }
  .slot.wide .slot-box { aspect-ratio: 4 / 3; }
}

/* ================= test-2: strategy tabs ================= */
.tab-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .05); background: var(--chip); color: var(--ink); font: 500 14px/1 var(--sans); letter-spacing: -0.01em; cursor: pointer; transition: background-color .3s var(--ease-soft), color .3s var(--ease-soft); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--soft); }
@media (hover: hover) { .tab[aria-selected="false"]:hover { background: var(--chip-hover); } }
.tab-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 16px; padding: 28px; border-radius: 28px; background: var(--band); border: 1px solid rgb(255 255 255 / .03); animation: tab-in .5s var(--ease); }
.tab-panel[hidden] { display: none; }
@keyframes tab-in { from { opacity: 0; transform: translateY(10px); } }
.tab-media { display: grid; place-items: center; height: 420px; border-radius: 20px; background: #0b0806; overflow: hidden; }
.tab-media .phone { width: 172px; padding: 5px; border-radius: 28px; }
.tab-media .phone img { border-radius: 23px; }
.tab-media img.wide { width: 88%; border-radius: 12px; }
.tab-copy { padding-right: 12px; }
.tab-copy .t-h3 { margin-top: 12px; }
.tab-copy .t-body { margin-top: 12px; }
@media (max-width: 760px) {
  .tab-panel { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .tab-media { height: 360px; }
  .tab-media .phone { width: 148px; }
  .tab-copy { padding: 0 4px 4px; }
}

/* ================= test-2: case study section list (right edge) ================= */
.toc { position: fixed; right: 14px; top: 50%; z-index: 40; transform: translateY(-50%); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease-soft), visibility .4s; }
.toc.show { opacity: 1; visibility: visible; }
.toc ol { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 2px; border-radius: 16px; border: 1px solid transparent; transition: background-color .3s var(--ease-soft), border-color .3s var(--ease-soft), box-shadow .3s var(--ease-soft); }
.toc a { display: flex; align-items: center; justify-content: flex-end; gap: 12px; height: 26px; color: var(--muted); font-size: 14px; line-height: 1; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.toc a span { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .4s var(--ease), opacity .25s var(--ease-soft); }
.toc a i { flex: none; width: 14px; height: 2px; border-radius: 2px; background: rgb(243 234 223 / .26); transition: width .35s var(--ease), background-color .3s var(--ease-soft); }
.toc a.on { color: var(--ink); }
.toc a.on i { width: 26px; background: var(--ink); }
.toc:hover ol, .toc:focus-within ol, .toc.open ol { background: var(--band); border-color: rgb(255 255 255 / .06); box-shadow: 0 20px 50px rgb(0 0 0 / .45); }
.toc:hover a span, .toc:focus-within a span, .toc.open a span { max-width: 200px; opacity: 1; }
@media (hover: hover) { .toc a:hover { color: var(--ink); } .toc a:hover i { background: var(--ink); } }
.toc-toggle { display: none; }
@media (max-width: 1180px) {
  .toc { right: auto; left: 50%; top: 12px; transform: translateX(-50%); }
  .toc-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 16px; border-radius: 999px;
    border: 1px solid rgb(255 255 255 / .09); background: rgb(24 18 13 / .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    color: var(--ink); font: 500 14px/1 var(--sans); letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
    box-shadow: 0 10px 30px rgb(0 0 0 / .45);
  }
  .toc-toggle svg { width: 12px; height: 12px; color: var(--muted); transition: transform .3s var(--ease); }
  .toc.open .toc-toggle svg { transform: rotate(180deg); }
  .toc ol, .toc:hover ol, .toc:focus-within ol {
    display: none; position: absolute; top: 48px; left: 50%; width: 236px; margin-left: -118px; padding: 8px; gap: 2px;
    background: var(--band); border-color: rgb(255 255 255 / .08); box-shadow: 0 20px 50px rgb(0 0 0 / .55);
  }
  .toc.open ol { display: grid; animation: tab-in .3s var(--ease); }
  .toc a { justify-content: flex-start; height: 42px; padding: 0 12px; border-radius: 10px; font-size: 15px; }
  .toc a span, .toc:hover a span { max-width: none; opacity: 1; overflow: visible; }
  .toc a i { order: -1; width: 0; }
  .toc a.on { background: var(--chip); }
  .toc a.on i { width: 18px; }
}

/* screens box inside a case study chapter: lines up with the text column */
.chapter .row-body > .screens-inline { height: auto; aspect-ratio: 2 / 1; margin-top: 48px; align-items: center; }
.screens-inline .over { align-items: center; gap: 1.8%; padding: 0; margin-bottom: 0; }
.screens-inline .phone { width: 16%; padding: 5px; border-radius: 26px; }
.screens-inline .phone img { border-radius: 21px; }
.screens-inline .phone:nth-child(n) { display: block; margin-bottom: 0; }
@media (max-width: 560px) {
  .chapter .row-body > .screens-inline { aspect-ratio: 4 / 3; margin-top: 32px; }
  .screens-inline .over { gap: 3%; margin-bottom: 0; }
  .screens-inline .phone { width: 27%; padding: 4px; border-radius: 20px; }
  .screens-inline .phone img { border-radius: 16px; }
  .screens-inline .phone:nth-child(n+4) { display: none; }
}

/* ================= test-2: case study notes ================= */
.impact .results { margin-top: 16px; }
.attrib { margin-top: 14px; font-size: 14px; line-height: 21px; color: var(--muted); }
.decision .t-body b { color: var(--ink); font-weight: 500; }
.dec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgb(110 200 140 / .12); color: #8fd6a6; font-size: 12px; line-height: 1; font-weight: 500; letter-spacing: .02em; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.decision.has-shot .decision-shot { grid-row: 1 / span 7; }
@media (max-width: 760px) { .decision.has-shot .decision-shot { grid-row: auto; } }

/* ================= test-2: home intro card ================= */
.hero-intro { display: grid; grid-template-columns: 37% minmax(0, 1fr); height: 440px; margin-top: 56px; border-radius: 32px; overflow: hidden; text-align: left; -webkit-mask-image: linear-gradient(#000 0 0); mask-image: linear-gradient(#000 0 0); }
.hi-photo { position: relative; background: #3a322b; }
.hi-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hi-side { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; }
.hi-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hi-card { position: relative; width: 100%; max-width: 532px; padding: 32px 32px 28px; border-radius: 20px; background: rgb(36 27 20 / .84); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 30px 60px -30px rgb(40 15 0 / .6); }
.hi-title { margin: 0; font-family: var(--serif); font-size: 40px; line-height: 44px; font-weight: 400; letter-spacing: -0.03em; color: var(--ink); }
.hi-card p { margin-top: 16px; font-size: 15px; line-height: 24px; color: rgb(243 234 223 / .82); }
.hi-chips { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hi-chips li { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: rgb(255 255 255 / .07); color: var(--ink); font-size: 13px; line-height: 1; font-weight: 500; white-space: nowrap; }
/* tablets keep the photo beside the card, so the face stays a normal size */
@media (max-width: 1000px) {
  .hero-intro { grid-template-columns: 38% minmax(0, 1fr); height: auto; min-height: 380px; margin-top: 44px; border-radius: 28px; }
  .hi-photo img { object-position: 50% 22%; }
  .hi-side { padding: 28px; }
  .hi-card { padding: 26px 24px 22px; }
  .hi-title { font-size: 34px; line-height: 38px; }
}
/* phones stack them, with a short photo band cropped to the face */
@media (max-width: 640px) {
  .hero-intro { grid-template-columns: 1fr; min-height: 0; margin-top: 36px; }
  .hi-photo { aspect-ratio: 16 / 10; }
  .hi-photo img { object-position: 50% 12%; }
  .hi-side { padding: 16px; }
  .hi-card { max-width: none; padding: 22px 20px 20px; }
  .hi-title { font-size: 30px; line-height: 34px; }
}

/* test-2: home featured card, phones centered in the box */
.fc-screens { align-items: center; }
.fc-screens .over { align-items: center; margin-bottom: 0; }
.fc-screens .over { gap: 20px; }
.fc-screens .phone { width: 164px; }
/* 2nd and 4th stand higher; equal margin boxes keep the whole row centered */
.fc-screens .phone:nth-child(n) { margin: 44px 0 0; }
.fc-screens .phone:nth-child(2), .fc-screens .phone:nth-child(4) { margin: 0 0 44px; }
@media (max-width: 760px) {
  .fc-screens { height: 330px; }
  .fc-screens .over { gap: 3%; padding: 0 16px; }
  .fc-screens .phone { flex: 0 0 29%; width: 29%; padding: 4px; border-radius: 18px; }
  .fc-screens .phone img { border-radius: 14px; }
  .fc-screens .phone:nth-child(n) { margin: 22px 0 0; }
  .fc-screens .phone:nth-child(2) { margin: 0 0 22px; }
}

/* test-2: home stat tiles, numbers on one line whatever the label length */
.fc-stats p { min-height: 36px; }
@media (max-width: 760px) { .fc-stats p { min-height: 0; } }

/* test-2: FitFlex card, a close-up of three phones (home in front, bleeding off the bottom) */
.shots-ff { display: block; padding: 0; }
.shots-ff .phone { position: absolute; margin: 0; padding: 5px; border-radius: 30px; box-shadow: 0 40px 60px -24px rgb(20 10 0 / .55); }
.shots-ff .phone img { border-radius: 25px; }
.shots-ff .phone:nth-of-type(1) { left: 8%; top: 32%; width: 28%; margin: 0; }
.shots-ff .phone:nth-of-type(2) { left: 32%; top: 13%; width: 36%; margin: 0; z-index: 3; }
.shots-ff .phone:nth-of-type(3) { right: 8%; top: 32%; width: 28%; margin: 0; }
@media (max-width: 760px) {
  .shots-ff .phone { padding: 4px; border-radius: 24px; }
  .shots-ff .phone img { border-radius: 20px; }
}

/* ================= test-2: before and after (Figma page 7) ================= */
.ba-tabs { margin-top: 24px; }
.tab-media.ba-media { height: auto; min-height: 420px; padding: 28px 20px 22px; display: flex; align-items: flex-start; justify-content: center; gap: 18px; }
.ba-shot { margin: 0; width: 44%; max-width: 172px; text-align: center; }
.ba-media.three .ba-shot { width: 31%; max-width: 150px; }
.ba-tabs .tab-panel { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.ba-shot .phone { width: 100%; padding: 5px; border-radius: 28px; }
.ba-shot .phone img { border-radius: 23px; }
.ba-shot figcaption { display: inline-flex; margin-top: 12px; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .06); color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.ba-shot.after figcaption { background: rgb(110 200 140 / .12); color: #8fd6a6; }
.ba-media.three .ba-shot .phone { padding: 4px; border-radius: 24px; }
.ba-media.three .ba-shot .phone img { border-radius: 20px; }
.slot.filled .phone { width: 100%; padding: 4px; border-radius: 24px; }
.slot.filled .phone img { border-radius: 20px; }
@media (max-width: 760px) {
  .ba-tabs .tab-panel { grid-template-columns: 1fr; }
  .tab-media.ba-media { min-height: 0; padding: 20px 12px 16px; gap: 10px; }
  .ba-shot .phone { padding: 4px; border-radius: 22px; }
  .ba-shot .phone img { border-radius: 18px; }
  .ba-media.three .ba-shot .phone { padding: 3px; border-radius: 16px; }
  .ba-media.three .ba-shot .phone img { border-radius: 13px; }
  .ba-shot figcaption { font-size: 11px; padding: 3px 8px; }
}

/* test-2: every phone mockup keeps the same corner shape at any size.
   The phone is a size container, so the frame and corner radius are measured in cqi
   (a share of the phone's own width) and scale together. Small phones get a floor. */
.phone { container-type: inline-size; padding: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.phone img, .phone video {
  box-sizing: border-box;
  border: max(2.8cqi, 3px) solid #151210 !important;
  border-radius: max(16.8cqi, 14px) !important;  /* iPhone: screen corner 55pt on a 393pt width (14%) plus the frame */
  box-shadow: 0 0 0 1px #3b3530, 0 40px 60px -24px rgb(20 10 0 / .55);
}

/* test-2: Fig 02.1 turns vertical on phones instead of scrolling sideways */
.flow-v { display: none; }
@media (max-width: 760px) {
  .flow-frame { overflow: visible; padding: 22px 16px; }
  .flow-h { display: none; }
  .flow-v { display: block; width: 100%; max-width: 340px; min-width: 0; margin: 0 auto; }
}

/* test-2: figures open in a modal */
.fig .frame.zoomable { position: relative; cursor: zoom-in; transition: border-color .3s var(--ease-soft); }
.fig .frame.zoomable:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) { .fig .frame.zoomable:hover { border-color: rgb(255 255 255 / .14); } }
html.lb-open { overflow: hidden; }
.lightbox { width: min(1200px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.lightbox[open] { animation: lb-in .35s var(--ease); }
.lightbox::backdrop { background: rgb(8 6 4 / .84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } }
.lb-inner { position: relative; max-height: calc(100dvh - 32px); overflow: auto; padding: 56px 24px 22px; border-radius: 24px; background: var(--band); border: 1px solid var(--line); }
.lb-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--chip); color: var(--ink); cursor: pointer; }
.lb-close svg { width: 13px; height: 13px; }
.lb-body .frame { display: grid; place-items: center; padding: 0; border: 0; background: none; border-radius: 0; overflow: visible; }
.lb-body img { display: block; width: auto; max-width: 100%; max-height: calc(100dvh - 190px); margin: 0 auto; border-radius: 12px; }
.lb-body .flow { max-height: calc(100dvh - 190px); }
.lb-cap { margin-top: 18px; font-size: 13px; line-height: 19px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.lb-cap b { color: var(--ink); font-weight: 600; margin-right: 6px; }
/* in the modal the wide diagram has room from tablet width up */
@media (min-width: 641px) { .lightbox .flow-h { display: block; } .lightbox .flow-v { display: none; } }
@media (max-width: 640px) { .lightbox .flow-h { display: none; } .lightbox .flow-v { display: block; max-width: 360px; margin: 0 auto; } .lb-inner { padding: 52px 16px 18px; } }

/* test-2: Decision 04 phone matches the Decision 03 phones */
@media (min-width: 1101px) { .decision.has-slots.one { grid-template-columns: minmax(0, 1fr) 150px; } }
@media (max-width: 1100px) { .decision.has-slots.one .decision-slots { max-width: calc((min(340px, 100%) - 16px) / 2); } }

/* test-2: four facts and credits */
.cs-meta.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cs-meta.four dd span { display: inline; }
.cs-meta.four.with-credits { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.6fr); }
.cs-meta .credits dd span { display: block; font-size: 14px; line-height: 21px; }
.cs-meta .credits dd span + span { margin-top: 4px; }
.cs-meta .credits dd b { font-weight: 500; color: var(--ink); }
@media (max-width: 1100px) { .cs-meta.four.with-credits { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cs-meta .credits { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  .cs-meta.four, .cs-meta.four.with-credits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* credit names start on their own line, under the label */
.cs-meta .credits dd b { display: block; }

/* test-2: cover buttons lighten a little on hover instead of turning white */
.back-pill, .next-dot { transition: background-color .15s ease-out, transform .15s ease-out; }
@media (hover: hover) { .back-pill:hover, .next-dot:hover { background: #3d3026; transform: scale(1.05); } }
.back-pill:active, .next-dot:active { transform: scale(.97); }

/* test-2: the next-project arrow names where it goes on hover */
.next-dot[data-tip] { position: relative; }
.next-dot[data-tip]::after {
  content: attr(data-tip); position: absolute; top: 50%; right: calc(100% + 8px);
  display: flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px;
  background: var(--band); color: var(--ink); font-size: 13px; line-height: 1; font-weight: 500; white-space: nowrap;
  opacity: 0; transform: translate(4px, -50%); pointer-events: none;
  transition: opacity .15s ease-out, transform .15s ease-out;
}
@media (hover: hover) { .next-dot[data-tip]:hover::after, .next-dot[data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); } }

/* four facts instead of five, with the usual smaller-screen columns */
@media (min-width: 810px) { .cs-meta.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- intro loader (first visit per session) ---------- */
.loader { display: none; }
html.is-loading { overflow: hidden; }
html.is-loading .loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--band);
  transition: transform 1s cubic-bezier(.76, 0, .24, 1);
  animation: loader-failsafe 0s 7s forwards;   /* if the script never runs, get out of the way */
}
.loader-name {
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -0.035em;
  white-space: nowrap;
  transition: transform 1s cubic-bezier(.76, 0, .24, 1), opacity .6s var(--ease);
}
.loader-name span { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(.18em); }
.loader-name .sp { width: .28em; }
.loader.play .loader-name span {
  opacity: 1; filter: blur(0); transform: none;
  transition: opacity .7s var(--ease), filter .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i) * 55ms + 150ms);
}
.loader.out { transform: translateY(-100%); }
.loader.out .loader-name { transform: translateY(40vh); opacity: 0; }
@keyframes loader-failsafe { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {          /* calmer version: plain fades, no blur or sliding */
  .loader-name span { filter: none; transform: none; }
  html.is-loading .loader { transition: opacity .6s ease; }
  .loader.out { transform: none; opacity: 0; }
  .loader.out .loader-name { transform: none; }
}
