/* =========================================================
   Site-wide "soft card" layer
   Loaded last on every page except the home, so case studies,
   About, Work, Contact and the rest share the home's look:
   flat rounded surfaces (no borders, no heavy shadows), 20px
   radius for cards and media, 28px for big blocks, and the same
   surface colours (#141414 dark / #f5f5f5 light).
   Page stylesheets keep their own layout; this only aligns the
   surfaces.
   ========================================================= */

:root {
  --surface: #141414;
  --surface-line: rgba(255, 255, 255, 0.06);
  --r-card: 20px;
  --r-block: 28px;
  --r-media: 20px;
}
[data-theme="light"] {
  --surface: #f5f5f5;
  --surface-line: transparent;
}

/* ---------- Cards: flat surface, soft radius ---------- */
.persona-card,
.ux-card,
.table-cell,
.cards-column .card,
.service-card-box,
.ab-value,
.zp-principle,
.zp-impact-card,
.zp-feat,
.zp-flow-step,
.zp-spine,
.zp-dia-tool,
.zp-confidential,
.zpx-frame,
.zpx-principle,
.zpx-flow-step,
.zpx-more,
.zpx-take,
.zpx-preview-media,
.ds-syscard,
.ds-life,
.ds-tier,
.ds-craft,
.ds-brand,
.ds-org-platform,
.ds-shot,
.ys-grid-cell,
.ys-quote,
.ys-bet,
.ys-brands,
.ys-figure-frame,
.ys-shot-frame {
  background: var(--surface) !important;
  border-color: transparent !important;
  box-shadow: inset 0 0 0 1px var(--surface-line) !important;
  border-radius: var(--r-card) !important;
}

/* ---------- Big blocks: 28px, like the home's panels ---------- */
.cta-interrupt,
.ct-form-card,
.ty-card,
.bd-form-card {
  background: var(--surface) !important;
  border-color: transparent !important;
  box-shadow: inset 0 0 0 1px var(--surface-line) !important;
  border-radius: var(--r-block) !important;
}
/* Branded blocks keep their colour, only the shape changes */
.ys-cta,
.ds-system,
.ds-ai,
.zpx-zync,
.zpx-stat {
  border-radius: var(--r-block) !important;
}

/* Inputs follow the softer shape too */
.ct-field input,
.ct-field textarea,
.ct-select select,
.bd-input {
  border-radius: 14px !important;
}

/* ---------- Media: screenshots and videos get the card radius ---------- */
section img:not([src$=".svg"]):not(.logo):not(.header-logo),
section video,
.work_card_img,
.modal-content img {
  border-radius: var(--r-media);
}
/* Images inside device frames or small chips keep their own shape */
.zp-phone img,
.iphone-case img,
.ds-brand-screen img,
.ds-company img,
.ds-tool-chip img,
.marquee-item img {
  border-radius: inherit;
}

/* ---------- Work page grid: cards like the home showcase ---------- */
.work_card {
  padding: 12px 12px 20px;
  border-radius: var(--r-block);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--surface-line);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.work_card:hover { transform: translateY(-4px); }
.work_card > *:not(.work_card_img) { padding-left: 8px; padding-right: 8px; }
.work_card_img { border-radius: 18px; }

