/* Page styles — home (built 2026-11-19, copying soripixel.com) */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -48px -6%;
  z-index: -1;
  filter: blur(36px);
  background: radial-gradient(
    ellipse 58% 55% at 50% -12%,
    var(--glow-strong),
    var(--glow-deep) 52%,
    transparent 96%
  );
}

.hero h1 {
  max-width: 13ch;
}

.hero .lede {
  margin-top: var(--space-6);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: auto;
  padding-top: var(--space-9);
}

.stat {
  position: relative;
  padding: var(--space-5);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  transition:
    box-shadow 300ms ease,
    transform 300ms ease;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1.5px;
  background: conic-gradient(
    from var(--angle),
    transparent 0%,
    #0d2727 12%,
    #17604a 24%,
    #9aa39c 30%,
    transparent 44%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(13, 39, 39, 0.35);
}

.stat:hover::before {
  opacity: 1;
  animation: stat-ring 2.8s linear infinite;
}

@keyframes stat-ring {
  to {
    --angle: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat:hover::before {
    animation: none;
  }
}

.stat .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 1;
}
/* Word-based stats (e.g. Days→hours) sit a step smaller than numerals */
.stat .num.num-words {
  font-size: clamp(30px, 3.8vw, 48px);
}

.stat .lbl {
  display: block;
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--small);
}

.section {
  padding: var(--space-9) 0;
}

.section h2 {
  margin-bottom: var(--space-6);
}

.work-card {
  display: block;
  padding: var(--space-7) 0;
}

.work-card .card-meta {
  color: var(--muted);
  font-size: var(--small);
  font-weight: 500;
}

.work-card h3 {
  margin-top: var(--space-3);
  font-size: var(--h3);
  transition: color 200ms ease;
}

.work-card:hover h3 {
  color: var(--accent);
}

.work-card p {
  max-width: var(--text-width);
  margin-top: var(--space-3);
  color: var(--muted);
}

.work-card .metrics {
  color: var(--text);
  font-size: var(--small);
  font-weight: 600;
}

.brands .brand-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.brands .brand-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 3vw, 34px);
}

.brands .brand {
  text-align: center;
}

.brands .brand p {
  max-width: 30ch;
  margin-top: var(--space-2);
  margin-inline: auto;
  color: var(--muted);
  font-size: var(--small);
  text-wrap: balance;
}

.cta .wrap {
  padding: var(--space-9) var(--space-7);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  background: var(--header-bg);
  backdrop-filter: blur(10px) saturate(140%);
  text-align: center;
}

.cta h2 {
  color: #ffffff;
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 300;
}

:root[data-theme="alabaster"] .cta h2 {
  color: #121212;
}

.ww-line {
  display: block;
}

.cta-icon {
  display: block;
  width: 136px;
  height: auto;
  margin: 0 auto var(--space-5);
  transition:
    transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 500ms ease;
  animation: icon-float 5s ease-in-out infinite;
}

@keyframes icon-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.cta:hover .cta-icon {
  animation: icon-wiggle 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: scale(1.07);
  filter: drop-shadow(0 14px 28px rgba(245, 241, 234, 0.38));
}

/* ---- Alabaster: shadows and glows stay subtle ---- */
:root[data-theme="alabaster"] .cta:hover .cta-icon {
  filter: drop-shadow(0 10px 22px rgba(18, 18, 18, 0.18));
}

:root[data-theme="alabaster"] .worked-portrait {
  box-shadow: 0 8px 24px rgba(18, 18, 18, 0.16);
}

:root[data-theme="alabaster"] .stat:hover {
  box-shadow: 0 10px 26px rgba(13, 39, 39, 0.16);
}

@keyframes icon-wiggle {
  0% {
    transform: scale(1) rotate(0deg);
  }

  30% {
    transform: scale(1.09) rotate(-3deg);
  }

  60% {
    transform: scale(1.05) rotate(2deg);
  }

  100% {
    transform: scale(1.07) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-icon,
  .cta:hover .cta-icon {
    animation: none;
  }
}

.cta .lede {
  margin-inline: auto;
}

.cta .button {
  margin-top: var(--space-5);
}

/* ---- Home: project previews (sticky info, responsive image) ---- */
.project {
  display: grid;
  grid-template-columns: minmax(260px, 400px) 1fr;
  gap: var(--space-7);
  align-items: start;
  padding: var(--space-8) 0;
}

.project-info {
  position: sticky;
  top: 112px;
}

.project-info .card-meta {
  color: var(--muted);
  font-size: var(--small);
  font-weight: 500;
}

.project-info h3 {
  margin-top: var(--space-3);
  font-size: var(--h3);
}

.project-info h3 a {
  transition: color 200ms ease;
}

.project-info h3 a:hover {
  color: var(--accent);
}

.project-info p {
  max-width: 36ch;
  margin-top: var(--space-3);
  color: var(--muted);
}

.project-info .project-more a {
  color: var(--text);
  font-size: var(--small);
  font-weight: 600;
}

.project-media {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 1 / 1;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-media:hover img,
.project-media:focus-visible img {
  transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .project-media img {
    transition: none;
  }

  .project-media:hover img,
  .project-media:focus-visible img {
    transform: none;
  }
}

@media (max-width: 720px) {
  .project {
    grid-template-columns: 1fr;
  }

  .project-info {
    position: static;
  }
}

/* ---- Project tags ---- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}

.tag {
  position: relative;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 600;
  line-height: 1;
  transition:
    border-color 200ms ease,
    color 200ms ease;
}

.tag::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1px;
  background: conic-gradient(
    from var(--angle),
    transparent 0%,
    #0d2727 12%,
    #17604a 24%,
    #9aa39c 30%,
    transparent 44%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.project:hover .tag::before,
.work-card:hover .tag::before {
  opacity: 1;
  animation: stat-ring 2.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .project:hover .tag::before,
  .work-card:hover .tag::before {
    animation: none;
  }
}

/* ---- Brands: small logos, subtle hover lift ---- */
.brand-name {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  transition:
    transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 350ms ease;
}

.brand-img {
  width: auto;
  opacity: 1;
  filter: brightness(0.62);
  transition:
    transform 550ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 550ms ease,
    filter 550ms ease;
}

.brand-amazon {
  height: 30px;
}

.brand-jemm {
  height: 60px;
}

.brand-um {
  height: 60px;
}

:root[data-theme="alabaster"] .brand-img {
  opacity: 0.62;
  filter: brightness(0);
}

.brand:hover .brand-name {
  color: var(--text);
}

.brand:hover .brand-img {
  transform: scale(1.06);
  opacity: 1;
  filter: brightness(1);
}

:root[data-theme="alabaster"] .brand:hover .brand-img {
  filter: brightness(0);
}

.brand-color {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  opacity: 0;
  filter: none;
}

.brand:has(.brand-color):hover .brand-img:not(.brand-color) {
  opacity: 0;
}

.brand:hover .brand-color {
  opacity: 1;
  filter: none;
}

:root[data-theme="alabaster"] .brand-color {
  opacity: 0;
  filter: none;
}

:root[data-theme="alabaster"] .brand:hover .brand-color {
  opacity: 1;
  filter: none;
}

:root[data-theme="alabaster"] .brand-amazon.brand-color {
  content: url("../assets/images/logo-amazon-color-light.webp");
}

/* ---- Worked-with stage: giant faded name behind the portrait ---- */
.worked-as {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--h2);
  color: var(--text);
  text-align: center;
  margin: 0;
}

.brands h2 {
  text-align: center;
}

.worked-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--space-7) 0 var(--space-7);
  overflow: hidden;
  perspective: 700px;
}

.worked-word {
  transform-origin: 50% 100%;
  font-family: var(--font);
  font-size: clamp(64px, 10.5vw, 148px);
  font-weight: 250;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: #8f8a80;
  opacity: 1;
  transition:
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 600ms ease,
    filter 600ms ease;
  pointer-events: none;
  user-select: none;
}

:root[data-theme="alabaster"] .worked-word {
  color: #6d675c;
}

.worked-portrait {
  position: absolute;
  z-index: 1;
  left: var(--av-left, 8px);
  top: var(--av-top, calc(50% - clamp(61px, 10vw, 141px)));
  width: 100px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: visible;
  isolation: isolate;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition:
    left 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    height 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.worked-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transform: scale(0.88);
  transform-origin: 50% 100%;
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}


