/* Stevie McLane portfolio
   One stylesheet for every page. Case study pages set --accent on <body>. */

:root {
  --bg: #0b0a10;
  --bg-raised: #14131b;
  --bg-sunken: #08070c;
  --line: #2a2833;
  --line-strong: #3b3946;
  --text: #edebe6;
  --muted: #a6a3ae;
  --accent: #edebe6;
  --accent-ink: #0b0a10;

  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.4rem + 4.4vw, 4.5rem);
  --step-5: clamp(3.25rem, 1rem + 9vw, 9.5rem);

  --page: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

body[data-case="flexidoc"] { --accent: #8fb5de; }
body[data-case="sld"] { --accent: #ff3d9a; --accent-2: #00a0e9; }
body[data-case="anydaynow"] { --accent: #7aa5ff; }
body[data-case="blendwright"] { --accent: #ec6a3f; }
body[data-case="taglet"] { --accent: #46c2b0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

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

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

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.site-header {
  position: relative;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}
.wordmark {
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: clamp(4px, 2vw, 28px);
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  background: none;
  border: 0;
  text-decoration: none;
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 6px; right: 6px; bottom: 10px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
@media (max-width: 560px) {
  .site-header .wrap { min-height: 68px; }
  .wordmark { font-size: var(--step-0); white-space: nowrap; }
  .site-nav ul { gap: 0; }
  .nav-link { font-size: var(--step--1); padding: 0 4px; }
  .nav-link::after { left: 4px; right: 4px; }
}

/* ------------------------------------------------------------------
   Home: hero
   ------------------------------------------------------------------ */
.hero {
  padding-block: clamp(48px, 10vh, 120px) clamp(56px, 10vh, 112px);
}
.hero-name {
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin-left: -0.04em;
  white-space: nowrap;
}
.hero-name .line { display: block; }
.hero-name .ch {
  display: inline-block;
  font-variation-settings: 'wght' var(--w, 700);
  font-weight: var(--w, 700);
}
.hero-grid {
  margin-top: clamp(32px, 6vh, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: end;
}
.hero-intro {
  font-size: var(--step-2);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 30ch;
  font-weight: 500;
}
.hero-intro em {
  font-style: normal;
  color: var(--muted);
}
.facts {
  list-style: none;
  border-top: 1px solid var(--line);
}
.facts li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.facts dt, .facts .k { color: var(--muted); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Home: selected work
   ------------------------------------------------------------------ */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section-title h2 {
  font-size: var(--step-3);
}
.section-title p {
  color: var(--muted);
  font-size: var(--step--1);
}

.work-list { list-style: none; }
.work-item {
  border-bottom: 1px solid var(--line);
}
.work-link {
  --item-accent: var(--text);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(32px, 5vw, 56px) 0;
  text-decoration: none;
  align-items: center;
}
.work-link[data-case="flexidoc"] { --item-accent: #8fb5de; }
.work-link[data-case="sld"] { --item-accent: #ff3d9a; }
.work-link[data-case="anydaynow"] { --item-accent: #7aa5ff; }
.work-link[data-case="blendwright"] { --item-accent: #ec6a3f; }
.work-link[data-case="taglet"] { --item-accent: #46c2b0; }
.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: var(--step--1);
}
.work-title {
  font-size: var(--step-4);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 0.25em;
}
.work-arrow {
  display: inline-block;
  font-weight: 400;
  color: var(--item-accent);
  transform: translateX(-0.3em);
  opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.3s ease;
}
.work-link:hover .work-arrow,
.work-link:focus-visible .work-arrow { transform: none; opacity: 1; }
.work-desc {
  margin-top: 16px;
  color: var(--muted);
  max-width: 44ch;
}
.work-cta {
  margin-top: 24px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--item-accent);
}
.work-cta::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  transition: width 0.5s var(--ease-out);
}
.work-link:hover .work-cta::before { width: 56px; }
.work-media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--bg-raised);
  border-radius: 4px;
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04) translate(var(--mx, 0px), var(--my, 0px));
  transition: transform 0.9s var(--ease-out);
}
.work-link:hover .work-media img { transform: scale(1.09) translate(var(--mx, 0px), var(--my, 0px)); }
.work-item:nth-child(even) .work-link { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.work-item:nth-child(even) .work-media { order: -1; }
@media (max-width: 820px) {
  .work-link,
  .work-item:nth-child(even) .work-link { grid-template-columns: 1fr; }
  .work-media,
  .work-item:nth-child(even) .work-media { order: -1; }
  .work-arrow { opacity: 1; transform: none; }
}

.about-teaser {
  padding-top: clamp(72px, 12vw, 140px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
.about-teaser img {
  width: clamp(88px, 14vw, 148px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-raised);
}
.about-teaser p {
  font-size: var(--step-2);
  line-height: 1.35;
  max-width: 34ch;
  font-weight: 500;
}
.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-underline-offset 0.3s var(--ease-out);
}
.text-link:hover { text-underline-offset: 0.35em; }

/* ------------------------------------------------------------------
   Case study: hero
   ------------------------------------------------------------------ */
/* Case pages: the project cover sits behind the header and title as a
   full-bleed banner, darkened for legibility and fading into the page. */
body[data-case] .site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
}
body[data-case] .nav-link { color: rgba(237, 235, 230, 0.8); }
body[data-case] .nav-link:hover,
body[data-case] .nav-link[aria-current="page"] { color: var(--text); }
.case-hero {
  position: relative;
  isolation: isolate;
  padding-block: calc(84px + clamp(40px, 10vh, 120px)) clamp(32px, 5vw, 56px);
  min-height: min(88vh, 860px);
  display: flex;
  align-items: flex-end;
}
.case-hero-inner { position: relative; }
.case-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.case-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--bg-zoom, 1.06)) translateY(var(--bg-shift, 0px));
  transform-origin: 50% 30%;
}
.case-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(11, 10, 16, 0.55) 0%, rgba(11, 10, 16, 0.35) 30%, rgba(11, 10, 16, 0.82) 72%, var(--bg) 100%),
    linear-gradient(to right, rgba(11, 10, 16, 0.6), rgba(11, 10, 16, 0) 70%);
}
/* FlexiDoc's cover is a light image; push it darker so the title holds. */
.case-bg.cover-flexidoc img { filter: brightness(0.55) saturate(0.9); }
.case-bg.cover-sld img { filter: brightness(0.45) saturate(1.1); }
.case-bg.cover-anydaynow img { filter: brightness(0.5) saturate(1.1); }
.case-bg.cover-blendwright img { filter: brightness(0.4); }
.case-bg.cover-taglet img { filter: brightness(0.5) saturate(1.05); }
.case-hero .back-link { color: rgba(237, 235, 230, 0.8); }
@media (max-width: 560px) {
  .case-hero { padding-top: calc(68px + 32px); min-height: 0; }
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step--1);
  transition: color 0.2s ease, gap 0.4s var(--ease-out);
}
.back-link:hover { color: var(--text); gap: 14px; }
.case-title {
  font-size: var(--step-5);
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-top: 16px;
}
.case-summary {
  margin-top: 28px;
  font-size: var(--step-2);
  line-height: 1.35;
  font-weight: 500;
  max-width: 34ch;
}
.case-meta {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid rgba(237, 235, 230, 0.22);
  padding-top: 20px;
}
.case-meta div { font-size: var(--step--1); }
.case-meta dt { color: rgba(237, 235, 230, 0.68); margin-bottom: 4px; }
.case-meta dd { margin: 0; }
@media (max-width: 820px) {
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.case-cover {
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-raised);
  aspect-ratio: 16 / 9;
}
.case-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------
   Case study: sticky process timeline
   ------------------------------------------------------------------ */
.timeline {
  position: sticky;
  top: 0;
  z-index: 15;
  margin-top: clamp(48px, 8vw, 96px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.timeline ol {
  list-style: none;
  display: flex;
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.timeline ol::-webkit-scrollbar { display: none; }
.timeline li { flex: 1 0 auto; }
.timeline a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 20px 14px 0;
  min-width: 96px;
  text-decoration: none;
  color: var(--muted);
  font-size: var(--step--1);
  white-space: nowrap;
  transition: color 0.3s ease;
}
.timeline .node {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.5s var(--ease-out);
}
.timeline a:hover { color: var(--text); }
.timeline a.is-done .node { border-color: var(--accent); color: var(--accent); }
.timeline a.is-active { color: var(--text); }
.timeline a.is-active .node {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.12);
}
.timeline-track {
  position: absolute;
  left: 0; right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}
.timeline-fill {
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* ------------------------------------------------------------------
   Case study: chapters
   ------------------------------------------------------------------ */
.chapter {
  padding-top: clamp(72px, 12vw, 152px);
  scroll-margin-top: 80px;
}
.chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(20px, 5vw, 80px);
  align-items: start;
}
.chapter-num {
  font-size: var(--step--1);
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 14px;
}
/* Sized to the heading column, not the window, so the longest single
   word ("sketchbook", "presenting") always fits inside its mask. */
.chapter h2 {
  font-size: clamp(1.875rem, 0.6rem + 2.6vw, 3.25rem);
  overflow-wrap: break-word;
  hyphens: auto;
}
.prose {
  max-width: 64ch;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.65;
}
.prose p + p { margin-top: 1em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose-lead {
  color: var(--text);
}
.question-list {
  list-style: none;
  margin-top: 1em;
  border-left: 1px solid var(--line-strong);
}
.question-list li {
  padding: 0 0 0 20px;
  position: relative;
}
.question-list li + li { margin-top: 0.75em; }
.question-list li::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 820px) {
  .chapter-head { grid-template-columns: 1fr; }
  .prose { font-size: var(--step-0); }
}

.findings {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  list-style: none;
}
.findings li {
  padding: 24px 24px 0 0;
}
.findings li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.findings h3 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.25; }
.findings p { margin-top: 10px; color: var(--muted); font-size: var(--step--1); }
@media (max-width: 820px) {
  .findings { grid-template-columns: 1fr; }
  .findings li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .findings li { padding-bottom: 24px; }
}

.quote {
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding-left: clamp(16px, 3vw, 32px);
  border-left: 2px solid var(--accent);
  max-width: 40ch;
}
.quote p { font-size: var(--step-2); line-height: 1.3; font-weight: 500; }
.quote footer { margin-top: 10px; color: var(--muted); font-size: var(--step--1); }

/* ------------------------------------------------------------------
   Assets (every image / document, with full screen + download)
   ------------------------------------------------------------------ */
.gallery {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}
.gallery.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery.phones { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 880px; }
@media (max-width: 820px) {
  .gallery.two, .gallery.three { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .gallery.phones { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; }
}
.asset { margin: 0; }
.asset-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bg-raised);
  border-radius: 4px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.asset-frame img {
  width: 100%;
  transition: transform 0.9s var(--ease-out);
}
.asset-frame:hover img { transform: scale(1.025); }
.asset-frame.pad { padding: clamp(12px, 3vw, 32px); }
.asset-frame.pad img { border-radius: 2px; }
.asset-frame.light { background: #ece9e2; }
.asset-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  background: rgba(11, 10, 16, 0.78);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
}
.asset figcaption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.asset-caption {
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.5;
}
.asset-caption strong { color: var(--text); font-weight: 600; display: block; }
.asset-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.4s var(--ease-out);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.icon-btn:active { transform: scale(0.92); }

/* Final screens: horizontal strip, pinned on wide screens by JS */
.screens {
  margin-top: clamp(36px, 5vw, 64px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  padding-bottom: 12px;
}
.screens.is-pinned { overflow: visible; }
.screens-track {
  display: flex;
  gap: clamp(16px, 2.5vw, 32px);
  width: max-content;
  padding-right: var(--gutter);
}
.screens .asset {
  /* Fit a full phone plus caption inside the viewport while pinned. */
  width: clamp(180px, min(22vw, calc((100svh - 330px) / 2.17)), 280px);
  scroll-snap-align: start;
}
.screens .asset-frame { border-radius: 18px; background: #d9e4ee; }
.screens .asset figcaption { min-height: 4.5em; }

/* Deck preview */
.deck {
  margin-top: clamp(36px, 5vw, 64px);
}
.deck-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 8px;
}
.deck-strip button {
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  background: none;
  opacity: 0.55;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.4s var(--ease-out);
}
.deck-strip button:hover { opacity: 1; transform: translateY(-3px); }
.deck-strip button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
@media (max-width: 820px) {
  .deck-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.deck-current { aspect-ratio: 16 / 9; }
.deck-current img { width: 100%; height: 100%; object-fit: cover; }
.deck-nav { display: flex; gap: 4px; align-items: center; }
.deck-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: var(--step--1); margin-right: 8px; }

/* Palette chips on SLD logo chapter */
.palette {
  margin-top: clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.swatch {
  aspect-ratio: 1 / 1.15;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: #0b0a10;
  font-weight: 600;
}
.swatch span { font-weight: 400; font-variant-numeric: tabular-nums; }
.swatch.on-dark { color: #fff; }
@media (max-width: 560px) {
  .palette { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.logo-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  margin-top: clamp(36px, 5vw, 64px);
}
.logo-stage .asset-frame { aspect-ratio: 1; display: grid; place-items: center; }
.logo-stage .asset-frame img { width: 62%; }
.logo-stage .on-magenta { background: #e6007e; }
@media (max-width: 820px) { .logo-stage { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------
   SLD player
   ------------------------------------------------------------------ */
.player {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.stage {
  position: relative;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(20px, 4vw, 48px) clamp(20px, 4vw, 48px) 0;
  overflow: hidden;
}
/* The analyzer sits right under the cover like a speaker grille. */
.stage-viz {
  position: relative;
  height: clamp(72px, 9vw, 112px);
  margin: 0 calc(-1 * clamp(20px, 4vw, 48px));
  pointer-events: none;
  border-bottom: 1px solid var(--line);
}
.stage-cover {
  position: relative;
  z-index: 1;
  width: min(78%, 420px);
  margin: 0 auto;
  aspect-ratio: 1;
  transform: scale(var(--pulse, 1));
  transform-origin: 50% 60%;
  will-change: transform;
}
.stage-cover .asset-frame { height: 100%; border-radius: 2px; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7); }
.stage-cover .asset-frame img { width: 100%; height: 100%; object-fit: cover; }
.transport {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 16px;
  align-items: center;
  padding: clamp(20px, 3vw, 28px) 0;
}
.track-name {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.track-name strong { font-size: var(--step-2); letter-spacing: -0.015em; line-height: 1.15; }
.track-name span { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: #0b0a10;
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--ease-out);
}
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: scale(0.94); }
.play-btn svg { width: 22px; height: 22px; fill: currentColor; }
.scrub {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  cursor: pointer;
  --p: 0%;
}
.scrub::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--p), var(--line-strong) var(--p));
}
.scrub::-moz-range-track { height: 3px; border-radius: 3px; background: var(--line-strong); }
.scrub::-moz-range-progress { height: 3px; background: var(--accent); }
.scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--text);
  border: 0;
}
.scrub::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
.skip-btns { display: flex; gap: 6px; align-items: center; }
.time { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 560px) {
  .transport { grid-template-columns: 1fr auto; }
  .skip-btns { grid-column: 1 / -1; justify-content: center; }
}

.crate-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: var(--step--1);
}
.crate {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.crate button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bg-raised);
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 1;
}
.crate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s ease;
  filter: saturate(0.85) brightness(0.85);
}
.crate button:hover img { transform: scale(1.06); filter: none; }
.crate button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 3px; }
.crate button[aria-pressed="true"] img { filter: none; }
.crate .eq {
  position: absolute;
  left: 8px; bottom: 8px;
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}
.crate button[aria-pressed="true"] .eq { display: flex; }
.eq i {
  width: 3px;
  background: #fff;
  height: 40%;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}
