/* ==========================================================================
   Base styles — Jessi Queen Portfolio
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body-default);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: 700; }

p { margin: 0 0 var(--space-4); }

a {
  color: var(--accent-link);
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}
a:hover { color: var(--purple-900); }

img { max-width: 100%; display: block; }

ul { padding: 0; margin: 0; list-style: none; }

button { font-family: inherit; }

/* ---- Layout --------------------------------------------------------- */

.container {
  max-width: calc(var(--content-width) + var(--page-margin) * 2);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--column-gap);
}

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

.filter-section { padding-top: var(--space-6); }

.section-header { margin-bottom: var(--space-7); }

.eyebrow {
  display: block;
  font-family: var(--font-editorial);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-link);
  margin: 0 0 var(--space-3);
}

.section-title { font-size: var(--fs-h2); margin: 0; }

.section-header__lede {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 640px;
  margin: var(--space-4) 0 0;
}

.section-header__actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.story-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-9);
}

.about-story {
  background: var(--white);
}

#about {
  scroll-margin-top: 100px;
}

#resume {
  scroll-margin-top: 100px;
}

.story-intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.story-intro__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -1.12px;
  color: var(--purple-900);
  margin: 0;
}

.story-intro__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.28px;
  color: var(--purple-650);
  margin: 0;
}

.story-intro__location {
  font-family: var(--font-editorial);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.14px;
  color: var(--teal-500);
  margin: 0;
}

.story-block {
  display: flex;
  gap: 80px;
}

.story-block__intro {
  flex: 0 0 400px;
  max-width: 400px;
  position: sticky;
  top: 140px;
  align-self: flex-start;
}

.story-block__eyebrow {
  margin-bottom: var(--space-4);
}

.story-block__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.2;
  color: var(--purple-900);
  margin: 0;
}

.story-block__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.story-block__body p {
  font-family: var(--font-body);
  font-size: var(--fs-body-default);
  line-height: 1.6;
  color: var(--purple-800);
  margin: 0;
}

.story-block__body p.story-block__lead {
  color: var(--purple-900);
}

.bento-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

.bento-row {
  display: flex;
  gap: var(--space-4);
  width: 100%;
}

.bento-cell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.bento-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-row-1 .bento-cell:first-child {
  flex: 1 1 0;
  min-width: 0;
  height: 320px;
}

.bento-row-1 .bento-cell:last-child {
  flex: 0 0 285px;
  height: 320px;
}

.bento-row-2 .bento-cell {
  width: 100%;
  height: 403px;
}

.bento-row-3 .bento-cell:first-child {
  flex: 0 0 285px;
  height: 444px;
}

.bento-row-3 .bento-cell:last-child {
  flex: 1 1 0;
  min-width: 0;
  height: 444px;
}

.bento-row-6 .bento-cell {
  flex: 1 1 0;
  min-width: 0;
  height: 320px;
}

.bento-row-7 .bento-cell {
  width: 100%;
  height: 352px;
}

@media (max-width: 900px) {
  .story-block {
    flex-direction: column;
    gap: var(--space-5);
  }
  .story-block__intro {
    flex: 1 1 auto;
    max-width: none;
    position: static;
  }
}

@media (max-width: 640px) {
  .bento-row {
    flex-direction: column;
  }
  .bento-row .bento-cell {
    flex: 1 1 auto;
    width: 100%;
    height: 240px;
  }
}

.section-lede {
  font-family: var(--font-body);
  font-size: var(--fs-body-lead);
  color: var(--text-secondary);
  max-width: 720px;
  margin-top: var(--space-4);
}

.divider {
  border: none;
  border-top: var(--border-divider);
  margin: var(--space-7) 0;
}

.divider--dark { border-top: var(--border-divider-dark); }

/* ---- Button System (Primary / Secondary / Tertiary) ------------------------
   Source: Figma "Button System — Documentation". M size is the default;
   .btn-lg is Large (hero use), .btn-sm is Small, .btn-xs is Extra Small
   (filter pills). XL not yet pulled into the system. */

.btn-primary,
.btn-secondary,
.btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.52px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  background: none;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 14px;
  letter-spacing: 0.56px;
}

.btn-lg .btn-arrow {
  font-size: 16px;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 11px;
  letter-spacing: 0.44px;
}

.btn-xs {
  padding: 8px 16px;
  font-size: 11px;
  letter-spacing: 0.44px;
}

.btn-arrow {
  display: inline-block;
  font-size: 14px;
  transition: transform 0.15s ease-out;
}

.btn-primary:hover .btn-arrow,
.btn-primary:focus-visible .btn-arrow,
.btn-secondary:hover .btn-arrow,
.btn-secondary:focus-visible .btn-arrow,
.btn-tertiary:hover .btn-arrow,
.btn-tertiary:focus-visible .btn-arrow {
  transform: translateX(4px);
}

/* Primary — solid chartreuse fill; hover inverts to eggplant with a neon ring + glow */

.btn-primary {
  background: var(--highlight);
  border-color: transparent;
  color: var(--purple-900);
}

.btn-primary:hover {
  background: var(--purple-900);
  border-color: var(--highlight);
  color: var(--highlight);
  box-shadow: 0 0 10px rgba(199, 255, 36, 0.35);
}