.portrait-ring {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
  animation: badge-spin 18s linear infinite;
}

.worked-stage:hover .worked-portrait,
.worked-stage.stage-open .worked-portrait {
  left: 50%;
  top: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
}

.worked-stage:hover .portrait-ring,
.worked-stage.stage-open .portrait-ring {
  opacity: 1;
}

.worked-stage:hover .worked-word,
.worked-stage.stage-open .worked-word {
  transform: rotateX(10deg);
  opacity: 0.3;
  filter: blur(7px);
}

@media (max-width: 720px) {
  .worked-portrait {
    width: 56px;
    left: 0;
  }
}

/* ---- Impact line: one-sentence STAR summary on project tiles ---- */
.impact,
.work-card .impact,
.project-info .impact {
  margin-top: var(--space-3);
  color: var(--text);
  font-size: var(--small);
  font-weight: 500;
  line-height: 1.7;
}

.project-info .impact {
  max-width: 36ch;
}

.work-card .impact {
  max-width: 62ch;
}

/* ---- Home hero headline: sized to hold two full lines ---- */
.hero-home {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 240px;
  padding-bottom: var(--space-10);
}

.hero-home .wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
}

/* Stats sit right under the lede at the designed gap (Erik: the auto
   margin pinned them to the fold bottom, a huge void on tall screens) */
.hero-home .stats {
  margin-top: 0;
}

.hero-home h1 {
  max-width: none;
  font-size: clamp(48px, 6.6vw, 80px);
  text-wrap: balance;
}

/* ---- H1 name badge: photo snapshot + rotating ring text ---- */
/* The word Erik carries no styling at all (Erik, 2026-11-19: shimmer
   and glow removed). The badge trigger is the whole-H1 hover in main.js. */

.name-badge {
  position: absolute;
  top: calc(240px + 90px);
  right: max(24px, calc((100% - var(--page)) / 2));
  z-index: 6;
  width: 232px;
  height: 232px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) scale(0.92);
  transition:
    opacity 300ms ease,
    transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.name-badge.on {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.name-badge img {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: 204px;
  height: 204px;
  border-radius: 50%;
  object-fit: cover;
  transform: translateX(-50%);
  /* No box-shadow: the portrait is a transparent cutout, and a shadow
     on the circular img box painted a filled disc behind him
     (Erik, 2026-11-19). Nothing paints behind the cutout now. */
}

:root[data-theme="alabaster"] .worked-portrait {
  box-shadow: 0 8px 24px rgba(18, 18, 18, 0.16);
}

@media (max-width: 900px) {
  .hero-home {
    padding-top: 300px;
  }
  .name-badge {
    top: 92px;
    right: auto;
    left: 50%;
    width: 184px;
    height: 184px;
    transform: translate(-50%, 0) scale(0.92);
  }
  .name-badge.on {
    transform: translate(-50%, 0) scale(1);
  }
  .name-badge img {
    width: 162px;
    height: 162px;
  }
  .stat {
    padding: var(--space-6) var(--space-5);
    min-height: 150px;
  }
}

.badge-ring {
  position: absolute;
  inset: 0;
  z-index: 2;
  animation: badge-spin 18s linear infinite;
}

.badge-ring text,
.portrait-ring text {
  font-family: var(--font);
  font-weight: 300;
  fill: var(--text);
  /* Halo in the page background color: keeps the letters readable where
     the ring crosses Erik's black shirt, in both themes. */
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 2px;
  stroke-linejoin: round;
}


.badge-ring text {
  font-size: 6px;
  letter-spacing: 1.3px;
  /* The hero ring's viewBox is 132 but renders at 232px (x1.76), so its
     halo must be thinner in units to match the section ring on screen. */
  stroke-width: 1.15px;
}

@media (max-width: 900px) {
  .badge-ring text {
    /* 184px box: keep the halo at the same rendered 2px as everywhere.
       Must stay AFTER the base ring rules or the cascade kills it. */
    stroke-width: 1.45px;
  }
}

.portrait-ring text {
  font-size: 9px;
  letter-spacing: 2px;
}

@keyframes badge-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .badge-ring {
    animation: none;
  }
}

/* ---- Confidential gate ---- */
.gate-form {
  max-width: 420px;
  margin-top: var(--space-7);
}

.gate-error {
  color: #f87171;
  font-size: var(--small);
  font-weight: 600;
}

:root[data-theme="alabaster"] .gate-error {
  color: #dc2626;
}

.gate-form .field input.input-error {
  border-color: #f87171;
}

:root[data-theme="alabaster"] .gate-form .field input.input-error {
  border-color: #dc2626;
}

.gate-note {
  margin-top: var(--space-5);
  color: var(--muted);
  font-size: var(--small);
}

/* ---- Theme toggle ---- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="alabaster"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="alabaster"] .theme-toggle .icon-moon {
  display: block;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---- Gridlines: full X/Y grid behind the page, revealed through a
   circular lens that follows the cursor ---- */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms ease;
  -webkit-mask-image: radial-gradient(
    circle 240px at var(--mx, 50%) var(--my, 50%),
    #000 0%,
    #000 55%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle 240px at var(--mx, 50%) var(--my, 50%),
    #000 0%,
    #000 55%,
    transparent 100%
  );
}

.grid-overlay.on {
  opacity: 1;
}

.grid-cols {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  width: min(var(--page), calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
}

.grid-cols > div {
  border-left: 1px solid var(--grid-line);
}

.grid-cols > div:last-child {
  border-right: 1px solid var(--grid-line);
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .stat {
    padding: var(--space-5);
  }

  .stat .num {
    font-size: clamp(28px, 8vw, 40px);
  }

  .stat .lbl {
    line-height: 1.35;
  }

  .brands .brand-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grid-overlay {
    transition: none;
  }
}

/* ---- Subpages: work, about, contact ---- */
.portrait {
  max-width: 560px;
  margin-top: var(--space-7);
}

.hero .lede + .lede {
  margin-top: var(--space-4);
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.trio > div {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: var(--space-6);
  background: var(--header-bg);
}
.trio > div::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    120deg,
    #6e6e73,
    #f5f5f7,
    #aeaeb2,
    #e8e8ed,
    #6e6e73
  );
  background-size: 300% 100%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
}
.trio > div:hover {
  border-color: transparent;
}
.trio > div:hover::after {
  opacity: 1;
  animation: to-top-flow 5s linear infinite;
}

.trio img {
  width: 88px;
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(245, 241, 234, 0.3));
}
:root[data-theme="alabaster"] .trio img {
  filter: none;
}

.trio h3 {
  margin-top: var(--space-4);
}

.trio p {
  margin-top: var(--space-2);
  color: var(--muted);
}

.feedback-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}
.feedback-title {
  margin: 0;
}
@media (min-width: 861px) {
  .feedback-title {
    position: sticky;
    top: 112px;
  }
}
@media (max-width: 860px) {
  .feedback-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}
.quotes {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.quotes blockquote {
  flex: none;
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--header-bg);
}
.quote-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.quote-head img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.quote-head cite {
  font-style: normal;
  font-weight: 600;
}
.quotes-intro {
  font-size: var(--subtitle);
  line-height: 1.5;
}
.quotes blockquote p {
  line-height: 1.75;
  font-weight: 400;
  color: var(--muted);
}

.quotes cite {
  display: block;
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--small);
  font-style: normal;
  font-weight: 600;
}

.form {
  max-width: 640px;
  margin-top: var(--space-7);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.field {
  margin-bottom: var(--space-5);
}

.field label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: var(--small);
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--focus);
}

@media (max-width: 720px) {
  .trio,
  .quotes,
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Case study pages: sticky info column, scrolling body ---- */
.case-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: var(--space-8);
  align-items: start;
}

.case-info {
  position: sticky;
  top: 112px;
  display: grid;
  gap: var(--space-7);
}

.meta-list {
  display: grid;
  margin: 0;
}

.meta-list > div {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}

.meta-list > div:first-child {
  padding-top: 0;
}

.meta-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-list dt {
  color: var(--muted);
  font-size: var(--small);
}

.meta-list dd {
  margin: 0;
  font-weight: 600;
}

.tldr .q {
  margin-top: var(--space-4);
  font-weight: 700;
}

.tldr .q:first-child {
  margin-top: 0;
}

.tldr p {
  color: var(--muted);
}