.is-playing .eq i { animation: eq 0.9s ease-in-out infinite; }
.is-playing .eq i:nth-child(2) { animation-delay: -0.3s; }
.is-playing .eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
@media (max-width: 960px) {
  .player { grid-template-columns: 1fr; }
  .crate { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .crate { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------
   Read more
   ------------------------------------------------------------------ */
.more {
  padding-top: clamp(96px, 14vw, 180px);
}
.more h2 { font-size: var(--step-3); }
.more-grid {
  list-style: none;
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.more-link {
  display: block;
  text-decoration: none;
}
.more-link .work-media { aspect-ratio: 4 / 3; }
.more-link h3 {
  margin-top: 16px;
  font-size: var(--step-2);
  letter-spacing: -0.015em;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.more-link h3 span { color: var(--muted); font-weight: 400; transition: transform 0.5s var(--ease-out), color 0.3s ease; }
.more-link:hover h3 span { transform: translateX(6px); color: var(--text); }
.more-link p { color: var(--muted); font-size: var(--step--1); margin-top: 6px; }

/* ------------------------------------------------------------------
   About
   ------------------------------------------------------------------ */
.about-hero {
  padding-top: clamp(32px, 8vh, 96px);
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: end;
}
.about-hero h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
.about-photo {
  width: min(100%, 280px);
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 70%, var(--line) 0 45%, transparent 46%);
  display: grid;
  place-items: end center;
  justify-self: end;
}
.about-photo img { width: 240px; }
.about-body {
  margin-top: clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(20px, 5vw, 80px);
}
.about-body h2 { font-size: var(--step-2); letter-spacing: -0.015em; }
.about-block + .about-block { margin-top: clamp(56px, 8vw, 96px); }
.roles { list-style: none; border-top: 1px solid var(--line); }
.roles li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.roles h3 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.3; }
.roles .when { color: var(--muted); font-size: var(--step--1); }
.roles p { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--1); max-width: 62ch; }
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.skills h3 { font-size: var(--step-0); margin-bottom: 8px; }
.skills p { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 820px) {
  .about-hero, .about-body { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .skills { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
  margin-top: clamp(112px, 16vw, 200px);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vw, 96px) 0 32px;
}
.footer-cta {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.footer-cta p { color: var(--muted); font-size: var(--step-1); letter-spacing: 0; font-weight: 400; margin-bottom: 16px; line-height: 1.4; }
.footer-mail {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.6s var(--ease-out), color 0.3s ease;
  overflow-wrap: anywhere;
}
.footer-mail:hover { background-size: 100% 2px; color: var(--accent); }
.footer-bottom {
  margin-top: clamp(48px, 8vw, 96px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; list-style: none; gap: 4px 20px; margin-left: -6px; }
.footer-bottom small { color: var(--muted); font-size: var(--step--1); }

/* ------------------------------------------------------------------
   Dialogs: resume, contact
   ------------------------------------------------------------------ */
dialog {
  color: var(--text);
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}
dialog::backdrop { background: rgba(5, 4, 8, 0.72); }
.sheet {
  width: min(560px, calc(100vw - 32px));
  margin: auto;
}
.sheet-inner {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(20px, 4vw, 32px);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.sheet-head h2 { font-size: var(--step-2); letter-spacing: -0.015em; }
.sheet-tools { display: flex; gap: 4px; }
.resume-preview {
  margin-top: 20px;
  max-height: min(64vh, 720px);
  aspect-ratio: 8.5 / 11;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 2px;
}
.resume-preview .asset-frame { background: #fff; height: 100%; }
.resume-preview img { width: 100%; height: 100%; object-fit: contain; }
.contact-list { list-style: none; margin-top: 20px; border-top: 1px solid var(--line); }
.contact-list a {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 0.4s var(--ease-out), color 0.2s ease;
}
.contact-list a:hover { padding-left: 8px; color: var(--accent); }
.contact-list .k { color: var(--muted); font-size: var(--step--1); }
.contact-list .v { font-weight: 600; overflow-wrap: anywhere; }
.contact-list svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------
   Full screen viewer
   ------------------------------------------------------------------ */
.viewer {
  width: 100vw;
  height: 100dvh;
  margin: 0;
  inset: 0;
  overflow: hidden;
}
.viewer::backdrop { background: transparent; }
.viewer-bg {
  position: fixed;
  inset: 0;
  background: #060509;
}
.viewer-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(12px, 3vw, 24px);
  background: linear-gradient(to bottom, rgba(6,5,9,0.92), rgba(6,5,9,0));
}
.viewer-title { font-weight: 600; font-size: var(--step--1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-title span { color: var(--muted); font-weight: 400; margin-left: 8px; }
.viewer-scroll {
  position: absolute;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 72px clamp(12px, 4vw, 48px) 48px;
}
.viewer-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.viewer-pages img {
  max-width: min(100%, 1600px);
  max-height: calc(100dvh - 120px);
  width: auto;
  object-fit: contain;
  border-radius: 2px;
  background: #fff;
}
.viewer-pages.is-long img { max-height: none; }
.viewer-pages.is-transparent img { background: transparent; }


/* ------------------------------------------------------------------
   Any Day Now: stats, audit rounds, videos, theme switch
   ------------------------------------------------------------------ */
.stats {
  list-style: none;
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.stats li { padding: 24px 24px 0 0; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-num {
  display: block;
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-num i { font-style: normal; font-weight: 400; font-size: 0.45em; color: var(--muted); letter-spacing: 0; vertical-align: middle; }
.stat-label { display: block; margin-top: 10px; color: var(--muted); font-size: var(--step--1); max-width: 26ch; }
@media (max-width: 820px) {
  .stats { grid-template-columns: 1fr; }
  .stats li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .stats li { padding-bottom: 24px; }
}

.round-chart {
  margin: clamp(40px, 6vw, 72px) 0 0;
  display: grid;
  gap: 14px;
  max-width: 760px;
}
.round {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 16px;
  align-items: center;
}
.round-name { font-weight: 600; font-size: var(--step--1); }
.round-name small { display: block; color: var(--muted); font-weight: 400; font-size: 0.8125rem; }
.round-bar {
  position: relative;
  height: 36px;
  border-radius: 2px;
  background: var(--bg-raised);
}
.round-bar::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) / 12 * 100%);
  min-width: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.round-bar b {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(var(--v) / 12 * 100% + 12px);
  font-variant-numeric: tabular-nums;
}
.round-bar[style*="--v: 12"] b { left: auto; right: 12px; color: var(--accent-ink); }
.round-chart figcaption { margin-top: 6px; }
@media (max-width: 560px) { .round { grid-template-columns: 1fr; gap: 6px; } }

.round-group { margin-top: clamp(40px, 6vw, 72px); }
.round-title { font-size: var(--step-1); letter-spacing: -0.01em; }
.round-title span { color: var(--muted); font-weight: 400; margin-left: 8px; }
.round-group .gallery { margin-top: 16px; }
.round-group .asset-frame { aspect-ratio: 16 / 10; }
.round-group .asset-frame img { height: 100%; object-fit: cover; object-position: top left; }

.gallery.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .gallery.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .gallery.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.video-frame {
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; }

.theme-switch {
  margin-top: clamp(28px, 4vw, 48px);
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.theme-switch button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: var(--step--1);
  transition: background 0.3s ease, color 0.3s ease;
}
.theme-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.theme-switch + .gallery { margin-top: 20px; }
.screens .asset-frame:has(img[src*="home-concept"]) { background: #f5f7fa; border-radius: 10px; }

/* ------------------------------------------------------------------
   Page transitions + motion helpers
   ------------------------------------------------------------------ */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.32s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in 0.62s var(--ease-out) both; }
::view-transition-group(*) { animation-duration: 0.62s; animation-timing-function: var(--ease-out); }
@keyframes vt-out { to { opacity: 0; transform: translateY(-2.5vh); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(5vh); } }

.cover-flexidoc { view-transition-name: cover-flexidoc; }
.cover-sld { view-transition-name: cover-sld; }
.cover-anydaynow { view-transition-name: cover-anydaynow; }
.cover-blendwright { view-transition-name: cover-blendwright; }
.cover-taglet { view-transition-name: cover-taglet; }

/* FlexiDoc: the published Figma Make prototype, framed as a phone. */
.demo-card {
  margin: clamp(40px, 6vw, 72px) 0 0;
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: clamp(32px, 6vw, 72px) 16px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.demo-phone {
  width: min(390px, 100%, 80vh * 390 / 844);
  aspect-ratio: 390 / 844;
  padding: 10px;
  background: #111318;
  border-radius: 48px;
  box-shadow: 0 0 0 1px var(--line-strong), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}
.demo-phone iframe { width: 100%; height: 100%; border: 0; border-radius: 38px; background: #dfe7ee; display: block; }
.demo-card .asset-caption { text-align: center; }

/* ------------------------------------------------------------------
   Blendwright: comparison tables, decisions, type specimen, label demo.
   The demo uses Blendwright's own tokens, so it stays light on this dark site.
   ------------------------------------------------------------------ */
.table-scroll { margin-top: clamp(40px, 6vw, 72px); overflow-x: auto; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--step--1); }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.compare thead th { color: var(--muted); font-weight: 600; border-bottom-color: var(--line-strong); }
.compare tbody th { color: var(--text); font-weight: 600; }
.compare td { color: var(--muted); }
.compare td:last-child { color: var(--text); }

.findings.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 820px) { .findings.four { grid-template-columns: 1fr; } }
.palette + .palette { margin-top: 8px; }
.palette.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 560px) { .palette.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.decisions {
  list-style: none;
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 56px);
}
.decisions li { padding: 24px 0; border-top: 1px solid var(--line); }
.decisions h3 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.25; }
.decisions p { margin-top: 10px; color: var(--muted); font-size: var(--step--1); max-width: 60ch; }
@media (max-width: 820px) { .decisions { grid-template-columns: 1fr; } }

.type-specimen { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.type-specimen > div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) minmax(0, 18rem);
  gap: 16px 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.type-specimen .k { font-size: var(--step--1); color: var(--accent); font-weight: 600; }
.type-specimen .v { font-size: var(--step--1); color: var(--muted); }
.bw-display { font: 700 var(--step-3)/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -0.01em; }
.bw-body { font: 400 var(--step-1)/1.4 'Public Sans', sans-serif; }
.bw-mono-lg { font: 400 var(--step-0)/1.4 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.08em; }
.tg-display { font: 700 var(--step-3)/1.1 'Bricolage Grotesque', sans-serif; letter-spacing: -0.02em; }
.tg-body { font: 400 var(--step-1)/1.4 'Hanken Grotesk', sans-serif; }
.tg-mono { font: 500 var(--step-0)/1.4 'JetBrains Mono', monospace; }
@media (max-width: 820px) { .type-specimen > div { grid-template-columns: 1fr; gap: 6px; } }

.bw-demo { margin: clamp(40px, 6vw, 72px) 0 0; }
.bw-stage {
  background: #f4f6f5;
  color: #17242f;
  border-radius: 6px;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(24px, 5vw, 64px);
  font-family: 'Public Sans', sans-serif;
}
.bw-label {
  flex: 0 1 460px;
  background: #fff;
  border: 2px solid #17242f;
  border-radius: 8px;
  padding: clamp(20px, 3vw, 32px);
}
.bw-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid #17242f; margin-bottom: 18px; }
.bw-word { font: 700 1.375rem/1 'Bricolage Grotesque', sans-serif; }
.bw-mono { font: 400 0.8125rem/1.4 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.08em; color: #45525c; }
.bw-name { font: 700 clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem)/1.05 'Bricolage Grotesque', sans-serif; letter-spacing: -0.02em; margin: 6px 0 16px; }
.bw-name em { font-style: normal; color: #c8431a; }
.bw-rows { list-style: none; }
.bw-rows li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #d3d9db;
  animation: bw-row-in 0.5s var(--ease-out);
}
.bw-rows li[hidden] { display: none; }
@keyframes bw-row-in { from { opacity: 0; transform: translateX(-12px); } }
.bw-dot { width: 14px; height: 14px; border-radius: 50%; }
.bw-g { font: 500 0.8125rem/1 'IBM Plex Mono', monospace; padding: 5px 8px; border-radius: 4px; }
.bw-g.a { background: #dcefe3; color: #1e5b34; }
.bw-g.b { background: #fbebcb; color: #6b4a00; }
.bw-g.c { background: #f5dad3; color: #7a2a17; }
.bw-jar {
  flex: 0 0 auto;
  width: clamp(96px, 14vw, 170px);
  height: clamp(220px, 30vw, 380px);
  border: 3px solid #17242f;
  border-radius: 18px 18px 28px 28px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #fff;
  position: relative;
}
.bw-jar::before { content: ''; position: absolute; left: 18%; right: 18%; top: -22px; height: 19px; background: #17242f; border-radius: 6px 6px 0 0; }
.bw-jar span { height: calc(var(--h) * 1%); transition: height 0.8s var(--ease-out); }
.bw-jar span:last-child { border-radius: 0 0 20px 20px; }
.bw-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bw-toggles button {
  font: inherit;
  font-size: var(--step--1);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 40px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.bw-toggles button:hover { color: var(--text); border-color: var(--text); }
.bw-toggles button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.bw-toggles button[aria-pressed="true"]::before { content: "\2713\00a0"; }
.bw-demo .asset-caption { margin-top: 12px; }
@media (max-width: 560px) { .bw-jar { display: none; } }

/* Fallback transition for browsers without cross-document view transitions */
html.no-vt body { animation: page-in 0.6s var(--ease-out) both; }
html.no-vt body.is-leaving { animation: page-out 0.28s var(--ease-in-out) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes page-out { to { opacity: 0; transform: translateY(-12px); } }

/* Hide reveal targets only once JS + GSAP are confirmed, so content never
   gets stuck invisible if a script fails. */
html.motion [data-reveal] { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