.btn-primary:active { background: #99D114; border-color: transparent; color: var(--purple-900); box-shadow: none; }

.btn-primary:focus-visible {
  outline: 2px solid var(--purple-900);
  outline-offset: 3px;
}

.btn-primary[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* Secondary — outlined, inverts to solid teal on hover */

.btn-secondary {
  border: 1.5px solid var(--purple-900);
  color: var(--purple-900);
}

.btn-secondary:hover {
  background: var(--teal-500);
  border-color: var(--teal-500);
  color: var(--white);
  box-shadow: 0 0 8px rgba(62, 172, 195, 0.3);
}

.btn-secondary:active {
  background: rgba(53, 18, 49, 0.12);
  border-width: 2px;
  border-color: var(--purple-900);
  color: var(--purple-900);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.btn-secondary[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.btn-secondary--on-dark {
  border-color: var(--text-inverse);
  color: var(--text-inverse);
}

/* Tertiary — text button, teal wash + underline on hover */

.btn-tertiary {
  border: none;
  color: var(--purple-900);
}

.btn-tertiary:hover {
  background: rgba(62, 172, 195, 0.1);
  color: var(--teal-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-tertiary:focus-visible {
  text-decoration: underline;
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.btn-tertiary[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.btn-tertiary--on-dark {
  color: var(--text-inverse);
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-secondary,
  .btn-tertiary {
    transition: none;
  }
}

/* ---- Tag System ---------------------------------------------------------
   Source: Figma "Tag Component" documentation (node 2068:392). Compact
   labels for categorizing, filtering, and organizing content.

   Anatomy: 4px-radius container, Alte Haas Grotesk Bold 12px label with 1px
   letter-spacing, 6px/14px padding, optional 12px close icon (6px gap).

   Background context — `.tag` (default) sits on light/white surfaces;
   `.tag--dark` sits on the eggplant/dark surfaces. Each has six states:
   Default, Hover, Selected (persistent "active"), Pressed, Focus, Disabled.
   A 2px transparent border is reserved on every tag so the Focus outline
   doesn't shift layout, matching the button system's convention. */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 4px;
  border: 2px solid transparent;
  background: var(--purple-900);
  color: var(--highlight);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tag:hover {
  background: var(--highlight);
  color: var(--purple-900);
  border-color: var(--purple-800);
  box-shadow: 0 0 6px rgba(199, 255, 36, 0.5);
}

.tag.is-selected,
.tag[aria-selected="true"] {
  background: var(--highlight);
  color: var(--purple-900);
  box-shadow: none;
}

.tag:active {
  background: #240d21;
  color: var(--highlight);
}

.tag:focus-visible {
  border-color: var(--highlight);
}

.tag.is-disabled,
.tag:disabled,
.tag[aria-disabled="true"] {
  background: rgba(53, 18, 49, 0.35);
  color: rgba(199, 255, 36, 0.35);
  pointer-events: none;
}

/* Dark-background context */

.tag--dark {
  background: var(--purple-050);
  color: var(--purple-900);
}

.tag--dark:hover {
  background: var(--teal-500);
  color: #ffffff;
  box-shadow: 0 0 6px rgba(62, 172, 195, 0.5);
}

.tag--dark.is-selected,
.tag--dark[aria-selected="true"] {
  background: var(--highlight);
  color: var(--purple-900);
  box-shadow: none;
}

.tag--dark:active {
  background: #d9d4d9;
  color: var(--purple-900);
}

.tag--dark:focus-visible {
  border-color: var(--highlight);
}

.tag--dark.is-disabled,
.tag--dark:disabled,
.tag--dark[aria-disabled="true"] {
  background: rgba(246, 242, 245, 0.35);
  color: rgba(53, 18, 49, 0.35);
  pointer-events: none;
}

/* Linked tags — badges that jump to the filtered Work page. See
   js/tag-links.js. */

.tag--link {
  cursor: pointer;
}

.tag--link:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

/* Dismissible tags — optional close icon, 12x12px, stroke uses currentColor
   so it always matches the tag's text color across every state. */

.tag__close {
  display: inline-flex;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

.tag__close svg {
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .tag,
  .tag--dark {
    transition: none;
  }
}

/* ---- Nav — Navigation System ------------------------------------------------
   Source: Figma "Navigation — Documentation". Dark-background variant by
   default; add .site-header--light on pages whose hero is light (see below).
   Sticky with Expanded (88px desktop / 72px mobile) → Scrolled (56px)
   states, hide-on-scroll-down, and a full-screen mobile overlay. */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(53, 18, 49, 0.1);
  border-top: 3px solid var(--teal-500);
  transition: transform 0.3s ease-out, background-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) 64px;
  transition: padding 0.3s ease-out;
}

.site-header.is-scrolled .site-header__inner {
  padding: var(--space-4) 64px;
}

.site-header.is-scrolled {
  background: rgba(53, 18, 49, 0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Light nav color scheme — for pages whose hero sits on a light/white
   surface, so the logo, links, and menu icon stay readable while the nav
   is still transparent. Reverts to the standard dark-bg treatment once
   .is-scrolled (the bar becomes solid) since white text works there. */

.site-header--light:not(.is-scrolled) .logo__word,
.site-header--light:not(.is-scrolled) .nav__link {
  color: var(--purple-900);
}

.site-header--light:not(.is-scrolled) .nav__link:hover {
  color: var(--teal-500);
}

.site-header--light:not(.is-scrolled) .nav__link:active {
  color: #2d8a9c;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  position: relative;
  z-index: 31;
}

.logo__mark {
  display: block;
  height: 24px;
  width: auto;
}

.logo__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.32px;
  color: var(--text-inverse);
  white-space: nowrap;
  transition: font-size 0.3s ease-out;
}

.site-header.is-scrolled .logo__word {
  font-size: 14px;
  letter-spacing: 0.28px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  position: relative;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-inverse);
  text-decoration: none;
  padding-bottom: 4px;
  transition: color 0.15s ease, font-size 0.3s ease-out;
}

.site-header.is-scrolled .nav__link {
  font-size: 13px;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--teal-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s ease;
}

.nav__link:hover {
  color: var(--teal-500);
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.nav__link:active {
  color: #2d8a9c;
}

.nav__link:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.nav__link[aria-current="page"] {
  font-weight: 800;
}

.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__link[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

.nav__cta {
  padding: 10px 24px;
  font-size: 11px;
  letter-spacing: 0.44px;
}

.nav__cta:active,
.mobile-menu__cta:active {
  background: #1A0C18;
  border-color: var(--highlight);
  color: var(--highlight);
  box-shadow: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 31;
  background: var(--highlight);
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 10px 24px;
  cursor: pointer;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.nav-toggle:hover {
  background: var(--purple-900);
  border-color: var(--highlight);
  box-shadow: 0 0 10px rgba(199, 255, 36, 0.35);
}

.nav-toggle:hover .nav-toggle__label {
  color: var(--highlight);
}

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

.nav-toggle__label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.44px;
  text-transform: uppercase;
  color: var(--purple-900);
  white-space: nowrap;
  transition: color 0.15s ease-out;
}

/* ---- Mobile full-screen menu overlay --------------------------------------- */

.mobile-menu {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__inner,
  .logo__word,
  .nav__link,
  .nav__link::after,
  .nav-toggle,
  .mobile-menu,
  .mobile-menu__link,
  .mobile-menu__cta {
    transition: none !important;
  }
}

/* ---- Footer (hover-reveal wordmark) ----------------------------------------
   Ported from a pasted React/Motion "HoverFooter" component to vanilla
   JS/CSS. See js/footer-hover-text.js. */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--purple-950);
}

.footer-hover__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(125% 125% at 50% 0%, rgba(53, 18, 49, 0.5) 45%, rgba(62, 172, 195, 0.18) 100%);
}

.footer-hover__inner {
  position: relative;
  z-index: 1;
  padding-top: var(--space-9);
}

.footer-hover__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  padding-bottom: var(--space-8);
}

.footer-hover__brand {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-hover__brand .logo__word { color: var(--text-inverse); }

.footer-hover__tagline {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--purple-300);
  max-width: 280px;
  margin: 0;
}

.footer-hover__col { flex: 1 1 140px; }

.footer-hover__col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-inverse);
  margin: 0 0 var(--space-4);
}

.footer-hover__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-hover__col a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--purple-300);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-hover__col a:hover { color: var(--teal-500); }

.footer-hover__external-icon {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.15s ease-out;
}

.footer-hover__col a:hover .footer-hover__external-icon { transform: translate(2px, -2px); }

.footer-hover__contact li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--purple-300);
}

.footer-hover__contact svg {
  color: var(--teal-500);
  flex-shrink: 0;
}

.footer-hover__divider {
  border: none;
  border-top: 1px solid rgba(246, 242, 245, 0.12);
  margin: 0;
}

.footer-hover__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) 0;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--purple-300);
}

.footer-hover__socials {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.footer-hover__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: -10px;
  border-radius: 8px;
  color: var(--white);
  transition: color 0.15s ease;
}

.footer-hover__socials a:hover { color: var(--highlight); }
.footer-hover__socials a:active { color: var(--teal-500); }

.footer-hover__socials a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--teal-500);
}

.footer-hover__text-wrap {
  position: relative;
  z-index: 1;
}

.footer-hover__text-svg {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
  user-select: none;
}

.footer-hover__text-svg text {
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-hover__text-base {
  fill: none;
  stroke: var(--purple-650);
  stroke-width: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-hover__text-svg.is-hovered .footer-hover__text-base { opacity: 0.6; }

.footer-hover__text-draw {
  fill: none;
  stroke: var(--teal-500);
  stroke-width: 1;
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
}

.footer-hover__text-draw.is-visible {
  animation: footerTextDraw 2.6s ease forwards;
}

.footer-hover__text-gradient {
  fill: none;
  stroke: url(#footerTextGradient);
  stroke-width: 1;
}

@keyframes footerTextDraw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-hover__text-draw { stroke-dashoffset: 0; animation: none; }
}

@media (max-width: 960px) {
  .footer-hover__grid { gap: var(--space-6); }
}

@media (max-width: 640px) {
  .footer-hover__text-wrap { display: none; }
  .footer-hover__bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}

/* ---- Cards ----------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  border: var(--border-divider);
}

.card--dark {
  background: var(--bg-dark);
  color: var(--text-inverse);
  border: none;
}

.card--dark .card__meta { color: var(--text-inverse-secondary); }
.card--dark h3 { color: var(--text-inverse); }

.card__eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.card__meta {
  font-family: var(--font-editorial);
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
}

.card p { color: var(--text-secondary); }

.card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.card__logo img {
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
}
.card--dark p { color: var(--text-inverse-secondary); }

/* ---- Project / work grid ---------------------------------------------- */

.work-filter-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.work-filter-group:last-of-type { margin-bottom: var(--space-7); }

.work-filter__label {
  font-family: var(--font-editorial);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.work-filter {
  justify-content: center;
}

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

@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: clip;
  background: var(--white);
  border: 1px solid #E5E0E5;
  padding-bottom: var(--space-5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card[hidden] { display: none; }

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(36, 16, 31, 0.35);
}

.project-card__media {
  height: 260px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5) 0;
}

.project-card__body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--purple-900);
  margin: 0;
}