.case-info .stat {
  margin-top: var(--space-4);
}

.case-info .stat:first-child {
  margin-top: 0;
}

.process {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 600;
  list-style: none;
}

.case-body section {
  padding: var(--space-7) 0;
}

.case-body section:first-child {
  padding-top: 0;
  border-top: 0;
}

.case-body h3 {
  margin: var(--space-6) 0 var(--space-3);
  font-size: var(--h3);
}

.case-body section > h3:first-child {
  margin-top: 0;
}

.case-body p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.75;
}

.case-body p + p {
  margin-top: var(--space-3);
}

.case-body img,
.case-body video {
  width: 100%;
  height: auto;
  margin: var(--space-5) 0;
  border-radius: 12px;
}

.case-body .statement {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  color: var(--text);
}

.next-project {
  display: block;
  padding: var(--space-7) 0;
}

.next-project h3 {
  margin-top: var(--space-3);
  font-size: var(--h3);
  transition: color 200ms ease;
}

.next-project:hover h3 {
  color: var(--accent);
}

/* ---------- More projects: horizontal thumbnail carousel ---------- */
.next-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.next-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--h2);
}
.np-nav {
  display: flex;
  gap: var(--space-3);
}
.np-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--btn-border);
  background: transparent;
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  transition:
    background 200ms ease,
    color 200ms ease;
}
.np-btn:hover {
  background: var(--btn-hover-bg);
  color: var(--btn-hover-text);
}
.np-track {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3);
  scrollbar-width: none;
}
.np-track::-webkit-scrollbar {
  display: none;
}
.np-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--text);
}
.np-media {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
}
.np-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.np-card:hover .np-media img {
  transform: scale(1.04);
}
.np-meta {
  display: block;
  margin-top: var(--space-4);
}
.np-brand {
  display: block;
  color: var(--muted);
  font-size: var(--small);
  margin-bottom: 2px;
}
.np-name {
  display: block;
  font-size: var(--subtitle);
  font-weight: 600;
}
@media (max-width: 720px) {
  .np-card {
    flex-basis: 74vw;
  }
}

@media (max-width: 720px) {
  .case-grid {
    grid-template-columns: 1fr;
  }

  .case-info {
    position: static;
  }
}


/* ---------- Case heroes: top flow takes the project's color ---------- */
.hero[data-glow]::before {
  background: radial-gradient(
    ellipse 58% 58% at 50% -10%,
    color-mix(in srgb, var(--pglow, #10b981) 16%, transparent),
    transparent 94%
  );
}
:root[data-theme="alabaster"] .hero[data-glow]::before {
  background: radial-gradient(
    ellipse 58% 58% at 50% -10%,
    color-mix(in srgb, var(--pglow, #10b981) 10%, transparent),
    transparent 94%
  );
}

/* ---------- About hero (Spotify artist style) ---------- */
.about-hero {
  position: sticky;
  top: 0;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
}
/* The standard site beam, same as every non-project hero: a subtle
   emerald (dark) / amethyst (alabaster) glow at top center */
.about-hero::before {
  content: "";
  position: absolute;
  inset: -48px -6%;
  z-index: 0;
  filter: blur(36px);
  background: radial-gradient(
    ellipse 58% 55% at 50% -12%,
    var(--glow-strong),
    var(--glow-deep) 52%,
    transparent 96%
  );
}
/* Alabaster hero text uses difference blending: the name and sub are
   white, so over the light background they read dark, and exactly
   where they cross Erik's dark shirt they flip to white */
:root[data-theme="alabaster"] .about-hero-text {
  mix-blend-mode: difference;
}
:root[data-theme="alabaster"] .about-hero h1,
:root[data-theme="alabaster"] .about-hero-sub,
:root[data-theme="alabaster"] .about-hero .eyebrow {
  color: #ffffff;
}

/* Travel strip (About): scrollable photo row with place captions */
.travel-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.travel-head h2 {
  margin: 0;
}
.travel-plane {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  animation: plane-bob 2.6s ease-in-out infinite alternate;
}
@keyframes plane-bob {
  from {
    transform: translateY(0) rotate(-2deg);
  }
  to {
    transform: translateY(-5px) rotate(2deg);
  }
}
.travel-lede {
  margin-top: var(--space-4);
}
.travel-strip {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  margin-top: var(--space-7);
  /* Bleed to the right edge of the screen: cards run off the page,
     on mobile too, so the carousel reads as seamless */
  margin-right: calc(-1 * max(24px, (100vw - var(--page)) / 2));
  padding-bottom: var(--space-3);
}
.travel-strip figure {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  width: min(340px, 78vw);
}
.travel-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}
.travel-strip figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-8) var(--space-5) var(--space-4);
  background: linear-gradient(to top, rgba(10, 10, 10, 0.68), rgba(10, 10, 10, 0));
  border-radius: 0 0 16px 16px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 22px;
  color: #f5f1ea;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}
.travel-pin {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #f5f1ea;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.55));
  animation: pin-float 1.6s ease-in-out infinite alternate;
}
@keyframes pin-float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-2.5px);
  }
}

/* About intro: the about-me text on a comfortable measure */
.about-intro-text {
  max-width: 46em;
}

/* Spotify-style cover: the page content scrolls up over the pinned
   hero, above it in z-index */
.about-hero ~ section,
.about-hero ~ [data-component="cta"] {
  position: relative;
  z-index: 3;
  background: var(--bg);
}
.about-hero-img {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: 0;
  height: 80%;
  width: auto;
  max-width: none;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
  z-index: 1;
}
.about-hero-text {
  position: relative;
  z-index: 2;
  padding-top: 168px;
  padding-bottom: var(--space-9);
  text-align: left;
}
.about-hero h1 {
  font-size: clamp(64px, 11vw, 132px);
  line-height: 0.98;
  transform-origin: 0% 100%;
  will-change: transform;
}
.about-hero-sub {
  margin-top: var(--space-4);
  color: var(--muted);
  font-size: var(--subtitle);
  will-change: opacity;
}
@media (max-width: 720px) {
  .about-hero { min-height: 100svh; }
  .about-hero-img { height: 80%; }
  .about-hero-text { padding-bottom: var(--space-8); }
}

/* ---------- Case hero: one template for every project ---------- */
.hero[data-glow] {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 82svh;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pglow, #10b981) 5%, transparent),
    transparent 46%
  );
}
.hero[data-glow] h1 {
  font-size: clamp(56px, 9vw, 110px);
}
:root[data-theme="alabaster"] .hero[data-glow] {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pglow, #10b981) 4%, transparent),
    transparent 46%
  );
}
@media (max-width: 720px) {
  .hero[data-glow] { min-height: 72svh; }
}

/* ---------- Case pages: the footer glow takes the project color, subtle.
   Everywhere else the footer glow stays the default deep emerald. ---------- */