/* Work card text: readable on the card surface in both themes */
.work_card p { color: rgba(255, 255, 255, 0.65); line-height: 1.55; }
[data-theme="light"] .work_card h2 { color: #0a0a0a; }
[data-theme="light"] .work_card p { color: #6b6b6b; }

/* Work card images: 4:3, the shape most of the project images were made
   in (YOOBIC, Rota, HERO, Dojo, Feeday), instead of a fixed 300px height
   that cropped their tops and bottoms. The two wider images (Zapp, 3TX)
   lose a little on the sides, where there is no content. */
.work_card_img {
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

/* =========================================================
   Section intro animation (inner pages; script: reveal.js)
   Same motion as the home: lift in from a soft blur, staggered.
   ========================================================= */
html.reveal-armed [data-reveal-item] {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  filter: blur(8px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--ri, 0) * 90ms);
}
html.reveal-armed [data-reveal].is-in [data-reveal-item] { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  html.reveal-armed [data-reveal-item] { opacity: 1; transform: none; filter: none; transition: none; }
}

/* =========================================================
   About page (.ab2) — built from the home's pieces:
   black hero card, 976px column, 36px Inter headings,
   #f5f5f5 / #141414 soft cards, metal CTA.
   ========================================================= */
.ab2 { padding-bottom: 2rem; }

.ab2-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  margin: 0 16px;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 6vw, 96px);
  border-radius: 28px;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
}
.ab2-eyebrow { margin: 0 0 1rem; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.55); }
.ab2-title {
  margin: 0 0 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #fff;
}
.ab2-lead { max-width: 46ch; margin: 0 0 2rem; font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.55; color: rgba(255, 255, 255, 0.68); }
.ab2-cta { width: auto !important; padding: 0 2rem !important; display: inline-flex !important; }