.project-card__industry {
  font-family: var(--font-editorial);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.14px;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0;
}

.project-card__desc {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card__tags .tag {
  font-size: 11px;
  padding: 5px 12px;
}


/* ---- Editorial patterns ------------------------------------------------ */

.color-takeover {
  background: var(--bg-dark);
  color: var(--text-inverse);
  border-radius: var(--radius-card);
  padding: var(--space-8) var(--space-7);
}
.color-takeover .eyebrow { color: var(--highlight); }
.color-takeover h2, .color-takeover h3 { color: var(--text-inverse); }
.color-takeover p { color: var(--text-inverse-secondary); }

.pull-quote {
  border-left: var(--border-accent-bar);
  padding-left: var(--space-5);
}
.pull-quote p {
  font-family: var(--font-editorial);
  font-size: var(--fs-h4);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
}
.pull-quote cite {
  font-style: normal;
  font-family: var(--font-editorial);
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
}

/* ---- Hero -------------------------------------------------------------- */

.hero {
  padding-top: var(--space-10);
  padding-bottom: var(--space-9);
}

.hero h1 {
  font-size: clamp(48px, 7vw, var(--fs-display-l));
  max-width: 16ch;
}

/* ---- L2 Hero — light (Work page only) --------------------------------------
   Source: Figma "01 Hero Section" (node 2276:21390). About, Capabilities, and
   Contact keep the dark mesh-gradient/portrait hero below. */

.hero-l2 {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-10) var(--page-margin) var(--space-6);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-light);
}

.hero-l2__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.hero-l2__eyebrow {
  font-family: var(--font-editorial);
  font-size: 14px;
  letter-spacing: 0.14px;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0;
}

.hero-l2__headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 6vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.034em;
  color: var(--purple-900);
  max-width: 1024px;
}

.hero-l2__headline em {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-style: normal;
}

.hero-l2__lede {
  font-family: var(--font-body);
  font-size: 22px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 1024px;
  margin: 0;
}

.hero-l2__actions {
  display: flex;
  gap: var(--space-4);
}

/* ---- Split hero (shared template: About, Capabilities, Contact) ----------- */

.about-hero,
.capabilities-hero,
.contact-hero {
  position: relative;
  overflow: hidden;
  background: var(--purple-900);
  padding: var(--space-10) 0;
}

.about-hero .container,
.capabilities-hero .container,
.contact-hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.hero-mesh-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
  mix-blend-mode: screen;
}

.about-hero__text,
.capabilities-hero__text,
.contact-hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  flex: 1 0 0;
  min-width: 0;
}

.about-hero__eyebrow,
.capabilities-hero__eyebrow,
.contact-hero__eyebrow {
  font-family: var(--font-editorial);
  font-size: 14px;
  letter-spacing: 0.14px;
  text-transform: uppercase;
  color: var(--highlight);
  margin: 0 0 var(--space-4);
}

.about-hero__headline,
.capabilities-hero__headline,
.contact-hero__headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 80px);
  line-height: 0.96;
  letter-spacing: -1.6px;
  color: var(--text-inverse);
}

.about-hero__headline em,
.capabilities-hero__headline em,
.contact-hero__headline em {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-style: normal;
}

.about-hero__subhead,
.capabilities-hero__subhead,
.contact-hero__subhead {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-inverse);
  opacity: 0.8;
  max-width: 640px;
  margin: 0;
}

.about-hero__jump-links {
  display: flex;
  gap: var(--space-4);
}

.about-hero__portrait,
.capabilities-hero__portrait,
.contact-hero__portrait {
  flex-shrink: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 4px solid var(--highlight);
  overflow: hidden;
  box-shadow: 12px 12px 24px 0 rgba(0, 0, 0, 0.25);
}

.about-hero__portrait img,
.capabilities-hero__portrait img,
.contact-hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 960px) {
  .about-hero .container,
  .capabilities-hero .container,
  .contact-hero .container { flex-direction: column-reverse; text-align: center; }
  .about-hero__portrait,
  .capabilities-hero__portrait,
  .contact-hero__portrait { width: 280px; height: 280px; }
  .about-hero__subhead,
  .capabilities-hero__subhead,
  .contact-hero__subhead { max-width: 100%; }
}

.hero .section-lede { font-size: var(--fs-body-lead); max-width: 640px; }

.hero__actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* ---- Photo hero (homepage) ------------------------------------------------ */

.hero-photo {
  position: relative;
  overflow: clip;
  background: var(--purple-900);
  min-height: calc(900px - 67px);
  display: flex;
  flex-direction: column;
  padding: 0 80px 64px;
}

.hero-photo__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(53, 18, 49, 0.8), rgba(53, 18, 49, 0.95));
}

.hero-photo__shader {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: screen;
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo__shader {
    display: none;
  }
}

.hero-photo__headline-wrap {
  position: relative;
  z-index: 2;
  margin-top: clamp(160px, 32vh, 340px);
}

.hero-photo__headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 9vw, 140px);
  line-height: 0.93;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
  max-width: 20ch;
}

.hero-photo__bottom-row {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: var(--space-7);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.hero-photo__tagline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 480px;
}

.hero-photo__eyebrow {
  font-family: var(--font-editorial);
  font-size: 14px;
  letter-spacing: 0.14px;
  color: var(--highlight);
  margin: 0;
}

.hero-photo__tagline-body {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-inverse);
  margin: 0;
}

@media (max-width: 960px) {
  .hero-photo { padding: 0 var(--page-margin) var(--space-7); }
  .hero-photo__headline-wrap { margin-top: 140px; }
  .hero-photo__bottom-row { align-items: flex-start; flex-direction: column; }
}

/* ---- Range banner (homepage) ---------------------------------------------- */

.range-banner-section {
  background: var(--white);
  padding: 0;
}

.range-banner {
  background: var(--purple-900);
  padding: var(--space-9) 0;
}

/* Same eggplant background as the dark craft-intro above it — its bottom
   padding already provides the gap, so don't stack a second full padding. */
.craft-intro--dark + .range-banner-section .range-banner {
  padding-top: var(--space-6);
}

.range-banner__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.range-banner__eyebrow {
  font-family: var(--font-editorial);
  font-size: 13px;
  letter-spacing: 1.04px;
  text-transform: uppercase;
  color: var(--purple-300);
  margin: 0;
}

.range-banner__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: var(--space-5);
  column-gap: var(--space-3);
}

.range-banner__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  color: var(--text-inverse);
}

.range-banner__word--accent { color: var(--highlight); }

.range-banner__arrow {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  color: var(--purple-300);
}

.range-banner .btn-secondary--on-dark {
  margin-left: var(--space-3);
}

@media (max-width: 640px) {
  .range-banner { padding: var(--space-7) 0; }
  .range-banner .btn-secondary--on-dark { margin-left: 0; margin-top: var(--space-2); }
}

/* ---- Selected work / case studies (homepage) ------------------------------ */

.section-selected-work { padding: var(--space-8) 0; }

.selected-work__header { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-8); }

.selected-work__eyebrow {
  font-family: var(--font-editorial);
  font-size: 13px;
  letter-spacing: 0.52px;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0;
}

.selected-work__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  color: var(--text-primary);
  margin: 0;
}

.case-studies-list {
  display: flex;
  flex-direction: column;
}

.case-study-card {
  position: sticky;
  top: 88px;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-7);
  border-radius: 12px;
  padding: var(--space-9) var(--space-9);
  background: var(--highlight);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 24px 48px -24px rgba(36, 16, 31, 0.35);
}