body:has(.hero[data-glow]) {
  --foot-glow-strong: color-mix(in srgb, var(--pglow, #10b981) 10%, transparent);
  --foot-glow-deep: color-mix(in srgb, var(--pglow, #10b981) 4%, transparent);
}

/* ---------- Case template v2: full-fold hero + Spotify media scroll ---------- */
.case-hero {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 100svh;
  overflow: clip;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--space-10);
  padding-bottom: var(--space-7);
}
/* Spotify-style cover on case pages: the pinned hero is slid over by
   everything after it, the cover image disappearing behind the page */
.case-hero ~ section:not(.wireframes-sec):not(.mobile-app-sec),
.case-hero ~ .case-sections,
.case-hero ~ [data-component="cta"] {
  position: relative;
  z-index: 3;
  background: var(--bg);
}
.case-hero ~ section.wireframes-sec,
.case-hero ~ section.mobile-app-sec {
  position: relative;
  z-index: 3;
}
.case-hero h1 {
  font-size: clamp(64px, 10vw, 124px);
}
@media (min-width: 861px) {
  .case-hero h1.h1-fit {
    font-size: clamp(48px, 7vw, 96px);
    white-space: nowrap;
  }
}
.case-hero-text {
  position: relative;
  z-index: 2;
  transform-origin: 0% 100%;
  will-change: transform, opacity;
}
.case-hero .tags {
  margin-top: var(--space-6);
}
.media-zone {
  position: relative;
}
.case-media {
  position: sticky;
  top: 96px;
  z-index: 0;
  margin: 0;
}
.case-media img {
  display: block;
  width: 100%;
  border-radius: 18px;
  will-change: transform, opacity;
}
.over-sheet {
  position: relative;
  z-index: 1;
  margin-top: var(--space-7);
  margin-inline: calc(var(--space-4) * -1);
  padding: var(--space-6) var(--space-4) 0;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
}
@media (max-width: 720px) {
  .case-media {
    top: 84px;
  }
}

.case-hero-cover {
  position: relative;
  align-self: center;
  flex: 0 0 auto;
  z-index: 1;
  width: auto;
  margin: 0 0 var(--space-7);
  transform-origin: 50% 100%;
}
.case-hero-cover img {
  display: block;
  height: 44svh;
  width: auto;
  max-width: 66vw;
  margin-inline: auto;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.4));
  will-change: transform, opacity;
}
@media (max-height: 900px) and (min-width: 721px) {
  .case-hero-cover img {
    height: 36svh;
  }
}
@media (max-height: 780px) and (min-width: 721px) {
  .case-hero-cover img {
    height: 32svh;
  }
}
:root[data-theme="alabaster"] .case-hero-cover img {
  filter: drop-shadow(0 24px 40px rgba(18, 18, 18, 0.22));
}
/* Stat cards inside a case section body sit flush (no hero-context offset) */
.case-sec-body .stats {
  margin-top: 0;
  padding-top: 0;
}
/* Case section side column: title + text together, sticky on desktop (Jemm Devices) */
.case-sec-side .case-sec-title {
  position: static;
}
.case-sec-side p {
  margin-top: var(--space-5);
  line-height: 1.5;
}
.case-sec-side .check-list {
  margin-top: var(--space-4);
}
.case-sec-side .bullet-list {
  margin-top: var(--space-4);
}
/* Plain bullet list (no checkmarks) */
.bullet-list {
  list-style: disc;
  padding-left: var(--space-5);
}
.bullet-list li {
  line-height: 1.5;
}
.bullet-list li + li {
  margin-top: var(--space-2);
}
@media (min-width: 861px) {
  .case-sec-side {
    position: sticky;
    top: 112px;
  }
}
/* Jemm Summary: centered label, no sticky column, card titles at H3 size */
.summary-sec {
  padding: var(--space-8) 0;
}
.summary-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--h2);
  margin-bottom: var(--space-7);
}
.summary-sec .summary-stats {
  margin-top: 0;
  padding-top: 0;
}
.summary-sec .summary-stats .num.num-words {
  font-size: var(--h3);
}
/* Icon tile grid variant: 2x2 (Jemm My role) */
.methods-grid.grid-2x2 {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7) var(--space-8);
}
@media (max-width: 680px) {
  .methods-grid.grid-2x2 {
    gap: var(--space-5);
  }
}
/* Portrait phone video, centered at phone width (Jemm Brand identity) */
.case-sec-body video.video-phone {
  display: block;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
/* Mobile app block (Jemm): centered, whitespace-driven, WHITE band in both
   themes (Erik), sitting between Devices and the dark wireframes band */
.mobile-app-sec {
  padding: var(--space-10) 0 0;
  text-align: center;
  background: #f5f1ea;
  color: #121212;
}
.mobile-app-sec h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
}
.mobile-app-sub {
  margin-top: var(--space-3);
  font-size: var(--subtitle);
  color: rgba(18, 18, 18, 0.62);
}
.mobile-app-sec .device-figure {
  max-width: 540px;
  margin: var(--space-8) auto 0;
}
.mobile-app-sec .device-figure img {
  display: block;
  width: 100%;
}
/* Labeled hardware pair (Jemm Devices): photo with its name line under it */
.device-pair figure {
  margin: 0;
}
.device-pair figure img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0;
}
.device-pair figcaption {
  margin-top: var(--space-3);
  font-size: var(--small);
}
@media (max-width: 720px) {
  .case-hero {
    padding-top: 118px;
  }
  .case-hero-cover {
    position: relative;
    margin: 0 auto var(--space-6);
  }
  .case-hero-cover img {
    height: 32svh;
    max-width: 82vw;
  }
}

@media (hover: hover) and (min-width: 721px) {
  .case-hero-cover {
    transition: transform 600ms ease;
  }
  .case-hero-cover:hover {
    transform: scale(1.05);
  }
}