.ab2-hero-media { position: relative; justify-self: center; width: min(100%, 420px); }
.ab2-portrait { display: block; width: 100%; height: auto; aspect-ratio: 1332 / 1698; object-fit: cover; border-radius: 24px !important; }
.ab2-pet {
  position: absolute;
  left: -14%;
  bottom: 8%;
  width: 46%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 18px !important;
  box-shadow: 0 0 0 6px #0a0a0a, 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

.ab2-section { max-width: 976px; margin: 0 auto; padding: 0 1.5rem; margin-top: 112px; }
.ab2-h2 {
  margin: 0 0 24px;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.25rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
}
[data-theme="light"] .ab2-h2 { color: #0a0a0a; }

.ab2-story { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
.ab2-story-text p { margin: 0 0 1.1rem; font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, 0.7); }
[data-theme="light"] .ab2-story-text p { color: #4a4a4a; }

.ab2-card {
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--surface-line);
  padding: 28px;
  color: inherit;
}
.ab2-card h3 { margin: 0 0 0.6rem; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ab2-card p { margin: 0; font-size: 0.98rem; line-height: 1.6; opacity: 0.68; }
.ab2-num { display: block; margin-bottom: 2.5rem; font-size: 0.85rem; font-weight: 600; opacity: 0.45; }

.ab2-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ab2-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.ab2-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ab2-stat { display: flex; flex-direction: column; gap: 0.5rem; min-height: 180px; justify-content: flex-end; }
.ab2-stat strong { font-size: clamp(2.75rem, 4.4vw, 4rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.ab2-stat span { font-size: 0.95rem; line-height: 1.4; opacity: 0.6; }

.ab2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ab2-chips li {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--surface-line);
}
.ab2-skill .ab2-chips li { background: rgba(127, 127, 127, 0.12); box-shadow: none; font-size: 0.88rem; }
.ab2-traits li { padding: 12px 20px; font-size: 1rem; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.ab2-traits li:hover { transform: translateY(-2px); }

.ab2-timeline { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ab2-role {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--surface-line);
}
.ab2-role-when { font-size: 0.9rem; font-weight: 500; opacity: 0.55; }
.ab2-role-body h3 { margin: 0 0 0.35rem; font-size: 1.15rem; font-weight: 600; }
.ab2-role-body h3 span { font-weight: 400; opacity: 0.6; }
.ab2-role-body p { margin: 0; font-size: 0.95rem; line-height: 1.55; opacity: 0.68; }
.ab2-role-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.92rem; font-weight: 500; white-space: nowrap;
  color: inherit; text-decoration: none;
}
.ab2-role-link svg { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.ab2-role-link:hover svg { transform: translateX(4px); }

.ab2-outside-text { max-width: 60ch; margin: 0 0 2rem; font-size: 17px; line-height: 1.65; opacity: 0.7; }
.ab2-contact {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ab2-contact:hover { transform: translateY(-3px); }
.ab2-contact-ic {
  display: grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #0a0a0a;
}
[data-theme="light"] .ab2-contact-ic { background: #0a0a0a; color: #fff; }
.ab2-contact-ic svg { width: 20px; height: 20px; }
.ab2-contact-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ab2-contact-text strong { font-size: 1.02rem; }
.ab2-contact-text span { font-size: 0.9rem; opacity: 0.6; }
.ab2-contact-arrow { opacity: 0.6; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s; }
.ab2-contact:hover .ab2-contact-arrow { opacity: 1; transform: translateX(3px); }

@media (max-width: 900px) {
  .ab2-hero { grid-template-columns: 1fr; margin: 0 8px; border-radius: 22px; gap: 40px; }
  .ab2-hero-media { width: min(100%, 340px); }
  .ab2-pet { left: -6%; }
  .ab2-section { margin-top: 72px; padding: 0 1rem; }
  .ab2-story { grid-template-columns: 1fr; gap: 0; }
  .ab2-grid-3, .ab2-grid-2, .ab2-stats { grid-template-columns: 1fr; }
  .ab2-stat { min-height: 0; }
  .ab2-role { grid-template-columns: 1fr; gap: 10px; padding: 22px; }
}

/* =========================================================
   Design Systems page — aligned to the home
   Black rounded hero card, 976px column, Playfair section
   titles, flat soft surfaces instead of glows and gradients,
   no kicker labels above every heading.
   ========================================================= */
.ds-hero {
  margin: 0 16px !important;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 96px) !important;
  border-radius: 28px;
  background: #0a0a0a !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  color: #fff;
}
.ds-hero::before, .ds-hero::after, .ds-hero-grid { display: none !important; }
.ds-hero-inner { max-width: 976px; margin: 0 auto; }
.ds-eyebrow { font-size: 0.9rem !important; font-weight: 500 !important; letter-spacing: 0.02em !important; text-transform: none !important; color: rgba(255, 255, 255, 0.55) !important; }
.ds-title {
  font-family: 'Inter', sans-serif !important;
  font-size: clamp(2.6rem, 5vw, 4.25rem) !important;
  font-weight: 600 !important;
  line-height: 1.02 !important;
  letter-spacing: -0.04em !important;
  color: #fff !important;
  max-width: 16ch;
}
.ds-subtitle { max-width: 56ch; font-size: clamp(1.05rem, 1.4vw, 1.2rem) !important; line-height: 1.6 !important; color: rgba(255, 255, 255, 0.68) !important; }
.ds-subtitle strong { color: #fff; font-weight: 600; }

/* The three system cards in the hero: same soft surface, no tints */
.ds-hero .ds-syscard {
  background: #161616 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07) !important;
  border-radius: 20px !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ds-hero .ds-syscard:hover { transform: translateY(-3px); }
.ds-hero .ds-syscard::before, .ds-hero .ds-syscard::after { display: none !important; }

/* Sections on the 976px column */
.ds-section, .ds-close { max-width: 976px; margin-left: auto !important; margin-right: auto !important; }
.ds-section { margin-top: 112px !important; padding-left: 1.5rem; padding-right: 1.5rem; }
.ds-kicker { display: none !important; }
.ds-h2 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(2.25rem, 3.4vw, 2.75rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.01em !important;
  margin: 0 0 24px !important;
}

/* Glow / gradient panels become plain surfaces */
.ds-system, .ds-ai {
  background: var(--surface) !important;
  box-shadow: inset 0 0 0 1px var(--surface-line) !important;
}
.ds-system::before, .ds-system::after, .ds-ai::before, .ds-ai::after { display: none !important; }

/* Closing block as a soft card */
.ds-close {
  margin-top: 112px !important;
  padding: clamp(32px, 5vw, 56px) !important;
  border-radius: 28px;
  background: var(--surface) !important;
  box-shadow: inset 0 0 0 1px var(--surface-line);
  text-align: left !important;
}
.ds-close h2 { font-family: 'Inter', sans-serif !important; font-size: 36px !important; font-weight: 600 !important; letter-spacing: -0.015em !important; line-height: 1.1 !important; }
.ds-close p { font-size: 17px !important; line-height: 1.55 !important; opacity: 0.7; max-width: 56ch; }

@media (max-width: 768px) {
  .ds-hero { margin: 0 8px !important; border-radius: 22px; }
  .ds-section { margin-top: 72px !important; padding-left: 1rem; padding-right: 1rem; }
  .ds-close { margin: 72px 8px 0 !important; }
}

/* Design Systems: the hero card spans the viewport like the home's
   (16px from each edge) even though the page sits in a narrower main;
   sections measure 976px including their padding. */
.ds-hero {
  margin-left: calc(50% - 50vw + 16px) !important;
  margin-right: calc(50% - 50vw + 16px) !important;
}
.ds-section, .ds-close { box-sizing: border-box; }
@media (max-width: 768px) {
  .ds-hero {
    margin-left: calc(50% - 50vw + 8px) !important;
    margin-right: calc(50% - 50vw + 8px) !important;
  }
}

/* About hero: the landscape photo at twice its size (46% -> 92% of the
   portrait's width), overlapping the lower-left of the portrait. */
.ab2-hero-media { margin-bottom: 12%; }
.ab2-pet { width: 92%; left: -26%; bottom: -14%; }
@media (max-width: 900px) {
  .ab2-hero-media { margin-bottom: 18%; }
  .ab2-pet { width: 88%; left: -6%; bottom: -16%; }
}

/* Rotating word (About title greeting). Same motion as the home's
   rotating role: the word rises in, the slot eases to its width. */
.word-flip {
  display: inline-grid;
  vertical-align: bottom;
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.word-flip > span {
  grid-area: 1 / 1;
  justify-self: start;
  opacity: 0;
  transform: translateY(70%);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.word-flip:not(.is-ready) > span:first-child,
.word-flip > span.is-active { opacity: 1; transform: none; }
.word-flip > span.is-active { transition-delay: 0.22s; }
.word-flip > span.is-leaving { opacity: 0; transform: translateY(-70%); }
@media (prefers-reduced-motion: reduce) {
  .word-flip, .word-flip > span { transition: none; }
}

/* Design Systems hero now sits before <main>, in the page flow, so it is
   placed like the About/home cards: right under the nav, 16px from the edges. */
.ds-hero { margin: 0 16px !important; }
.ds-main { padding-top: 0 !important; }
@media (max-width: 768px) { .ds-hero { margin: 0 8px !important; } }

/* The hero is always black: keep the system cards' text light in both themes */
.ds-hero .ds-syscard-name { color: #fff !important; }
.ds-hero .ds-syscard-desc { color: rgba(255, 255, 255, 0.62) !important; }
.ds-hero .ds-syscard-meta { color: rgba(255, 255, 255, 0.45) !important; }
.ds-hero .ds-syscard-stack { color: color-mix(in srgb, var(--accent) 70%, #fff) !important; }

/* The hero left .ds-main, which reset paragraphs to block; a global
   style.css rule makes <p> a flex row, splitting the subtitle around
   its <strong> words. Restore normal text flow inside the hero. */
.ds-hero p { display: block !important; gap: 0 !important; }
.ds-hero { line-height: 1.7; font-family: 'Inter', system-ui, sans-serif; }

/* Company badges on the black hero: always the light tint */
.ds-hero .ds-syscard-co {
  color: color-mix(in srgb, var(--accent) 40%, #fff) !important;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent) !important;
  background: color-mix(in srgb, var(--accent) 16%, transparent) !important;
}

/* =========================================================
   Black hero card placement — same on every page that has one
   (home: reel.css; here About and Design Systems): the card starts
   16px from the top like it is 16px from the sides (8px on mobile),
   and the nav pill sits 24px inside it.
   ========================================================= */
html:has(.ab2-hero) nav.pill-nav,
html:has(.ds-hero) nav.pill-nav { height: 100px; padding-top: 40px; }

.ab2-hero,
.ds-hero { margin-top: -84px !important; }
.ab2-hero { padding-top: calc(clamp(40px, 6vw, 80px) + 84px) !important; }
.ds-hero  { padding-top: calc(clamp(48px, 7vw, 96px) + 84px) !important; }

@media (max-width: 768px) {
  html:has(.ab2-hero) nav.pill-nav,
  html:has(.ds-hero) nav.pill-nav { height: 92px; padding-top: 32px; }
  .ab2-hero,
  .ds-hero { margin-top: -84px !important; }
}

/* =========================================================
   Contact page (.ct2) — home UI: black hero card, then a 976px
   row with direct-contact cards on the left and the form in a
   soft rounded panel on the right. The form markup and field
   names are unchanged (send_mail.php).
   ========================================================= */
.ct2-hero { grid-template-columns: 1fr !important; }
.ct2-hero-text { max-width: 976px; width: 100%; margin: 0 auto; }
.ct2-status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 8px 14px; border-radius: 999px;
  font-size: 0.9rem; color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

.ct2 { max-width: 976px; margin: 56px auto 0; padding: 0 1.5rem; box-sizing: border-box; }
.ct2-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}
.ct2-side { display: grid; gap: 16px; }

.ct2-mail {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ct2-mail:hover { transform: translateY(-3px); }
.ct2-mail:hover .ab2-contact-arrow { opacity: 1; transform: translateX(3px); }
.ct2-mail-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.ct2-mail-text span { font-size: 0.88rem; opacity: 0.6; }
.ct2-mail-text strong { font-size: 1.02rem; overflow-wrap: anywhere; }

.ct2-label { margin: 0 0 14px; font-size: 0.88rem; opacity: 0.6; }
.ct2-social-row { display: flex; gap: 10px; }
.ct2-social-row a {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #0a0a0a;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .ct2-social-row a { background: #0a0a0a; color: #fff; }
.ct2-social-row a:hover { transform: translateY(-2px); }
.ct2-social-row svg { width: 18px; height: 18px; }

.ct2-reply { display: flex; flex-direction: column; gap: 6px; }
.ct2-reply strong { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.ct2-reply span { font-size: 0.92rem; opacity: 0.6; }

/* Form panel */
.ct2-form {
  padding: clamp(24px, 4vw, 40px);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--surface-line);
}
.ct2-form .ct-form { gap: 1.1rem; }
.ct2-form .ct-field label { font-size: 0.9rem; font-weight: 500; }
.ct2-form .ct-field input,
.ct2-form .ct-field textarea,
.ct2-form .ct-select select {
  background: #1c1c1c !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}
[data-theme="light"] .ct2-form .ct-field input,
[data-theme="light"] .ct2-form .ct-field textarea,
[data-theme="light"] .ct2-form .ct-select select { background: #fff !important; }
.ct2-form .ct-field input:focus,
.ct2-form .ct-field textarea:focus,
.ct2-form .ct-select select:focus { border-color: currentColor !important; outline: none; }
.ct2-form .ct-pill span { border-radius: 999px; }
.ct2-form .ct-submit { width: 100%; margin-top: 0.5rem; align-self: stretch; }
.ct2-form .ct-formnote { display: none; }   /* reply time is in its own card */

@media (max-width: 860px) {
  .ct2 { margin-top: 32px; padding: 0 1rem; }
  .ct2-grid { grid-template-columns: 1fr; }
  .ct2-form { order: -1; }
  .ct2-form { border-radius: 22px; }
}

/* About hero photos: intro on page load. The portrait opens upward from
   a clip while settling from a slight zoom; the landscape photo then
   swings in from the lower left. Armed only by reveal.js. */
html.reveal-armed .ab2-portrait {
  clip-path: inset(100% 0 0 0 round 24px);
  transform: scale(1.08);
}
html.reveal-armed .ab2-hero.is-in .ab2-portrait {
  clip-path: inset(0 0 0 0 round 24px);
  transform: none;
  transition:
    clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1) 0.15s,
    transform 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
html.reveal-armed .ab2-pet {
  opacity: 0;
  transform: translate(-48px, 40px) rotate(-8deg) scale(0.92);
}
html.reveal-armed .ab2-hero.is-in .ab2-pet {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.6s ease 0.75s,
    transform 1s cubic-bezier(0.34, 1.4, 0.64, 1) 0.75s;
}
@media (prefers-reduced-motion: reduce) {
  html.reveal-armed .ab2-portrait,
  html.reveal-armed .ab2-pet { clip-path: none; opacity: 1; transform: none; transition: none; }
}

/* Contact status pill: the green dot was collapsing to nothing */
.ct2-status .ct-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Contact: the email address stays on one line */
.ct2-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.ct2-mail { gap: 12px; }
.ct2-mail-text strong {
  font-size: 1rem;
  white-space: nowrap;
  overflow-wrap: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   Case studies — home UI
   .cs-hero: the black hero card (placement shared with About via
   .ab2-hero). Sections sit on the 976px column with the home's
   heading scale; numbered kicker labels are dropped.
   ========================================================= */
.cs-hero { display: block !important; }
.cs-hero > * { max-width: 976px; margin-left: auto !important; margin-right: auto !important; }
.cs-hero, .cs-hero h1, .cs-hero h2 { color: #fff; }

/* Zapp hero */
.cs-hero .zpx-logo--dark { display: block !important; }
.cs-hero .zpx-logo--light { display: none !important; }
.cs-hero .zpx-hero-logo { margin-bottom: 1.5rem; }
.cs-hero .zpx-hero-claim {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.2rem, 4.4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 18ch;
  color: #fff;
  margin-bottom: 1.75rem;
}
.cs-hero .zpx-meta li {
  color: rgba(255, 255, 255, 0.8) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: transparent !important;
  border-radius: 999px !important;
}
.cs-hero .zpx-meta li.is-key { color: #fff !important; background: rgba(255, 255, 255, 0.16) !important; }
.cs-hero .zpx-lead { color: rgba(255, 255, 255, 0.7) !important; font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 60ch; margin-top: 1.75rem; }

/* Zapp sections */
.case-study-content:has(.zpx-sec) { padding-top: 0; max-width: 1024px; }
.zpx-sec { padding-top: 112px !important; }
.zpx-sec:first-of-type { padding-top: 72px !important; }
.zpx-eyebrow { display: none !important; }
.zpx-h2 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.25rem) !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.015em !important;
  max-width: 24ch;
}
.zpx-sub { font-size: 17px !important; line-height: 1.5; }
.zpx-lead { font-size: 17px; line-height: 1.6; }
[data-theme="light"] .case-study-content .zpx-lead { color: #4a4a4a; }

@media (max-width: 768px) {
  .zpx-sec { padding-top: 72px !important; }
}

/* =========================================================
   Older case studies on case.css (YOOBIC, Rota, HERO, 3TX…)
   .cs-hero--legacy: the title block inside the black card,
   with its meta rows as soft chips. Sections on the 976px
   column with the home's 36px headings.
   ========================================================= */
.cs-hero--legacy { font-family: 'Inter', sans-serif; }
.cs-hero--legacy .header-logo { width: 150px; margin-bottom: 2rem; }
.cs-hero--legacy h1 {
  max-width: 22ch !important;
  margin: 0 0 1.75rem !important;
  font-size: clamp(2.2rem, 4.4vw, 3.5rem) !important;
  font-weight: 600 !important;
  line-height: 1.06 !important;
  letter-spacing: -0.035em !important;
  color: #fff !important;
}
.cs-hero--legacy > p {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  width: auto !important;
  max-width: none !important;
  margin: 0 8px 10px 0 !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem !important;
  line-height: 1.2 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  background: rgba(255, 255, 255, 0.08);
}
.cs-hero--legacy > p .icon { display: inline-flex; opacity: 0.7; }
.cs-hero--legacy > p a { color: #fff !important; }
.cs-hero--legacy .compact-text {
  margin: 2rem auto 0 !important;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
}
.cs-hero--legacy .compact-text p { color: inherit !important; }
.cs-hero--legacy .compact-text strong { color: #fff; }

.case-study-content:has(> .process-section, > .overview-section) { padding-top: 0; }
.case-study-content > section:not(.data-section-full):not(.zpx-sec):not(.zpx-zync) {
  width: 100%;
  max-width: 976px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.case-study-content > section:not(.zpx-sec):not(.zpx-zync) { margin-top: 112px !important; margin-bottom: 0 !important; padding-top: 0 !important; }
.case-study-content > section:not(.zpx-sec):not(.zpx-zync):first-child { margin-top: 72px !important; }
.case-study-content > section:not(.zpx-sec):not(.zpx-zync) > h2,
.case-study-content > section:not(.zpx-sec):not(.zpx-zync) .data-text > h2 {
  font-family: 'Inter', sans-serif !important;
  font-size: clamp(1.9rem, 3vw, 2.25rem) !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.015em !important;
  margin: 0 0 1.5rem !important;
}
.case-study-content > section:not(.zpx-sec):not(.zpx-zync) p,
.case-study-content > section:not(.zpx-sec):not(.zpx-zync) li { font-size: 17px; line-height: 1.6; }

@media (max-width: 768px) {
  .case-study-content > section:not(.zpx-sec):not(.zpx-zync) { margin-top: 72px !important; }
  .cs-hero--legacy > p { font-size: 0.85rem !important; }
}

/* Case-study hero: one left edge for everything. The card's side padding
   sets a 976px content column, and children start at its left edge
   (narrow text keeps its own max-width instead of being centred). */
.cs-hero {
  padding-left: max(clamp(24px, 6vw, 96px), calc((100vw - 32px - 976px) / 2)) !important;
  padding-right: max(clamp(24px, 6vw, 96px), calc((100vw - 32px - 976px) / 2)) !important;
}
.cs-hero > * { margin-left: 0 !important; margin-right: 0 !important; }
@media (max-width: 768px) {
  .cs-hero { padding-left: 24px !important; padding-right: 24px !important; }
}

/* Anything marked hidden stays hidden, whatever display a page rule sets */
[hidden] { display: none !important; }

/* Zapp — consistency pass
   Zync panel: same rhythm as the other sections outside, roomy inside.
   One chip style across the page (matches the hero chips).
   Body text inside the navy panel stays light in both themes. */
.zpx-zync {
  margin: 112px 0 0 !important;
  padding: 64px clamp(24px, 4vw, 48px) 56px !important;
  border-radius: 28px !important;
}
[data-theme="light"] .zpx-zync .zpx-lead { color: rgba(255, 255, 255, 0.75) !important; }
[data-theme="light"] .zpx-zync .zpx-cap { color: rgba(255, 255, 255, 0.55) !important; }
.zpx-zync .zpx-h2 { color: #fff; }

.zpx-chips { gap: 8px; margin-top: 1.25rem; }
.zpx-chips li {
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 6px 12px !important;
  line-height: 1.3;
}
.zpx-zync .zpx-chips li {
  color: #cfe9f2 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: transparent !important;
}
.zpx-subhead { font-size: 1.25rem !important; font-weight: 600 !important; margin-top: 3rem !important; }
.zpx-cap { font-size: 0.88rem !important; }
@media (max-width: 768px) {
  .zpx-zync { margin-top: 72px !important; padding: 44px 20px 40px !important; border-radius: 22px !important; }
}