.case-study-card:last-child {
  margin-bottom: 0;
}

.case-study-card__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  flex: 1 0 0;
  min-width: 0;
}

.case-study-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 56px);
  line-height: 1.05;
  color: var(--purple-800);
  margin: 0;
}

.case-study-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.case-study-card__media {
  flex-shrink: 0;
  width: 640px;
  max-width: 45%;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
}

.case-study-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 960px) {
  .case-study-card { flex-direction: column; align-items: stretch; padding: var(--space-6); gap: var(--space-6); }
  .case-study-card__media { width: 100%; max-width: 100%; height: 260px; }
}

@media (max-width: 640px) {
  .case-study-card { padding: var(--space-5); }
}

/* ---- Case study detail page (template) --------------------------------
   Source: Figma "Case Study Template" (node 2074:43700). Reusable across
   every case study — hero, deep-dive process grid, image mosaic, and four
   Problem/Approach/Solution/Impact blocks. */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.cs-hero {
  background: var(--purple-050);
  padding: var(--space-10) 80px var(--space-9);
}

.cs-hero__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-6);
  transition: color 0.15s ease;
}

.cs-hero__back:hover { color: var(--teal-500); }

.cs-hero__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
}

.cs-hero__meta-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(36, 16, 31, 0.5);
  margin: 0;
}

.cs-hero__meta-value {
  font-family: var(--font-editorial);
  font-size: 24px;
  color: var(--purple-950);
  margin: 0;
}

.cs-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1;
  color: var(--purple-950);
  margin: 0 0 var(--space-3);
  max-width: 18ch;
}

.cs-hero__subtitle {
  font-family: var(--font-editorial);
  font-size: clamp(18px, 2.2vw, 28px);
  color: var(--teal-500);
  margin: 0 0 var(--space-5);
}

.cs-hero__description {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: rgba(36, 16, 31, 0.5);
  max-width: 720px;
  margin: 0 0 var(--space-6);
}

.cs-hero__stage {
  background: var(--purple-900);
  border-radius: 12px;
  padding: var(--space-8);
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-hero__stage img {
  max-width: 100%;
  max-height: 460px;
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

/* ---- Coming soon placeholder ------------------------------------------- */

.coming-soon {
  background: var(--purple-050);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-10) var(--space-6);
}

.coming-soon__inner { max-width: 560px; }

.coming-soon__eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0 0 var(--space-4);
}

.coming-soon__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1;
  color: var(--purple-950);
  margin: 0 0 var(--space-5);
}

.coming-soon__body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: rgba(36, 16, 31, 0.5);
  margin: 0 0 var(--space-7);
}

.coming-soon__actions {
  display: flex;
  justify-content: center;
}

/* Deep dive — "The Process" (source: Figma "Steps carousel", node 2086:56406) */

.cs-deepdive {
  background: var(--purple-050);
  padding: 80px;
}

.cs-deepdive__intro {
  max-width: 1024px;
  margin: 0 0 var(--space-8);
}

.cs-deepdive__intro .cs-block__title { max-width: none; }

.cs-deepdive__intro .cs-block__eyebrow,
.cs-deepdive__intro .cs-block__title { margin-bottom: var(--space-4); }

.cs-deepdive__intro .cs-block__body { margin: 0; }

/* Desktop: sticky crossfade image + scroll-driven text list */

.cs-deepdive-desktop { display: block; }
.cs-deepdive-mobile { display: none; max-width: 640px; margin: 0 auto; }

.cs-deepdive__grid {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
}

.cs-deepdive__mockup {
  flex: 1 1 56%;
  min-width: 750px;
  position: sticky;
  top: 100px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--purple-050);
  transition: height 0.3s ease-out;
}

.cs-deepdive__mockup-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.15s linear;
}

.cs-deepdive__mockup-img.is-active { opacity: 1; }

.cs-deepdive__topics {
  flex: 1 1 44%;
  display: flex;
  flex-direction: column;
  gap: 30vh;
  text-align: left;
  padding: 35vh 0;
}

.cs-deepdive__topic {
  opacity: 0;
  will-change: opacity, transform;
}

.cs-deepdive__topic h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--purple-900);
  margin: 0 0 var(--space-4);
}

.cs-deepdive__topic p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
}

.cs-deepdive__topic p:last-child { margin-bottom: 0; }

.cs-deepdive__topic ul {
  text-align: left;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}

.cs-deepdive__topic ul:last-child { margin-bottom: 0; }

.cs-topic-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0 0 var(--space-2);
}

/* Mobile: flat stacked list, each topic with its own image */

.cs-deepdive-mobile__item { margin-bottom: var(--space-8); }
.cs-deepdive-mobile__item:last-child { margin-bottom: 0; }

.cs-deepdive-mobile__item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--purple-900);
  margin: 0 0 var(--space-3);
}

.cs-deepdive-mobile__item p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}

.cs-deepdive-mobile__item ul {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}

.cs-deepdive-mobile__item img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  background: var(--purple-050);
}

@media (max-width: 1300px) {
  .cs-deepdive-desktop { display: none; }
  .cs-deepdive-mobile { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-deepdive__topic { opacity: 1 !important; transform: none !important; }
}

/* Gallery mosaic */

.cs-gallery {
  background: var(--purple-900);
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
}

.cs-gallery__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1 1 0;
}

.cs-gallery__cell {
  flex: 1 1 0;
  min-height: 140px;
  border-radius: 8px;
  background: rgba(246, 242, 245, 0.06);
  border: 1px dashed rgba(246, 242, 245, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(246, 242, 245, 0.4);
  font-family: var(--font-editorial);
  font-size: var(--fs-caption);
  text-align: center;
  padding: var(--space-3);
  overflow: hidden;
}

.cs-gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 960px) {
  .cs-gallery { flex-direction: column; }
}

/* Problem / Approach / Solution / Impact blocks */

.cs-block {
  background: var(--purple-050);
  border-bottom: 1px solid var(--purple-150);
  padding: var(--space-10) var(--space-9);
}

.cs-block:last-of-type { border-bottom: none; }

.cs-block__inner { max-width: 840px; }

.cs-block__eyebrow {
  font-family: var(--font-editorial);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0 0 var(--space-4);
}

.cs-block__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--purple-900);
  margin: 0 0 var(--space-4);
  max-width: 720px;
}

.cs-block__body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 0 var(--space-7);
}

.cs-block__media {
  background: var(--purple-150);
  border-radius: 12px;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-family: var(--font-editorial);
  font-size: var(--fs-caption);
  overflow: hidden;
}

.cs-block__media img { width: 100%; height: 100%; object-fit: cover; }

.cs-block__diagram {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--purple-150);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.cs-block__diagram img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-block__diagram-row {
  display: flex;
  gap: var(--space-5);
  margin: var(--space-6) 0;
}

.cs-block__diagram-row .cs-block__diagram { flex: 1 1 0; margin: 0; }

.cs-block__diagram--scroll {
  overflow-x: auto;
}

.cs-block__diagram--scroll img {
  width: auto;
  max-width: none;
  height: 420px;
}

@media (max-width: 960px) {
  .cs-block__diagram-row { flex-direction: column; }
  .cs-block__diagram-row .cs-block__diagram { width: 100% !important; }
}

.cs-block__findings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6) var(--space-7);
  max-width: 840px;
  margin: 0 0 var(--space-6);
}

.cs-block__findings h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--purple-900);
  margin: 0 0 var(--space-2);
}

.cs-block__findings p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.cs-block__subheading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--purple-900);
  margin: var(--space-7) 0 0;
}

.cs-block__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 680px;
  margin: 0;
  padding-left: 1.2em;
}

.cs-block__list li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .cs-block__findings { grid-template-columns: 1fr; }
}

.cs-block__media-grid {
  display: flex;
  gap: var(--space-5);
  height: 460px;
}

.cs-block__media-grid .cs-block__media { flex: 1 1 0; height: 100%; }