/* ---------- Case template v3: details + thumb, TL;DR card, sticky titles ---------- */
.case-details {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-8);
  align-items: start;
}
/* Project details stay pinned beside the taller thumbnail */
.case-details > div {
  position: sticky;
  top: 112px;
}
.case-impact-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--h2);
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--text);
  margin-top: 0;
}
.case-impact-title + .stats {
  margin-top: var(--space-5);
  padding-top: 0;
}
.case-details p,
.case-details li {
  font-weight: 400;
}
.case-thumb {
  margin: 0;
}
.case-thumb img {
  display: block;
  width: 100%;
  border-radius: 18px;
  will-change: transform, opacity;
}
.case-thumb.fill {
  aspect-ratio: 7 / 5;
}
.case-thumb.fill img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 63%;
}
/* Taller detail frame (LaunchIt): shows the whole tablet in the photo */
.case-thumb.fill.taller {
  aspect-ratio: 6 / 5;
}
.case-thumb.fill.taller img {
  object-position: 50% 50%;
}
img.desk-pos {
  object-position: 50% 63%;
}
/* Centered narrow figure for portrait device shots on case pages */
.device-figure {
  max-width: 400px;
  margin-inline: auto;
}
.device-figure img {
  display: block;
  width: 100%;
}
.case-sec-body .device-figure {
  margin-top: var(--space-6);
}
/* Big statement flanked by two device shots (LaunchIt) */
.statement-duo {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.statement-lines {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text);
  margin: 0;
  position: relative;
  z-index: 2;
}
.statement-lines .line-blue {
  display: block;
  color: var(--pglow, #38bdf8);
}
.statement-lines .line-plain {
  display: block;
}
.statement-device {
  position: absolute;
  width: min(300px, 26vw);
  margin: 0;
  z-index: 1;
}
.statement-device img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.4));
}
:root[data-theme="alabaster"] .statement-device img {
  filter: drop-shadow(0 24px 40px rgba(18, 18, 18, 0.22));
}
.statement-device.left {
  left: 0;
  top: 0;
}
.statement-device.right {
  right: 0;
  bottom: 0;
}
@media (max-width: 860px) {
  .statement-duo {
    flex-direction: column;
    min-height: 0;
    gap: var(--space-6);
  }
  .statement-device {
    position: static;
    width: 216px;
  }
}
/* Key-value mini table (case studies) */
.kv-table {
  margin-top: var(--space-5);
  border: 1px solid color-mix(in srgb, #10b981 45%, transparent);
  border-radius: 18px;
  overflow: hidden;
}
.kv-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
}
.kv-row + .kv-row {
  border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.kv-key {
  font-size: 15px;
  font-weight: 600;
}
.kv-val {
  font-size: 16px;
  border-left: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  padding-left: var(--space-5);
}
@media (max-width: 680px) {
  .kv-row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
  .kv-val {
    border-left: 0;
    padding-left: 0;
  }
}
@media (hover: hover) and (min-width: 721px) {
  .case-thumb {
    transition: transform 600ms ease;
  }
  .case-thumb:hover {
    transform: scale(1.02);
  }
}
.tldr-sec {
  padding-top: 0;
}
.tldr-card {
  max-width: 960px;
  margin-inline: auto;
  padding: var(--space-7);
  background: color-mix(in srgb, var(--pglow, #10b981) 6%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--pglow, #10b981) 22%, transparent);
  border-radius: 28px 28px 28px 6px;
}
.tldr-pill {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--h2);
  letter-spacing: 0.02em;
  background-image: linear-gradient(
    100deg,
    var(--pglow, #10b981),
    color-mix(in srgb, var(--pglow, #10b981) 55%, var(--text)),
    var(--pglow, #10b981)
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-flow 7s ease-in-out infinite alternate;
  margin-bottom: var(--space-7);
}
@media (prefers-reduced-motion: reduce) {
  .tldr-pill {
    animation: none;
  }
}
:root[data-theme="alabaster"] .tldr-card {
  background: #fdfbf7;
  border-color: rgba(18, 18, 18, 0.12);
}
.tldr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7) var(--space-8);
}
.tldr-grid h3 {
  font-family: var(--font);
  font-size: var(--body);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: var(--space-3);
}
.tldr-grid p {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.75;
}
.tldr-grid p strong {
  color: var(--text);
  font-weight: 600;
}
.case-sec {
  padding: var(--space-8) 0;
}
.case-sec-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: var(--space-8);
  align-items: start;
}
.case-sec-title {
  position: sticky;
  top: 112px;
  font-family: var(--font);
  font-size: var(--h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding-bottom: 0.1em;
  background: linear-gradient(
    100deg,
    var(--title-color, var(--pglow, #10b981)),
    color-mix(
      in srgb,
      var(--title-color, var(--pglow, #10b981)) var(--title-mix, 55%),
      var(--text)
    ),
    var(--title-color, var(--pglow, #10b981))
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-flow 7s ease-in-out infinite alternate;
}
@keyframes title-flow {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}

/* Light theme: project colors run darker so colored titles and marks
   keep contrast on alabaster (dark theme keeps the lighter tones) */
:root[data-theme="alabaster"] .case-sec-title {
  background-image: linear-gradient(
    100deg,
    color-mix(in srgb, var(--title-color, var(--pglow, #10b981)) 52%, #121212),
    color-mix(in srgb, var(--title-color, var(--pglow, #10b981)) 38%, #121212),
    color-mix(in srgb, var(--title-color, var(--pglow, #10b981)) 52%, #121212)
  );
}
:root[data-theme="alabaster"] .tldr-pill {
  background-image: linear-gradient(
    100deg,
    color-mix(in srgb, var(--pglow, #10b981) 52%, #121212),
    color-mix(in srgb, var(--pglow, #10b981) 38%, #121212),
    color-mix(in srgb, var(--pglow, #10b981) 52%, #121212)
  );
}
:root[data-theme="alabaster"] .statement-lines .line-blue {
  color: color-mix(in srgb, var(--pglow, #38bdf8) 45%, #121212);
}
:root[data-theme="alabaster"] .check-list li::before {
  color: color-mix(in srgb, var(--pglow, #10b981) 52%, #121212);
}
:root[data-theme="alabaster"] body[data-checks="green"] .check-list li::before {
  color: color-mix(in srgb, #10b981 52%, #121212);
}
.case-sec-body h3 {
  margin: var(--space-6) 0 var(--space-3);
  font-size: var(--h3);
}
.case-sec-body > h3:first-child {
  margin-top: 0;
}
.case-sec.wide-copy .case-sec-body p {
  max-width: none;
}
.case-sec-body p {
  max-width: 62ch;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
}
.case-sec-body p + p {
  margin-top: var(--space-3);
}
.case-sec-body ul + p {
  margin-top: var(--space-5);
}
.case-sec-body p + ul {
  margin-top: var(--space-5);
}
/* Two-up image row: tall device shots side by side instead of
   stacking into a long vertical scroll. */
.case-sec-body .img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin: var(--space-5) 0;
}
.case-sec-body .img-row img {
  margin: 0;
}
.case-sec-body .img-row video {
  margin: 0;
}
/* Five-across photo strip (Sonidify usability testing). */
.case-sec-body .img-row.cols-5 {
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}
@media (max-width: 680px) {
  .case-sec-body .img-row.cols-5 {
    grid-template-columns: 1fr 1fr;
  }
}
/* Two-column check list: long task lists read as a grid instead of
   one tall stack. */
.case-sec-body .check-list.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-6);
}
.case-sec-body .bullet-list.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-6);
  list-style: disc;
}
@media (max-width: 680px) {
  .case-sec-body .check-list.cols-2 {
    grid-template-columns: 1fr;
  }
  .case-sec-body .bullet-list.cols-2 {
    grid-template-columns: 1fr;
  }
}
.case-sec-body img,
.case-sec-body video {
  width: 100%;
  height: auto;
  margin: var(--space-5) 0;
  border-radius: 12px;
}

/* Extra air between a methods quadrant and the image that follows it */
.case-sec-body .methods-grid + img {
  margin-top: var(--space-8);
}

/* Visual pause section (Sonidify, The solution): the lead line at H1
   display size, supporting text below, then the format resumes */
.pause-sec {
  padding: var(--space-10) 0;
}
.pause-statement {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  max-width: 34em;
}
.pause-body {
  margin-top: var(--space-7);
}
.pause-body p {
  max-width: none;
}

/* Feature blocks (Sonidify Features): title, then its video, stacked */
.feature-block + .feature-block {
  margin-top: var(--space-7);
}
.feature-block h3 {
  margin-top: 0;
}

/* Decision cards (Sonidify Key design decisions): image on top, the
   decision text below, three across */
.decision-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.decision-card {
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--header-bg);
  overflow: hidden;
}
.decision-card img {
  margin: 0;
  border-radius: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.decision-card .decision-text {
  padding: var(--space-5);
}
.decision-card h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--subtitle);
}
.decision-card p {
  margin: 0;
}
@media (max-width: 860px) {
  .decision-cards {
    grid-template-columns: 1fr;
  }
}
.case-sec-body img.sharp {
  border-radius: 0;
}
.case-sec-body .statement {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  color: var(--text);
  max-width: none;
}
@media (max-width: 860px) {
  .case-details,
  .tldr-grid,
  .case-sec-grid {
    grid-template-columns: 1fr;
  }
  /* Stacked layout: the desktop 72px column gap would become a huge
     row gap between the title and its content. Tighten it. */
  .case-sec-grid {
    gap: var(--space-4);
  }
  .case-sec-title {
    position: static;
  }
}
@media (prefers-reduced-motion: reduce) {
  .case-sec-title {
    animation: none;
  }
}

/* ---------- Case content components ---------- */
.case-sec-body ul {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
}
.case-sec-body li {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.7;
}
.case-sec-body li strong {
  color: var(--text);
  font-weight: 600;
}
.check-list li {
  position: relative;
  padding-left: 34px;
  margin-top: 14px;
}
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 2px;
  top: 0;
  font-weight: 700;
  color: var(--pglow, #10b981);
}
.check-list h3 {
  margin: 0 0 4px;
  font-size: var(--h4);
  color: var(--text);
}
.check-list li p {
  margin: 0;
}
.check-list.results-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: 0;
}
.case-sec-body p + .check-list.results-list {
  margin-top: var(--space-5);
}
.check-list.results-list li {
  margin-top: 0;
  padding: var(--space-5);
  padding-left: 52px;
  border: 1px solid var(--hairline);
  border-radius: 20px;
  background: var(--header-bg);
}
.check-list.results-list li::before {
  left: var(--space-5);
  top: var(--space-5);
}
.check-list.results-list h3 {
  margin: 0 0 var(--space-2);
  font-size: 20px;
}
@media (max-width: 720px) {
  .check-list.results-list {
    grid-template-columns: 1fr;
  }
}
.method-list li {
  position: relative;
  padding-left: 20px;
  margin-top: 12px;
}
.method-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pglow, #10b981);
}
.persona-list li {
  margin-top: 12px;
  font-size: var(--subtitle);
}
.persona-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pglow, #10b981) 16%, transparent);
  color: var(--text);
  font-size: var(--small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.pain-card {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: var(--space-5);
  background: color-mix(in srgb, var(--pglow, #10b981) 4%, transparent);
}
.pain-card h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--h4);
}
.pain-card p {
  margin: 0;
}
@media (max-width: 720px) {
  .pain-grid {
    grid-template-columns: 1fr;
  }
}
.big-statement {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 34em;
  margin: 0;
}
.big-statement.statement-shimmer {
  font-size: var(--display);
  line-height: 1.08;
  max-width: none;
}
.statement-shimmer {
  max-width: none;
  text-align: center;
  font-size: var(--h2);
  margin: var(--space-6) 0;
}
:root:not([data-theme="alabaster"]) .statement-shimmer {
  background-image: linear-gradient(
    100deg,
    #83838a 25%,
    #ffffff 50%,
    #83838a 75%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-flow 5.5s linear infinite;
}
@keyframes shimmer-flow {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -130% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root:not([data-theme="alabaster"]) .statement-shimmer {
    animation: none;
  }
}

/* ---------- Navigation shots + per-persona visibility ---------- */
.nav-shot {
  margin: var(--space-5) 0;
}
.nav-shot img {
  margin: 0;
}
.nav-shot figcaption {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.6;
}
.nav-shot figcaption strong {
  color: var(--text);
}
.nda-note {
  margin: 96px auto;
  max-width: 62ch;
  text-align: center;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}
.nda-note strong {
  color: var(--text);
  font-size: 20px;
}
.nda-lock {
  display: block;
  width: 84px;
  height: auto;
  margin: 0 auto var(--space-4);
  animation: icon-float 5s ease-in-out infinite;
  filter: drop-shadow(0 10px 22px rgba(245, 241, 234, 0.35));
}
:root[data-theme="alabaster"] .nda-lock {
  filter: drop-shadow(0 10px 22px rgba(16, 185, 129, 0.28));
}
@media (prefers-reduced-motion: reduce) {
  .nda-lock {
    animation: none;
  }
}
.section:has(.nda-note) {
  padding-bottom: 0;
}

/* ---------- About: Aside from design (lyrics + playlist) ---------- */
.aside-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
}
.aside-copy {
  grid-column: 1 / span 6;
}
.aside-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1.15;
  padding-bottom: 0.12em;
  letter-spacing: -0.01em;
  margin-top: var(--space-4);
  background-image: linear-gradient(
    100deg,
    var(--text),
    color-mix(in srgb, var(--text) 52%, var(--bg)),
    color-mix(in srgb, var(--text) 85%, var(--bg)),
    var(--text)
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-flow 7s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .aside-title {
    animation: none;
  }
}
.aside-copy p {
  color: var(--muted);
  line-height: 1.75;
  margin-top: var(--space-5);
  max-width: 52ch;
}
.now-playing {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: 10px 18px 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}
.np-eq {
  display: inline-flex;
  align-items: end;
  gap: 3px;
  height: 16px;
}
.np-eq span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: eq-bounce 900ms ease-in-out infinite;
}
.np-eq span:nth-child(1) {
  height: 60%;
  animation-delay: 0ms;
}
.np-eq span:nth-child(2) {
  height: 100%;
  animation-delay: 180ms;
}
.np-eq span:nth-child(3) {
  height: 45%;
  animation-delay: 360ms;
}
.np-eq span:nth-child(4) {
  height: 80%;
  animation-delay: 540ms;
}
@keyframes eq-bounce {
  0%,
  100% {
    transform: scaleY(0.4);
  }
  50% {
    transform: scaleY(1);
  }
}
.np-eq span {
  transform-origin: bottom;
}
.now-playing-text {
  font-size: var(--small);
  color: var(--muted);
}
.now-playing-text strong {
  color: var(--text);
  font-weight: 600;
}
.aside-phone {
  grid-column: 8 / span 4;
}
.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 900px;
}
.phone-ring {
  position: absolute;
  width: min(520px, 96vw);
  aspect-ratio: 1;
  pointer-events: none;
  animation: badge-spin 46s linear infinite;
  transition: opacity 300ms ease;
}
.phone-ring text {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 2.4px;
  fill: var(--muted);
}
.phone-stage:hover .phone-ring {
  animation-duration: 14s;
}
.phone-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #101010;
  border: 1px solid var(--hairline);
  border-radius: 44px;
  padding: 38px 12px 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 22px;
  border-radius: 999px;
  background: #101010;
  z-index: 2;
}
.phone-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 32px;
  background: #121212;
}
.aside-caption {
  margin-top: var(--space-4);
  text-align: center;
  color: var(--muted);
  font-size: var(--small);
}
@media (max-width: 860px) {
  .aside-copy {
    grid-column: 1 / -1;
  }
  .aside-phone {
    grid-column: 1 / -1;
    max-width: 380px;
    margin: var(--space-7) auto 0;
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .np-eq span {
    animation: none;
  }
  .phone-ring {
    animation: none;
  }
}
.phone-frame {
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- UX Methods: glass icons in the body column, 2 by 2 + 1 ---------- */
.methods-grid {
  display: grid;
  grid-template-columns: repeat(3, 190px);
  gap: var(--space-6) var(--space-5);
  margin-top: var(--space-6);
  justify-content: start;
}
@media (max-width: 680px) {
  .methods-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.method-item {
  text-align: left;
}
.case-sec-body .method-icon {
  display: block;
  width: 56px;
  height: auto;
  max-width: 100%;
  margin: 0 0 var(--space-4);
  filter: drop-shadow(0 10px 22px rgba(245, 241, 234, 0.32));
  transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-theme="alabaster"] .case-sec-body .method-icon {
  filter: drop-shadow(0 10px 22px rgba(13, 39, 39, 0.28));
}
.method-item:hover .method-icon {
  transform: translateY(-4px);
}
.method-item h3 {
  font-family: var(--font);
  font-size: var(--body);
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: var(--space-1);
}
.method-item p {
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.5;
}

/* ---------- Wireframes: full-bleed marquee row ---------- */
/* Wireframes section: solid alabaster band, self-contained light theme */
.wireframes-sec {
  background: #f5f1ea;
  color: #121212;
  padding: var(--space-10) 0;
}
.wireframes-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(52px, 8vw, 96px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  padding-bottom: 0.1em;
  margin: 0;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--pglow, #10b981) 42%, #000),
    var(--pglow, #10b981),
    color-mix(in srgb, var(--pglow, #10b981) 42%, #000)
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-flow 7s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .wireframes-title {
    animation: none;
  }
}
.wireframes-lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--subtitle);
  color: #121212;
  margin: var(--space-4) 0 0;
}
.wireframes-note {
  color: #6f6a61;
  font-size: var(--small);
  font-weight: 400;
  margin: var(--space-3) 0 0;
  line-height: 1.7;
  text-wrap: balance;
}
.wireframes-sec .slide .cap-title {
  color: #121212;
}
.wireframes-sec .slide figcaption p {
  color: #5c5c61;
}
.wireframes-sec .filmstrip-btn {
  border-color: rgba(18, 18, 18, 0.2);
  background: rgba(255, 255, 255, 0.65);
  color: #121212;
}
.wireframes-sec .filmstrip-btn:hover {
  border-color: #0d2727;
}
.wireframes-sec > .wrap:first-child {
  text-align: center;
}
.wireframes-sec .wireframes-note {
  margin-left: auto;
  margin-right: auto;
}
/* Dark wireframes band (Jemm): stays dark in both themes; the
   scroll morph skips it (see main.js liteSecEl selector) */
/* Jemm band: dark in the dark theme; in alabaster it falls back to the
   standard light band styling so the section follows the site theme */
:root:not([data-theme="alabaster"]) .wireframes-sec.band-dark {
  background: #121212;
  color: #f5f1ea;
}
:root:not([data-theme="alabaster"]) .wireframes-sec.band-dark .wireframes-lede {
  color: #f5f1ea;
}
:root:not([data-theme="alabaster"]) .wireframes-sec.band-dark .wireframes-note {
  color: #a8a29a;
}
:root:not([data-theme="alabaster"]) .wireframes-sec.band-dark .slide .cap-title {
  color: #f5f1ea;
}
:root:not([data-theme="alabaster"]) .wireframes-sec.band-dark .slide figcaption p {
  color: #a8a29a;
}
:root:not([data-theme="alabaster"]) .wireframes-sec.band-dark .filmstrip-btn {
  border-color: rgba(245, 241, 234, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f1ea;
}
:root:not([data-theme="alabaster"]) .wireframes-sec.band-dark .filmstrip-btn:hover {
  border-color: var(--pglow, #10b981);
}
.filmstrip-bleed {
  margin-top: var(--space-8);
  padding-left: max(24px, calc((100vw - var(--page)) / 2));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
}
.filmstrip-bleed::-webkit-scrollbar {
  display: none;
}
.filmstrip-bleed:active {
  cursor: grabbing;
}
.filmstrip-bleed img {
  -webkit-user-drag: none;
  user-select: none;
}
.filmstrip-track {
  display: flex;
  width: max-content;
}
.slide {
  flex: 0 0 auto;
  width: min(480px, 84vw);
  margin: 0 var(--space-5) 0 0;
}
/* Portrait tablet screens sit smaller (LaunchIt) */
.filmstrip-bleed.slides-tablet .slide {
  width: min(360px, 84vw);
  margin-right: var(--space-8);
}

/* Narrow device screens sit smaller still (BodyCam) */
.filmstrip-bleed.slides-device .slide {
  width: min(300px, 84vw);
  /* Device wireframes breathe: wider gaps between slides. */
  margin-right: var(--space-9);
}

/* The device screens are transparent cutouts: no box shadow rectangle
   behind them, the shadow follows the device silhouette instead. */
.filmstrip-bleed.slides-device .slide img {
  box-shadow: none;
  filter: drop-shadow(0 16px 24px rgba(18, 18, 18, 0.18));
}

/* Smaller hero cover for device-only heroes (BodyCam): the shared
   400px slot is sized for laptops/tablets and swamps a body camera. */


/* On tablet viewports the carousel sits smaller too */
@media (max-width: 1080px) {
  .filmstrip-bleed .slide {
    width: min(400px, 84vw);
  }

  .filmstrip-bleed.slides-tablet .slide {
    width: min(300px, 76vw);
  }

  .filmstrip-bleed.slides-device .slide {
    width: min(260px, 76vw);
  }
}
.slide img {
  width: 100%;
  height: auto;
  margin: 0;
  box-shadow: 0 16px 40px rgba(18, 18, 18, 0.14);
}
.slide figcaption {
  margin-top: var(--space-4);
}
.slide .cap-title {
  display: block;
  font-weight: 600;
  font-size: var(--subtitle);
  color: var(--text);
  margin-bottom: 4px;
}
.slide figcaption p {
  color: var(--muted);
  font-weight: 400;
  margin: 0;
}
/* Even slides: mixed-ratio screens share one height, tops aligned */
.filmstrip-bleed.slides-even .filmstrip-track {
  align-items: flex-start;
}
.filmstrip-bleed.slides-even .slide {
  width: min(400px, 84vw);
}
.filmstrip-bleed.slides-even .slide img {
  height: 300px;
  object-fit: contain;
  background: #ffffff;
}
@media (max-width: 1080px) {
  .filmstrip-bleed.slides-even .slide {
    width: min(320px, 76vw);
  }
  .filmstrip-bleed.slides-even .slide img {
    height: 240px;
  }
}
/* Closing line: a case study's last word, centered and large */
.close-sec {
  padding: var(--space-10) 0;
}
.close-line {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.2;
  text-align: center;
  max-width: 22em;
  margin-inline: auto;
}
.filmstrip-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.filmstrip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--header-bg);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 200ms ease;
}
.filmstrip-btn:hover {
  border-color: var(--accent);
}
.filmstrip-btn svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 720px) {
  .slide img {
    height: auto;
  }
}

/* ---------- Scroll blend: page gradually turns alabaster at the gallery ---------- */
:root:not([data-theme="alabaster"]) body {
  --bg: color-mix(in srgb, #f5f1ea calc(var(--lite-p, 0) * 100%), #121212);
  --text: color-mix(in srgb, #121212 calc(var(--lite-p, 0) * 100%), #f5f1ea);
  --muted: color-mix(in srgb, #5c5c61 calc(var(--lite-p, 0) * 100%), #cfc9bd);
  --hairline: color-mix(
    in srgb,
    rgba(18, 18, 18, 0.14) calc(var(--lite-p, 0) * 100%),
    rgba(255, 255, 255, 0.12)
  );
  --accent: color-mix(in srgb, #0d2727 calc(var(--lite-p, 0) * 100%), #10b981);
  --focus: color-mix(in srgb, #0d2727 calc(var(--lite-p, 0) * 100%), #10b981);
  --grid-line: color-mix(
    in srgb,
    rgba(18, 18, 18, 0.05) calc(var(--lite-p, 0) * 100%),
    rgba(255, 255, 255, 0.055)
  );
  --btn-border: color-mix(
    in srgb,
    rgba(18, 18, 18, 0.4) calc(var(--lite-p, 0) * 100%),
    rgba(255, 255, 255, 0.4)
  );
  --btn-text: color-mix(in srgb, #121212 calc(var(--lite-p, 0) * 100%), #ffffff);
  --btn-hover-bg: color-mix(in srgb, #121212 calc(var(--lite-p, 0) * 100%), #ffffff);
  --btn-hover-text: color-mix(in srgb, #ffffff calc(var(--lite-p, 0) * 100%), #121212);
  --btn-active-bg: color-mix(in srgb, #3d3d3d calc(var(--lite-p, 0) * 100%), #b5b7c1);
  --header-bg: color-mix(
    in srgb,
    rgba(245, 241, 234, 0.82) calc(var(--lite-p, 0) * 100%),
    rgba(10, 10, 10, 0.72)
  );
  --header-bg-scrolled: color-mix(
    in srgb,
    rgba(245, 241, 234, 0.6) calc(var(--lite-p, 0) * 100%),
    rgba(18, 18, 18, 0.55)
  );
  --glow-strong: color-mix(
    in srgb,
    rgba(255, 255, 255, 0.65) calc(var(--lite-p, 0) * 100%),
    rgba(16, 185, 129, 0.2)
  );
  --glow-deep: color-mix(
    in srgb,
    rgba(255, 255, 255, 0.28) calc(var(--lite-p, 0) * 100%),
    rgba(0, 41, 40, 0.65)
  );
}

/* The top nav never blends: it flips whole the moment the light band
   reaches it (body.nav-on-light, set in main.js). Contrast by the
   numbers: alabaster on the dark pill and #121212 on the light pill
   each land around 15:1 against the section behind the glass. */
:root:not([data-theme="alabaster"]) .site-header .nav {
  color: #f5f1ea;
}
:root:not([data-theme="alabaster"]) body:has(.wireframes-sec) .site-header .nav {
  transition:
    min-height 350ms ease,
    padding 350ms ease,
    border-color 350ms ease,
    box-shadow 350ms ease;
}
:root:not([data-theme="alabaster"]) .site-header .theme-toggle,
:root:not([data-theme="alabaster"]) .site-header .nav a.nav-link:hover,
:root:not([data-theme="alabaster"]) .site-header .nav a.nav-link[aria-current="page"] {
  color: #f5f1ea;
}
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header {
  --header-bg: rgba(245, 241, 234, 0.82);
  --header-bg-scrolled: rgba(245, 241, 234, 0.6);
  --hairline: rgba(18, 18, 18, 0.14);
  --btn-border: rgba(18, 18, 18, 0.4);
  --btn-text: #121212;
  --btn-hover-bg: #121212;
  --btn-hover-text: #f5f1ea;
  --btn-active-bg: #3d3d3d;
}
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header .nav,
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header .theme-toggle,
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header .nav a.nav-link:hover,
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header .nav a.nav-link[aria-current="page"] {
  color: #121212;
}
/* The logo, unselected links and the Let's talk button take their color
   from the scroll-blend vars (--muted / --btn-text), which stay light on
   pages with no morph (Jemm): pin them dark while the nav is flipped. */
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header .nav-logo,
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header .nav a.nav-link,
:root:not([data-theme="alabaster"]) body.nav-on-light .site-header .button {
  color: #121212;
}

/* ---------- Containment: no sideways blowout from wide media ---------- */
html,
body {
  overflow-x: clip;
}
.case-sec-grid > *,
.case-details > * {
  min-width: 0;
}

/* ---------- Lightbox: click a case image to view it larger ---------- */
.case-sec-body img.zoomable,
.case-thumb img.zoomable,
.filmstrip-bleed .slide img.zoomable {
  cursor: zoom-in;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 28px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  opacity: 0;
  transition: opacity 250ms ease;
}
.lightbox[hidden] {
  display: none;
}
.lightbox.open {
  opacity: 1;
}
.lightbox img {
  max-width: min(1280px, 100%);
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  cursor: zoom-out;
}
.lightbox-cap {
  color: #f5f1ea;
  font-size: var(--small);
  text-align: center;
  margin: 0;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-close svg {
  width: 18px;
  height: 18px;
}
body.lb-open {
  overflow: hidden;
}

/* ---------- Work grid: paired squares, full bleed (Herrström pattern).
   Erik approved the bleed for this section only (2026-11-19): the lines
   run off the page here, but every vertical line still lands on the
   site's 12-column grid: the track list is margin + 12 columns + margin,
   exactly the .wrap geometry, extended to the viewport edges. ---------- */
.work-grid {
  display: grid;
  grid-template-columns:
    max(24px, calc((100% - var(--page)) / 2))
    repeat(12, 1fr)
    max(24px, calc((100% - var(--page)) / 2));
  gap: 1px;
  border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.work-grid + .work-grid,
.work-grid + .trio-grid,
.trio-grid + .work-grid,
.trio-grid + .trio-grid {
  margin-top: var(--space-8);
}
.work-item {
  display: contents;
}
.work-media {
  display: block;
  height: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 4%, var(--bg));
}
.work-item:not(.featured) .work-media {
  aspect-ratio: 16 / 9;
}
.work-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.work-item:hover .work-media img {
  transform: scale(1.04);
}
.work-detail {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-5);
  padding: var(--space-7);
  background: #101010;
  color: #f5f1ea;
}
.work-top {
  display: block;
}
.work-brand {
  font-size: var(--small);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.55;
}
.work-proj {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.work-desc {
  margin-top: var(--space-4);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}
.work-arrow {
  opacity: 0.55;
}
.work-item.shrunk .work-media,
.work-item.shrunk .work-detail {
  display: none;
}
@media (min-width: 1081px) {
  .work-item.active.pair-a .work-media,
  .work-item.active.pair-b .work-media {
    grid-column: 2 / span 6;
  }
  .work-item.active.pair-a .work-detail,
  .work-item.active.pair-b .work-detail {
    grid-column: span 6;
  }
  .work-item.active .work-media,
  .work-item.active .work-detail {
    animation: work-expand 450ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
}
@keyframes work-expand {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Work page trio band (Motorola, Jemm, Arsht) ----------
   Three columns, 4 grid columns each: thumbnail on top, black detail
   square below it. Always visible, no hover tricks. Everything sits
   inside the 12 columns, images included. */
.trio-grid {
  display: grid;
  grid-template-columns:
    max(24px, calc((100% - var(--page)) / 2))
    repeat(12, 1fr)
    max(24px, calc((100% - var(--page)) / 2));
  gap: 1px;
  border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.trio-card {
  display: contents;
}
.trio-media {
  display: block;
  grid-row: 1;
  height: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 4%, var(--bg));
  grid-column: span 4;
}
.trio-card:first-child .trio-media {
  grid-column: 2 / span 4;
}
.trio-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.trio-card:hover .trio-media img {
  transform: scale(1.04);
}
.trio-detail {
  display: flex;
  grid-row: 2;
  grid-column: span 4;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-5);
  padding: var(--space-7);
  background: #101010;
  color: #f5f1ea;
}
.trio-card:first-child .trio-detail {
  grid-column: 2 / span 4;
}
.trio-top {
  display: block;
}
.trio-brand {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
  opacity: 0.55;
}
.trio-proj {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.trio-desc {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}
img.poster-pos {
  object-position: 50% 30%;
}
.trio-spacer {
  grid-column: 10 / span 4;
  grid-row: 1 / span 1;
  background: var(--bg);
}
.trio-next {
  grid-column: 10 / span 4;
  grid-row: 2 / span 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: var(--space-6);
  background: #101010;
  color: #f5f1ea;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: left;
}
/* Light (alabaster) mode: detail panels are off-alabaster, not black. */
:root[data-theme="alabaster"] .work-detail,
:root[data-theme="alabaster"] .trio-detail,
:root[data-theme="alabaster"] .trio-next {
  background: #fdfbf7;
  color: #121212;
}
/* Work page focus filters */
.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
button.filter-chip {
  font: inherit;
  cursor: pointer;
  background: none;
}
button.filter-chip.active {
  border-color: transparent;
  color: var(--bg);
  background:
    linear-gradient(var(--text), var(--text)) padding-box,
    linear-gradient(90deg, #6e6e73, #f5f5f7, #aeaeb2, #e8e8ed, #f5f5f7, #6e6e73) border-box;
  background-size: 100% 100%, 300% 100%;
  animation: chip-flow 5s linear infinite;
}
@keyframes chip-flow {
  to {
    background-position: 0 0, 300% 0;
  }
}
.work-item.is-hidden,
.trio-card.is-hidden {
  display: none;
}
/* Subtle horizontal dividers between stacked rows */
.work-item:nth-child(n + 2) .work-media,
.work-item:nth-child(n + 2) .work-detail {
  border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.trio-detail {
  border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
/* Subtle vertical dividers between cards, on the grid lines */
.trio-media,
.trio-detail {
  border-left: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.trio-card:last-child .trio-media,
.trio-card:last-child .trio-detail {
  border-right: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.work-detail .tags,
.trio-detail .tags {
  margin-top: 0;
}
@media (max-width: 1080px) {
  .trio-next,
  .trio-spacer {
    display: none;
  }
  .trio-grid .trio-detail {
    margin-bottom: var(--space-6);
  }
  .work-grid {
    row-gap: var(--space-6);
  }
}
@media (max-width: 1080px) {
  .trio-card:nth-child(n) .trio-media {
    grid-row: auto;
    grid-column: 2 / span 12;
  }
  .trio-card:nth-child(n) .trio-detail {
    grid-row: auto;
    grid-column: 2 / span 12;
  }
  .trio-next {
    grid-column: 2 / span 12;
    grid-row: auto;
    min-height: 120px;
  }
}
.work-item.flip .work-media {
  order: 2;
}
.work-item.flip .work-detail {
  order: 1;
}
/* Placement on the 12-column lines: images may bleed into the margins,
   text panels always stay inside the 12 columns so the margins show.
   Featured pairs (NorthStar top, LaunchIt bottom) split at the center
   line (6). Middle projects pair up two per row, splitting at 3, 6, 9. */
.work-item.featured .work-media {
  grid-column: span 7;
}
.work-item.featured .work-detail {
  grid-column: span 6;
}
.work-item.flip.featured .work-detail {
  grid-column: 2 / span 6;
}
/* Home page: featured thumbnails stay inside the grid too (no bleed). */
.work-grid.contained .work-item.featured .work-media {
  grid-column: 2 / span 6;
}
.work-grid.contained .work-item.flip.featured .work-media {
  grid-column: span 6;
}
.work-item.pair-a .work-media {
  grid-column: 2 / span 3;
}
.work-item.pair-a .work-detail {
  grid-column: span 3;
}
.work-item.pair-b .work-media {
  grid-column: span 3;
}
.work-item.pair-b .work-detail {
  grid-column: span 3;
}
.work-item.featured .work-proj {
  font-size: clamp(40px, 4.2vw, 64px);
}
@media (max-width: 1080px) {
  .work-item:nth-child(n) .work-media {
    grid-column: span 7;
  }
  .work-item:nth-child(n) .work-detail {
    grid-column: span 6;
  }
}
@media (max-width: 560px) {
  .work-item:nth-child(n) .work-media {
    grid-column: 2 / span 12;
  }
  .work-grid.contained .work-item:nth-child(n) .work-media {
    grid-column: 2 / span 12;
  }
  .work-item:nth-child(n) .work-detail {
    grid-column: 2 / span 12;
  }
  .work-item.flip .work-media {
    order: 0;
  }
  .work-item.flip .work-detail {
    order: 0;
  }
  /* The contained+flip rules above carry more classes than the
     nth-child rules in this block, so without these the flipped
     card's media stayed at span 6 on phones (LaunchIt showed at
     half width). Same specificity, later in the file: these win. */
  .work-grid.contained .work-item.flip.featured .work-media,
  .work-grid.contained .work-item.flip.featured .work-detail {
    grid-column: 2 / span 12;
  }
  .work-detail {
    min-height: 300px;
  }
}

/* ---------- Work page statement (replaces the "Selected work" title) ---------- */
.hero .work-statement {
  max-width: none;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.12;
}

/* Per-page green checkmarks (Arsht: checks stay emerald even though
   the page glow is red). */
body[data-checks="green"] .check-list li::before {
  color: #10b981;
}

/* Work trio: the detail panel is the same 4/3 box as the thumbnail
   above it on desktop, top block pinned up, description at the
   bottom, so the pair reads as two equal squares. */
@media (min-width: 1081px) {
  .trio-detail {
    aspect-ratio: 4 / 3;
    justify-content: flex-start;
  }
}
/* Slightly tighter chips inside trio details so a 3-chip row never
   wraps (a wrapped row breaks the equal-square height). */
.trio-detail .tags {
  gap: 6px;
}
.trio-detail .tag {
  padding-left: 7px;
  padding-right: 7px;
}

/* Portrait poster as a case details thumbnail (Sonidify). */
.case-thumb.fill.poster {
  aspect-ratio: 3 / 4;
}
.case-thumb.fill.poster img {
  object-position: 50% 50%;
}