.cs-block__metrics {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.cs-metric {
  flex: 1 1 200px;
  background: var(--purple-900);
  border-radius: 12px;
  padding: var(--space-7);
}

.cs-metric__number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--highlight);
  margin: 0 0 var(--space-4);
}

.cs-metric__divider {
  border: none;
  border-top: 1px solid rgba(246, 242, 245, 0.2);
  margin: 0 0 var(--space-4);
}

.cs-metric p:last-child {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--purple-050);
  margin: 0;
}

@media (max-width: 960px) {
  .cs-block { padding: var(--space-8) var(--space-6); }
  .cs-block__media-grid { flex-direction: column; height: auto; }
  .cs-block__media-grid .cs-block__media { height: 280px; }
  .cs-block__metrics { flex-direction: column; }
}

@media (max-width: 640px) {
  .cs-hero { padding: var(--space-8) var(--space-5) var(--space-7); }
  .cs-deepdive { padding: var(--space-7) var(--space-5); }
  .cs-block { padding: var(--space-7) var(--space-5); }
}

/* ---- Placeholder media block (matches Foundations convention) ---------- */

.placeholder {
  background: var(--purple-150);
  color: var(--text-tertiary);
  font-family: var(--font-editorial);
  font-size: var(--fs-caption);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-card);
  text-align: center;
  padding: var(--space-6);
}

/* ---- Capability flip cards ------------------------------------------------ */

.capabilities-section {
  background: var(--purple-900);
  padding: var(--space-4) 0 var(--space-9);
}

.capabilities-section__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  padding-top: var(--space-9);
  padding-bottom: var(--space-7);
}

.capabilities-section__header .eyebrow {
  letter-spacing: 1.5px;
  margin: 0;
}

.capabilities-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 88px);
  line-height: 0.95;
  color: var(--text-inverse);
  text-transform: uppercase;
  margin: 0;
}

.capabilities-section__title span { display: block; }

.capabilities-section__lede {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.4;
  color: var(--purple-300);
  max-width: 800px;
  margin: 0;
}

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

.flip-card {
  position: relative;
  height: 480px;
  perspective: 1600px;
  cursor: pointer;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
  .flip-card:hover .flip-card__inner { transform: rotateY(180deg); }
}

.flip-card.is-flipped .flip-card__inner { transform: rotateY(180deg); }

.flip-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: var(--space-7);
  overflow: hidden;
}

.flip-card__face--front {
  background: var(--purple-050);
  color: var(--text-primary);
  gap: var(--space-4);
}

.flip-card__face--back {
  background: var(--purple-900);
  color: var(--text-inverse);
  transform: rotateY(180deg);
  overflow-y: auto;
}

.flip-card__top-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.flip-card__bottom-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}

.flip-card__front-number {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 64px;
  line-height: 1;
  color: var(--purple-300);
  margin: 0;
}

.flip-card__front-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  color: var(--purple-900);
  text-transform: uppercase;
  margin: 0;
}

.flip-card__front-title span { display: block; }

.flip-card__front-desc {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--purple-650);
  margin: 0;
}

.flip-card__eyebrow {
  font-family: var(--font-editorial);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0 0 var(--space-5);
  padding-right: var(--space-7);
}

.flip-card__hint {
  font-family: var(--font-editorial);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal-500);
  margin: 0;
}

.flip-card__back-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h4);
  color: var(--text-inverse);
  margin: 0 0 var(--space-4);
  padding-right: var(--space-4);
}

.flip-card__back-lead {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-inverse-secondary);
  margin: 0 0 var(--space-5);
}

.flip-card__methods {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-inverse-secondary);
  margin: 0 0 var(--space-5);
}

.flip-card__divider {
  border: none;
  border-top: 1px solid var(--purple-800);
  margin: 0 0 var(--space-4);
}

.flip-card__proof-label {
  font-family: var(--font-editorial);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--highlight);
  margin: 0 0 var(--space-2);
}

.flip-card__proof-desc {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-inverse);
  opacity: 0.85;
  margin: 0 0 var(--space-3);
}

.flip-card__proof-links {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--teal-500);
  text-decoration: none;
  margin: 0;
}

.flip-card__proof-links:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .capabilities-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .capabilities-grid { grid-template-columns: 1fr; }
  .flip-card { height: 440px; }
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 960px) {
  :root { --page-margin: 40px; }

  .site-header__inner { padding: var(--space-5) 24px; }
  .site-header.is-scrolled .site-header__inner { padding: var(--space-4) 24px; }

  .nav { display: none; }
  .nav-toggle { display: inline-flex; }

  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: var(--purple-900);
    padding: 80px 24px 40px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0.3s;
  }

  .mobile-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0s;
  }

  .mobile-menu__links {
    display: flex;
    flex-direction: column;
    margin-top: 48px;
  }

  .mobile-menu__link {
    padding: 20px 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    color: var(--text-inverse);
    text-decoration: none;
    opacity: 0;
    transform: translateY(10px);
    transition: color 0.15s ease, opacity 0.3s ease-out, transform 0.3s ease-out;
  }

  .mobile-menu__link[aria-current="page"] { color: var(--highlight); }
  .mobile-menu__link:hover,
  .mobile-menu__link:focus-visible { color: var(--highlight); }

  .mobile-menu.is-open .mobile-menu__link {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu.is-open .mobile-menu__link:nth-child(1) { transition-delay: 0.05s; }
  .mobile-menu.is-open .mobile-menu__link:nth-child(2) { transition-delay: 0.1s; }
  .mobile-menu.is-open .mobile-menu__link:nth-child(3) { transition-delay: 0.15s; }
  .mobile-menu.is-open .mobile-menu__link:nth-child(4) { transition-delay: 0.2s; }
  .mobile-menu.is-open .mobile-menu__link:nth-child(5) { transition-delay: 0.25s; }

  .mobile-menu__cta {
    margin-top: 24px;
    align-self: flex-start;
    opacity: 0;
    transform: translateY(10px);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, opacity 0.3s ease-out, transform 0.3s ease-out;
    transition-delay: 0s;
  }

  .mobile-menu.is-open .mobile-menu__cta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
  }

  .work-grid { grid-template-columns: 1fr; }
  section { padding: var(--space-7) 0; }
}

@media (max-width: 600px) {
  :root { --page-margin: 24px; }
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 26px; }
}

/* ---- Before / After image comparison ------------------------------------
   Ported from a pasted React/Motion "Feature" component (drag-to-reveal
   image compare) to vanilla JS/CSS. See js/before-after.js.
   Source: Figma "Before / After Section" (node 2106:11392). */

.before-after {
  background: var(--purple-900);
  padding: 100px 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-7);
}

.before-after__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 700px;
  text-align: center;
}

.before-after__header .cs-block__eyebrow { margin: 0; }

.before-after__header .cs-block__title {
  color: var(--text-inverse);
  max-width: none;
  margin: 0;
}

.before-after__header .cs-block__body {
  color: var(--purple-300);
  max-width: none;
  margin: 0;
}

.before-after__slider {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 620px;
  aspect-ratio: 1100 / 620;
  border-radius: 12px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
}

.before-after__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: var(--purple-900);
}

.before-after__image--before {
  z-index: 1;
  object-position: top;
}

.before-after__image--after { z-index: 2; }

.before-after__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--highlight);
  z-index: 3;
  transform: translateX(-2px);
  pointer-events: none;
}

.before-after__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--highlight);
  color: var(--purple-900);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease-out;
}

.before-after__handle:hover,
.before-after__handle:focus-visible { transform: translate(-50%, -50%) scale(1.1); }

.before-after__handle:focus-visible {
  outline: 2px solid var(--text-inverse);
  outline-offset: 2px;
}

.before-after__labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
}

.before-after__label {
  background: var(--highlight);
  color: var(--purple-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .before-after { padding: var(--space-8) var(--space-5); }
  .before-after__slider { aspect-ratio: 4 / 5; }
}

/* ---- Resume timeline ------------------------------------------------------
   Ported from a pasted React/Framer-Motion "Timeline" component (sticky
   date labels + a scroll-driven gradient progress line) to vanilla
   JS/CSS. See js/resume-timeline.js. */

.resume-timeline__track {
  position: relative;
  margin-top: var(--space-7);
}

.resume-timeline__line {
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-light);
}

.resume-timeline__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to bottom, var(--highlight), var(--teal-500));
  border-radius: 1px;
}

.resume-timeline__entry {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  padding-top: var(--space-9);
}

.resume-timeline__entry:first-child { padding-top: 0; }

.resume-timeline__sticky {
  position: sticky;
  top: 140px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 0 0 auto;
  min-width: 200px;
}

.resume-timeline__dot {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 2px solid var(--purple-150);
}

.resume-timeline__year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.28px;
  color: var(--purple-650);
  opacity: 0.5;
  max-width: 168px;
  margin: 0;
}

.resume-timeline__content {
  flex: 1 1 auto;
  min-width: 0;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.resume-timeline__role {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.resume-timeline__role + .resume-timeline__role {
  margin-top: var(--space-6);
}

.resume-timeline__content h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.28px;
  color: var(--purple-900);
  margin: 0;
}

.resume-timeline__content p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--purple-650);
  margin: 0;
  max-width: 60ch;
}

.resume-timeline__logo-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.resume-timeline__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #E8E2E7;
  overflow: hidden;
  flex-shrink: 0;
}

.resume-timeline__logo img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.resume-timeline__logo--brandmovers img {
  max-width: 100%;
  max-height: 100%;
}

.resume-timeline__logo--redclay {
  background: #E61A23;
}

.resume-timeline__logo--redclay img {
  width: 108%;
  max-width: 108%;
  height: auto;
  max-height: none;
}

.resume-timeline__company {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--purple-650);
  margin: 0;
}

.resume-timeline__content p.resume-timeline__clients {
  font-family: var(--font-editorial);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--teal-500);
  margin: 0;
  max-width: 60ch;
}

.resume-timeline__clients strong { font-weight: 400; }

@media (max-width: 640px) {
  .resume-timeline__entry { flex-direction: column; gap: var(--space-3); padding-top: var(--space-7); }
  .resume-timeline__sticky { position: static; }
  .resume-timeline__line { left: 7px; }
}

/* ---- Skills carousel -------------------------------------------------------- */

.skills-carousel {
  margin-top: var(--space-7);
}

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

.skills-carousel__viewport {
  position: relative;
}

.skills-carousel__track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: var(--space-2) var(--space-2) var(--space-4);
  margin: 0 calc(var(--space-2) * -1);
  scrollbar-width: none;
}

.skills-carousel__track::-webkit-scrollbar {
  display: none;
}

.skills-carousel__track[hidden] {
  display: none;
}

.skills-carousel__card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-width: 220px;
  max-width: 220px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-5);
  background: var(--purple-050);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.skills-carousel__card:hover {
  border-color: var(--teal-500);
  transform: translateY(-2px);
}

.skills-carousel__card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--purple-900);
}

.skills-carousel__nav {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Button / Arrow Nav — see design library entry for full spec (states,
   backgrounds, accessibility). Light-background variant only; this site
   has no dark-surface usage of this component yet. */
.skills-carousel__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--purple-900);
  color: var(--highlight);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.skills-carousel__arrow svg {
  width: 20px;
  height: 14px;
  flex-shrink: 0;
}

.skills-carousel__arrow:hover:not([aria-disabled="true"]) {
  box-shadow: 0 0 0 2px var(--highlight), 0 0 10px rgba(199, 255, 36, 0.35);
}

.skills-carousel__arrow:active:not([aria-disabled="true"]) {
  background: #2E142B;
}

.skills-carousel__arrow:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 4px;
}

.skills-carousel__arrow[aria-disabled="true"] {
  color: var(--purple-650);
  cursor: default;
}

/* Static swatches for the design library's state comparison grid — mirror
   the real :hover/:active/:focus-visible rules above for non-interactive
   display. Not used outside documentation pages. */
.skills-carousel__arrow--force-hover {
  box-shadow: 0 0 0 2px var(--highlight), 0 0 10px rgba(199, 255, 36, 0.35);
}

.skills-carousel__arrow--force-pressed {
  background: #2E142B;
}

.skills-carousel__arrow--force-focus {
  outline: 2px solid var(--teal-500);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .skills-carousel__card {
    min-width: 170px;
    max-width: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skills-carousel__track {
    scroll-behavior: auto;
  }
  .skills-carousel__card:hover {
    transform: none;
  }
}

/* ---- Client logo marquee -------------------------------------------------- */

.client-marquee__viewport {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.client-marquee__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: max-content;
  padding: var(--space-5) var(--space-5);
  animation: client-marquee-scroll 42s linear infinite;
}

.client-marquee__viewport:hover .client-marquee__row {
  animation-play-state: paused;
}

@keyframes client-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.client-marquee__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 96px;
  border-radius: var(--radius-card);
  background: var(--purple-050);
  border: 1px solid var(--border-light);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.client-marquee__logo:hover {
  border-color: var(--teal-500);
  transform: translateY(-2px);
}

.client-marquee__logo img {
  max-width: 65%;
  max-height: 55%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.client-marquee__logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .client-marquee__row {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
  .client-marquee__logo--dup {
    display: none;
  }
}

/* ---- Scroll mantra ("I create ...") --------------------------------------- */

.scroll-mantra {
  position: relative;
  background: var(--bg-dark);
  padding: var(--space-8) 0 0;
}

.scroll-mantra__inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
}

.scroll-mantra__sticky {
  position: sticky;
  top: 140px;
  flex: 0 0 auto;
  padding-bottom: var(--space-9);
}

.scroll-mantra__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.02;
  color: var(--text-inverse);
  margin: 0;
}

.scroll-mantra__list {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--space-9);
  flex: 1 1 auto;
  min-width: 0;
}

.scroll-mantra__list li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.02;
  color: var(--highlight);
  color: oklch(78% 0.18 var(--mantra-hue, 280));
  opacity: 0.22;
  filter: brightness(0.7);
  padding: var(--space-6) 0;
  margin: 0;
  transition: opacity 0.25s ease-out, filter 0.25s ease-out;
}

.scroll-mantra__list li.is-active {
  opacity: 1;
  filter: brightness(1);
}

@media (max-width: 768px) {
  .scroll-mantra { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-mantra__list li {
    opacity: 1;
    filter: none;
    color: var(--highlight);
  }
}

/* ---- Craft intro (homepage, sits above craft-reveal) ---------------------- */

.craft-intro {
  background: var(--purple-050);
  padding: var(--space-9) 160px;
  text-align: center;
}

.craft-intro--dark {
  background: var(--purple-900);
}

.craft-intro--dark .craft-intro__heading { color: var(--text-inverse); }
.craft-intro--dark .craft-intro__body { color: var(--purple-050); }

.craft-intro .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.craft-intro .eyebrow { margin: 0; }

.craft-intro__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -1.44px;
  color: var(--purple-900);
  max-width: 1024px;
  margin: 0;
}

.craft-intro__body {
  font-family: var(--font-body);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 1024px;
  margin: 0;
}

@media (max-width: 768px) {
  .craft-intro { padding-left: var(--space-6); padding-right: var(--space-6); }
}

/* ---- Craft reveal ("I craft ... vivid ... spectacles.") ------------------- */

.craft-reveal {
  background: var(--purple-050);
  padding: var(--space-9) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  overflow-x: hidden;
}

.craft-reveal__line {
  --reveal-size: clamp(26px, 7.2vw, 108px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.craft-reveal__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--reveal-size);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--purple-900);
  white-space: nowrap;
  text-transform: uppercase;
}

.craft-reveal__pill {
  position: relative;
  display: block;
  height: var(--reveal-size);
  width: 0;
  border-radius: calc(var(--reveal-size) * 0.22);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.craft-reveal__pill img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.craft-reveal__pill:hover img { opacity: 1; }

.craft-reveal__cta {
  margin-top: var(--space-7);
}

.craft-reveal__follower {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(220px, 26vw, 420px);
  height: clamp(150px, 17vw, 280px);
  border-radius: 20px;
  overflow: hidden;
  pointer-events: none;
  z-index: 999;
  background: var(--purple-150);
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translate(var(--follower-x, -9999px), var(--follower-y, -9999px)) translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.craft-reveal__follower.is-visible {
  opacity: 1;
  transform: translate(var(--follower-x, -9999px), var(--follower-y, -9999px)) translate(-50%, -50%) scale(1);
}

.craft-reveal__follower img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: none) {
  .craft-reveal__follower { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .craft-reveal__pill {
    width: calc(var(--reveal-size) * var(--reveal-ratio, 2.7)) !important;
  }
  .craft-reveal__follower { display: none; }
}

/* ---- Let's create together (homepage, above footer) ----------------------- */

.create-together {
  background: var(--purple-050);
  padding: var(--space-9) var(--space-6);
}

.create-together .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

.create-together__heading {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-6);
  row-gap: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -1px;
  margin: 0;
}

.create-together__heading-primary { color: var(--purple-900); }
.create-together__heading-accent { color: var(--teal-500); }

/* ---- Design library (internal documentation, not part of the portfolio) --- */

.design-library {
  background: var(--bg-page);
  min-height: 100vh;
}

.design-library__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--purple-650);
  text-decoration: none;
}

.design-library__back:hover { color: var(--teal-500); }

.design-library__header {
  padding: var(--space-8) var(--space-6) var(--space-6);
  max-width: 1024px;
  margin: 0 auto;
}

.design-library__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  color: var(--purple-900);
  margin: var(--space-5) 0 var(--space-3);
}

.design-library__intro {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0;
}

.dl-component {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-9);
}

.dl-component__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--purple-900);
  margin: 0 0 var(--space-2);
}

.dl-component__subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-7);
}

.dl-section {
  margin-bottom: var(--space-8);
}

.dl-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-900);
  margin: 0 0 var(--space-4);
}

.dl-section__divider {
  height: 1px;
  background: var(--highlight);
  margin: 0 0 var(--space-5);
  border: none;
}

.dl-panel {
  background: var(--purple-050);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}

.dl-panel--dark {
  background: var(--purple-900);
}

.dl-eyebrow-label {
  font-family: var(--font-editorial);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 var(--space-5);
}

.dl-panel--dark .dl-eyebrow-label { color: var(--purple-300); }

.dl-states {
  display: grid;
  grid-template-columns: 100px repeat(5, 1fr);
  align-items: center;
  row-gap: var(--space-4);
}

.dl-states__header,
.dl-states__row-label {
  font-family: var(--font-editorial);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}

.dl-panel--dark .dl-states__header,
.dl-panel--dark .dl-states__row-label {
  color: var(--purple-300);
}

.dl-states__row-label { text-align: left; }

.dl-states__cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-anatomy {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
  flex-wrap: wrap;
}

.dl-anatomy__demo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.dl-anatomy__specs {
  flex: 1 1 280px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  list-style: none;
  padding: 0;
}

.dl-anatomy__specs li strong { color: var(--purple-900); }

.dl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.dl-cards__card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}

.dl-cards__card h4 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  color: var(--purple-900);
  margin: 0 0 var(--space-2);
}

.dl-cards__card p {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.dl-rule {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  background: var(--purple-900);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}

.dl-rule__tag {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  color: var(--highlight);
  flex-shrink: 0;
}

.dl-rule__text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--white);
  margin: 0;
}

.dl-do-dont {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.dl-do-dont__col {
  border-radius: var(--radius-card);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.dl-do-dont__col--dont { background: #F2EBED; }
.dl-do-dont__col--do { background: #EDF5EB; }

.dl-do-dont__label {
  font-family: var(--font-editorial);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.dl-do-dont__col--dont .dl-do-dont__label { color: #B24D4D; }
.dl-do-dont__col--do .dl-do-dont__label { color: #408C40; }

.dl-do-dont__col code {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
}

.dl-do-dont__note {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  margin: var(--space-2) 0 0;
}

.dl-do-dont__col--dont .dl-do-dont__note { color: #8C7387; }
.dl-do-dont__col--do .dl-do-dont__note { color: #598059; }

.dl-pattern {
  background: var(--white);
  border-radius: var(--radius-subtle);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
}

.dl-pattern:last-child { margin-bottom: 0; }

.dl-pattern h4 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  color: var(--purple-900);
  margin: 0 0 var(--space-1);
}

.dl-pattern code {
  display: block;
  font-family: var(--font-editorial);
  font-size: 12px;
  color: var(--purple-900);
  margin-bottom: var(--space-1);
}

.dl-pattern p:last-child {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.dl-keyboard-row {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}

.dl-keyboard-row:last-child { margin-bottom: 0; }

.dl-keyboard-row dt {
  flex: 0 0 140px;
  font-family: var(--font-editorial);
  font-size: 12px;
  color: var(--purple-900);
}

.dl-keyboard-row dd {
  flex: 1 1 auto;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.dl-note {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--white);
  border-left: 3px solid var(--teal-500);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-5);
}

@media (max-width: 768px) {
  .dl-states { grid-template-columns: 80px repeat(3, 1fr); }
  .dl-do-dont { grid-template-columns: 1fr; }
}

/* ---- Contact form section (contact page) ----------------------------------- */

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

.contact-form-section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-7);
}

.contact-form-section__header .eyebrow { margin: 0; }

.contact-form-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -1px;
  line-height: 1.05;
  color: var(--purple-900);
  margin: 0;
}

.contact-form-section__subhead {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-form__row {
  display: flex;
  gap: 20px;
}

.contact-form__field {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 200px;
}

.contact-form__field label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  color: var(--purple-900);
}

.contact-form__field input,
.contact-form__field textarea {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--purple-900);
  background: var(--purple-050);
  border: 1.5px solid var(--purple-900);
  border-radius: var(--radius-subtle);
  padding: var(--space-4);
  resize: vertical;
}

.contact-form__field input { height: 52px; }

.contact-form__field textarea {
  min-height: 140px;
  max-height: 320px;
  overflow-y: auto;
}

.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

.contact-form__field input:hover,
.contact-form__field textarea:hover {
  border-width: 2px;
}

.contact-form__field input:focus-visible,
.contact-form__field textarea:focus-visible {
  border-width: 2px;
  border-color: var(--teal-500);
  outline: none;
}

.contact-form__field--error input,
.contact-form__field--error textarea,
.contact-form__field--error .contact-form__select-wrap select {
  border-width: 2px;
  border-color: var(--error-500);
}

.contact-form__error-text {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--error-500);
  margin: 0;
}

.contact-form__error-text:empty { display: none; }

.contact-form__select-wrap {
  position: relative;
  display: flex;
}

.contact-form__select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 52px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--purple-900);
  background: var(--purple-050);
  border: 1.5px solid var(--purple-900);
  border-radius: var(--radius-subtle);
  padding: var(--space-4);
  padding-right: var(--space-7);
  cursor: pointer;
}

.contact-form__select-wrap select:invalid {
  color: var(--text-secondary);
}

.contact-form__select-wrap select:hover {
  border-width: 2px;
}

.contact-form__select-wrap select:focus-visible {
  border-width: 2px;
  border-color: var(--teal-500);
  outline: none;
}

.contact-form__select-chevron {
  position: absolute;
  top: 50%;
  right: var(--space-4);
  width: 10px;
  height: 5px;
  transform: translateY(-50%);
  color: var(--purple-900);
  pointer-events: none;
}

.contact-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 48px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--highlight);
  color: var(--purple-900);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.contact-form__submit:hover { background: var(--teal-500); color: var(--white); }
.contact-form__submit:hover .btn-arrow { transform: translateX(4px); }
.contact-form__submit:focus-visible { outline: 2px solid var(--purple-900); outline-offset: 2px; }
.contact-form__submit:active { transform: scale(0.98); }

.contact-form__note {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
  min-height: 18px;
}

.contact-form__alt {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin: calc(-1 * var(--space-3)) 0 0;
}

.contact-form__alt a {
  color: var(--text-secondary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-form__alt a:hover { color: var(--teal-500); }
.contact-form__alt a:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }

.contact-socials {
  max-width: 600px;
  margin: var(--space-7) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.contact-socials__label {
  font-family: var(--font-editorial);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.contact-socials__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.contact-socials__row a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--purple-050);
  border: 1px solid rgba(111, 89, 108, 0.3);
  color: var(--purple-900);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.contact-socials__row a:hover {
  background: var(--purple-900);
  border-color: var(--purple-900);
  color: var(--highlight);
  transform: translateY(-2px);
}

.contact-socials__row a:active { color: var(--teal-500); }

.contact-socials__row a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--teal-500);
}

@media (max-width: 640px) {
  .contact-form__row { flex-direction: column; }

  .contact-form__field input,
  .contact-form__field textarea,
  .contact-form__select-wrap select {
    font-size: 16px;
  }
}

.back-to-top {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--purple-900);
  color: var(--highlight);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 20px;
  height: 14px;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.back-to-top:hover {
  box-shadow: 0 0 0 2px var(--highlight), 0 0 10px rgba(199, 255, 36, 0.35);
}

.back-to-top:active { background: #2E142B; }

.back-to-top:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .back-to-top { right: var(--space-4); bottom: var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 0.2s ease, visibility 0.2s ease; transform: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tools — hover slider (label stagger-reveal + image wipe) */

.tools-slider {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.tools-slider__labels {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tools-slider__label {
  display: block;
  background: none;
  border: none;
  padding: 4px 0;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
}

.tools-slider__label:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 4px;
}

.tools-slider__chars { display: inline; }

.tools-slider__word {
  display: inline-block;
  white-space: nowrap;
}

.tools-slider__char-cell {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.tools-slider__char {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tools-slider__char--ghost {
  color: var(--purple-300);
  transform: translateY(0%);
}

.tools-slider__char--active {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--purple-900);
  transform: translateY(110%);
}

.tools-slider__label.is-active .tools-slider__char--ghost { transform: translateY(-110%); }
.tools-slider__label.is-active .tools-slider__char--active { transform: translateY(0%); }

.tools-slider__images {
  position: relative;
  display: grid;
  width: auto;
  max-width: 100%;
  height: 400px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  flex-shrink: 0;
}

.tools-slider__image {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%);
  transition: clip-path 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.tools-slider__image.is-active {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.tools-slider__logo {
  display: block;
  width: 72px;
  height: 72px;
  background-color: currentColor;
  -webkit-mask-image: var(--logo-icon);
  mask-image: var(--logo-icon);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.tools-slider__image--figma { background: var(--purple-900); color: var(--white); }
.tools-slider__image--claude { background: var(--teal-500); color: var(--purple-900); }
.tools-slider__image--openai { background: var(--purple-650); color: var(--white); }
.tools-slider__image--adobe { background: var(--purple-800); color: var(--white); }
.tools-slider__image--mural { background: var(--highlight); color: var(--purple-900); }
.tools-slider__image--atlassian { background: oklch(78% 0.18 165); color: var(--purple-900); }
.tools-slider__image--pencil { background: var(--purple-950); color: var(--white); }
.tools-slider__image--palette { background: oklch(78% 0.18 230); color: var(--purple-900); }

@media (max-width: 640px) {
  .tools-slider { flex-direction: column-reverse; align-items: stretch; }
  .tools-slider__images { width: 100%; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tools-slider__char { transition: none; }
  .tools-slider__image { transition: opacity 0.2s ease; clip-path: none; opacity: 0; }
  .tools-slider__image.is-active { clip-path: none; opacity: 1; }
}

.work-gate-body {
  background: var(--purple-950);
  min-height: 100vh;
}

.work-gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-7);
  padding: var(--space-6) var(--page-margin);
}

.work-gate__logo { flex-shrink: 0; }

.work-gate__card {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.work-gate__card .eyebrow { color: var(--highlight); }

.work-gate__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 var(--space-3);
}

.work-gate__desc {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--purple-300);
  margin: 0 0 var(--space-6);
}

.work-gate__desc a {
  color: var(--highlight);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.work-gate__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.work-gate__form input {
  height: 52px;
  font-family: var(--font-body);
  font-size: 16px;
  text-align: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--purple-650);
  border-radius: var(--radius-subtle);
  padding: 0 var(--space-4);
}

.work-gate__form input::placeholder { color: var(--purple-300); }

.work-gate__form input:hover { border-width: 2px; }

.work-gate__form input:focus-visible {
  outline: none;
  border-width: 2px;
  border-color: var(--teal-500);
}

.work-gate__form .btn-primary { align-self: center; }

.work-gate__error {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--error-500, #CC3333);
  margin: var(--space-4) 0 0;
}

/* ---- Portfolio (Work) filters ------------------------------------------- */

.filter-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
  position: sticky;
  top: var(--filter-bar-top, 0px);
  z-index: 20;
  background: var(--bg-page);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  transition: top 0.3s ease-out;
}

.filter-toggle-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.filter-toggle-row__label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-secondary);
}

.filter-toggle {
  display: flex;
  background: #EBE6EB;
  border: 1px solid rgba(111, 89, 108, 0.3);
  border-radius: var(--radius-pill);
  padding: 4px;
}

.filter-toggle__tab {
  border: none;
  background: none;
  padding: 8px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.filter-toggle__tab:hover {
  background: rgba(224, 219, 224, 0.5);
}

.filter-toggle__tab:active {
  background: #260D24;
  color: var(--highlight);
}

.filter-toggle__tab.is-active {
  background: var(--purple-900);
  color: var(--highlight);
}

.filter-toggle__tab.is-active:hover {
  background: var(--purple-800);
}

.filter-toggle__tab.is-active:active {
  background: #260D24;
}

.filter-toggle__tab:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.filter-toggle__tab:disabled,
.filter-toggle__tab[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.filter-panel[hidden] { display: none; }

/* Filter pills — extra-small pill buttons (outlined default, solid chartreuse
   when selected), distinct from the .tag badge style used on project cards. */

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--purple-900);
  background: none;
  color: var(--purple-900);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.44px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.filter-pill:hover {
  background: var(--teal-500);
  border-color: var(--teal-500);
  color: var(--white);
  box-shadow: 0 0 8px rgba(62, 172, 195, 0.3);
}

.filter-pill.is-selected,
.filter-pill[aria-selected="true"] {
  background: var(--highlight);
  border-color: transparent;
  color: var(--purple-900);
  box-shadow: none;
}

.filter-pill:active {
  background: rgba(53, 18, 49, 0.12);
  border-width: 2px;
  border-color: var(--purple-900);
  color: var(--purple-900);
}

.filter-pill:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.filter-pill .tag__close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.filter-pill[aria-selected="true"] .tag__close { display: inline-flex; }

/* ---- Case-study persistent project navigation (top of page) ----------- */

.cs-project-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  position: sticky;
  top: var(--project-nav-top, 90px);
  z-index: 25;
  margin-top: 90px;
  padding: var(--space-3) var(--space-6);
  background: var(--purple-050);
  box-shadow: 0 4px 6px rgba(53, 18, 49, 0.15);
  transition: top 0.3s ease-out;
}

.cs-project-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.cs-project-nav__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-5);
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple-900);
  text-decoration: none;
  white-space: nowrap;
}

.cs-project-nav__pill--all { border-color: var(--purple-900); }

.cs-project-nav__pill:hover { background-color: rgba(53, 18, 49, 0.08); }

.cs-project-nav__pill:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .cs-project-nav { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .cs-project-nav__links { gap: var(--space-3); }
  .cs-project-nav__pill { padding: var(--space-2) var(--space-4); font-size: 11px; }
}

@media print {
  .site-header, .site-footer, .client-marquee, .scroll-mantra, .craft-reveal, .back-to-top, .cs-project-nav { display: none !important; }
  body { background: #fff !important; }
}
