/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {
  /* COLORS — Light theme */
  --color-bg: #FDFDFD;
  --color-text-primary: #131212;
  --color-text-secondary: #8F8F8F;
  --color-text-tertiary: #B2B2B2;
  --color-text-inverse: #F8F4F3;
  --color-border: #E5E5E5;
  --color-hover: #F2F2F2;
  --color-accent: #5F20FF;
  --color-shimmer: #FF229F;
  --color-link: #131212;
  --color-surface-active: #131212;
  --color-surface-blend: #f2f2f2;
  --color-nav-bg: #F2F2F2;
  --color-nav-hover: rgba(0, 0, 0, 0.06);
  
  /* TYPOGRAPHY — Single font family */
  --font-primary: 'PP Neue Corp', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* SPACING (rem — scales with html font-size) */
  --space-1: 0.25rem;
  --space-2: 0.3125rem;
  --space-3: 0.5rem;
  --space-4: 0.625rem;
  --space-5: 1rem;
  --space-6: 1.25rem;
  --space-7: 1.5rem;
  --space-8: 1.75rem;
  --space-9: 2.5rem;
  --space-10: 3rem;
  --space-11: 4rem;
  --space-12: 5rem;
  
  /* LAYOUT (panel width in px — overridden per breakpoint) */
  --panel-left-width: 544px;
  --grid-gap: 0.625rem;
  
  /* RESPONSIVE RADII — scale with viewport */
  --radius-phone: clamp(17px, 1.4vw + 6.1px, 26px);
  --radius-phone-lg: clamp(22px, 1.9vw + 7.4px, 34px);
  --radius-screenshot: clamp(10px, 0.95vw + 2.7px, 16px);

  /* Fluid case spacing — scales between 768px and 1400px viewport */
  --sp-36: clamp(24px, 1.9vw + 9.4px, 36px);
  --sp-40: clamp(28px, 1.9vw + 13.4px, 40px);
  --sp-44: clamp(30px, 2.2vw + 13px, 44px);
  --sp-48: clamp(32px, 2.5vw + 12.6px, 48px);
  --sp-56: clamp(36px, 3.2vw + 11.7px, 56px);
  --sp-64: clamp(40px, 3.8vw + 10.8px, 64px);
  --sp-72: clamp(44px, 4.4vw + 10px, 72px);
  --sp-80: clamp(48px, 5.1vw + 9.1px, 80px);
  --sp-112: clamp(64px, 7.6vw + 5.7px, 112px);
  --sp-144: clamp(80px, 10.1vw + 2.2px, 144px);
  --sp-160: clamp(88px, 11.4vw + 0.5px, 160px);
  --panel-padding: 1.25rem;
  
  /* TRANSITIONS */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* IMAGE CONTAINER GRADIENT */
  --gradient-img-container: linear-gradient(180deg, #f8f8f8 4.8%, #f7f7f7 100%);
}


/* ==========================================================================
   DARK THEME
   ========================================================================== */

[data-theme="dark"] {
  --color-bg: #1A1919;
  --color-text-primary: #F8F4F3;
  --color-text-secondary: #686361;
  --color-text-tertiary: #4D4B4A;
  --color-text-inverse: #1A1919;
  --color-border: #2A2828;
  --color-hover: #252322;
  --color-accent: #A589EE;
  --color-shimmer: #FF83E0;
  --color-link: #F8F4F3;
  --color-surface-active: #F8F4F3;
  --color-surface-blend: #252322;
  --color-nav-bg: #252322;
  --color-nav-hover: rgba(255, 255, 255, 0.06);
  --gradient-img-container: linear-gradient(180deg, #252322 4.8%, #303031 100%);
}


/* ==========================================================================
   THEME TOGGLE
   ========================================================================== */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 4px;
  background: none;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  color: var(--color-text-primary);
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle:hover {
  opacity: 0.5;
}

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

.theme-toggle__moon,
.theme-toggle__sun {
  display: none;
}

/* Light theme: show moon icon */
.theme-toggle__moon {
  display: block;
}

/* Dark theme: show sun icon */
[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__sun {
  display: block;
}


/* ==========================================================================
   FONT FACE
   ========================================================================== */


/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}


/* ==========================================================================
   LAYOUT
   ========================================================================== */

.layout {
  min-height: 100vh;
  max-width: 1712px;
  margin: 0 auto;
  position: relative;
}


/* ==========================================================================
   LEFT PANEL (Fixed)
   ========================================================================== */

.panel-left {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--panel-left-width);
  height: 100vh;
  padding: 36px 32px 18px 20px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  background: var(--color-bg);
  overflow: hidden;
}

/* Center left panel when viewport exceeds max layout width */
/* Center left panel when viewport exceeds max layout width */
@media (min-width: 1713px) {
  .panel-left {
    left: calc((100vw - 1712px) / 2);
  }
}


/* ==========================================================================
   INTRO PHRASE
   ========================================================================== */

.intro-phrase {
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 400;
  line-height: 35px;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
}

.intro-phrase__name {
  display: inline;
}

.intro-phrase__dim {
  display: inline;
  transition: opacity 0.4s ease;
}

.intro-phrase__accent {
  color: var(--color-accent);
}

/* Case view: dim non-name parts of hero */
.intro-phrase--case-active .intro-phrase__dim {
  opacity: 0.2;
}


/* ==========================================================================
   NAVIGATION (pill-style segmented control)
   ========================================================================== */

.nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.nav-main {
  display: flex;
  align-items: center;
  background: var(--color-nav-bg);
  border-radius: 100px;
  padding: 2px;
  width: fit-content;
}

.nav-pill {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: -0.3px;
  color: var(--color-text-primary);
  padding: 2px 14px 3px;
  border-radius: 39px;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.nav-pill:hover {
  background: var(--color-nav-hover);
}

.nav-pill--active {
  background: var(--color-surface-active);
  color: var(--color-text-inverse);
}

.nav-pill--active:hover {
  background: var(--color-surface-active);
}


/* ==========================================================================
   PROJECT LIST
   ========================================================================== */

.project-list {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  margin-bottom: 88px;
}

.project-list--hidden {
  display: none;
}

.project-list__header {
  display: grid;
  grid-template-columns: 104px 104px 36px;
  column-gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}

.project-list__col {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
}

.project-list__col--year {
  text-align: right;
}

.project-list__items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Project item: flat text row (no pill) --- */
.project-item {
  display: grid;
  grid-template-columns: 104px 104px 36px;
  column-gap: 20px;
  align-items: center;
  width: fit-content;
  padding-right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.project-item__col {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.project-item__col--year {
  text-align: right;
}

/* Hover: primary color */
.project-item:hover .project-item__col {
  color: var(--color-text-primary);
}

/* Highlight: synced from grid hover - primary color */
.project-item--highlight .project-item__col {
  color: var(--color-text-primary);
}

/* Active (selected): primary color */
.project-item--active .project-item__col {
  color: var(--color-text-primary);
}


/* ==========================================================================
   ABOUT CONTENT
   ========================================================================== */

.about-content {
  flex: 1;
  padding-top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 100%;
  overflow-y: auto;
}

.about-content--hidden {
  display: none;
}

.about-text {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.about-links {
  display: flex;
  gap: 56px;
  padding-top: 40px;
}

.about-links__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: opacity var(--transition-fast);
}

.about-link:hover {
  opacity: 0.4;
}

.about-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.about-link span {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* Footer: hide icons on about page */
.footer--about-active .footer-icons {
  display: none;
}

.footer--about-active {
  justify-content: flex-start;
}

.footer--case-active .footer-copy {
  display: none;
}


/* ==========================================================================
   FOOTER (Icons)
   ========================================================================== */

.footer {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-icons {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-copy {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: -0.2px;
  color: var(--color-text-tertiary);
}

.footer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--color-text-primary);
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.footer-icon:hover {
  opacity: 0.4;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
}


/* ==========================================================================
   RIGHT PANEL
   ========================================================================== */

.panel-right {
  margin-left: var(--panel-left-width);
  position: relative;
  min-height: 100vh;
  padding: 16px 20px 16px 20px;
}

/* Panel transition overlay */
.panel-transition {
  position: fixed;
  top: 0;
  left: var(--panel-left-width);
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.25s ease-out;
}

.panel-transition--active {
  opacity: 1;
  pointer-events: auto;
}

/* Case content reveal animation */
.case-preview [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.case-preview--revealed [data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

.case-preview--revealed [data-reveal="1"] { transition-delay: 0s; }
.case-preview--revealed [data-reveal="2"] { transition-delay: 0.05s; }
.case-preview--revealed [data-reveal="3"] { transition-delay: 0.1s; }
.case-preview--revealed [data-reveal="4"] { transition-delay: 0.15s; }

@media (min-width: 1713px) {
  .panel-transition {
    left: calc((100vw - 1712px) / 2 + var(--panel-left-width));
    right: calc((100vw - 1712px) / 2);
  }
}


/* ==========================================================================
   WORK GRID GALLERY (Selected Work page)
   ========================================================================== */

.work-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  opacity: 1;
  transition: opacity var(--transition-slow);
}

.work-grid--hidden {
  display: none;
}

/* Inner row wrapper for side-by-side items */
.work-grid__row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.grid-item {
  display: block;
  overflow: hidden;
  width: 100%;
}

.grid-item--half {
  width: calc(50% - 4px);
  flex-shrink: 0;
}

.grid-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  transition: transform var(--transition-slow);
}

.grid-item:hover .grid-thumb img {
  transform: scale(1.02);
}

.grid-thumb__label {
  font-family: var(--font-primary);
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* When real images are added, use this */
.grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.grid-thumb__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% center;
  transform: scale(1.2);
  transform-origin: 20% center;
  display: block;
  pointer-events: none;
  transition: transform var(--transition-slow);
}

.grid-item:hover .grid-thumb__video {
  transform: scale(1.22);
}

/* Grid item hover overlay */
.grid-thumb__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.grid-item:hover .grid-thumb__overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Light text (default - for dark thumbs) */
.grid-thumb__meta {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: -0.3px;
  color: rgba(255, 255, 255, 0.7);
}

.grid-thumb__title {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: rgba(255, 255, 255, 0.9);
}

/* Gradient background variant (for busy/light images) */
[data-thumb="gradient"] .grid-thumb__overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

/* Dark text variant (for light thumbs, no gradient) */
[data-thumb="dark"] .grid-thumb__meta {
  color: rgba(0, 0, 0, 0.6);
}

[data-thumb="dark"] .grid-thumb__title {
  color: rgba(0, 0, 0, 0.85);
}

/* Gradient-light: light gradient + dark text (for bright images) */
[data-thumb="gradient-light"] .grid-thumb__overlay {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.7) 0%, transparent 100%);
}

[data-thumb="gradient-light"] .grid-thumb__meta {
  color: rgba(0, 0, 0, 0.6);
}

[data-thumb="gradient-light"] .grid-thumb__title {
  color: rgba(0, 0, 0, 0.85);
}


/* ==========================================================================
   ABOUT PANEL (About page - right side, empty)
   ========================================================================== */

.about-panel {
  position: fixed;
  top: 0;
  left: var(--panel-left-width);
  right: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 16px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.about-panel::-webkit-scrollbar {
  display: none;
}

.about-panel--hidden {
  display: none;
}

@media (min-width: 1713px) {
  .about-panel {
    left: calc((100vw - 1712px) / 2 + var(--panel-left-width));
    right: calc((100vw - 1712px) / 2);
  }
}


/* ==========================================================================
   CONTENT SCROLL (project details)
   ========================================================================== */

.content-scroll {
  position: fixed;
  top: 0;
  left: var(--panel-left-width);
  right: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 16px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  opacity: 1;
  transition: opacity var(--transition-slow);
  background: var(--color-bg);
  z-index: 50;
}

@media (min-width: 1713px) {
  .content-scroll {
    left: calc((100vw - 1712px) / 2 + var(--panel-left-width));
    right: calc((100vw - 1712px) / 2);
  }
}

.content-scroll::-webkit-scrollbar {
  display: none;
}

.content-scroll--hidden {
  opacity: 0;
  pointer-events: none;
}


/* ==========================================================================
   CASE CONTENT
   ========================================================================== */

.case-content {
  max-width: 37.5rem;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: var(--space-12);
}

.case-content--hidden {
  display: none;
}

.case-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 600;
  line-height: 2.0625rem;
  margin-bottom: var(--space-9);
}

.case-meta {
  margin-bottom: var(--space-9);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.meta-row {
  display: flex;
  gap: var(--space-6);
}

.meta-label {
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-tertiary);
  min-width: 5rem;
}

.meta-value {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.167;
  color: var(--color-text-primary);
}

.meta-link {
  color: var(--color-link);
  transition: opacity var(--transition-fast);
}

.meta-link:hover {
  opacity: 0.6;
}


/* ==========================================================================
   CASE DESCRIPTION & SECTIONS
   ========================================================================== */

.case-description {
  margin-bottom: var(--space-9);
}

.section-title {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.167;
  margin-bottom: var(--space-5);
}

.body-text {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.167;
  color: var(--color-text-primary);
}

.body-text-lg {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.167;
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
}

.body-text-lg:last-child {
  margin-bottom: 0;
}


/* ==========================================================================
   CASE IMAGES
   ========================================================================== */


/* ==========================================================================
   CASE PREVIEW (New Figma-based structure)
   ========================================================================== */

.case-preview {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.case-preview--hidden {
  display: none;
}

/* Hero large image at top */
.case-hero-large {
  width: 100%;
  padding-right: 12px;
  margin: 0;
}

.case-hero-large__image {
  width: 100%;
  height: auto;
  aspect-ratio: 952 / 489;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.case-hero-large__image img,
.case-hero-large__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Two-image row */
.case-hero-double {
  display: flex;
  gap: 8px;
  width: 100%;
  padding-right: 12px;
}

.case-hero-double__image {
  flex: 1;
  height: auto;
  aspect-ratio: 466 / 489;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.case-hero-double__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Phone frames inside hero doubles: img must respect phone size, not container */
.case-hero-double__image .bb-phone-frame img,
.case-hero-double__image .bb-hero-map__phone img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Title */
.case-headline {
  font-family: var(--font-primary);
  font-size: 50px;
  font-weight: 500;
  line-height: 56px;
  letter-spacing: -1.5px;
  color: var(--color-text-primary);
  padding-top: var(--sp-36);
  padding-right: var(--sp-160);
  margin: 0;
}

/* CTA buttons row */
.case-ctas {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-top: 16px;
}

.case-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 14px 6px 18px;
  background: transparent;
  border-radius: 39px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
  text-decoration: none;
  border: 1px solid var(--color-text-primary);
  transition: opacity var(--transition-fast);
  cursor: pointer;
}

.case-cta:hover {
  opacity: 0.6;
}

.case-cta--filled {
  background: var(--color-text-primary);
  color: var(--color-bg);
  border-color: transparent;
}

.case-cta--outline {
  background: transparent;
  border: 1px solid var(--color-text-primary);
  color: var(--color-text-primary);
}

.case-cta__icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-cta__icon svg {
  width: 14px;
  height: 14px;
}


/* ==========================================================================
   BUZZBIKE CASE — Custom Styles
   ========================================================================== */

/* Phone frame — used for mobile app screenshots */
.bb-phone-frame {
  overflow: hidden;
  border-radius: var(--radius-phone);
  flex-shrink: 0;
  width: 29.9%; /* 281/940 of gallery track */
  min-width: 160px;
}

.bb-phone-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Shadow type 1: soft elevated shadow (for phone mockups) */
.bb-phone-frame--shadow {
  box-shadow:
    0px 24px 40px 0px rgba(0, 0, 0, 0.06),
    0px 8px 48px 0px rgba(0, 0, 0, 0.06);
}

/* Large phone frame — for hero-style phone displays */
.bb-phone-frame--large {
  width: 80.5%; /* 375/466 of half-container */
  border-radius: var(--radius-phone-lg);
}

/* --- Hero section: photo + map --- */
.bb-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bb-hero-map {
  background: linear-gradient(180deg, #ff77a5 27.9%, #ff4074 102.3%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 28px 0;
}

.bb-hero-map__phone {
  height: 100%;
  aspect-ratio: 1059 / 2294;
  border-radius: var(--radius-phone);
  overflow: hidden;
  box-shadow:
    0px 24px 40px 0px rgba(0, 0, 0, 0.06),
    0px 8px 48px 0px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

/* --- Gradient backgrounds for image containers --- */
.bb-gradient-light {
  background: var(--gradient-img-container);
  position: relative;
  overflow: hidden;
}

.bb-gradient-teal {
  background: linear-gradient(0deg, #203435, #2f4a47);
  position: relative;
  overflow: hidden;
}

/* --- Onboarding screens pair --- */
.bb-hero-onboarding .case-hero-double__image {
  aspect-ratio: 466 / 489;
  padding: 0;
  position: relative;
}

.bb-hero-onboarding .case-hero-double__image img.bb-onboarding-phone {
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: calc(100% - 56px);
  object-fit: contain;
  border-radius: var(--radius-phone);
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.06),
    0px 8px 48px 0px rgba(19, 18, 18, 0.06);
}

/* Before/After comparison frame */
.bb-compare-frame {
  width: calc(100% - 12px);
  background: var(--gradient-img-container);
  padding: 48px 96px;
}

.bb-compare-frame .comparison-slider {
  border-radius: var(--radius-screenshot);
}

.bb-compare-frame .comparison-slider__before,
.bb-compare-frame .comparison-slider__after {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Horizontal scroll gallery (Ops app screens) --- */
.bb-gallery-scroll-wrap {
  position: relative;
  width: calc(100% - 12px);
}

.bb-gallery-scroll {
  width: 100%;
  display: flex;
  gap: var(--sp-56);
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--sp-48) var(--sp-64);
  background: var(--gradient-img-container);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bb-gallery-scroll::-webkit-scrollbar {
  display: none;
}

.bb-gallery-scroll__hint {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: #B2B2B2;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

.bb-gallery-scroll__phone {
  width: 281px;
  flex-shrink: 0;
  border-radius: var(--radius-phone);
  overflow: hidden;
}

.bb-gallery-scroll__phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* --- 2-column text sections (headline left, body right) --- */
.bb-section-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: var(--sp-36) 0;
  width: 100%;
}

.bb-section-2col--top-space {
  padding-top: var(--sp-112);
  padding-bottom: var(--sp-36);
}

.bb-section-2col--wide-space {
  padding-top: var(--sp-112);
  padding-bottom: var(--sp-36);
}

.bb-section-2col__headline {
  padding-right: var(--sp-72);
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

.bb-section-2col__body {
  padding-right: var(--sp-72);
}

.bb-section-2col__body p {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  margin: 0 0 24px 0;
}

.bb-section-2col__body p:last-child {
  margin-bottom: 0;
}

.bb-section-2col__body .case-label {
  margin-bottom: 0;
  font-weight: 500;
}

.bb-section-2col--no-sticky .bb-section-2col__headline {
  position: static;
}

/* Ops section: headline stops 144px before end of right column */
.bb-section-2col--ops .bb-section-2col__headline {
  padding-bottom: var(--sp-144);
}

/* Ops right column: narrower outer padding, inner text gets extra */
.bb-section-2col__body--ops {
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-36);
}

.bb-section-2col__body--ops .bb-section-2col__body-text {
  padding-right: var(--sp-44);
}

.bb-section-2col__body--ops .bb-section-2col__body-text p {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  margin: 0 0 24px 0;
}

.bb-section-2col__body--ops .bb-section-2col__body-text p:last-child {
  margin-bottom: 0;
}

/* Ops delivery phone inline inside right column */
.bb-ops-delivery-inline {
  background: var(--gradient-img-container);
  overflow: hidden;
  position: relative;
  aspect-ratio: 466 / 708;
}

.bb-ops-delivery-inline .bb-phone-frame {
  position: absolute;
  top: 11.3%; /* 80/708 */
  left: 10.3%; /* 48/466 */
  right: 10.3%;
  width: auto;
  min-width: 0;
  will-change: transform;
  border-radius: var(--radius-phone-lg);
}

/* --- Mechanic hero — photo left + teal gradient right --- */
.bb-hero-mechanic .case-hero-double__image {
  aspect-ratio: 466 / 600;
}

.bb-hero-mechanic-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bb-hero-mechanic .bb-gradient-teal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-mechanic-phone-wrap {
  position: relative;
}

.bb-mechanic-phone-wrap .bb-phone-frame {
  position: absolute;
  width: 60.3%; /* 281/466 */
  top: -16.9%; /* -101.5/600 */
  left: 50%;
  transform: translateX(-50%);
}


/* --- Image gallery (Conversion journeys section) --- */
.bb-image-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 12px;
}

/* --- Gallery frame: screenshot top-aligned, overflows bottom --- */
.bb-gallery-frame {
  width: 100%;
  background: var(--gradient-img-container);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5%; /* ~48/952 */
}

.bb-gallery-frame--489 {
  aspect-ratio: 952 / 489;
}

.bb-gallery-frame--612 {
  aspect-ratio: 940 / 612;
  padding: 5.1% 1.3%; /* 48px 12px at 940 ref */
  justify-content: center; /* center vertically too */
}

.bb-gallery-frame__screenshot {
  width: 78.5%; /* 747/952 */
  border-radius: var(--radius-screenshot);
  overflow: hidden;
  flex-shrink: 0;
}

.bb-gallery-frame--612 .bb-gallery-frame__screenshot {
  width: 79.6%; /* 748/940 */
}

.bb-gallery-frame__screenshot--shadow {
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.04),
    0px 8px 48px 0px rgba(19, 18, 18, 0.04);
}

.bb-gallery-frame__screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.bb-gallery-frame__screenshot--flat-bottom {
  border-radius: var(--radius-screenshot) var(--radius-screenshot) 0 0;
}

.bb-gallery-frame__screenshot--flat-bottom img {
  border-radius: var(--radius-screenshot) var(--radius-screenshot) 0 0;
}

/* --- Gallery pair: signup mobile + bike card side by side --- */
.bb-gallery-pair {
  width: 100%;
  aspect-ratio: 114 / 77; /* 952/643 */
  display: flex;
  gap: 8px;
  overflow: hidden;
}

.bb-gallery-pair__half {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

/* Left half: phone centered horizontally, top-aligned, clips at bottom */
.bb-gallery-pair__half:first-child {
  display: flex;
  padding-top: var(--sp-48);
  justify-content: center;
  align-items: flex-start;
}

.bb-gallery-pair__phone {
  width: 63.3%; /* 295/466 */
  border-radius: var(--radius-screenshot);
  overflow: hidden;
  flex-shrink: 0;
}

.bb-gallery-pair__phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* Right half: bike card anchored to bottom */
.bb-gallery-pair__half--bikecard img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
}

/* --- Booking screenshot (uses #ebebea, not gradient) --- */
.bb-booking-frame {
  padding-right: 12px;
  padding-top: var(--sp-36);
}

.bb-booking-frame__inner {
  background: #ebebea;
  padding: 5.1% 3.4%;
  overflow: hidden;
}

.bb-booking-frame__inner img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0px 24px 40px 0px rgba(19, 18, 18, 0.04);
}



/* Back to Projects section */
/* Scroll to top button */
.case-back__scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px 6px 18px;
  background: transparent;
  border: 1px solid var(--color-text-primary);
  border-radius: 39px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.case-back__scroll-btn:hover {
  opacity: 0.6;
}

/* Testimonial card - displayed inline in case-bottom */
.case-testimonial__card {
  position: relative;
  background: linear-gradient(135deg, #e8e4f7 0%, #d4f5e9 35%, #fdf2d9 70%, #fce4d6 100%);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 0px 20px 36px 0px rgba(0, 0, 0, 0.26);
  overflow: hidden;
  width: 100%;
}

.case-testimonial__bg {
  position: absolute;
  inset: -30px -30px -30px -30px;
  pointer-events: none;
  overflow: hidden;
}

.case-testimonial__bg-img {
  width: 180%;
  height: 180%;
  object-fit: cover;
  transform: rotate(90deg);
  position: absolute;
  left: -40%;
  top: -40%;
}

.case-testimonial__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
}

.case-testimonial__bracket {
  width: 48px;
  height: 48px;
  color: var(--color-text-primary);
}

.case-testimonial__linkedin {
  width: 32px;
  height: 32px;
  color: var(--color-text-primary);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  position: absolute;
  top: 16px;
  right: 0;
}

.case-testimonial__linkedin:hover {
  opacity: 1;
}

.case-testimonial__text {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
  margin: 0 0 24px 0;
  position: relative;
}

.case-testimonial__author {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
  margin: 0;
  position: relative;
}

/* ==========================================================================
   CLAY CASE — Custom Styles
   ========================================================================== */

/* Hero with screenshot inside dark frame */
.clay-hero-dark {
  background: #303031;
  padding: 28px 40px 0;
  align-items: flex-start;
  justify-content: flex-start;
}

.clay-hero-screenshot {
  width: 100%;
  border-radius: var(--radius-screenshot);
  overflow: hidden;
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.12),
    0px 8px 48px 0px rgba(19, 18, 18, 0.2);
}

.clay-hero-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Padded gallery frames */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 12px;
}

.gallery-frame {
  width: 100%;
  background: var(--gradient-img-container);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-48) 80px;
}

.gallery-frame--wide {
  padding-top: 28px;
  padding-bottom: 28px;
}

.gallery-frame__img {
  width: 100%;
  border-radius: var(--radius-screenshot);
  overflow: hidden;
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.04),
    0px 8px 48px 0px rgba(19, 18, 18, 0.04);
}

.gallery-frame__img img {
  display: block;
  width: 100%;
  height: auto;
}

/* DSX UI pair: phone left + screenshot right */
.clay-dsx-pair {
  display: flex;
  gap: 8px;
  width: 100%;
  height: 489px;
}

.clay-dsx-pair__half {
  flex: 1;
  background: var(--gradient-img-container);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
  min-width: 0;
}

.clay-dsx-pair__phone {
  height: 100%;
  border-radius: var(--radius-screenshot);
  overflow: hidden;
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.06),
    0px 8px 48px 0px rgba(19, 18, 18, 0.06);
}

.clay-dsx-pair__phone img {
  display: block;
  height: 100%;
  width: auto;
}

.clay-dsx-pair__screenshots {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  width: auto;
  align-items: center;
  justify-content: center;
}

.clay-dsx-pair__screenshots img {
  display: block;
  max-height: 100%;
  width: auto;
  border-radius: var(--radius-screenshot);
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.06),
    0px 8px 48px 0px rgba(19, 18, 18, 0.06);
}

/* "Discontinued" label */
.clay-label-muted {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-secondary);
  margin: 16px 0 0;
}

/* DSX body spacing (matches Figma: 12px outer gap, 24px para gap, 4px list gap) */
.clay-dsx-text p {
  margin: 0;
}

.clay-dsx-text p + p {
  margin-top: 24px;
}

.clay-dsx-list {
  margin-top: 12px;
}

.clay-dsx-list li {
  margin-bottom: 4px;
}

.clay-dsx-list li:last-child {
  margin-bottom: 0;
}

.clay-dsx-result {
  margin-top: 24px;
}

.clay-dsx-result p {
  margin: 0;
}

/* --- Comparison Slider --- */
.comparison-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-screenshot);
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.04),
    0px 8px 48px 0px rgba(19, 18, 18, 0.04);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.comparison-slider__before {
  display: block;
  width: 100%;
  height: auto;
}

.comparison-slider__after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 0 0 50%);
}

.comparison-slider__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #5f20ff;
  z-index: 2;
  pointer-events: none;
}

.comparison-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5f20ff;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.comparison-slider__handle svg {
  width: 20px;
  height: 20px;
}


/* ==========================================================================
   WERT CASE — Custom Styles
   ========================================================================== */

/* Wert hero pair: video + account preview */
.wert-hero-pair__frame {
  background: var(--gradient-img-container);
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

.wert-hero-pair__frame video,
.wert-hero-pair__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wert-hero-pair__frame--account {
  background-color: #E4E2EE;
}

/* Widget Transition Demo */
.wert-widget-demo {
  width: 100%;
  padding-right: 12px;
}

.wert-widget-demo__stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wert-widget-demo__tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #f2f2f2;
  border-radius: 100px;
  padding: 2px;
}

.wert-widget-demo__indicator {
  position: absolute;
  top: 2px;
  height: 26px;
  background: #131212;
  border-radius: 16px;
  transition: left 0.45s cubic-bezier(0.4, 0, 0.2, 1), width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.wert-widget-demo__progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 16px;
}

.wert-widget-demo__tab {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: -0.3px;
  color: #131212;
  padding: 3px 14px 4px;
  border-radius: 39px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.35s ease;
  white-space: nowrap;
}

.wert-widget-demo__tab--active {
  color: #fdfdfd;
}

.wert-widget-demo__bg {
  position: absolute;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: 93.2%;
  bottom: 24px;
  background: #f8f8f8;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow: hidden;
}

.wert-widget-demo__bg--visible {
  opacity: 1;
}

.wert-widget-demo__close {
  position: absolute;
  top: 98px;
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, left 0.55s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
  z-index: 5;
}

.wert-widget-demo__close--visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.wert-widget-demo__card {
  position: absolute;
  top: 98px;
  left: 50%;
  width: 300px;
  height: 476px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  transform: translateX(-50%);
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1), height 0.55s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.45s ease, transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
  box-shadow: 0 24px 40px rgba(19,18,18,0.06), 0 8px 48px rgba(19,18,18,0.06);
}

.wert-widget-demo__header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  position: relative;
  z-index: 2;
  transition: padding 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wert-widget-demo__title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05px;
  color: #131212;
  flex: 1;
  font-feature-settings: 'liga' 0, 'lnum' 1, 'tnum' 1;
}

.wert-widget-demo__icons {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.wert-widget-demo__fields {
  position: relative;
  padding: 0 18px;
  height: 150px;
  transition: height 0.55s cubic-bezier(0.4, 0, 0.2, 1), padding 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wert-widget-demo__field {
  position: absolute;
  left: 18px;
  right: 18px;
  transition: top 0.55s cubic-bezier(0.4, 0, 0.2, 1), left 0.55s cubic-bezier(0.4, 0, 0.2, 1), right 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wert-widget-demo__field--pay {
  top: 0;
}

.wert-widget-demo__field--get {
  top: 72px;
}

.wert-widget-demo__field--get-fade {
  transition: opacity 0.14s ease;
  opacity: 0;
}

.wert-widget-demo__field--get-show {
  transition: opacity 0.22s ease 0.08s;
  opacity: 1;
}

.wert-widget-demo__field-label {
  font-size: 12px;
  font-weight: 400;
  color: #8f8f8f;
  line-height: 14px;
}

.wert-widget-demo__field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
  padding-bottom: 10px;
  border-bottom: 0.8px solid #b2b2b2;
}

.wert-widget-demo__field-value {
  font-size: 20px;
  font-weight: 500;
  color: #131212;
  letter-spacing: -0.08px;
  font-feature-settings: 'liga' 0, 'lnum' 1, 'tnum' 1;
}

.wert-widget-demo__field-currency {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 14px;
  font-weight: 500;
  color: #131212;
}

.wert-widget-demo__details {
  padding: 6px 18px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: padding 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wert-widget-demo__dots {
  display: flex;
  gap: 2px;
}

.wert-widget-demo__dots span {
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: #8f8f8f;
}

.wert-widget-demo__details-text {
  font-size: 13px;
  font-weight: 500;
  color: #8f8f8f;
}

.wert-widget-demo__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 76px;
  padding: 0 18px 18px;
  transition: padding 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wert-widget-demo__visa {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  bottom: 66px;
  left: 18px;
  transition: bottom 0.55s cubic-bezier(0.4, 0, 0.2, 1), left 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.wert-widget-demo__visa img {
  height: 27px;
  width: auto;
  object-fit: contain;
}

.wert-widget-demo__visa span {
  font-size: 12px;
  font-weight: 400;
  color: #8f8f8f;
  white-space: nowrap;
}

.wert-widget-demo__btn {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  background: #131212;
  color: #fdfdfd;
  border-radius: 100px;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  box-shadow: 0 3px 9px rgba(22,29,37,0.15);
  transition: right 0.55s cubic-bezier(0.4, 0, 0.2, 1), left 0.55s cubic-bezier(0.4, 0, 0.2, 1), bottom 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}


#support-tools {
  padding-top: 112px;
  padding-bottom: 36px;
}

#kyc-flow {
  padding-top: 112px;
  padding-bottom: 36px;
}

#shipping-speed {
  padding-top: 112px;
  padding-bottom: 36px;
}

/* Wert statement block — centered closing text */
.wert-statement {
  width: 100%;
  padding: var(--sp-64) 120px 36px;
  padding-right: calc(120px + 12px);
}

.wert-statement__text {
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 400;
  line-height: 35px;
  letter-spacing: -0.5px;
  text-align: center;
  margin: 0;
}

/* Wert quote wrapper — centered testimonial */
.wert-quote-wrap {
  width: 100%;
  padding: var(--sp-64) 120px var(--sp-64);
  padding-right: calc(120px + 12px);
}

/* Wert dark testimonial card */
.wert-testimonial--dark {
  background: linear-gradient(90deg, rgba(95, 32, 255, 0.15) 0%, rgba(95, 32, 255, 0.15) 100%), #131212;
}

.wert-testimonial--dark .case-testimonial__bracket,
.wert-testimonial--dark .case-testimonial__linkedin,
.wert-testimonial--dark .case-testimonial__text,
.wert-testimonial--dark .case-testimonial__author {
  color: #fdfdfd;
}


/* Dashboard screenshot: top padding, no sides, image overflows bottom */
.wert-dashboard-frame {
  width: 100%;
  padding-right: 12px;
}

.wert-dashboard-frame__screenshot {
  width: 100%;
  background: var(--gradient-img-container);
  overflow: hidden;
  aspect-ratio: 952 / 490;
  padding: 48px 75px 0;
}

.wert-dashboard-frame__screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px 16px 0 0;
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.04),
    0px 8px 48px 0px rgba(19, 18, 18, 0.04);
}


/* Wert 2023: inline CTA inside grid body */
.case-ctas--inline {
  padding-top: 8px;
}

/* Wert 2023: flow video — hug content, no crop */
.wert-2023-flow-wrap {
  aspect-ratio: unset;
  height: auto;
  background: var(--gradient-img-container);
}

.wert-2023-flow-wrap video {
  height: auto;
  object-fit: contain;
}

/* Full-width 1px divider */
.case-divider {
  width: 100%;
  height: 1px;
  background: var(--color-surface-blend, #f2f2f2);
}


/* ==========================================================================
   TEXET CASE — Custom Styles
   ========================================================================== */

/* Stats row */
.texet-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.texet-stats__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 32px;
}

.texet-stats__number {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 50px;
  line-height: 56px;
  letter-spacing: -1.5px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 2px;
}

.texet-stats__label {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
}

.texet-star {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Strategy section */
.texet-strategy-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.texet-strategy-block p {
  margin: 0;
}

/* Device specification links */
.texet-device-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.texet-device-links a {
  font-family: var(--font-primary);
  font-size: 18px;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  text-decoration: underline;
  padding-bottom: 12px;
}

.texet-device-links a:last-child {
  padding-bottom: 0;
}

.texet-device-links a:hover {
  opacity: 0.7;
}

.texet-device-links__hidden {
  display: none;
  flex-direction: column;
  gap: 0;
}

.texet-device-links__hidden.is-open {
  display: flex;
}

.texet-device-links__hidden a {
  padding-bottom: 12px;
}

.texet-device-links__hidden a:last-child {
  padding-bottom: 0;
}

.texet-device-links__toggle {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.2px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  padding: 12px 0 0;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
}

.texet-device-links__toggle:hover {
  color: var(--color-text-primary);
}

.texet-strategy-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.texet-strategy-list > p {
  margin: 0;
}

.texet-numbered-list {
  list-style: decimal;
  padding-left: 27px;
  margin: 0;
  font-family: var(--font-primary);
  font-size: 18px;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.texet-numbered-list > li > .case-list {
  margin-top: 12px;
}

.texet-numbered-list .case-list li {
  margin-bottom: 4px;
}

.texet-numbered-list .case-list li:last-child {
  margin-bottom: 0;
}

/* Phone pair (packaging images) */
.texet-phone-pair {
  display: flex;
  gap: 8px;
  width: 100%;
  aspect-ratio: 940 / 489;
  padding-right: 12px;
  overflow: hidden;
}

.texet-phone-pair__half {
  flex: 1;
  background: var(--gradient-img-container);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
  min-width: 0;
  min-height: 0;
}

.texet-phone-pair__phone {
  max-height: 100%;
  aspect-ratio: 109 / 138;
  border-radius: 26px;
  overflow: hidden;
  box-shadow:
    0px 24px 40px 0px rgba(19, 18, 18, 0.06),
    0px 8px 48px 0px rgba(19, 18, 18, 0.06);
}

.texet-phone-pair__phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* No top padding on Texet offset block */
[data-content="texet"] .case-grid--offset {
  padding-top: 0;
  padding-bottom: var(--sp-80);
}


/* 3-Column Grid System for Cases */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: var(--sp-64) 0 var(--sp-80);
}

/* Main content area - spans columns 1-2 */
.case-grid__main {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: var(--sp-72);
}

/* Info column - column 3 */
.case-grid__info {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 8px;
}

/* Stats row */
.case-stats {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.case-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 32px;
}

.case-stat__number {
  font-family: var(--font-primary);
  font-size: 50px;
  font-weight: 500;
  line-height: 56px;
  letter-spacing: -1.5px;
  color: var(--color-text-primary);
}

.case-stat__number-star {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.case-stat__number-star svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  top: -2px;
}

.case-stat__label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
}

/* Intro paragraph */
.case-intro {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
}

/* Body text */
.case-body-text {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  margin: 0;
}

/* Accent text */
.case-accent {
  color: var(--color-accent);
}

/* Info list */
.case-info-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-info-list__item {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 21px;
  letter-spacing: -0.1px;
  color: var(--color-text-primary);
}

/* Offset text block - col 1 empty, text spans cols 2-3 */
.case-grid--offset {
  padding: 12px 0 var(--sp-64) 0;
}

[data-content="clay"] .case-grid--offset {
  padding-top: 0;
}

.case-grid--final {
  padding: var(--sp-64) 0;
}

.case-grid__spacer {
  grid-column: 1;
}

.case-grid__offset-text {
  grid-column: 2 / 4;
  padding-right: var(--sp-56);
}

.case-grid__offset-text p {
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 400;
  line-height: 35px;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
}

/* Text color helpers */
.text-primary {
  color: var(--color-text-primary);
}

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

.text-accent {
  color: #ff4074;
}

/* Impact section - spans all 3 columns */
.case-grid--impact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px 8px;
  padding: var(--sp-64) var(--sp-56) var(--sp-64) 0;
}

.case-impact__title {
  grid-column: 1 / 4;
  grid-row: 1;
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 400;
  line-height: 35px;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
}

.case-impact__list {
  grid-column: 1 / 4;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-impact__item {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
  text-decoration: none;
  display: block;
  transition: opacity var(--transition-fast);
}

.case-impact__item:hover {
  opacity: 0.6;
}

.case-impact__footnote {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
  letter-spacing: -0.3px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Section grid - body in cols 1-2, metric in col 3 */
.case-grid--section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: var(--sp-36) 0 var(--sp-64) 0;
}

.case-grid--section-top {
  padding-top: var(--sp-80);
  padding-bottom: var(--sp-36);
}

.case-grid__body {
  grid-column: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-right: var(--sp-72);
}

.case-grid__body > p:not(.case-subheading) {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  margin: 0 0 24px 0;
}

.case-grid__body > p:not(.case-subheading):last-child {
  margin-bottom: 0;
}

/* Paragraph styles within section blocks */
.case-section-block p:not(.case-label) {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
}

/* Section blocks - groups label + text with proper spacing */
.case-section-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-section-block + .case-section-block {
  margin-top: 24px;
}

.case-section-block p {
  margin: 0;
}

/* Space between consecutive body paragraphs, but not after label */
.case-section-block p:not(.case-label) + p:not(.case-label) {
  margin-top: 24px;
}

.case-section-block__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-section-block__text p {
  margin: 0;
}

/* Section labels (Problem, What I did, Impact) */
.case-label {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  margin: 0;
}

/* Bullet lists */
.case-list {
  list-style: disc;
  margin: 12px 0 0 0;
  padding-left: 27px;
}

.case-list li {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.case-list li:last-child {
  margin-bottom: 0;
}

.case-list li strong {
  font-weight: 600;
}

/* List gap variants */
.case-list--spaced li {
  margin-bottom: 12px;
}

.case-list--spaced li:last-child {
  margin-bottom: 0;
}

.case-list--tight li {
  margin-bottom: 4px;
}

/* Simplified flow layout — single text block with paragraph spacing */
.case-flow > * {
  margin-top: 0;
  margin-bottom: 0;
}

.case-flow .case-body-text {
  margin-bottom: 20px;
}

.case-flow .case-subheading {
  margin-bottom: 12px;
}

.case-flow .case-subheading + .case-body-text {
  margin-top: 8px;
}

.case-body-text strong {
  font-weight: 600;
}

.case-grid__body > p strong {
  font-weight: 600;
}

.case-flow .case-list {
  margin-top: 0;
  margin-bottom: 20px;
}

.case-flow .case-list:last-child {
  margin-bottom: 0;
}

/* Subheading within flow */
.case-subheading {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 600;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
}

/* Metric column */
.case-grid__metric {
  grid-column: 3;
  padding-right: var(--sp-40);
  padding-bottom: var(--sp-144);
  position: sticky;
  top: 16px;
  align-self: flex-start;
}

/* Disable sticky effect for small sections */
.case-grid--no-sticky .case-grid__metric {
  position: static;
  padding-bottom: 0;
}

.case-metric {
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 400;
  line-height: 33px;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
}

.case-metric-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-metric-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-metric-sub {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 400;
  line-height: 30px;
  letter-spacing: -0.5px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Inline link within body text */
.case-link {
  color: #5f20ff;
  text-decoration: none;
}

.case-link:hover {
  text-decoration: underline;
}

/* Bottom section - col 1 CTA, cols 2-3 testimonial */
.case-grid--bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: var(--sp-64);
  padding-right: 12px;
}

.case-grid__cta {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.case-grid__quote {
  grid-column: 2 / 4;
}

/* Responsive adjustments for case preview */
@media (max-width: 1364px) {
  .case-headline {
    font-size: 44px;
    line-height: 48px;
    padding-right: 80px;
  }
  
  /* Grid padding adjustments */
  .case-grid__main,
  .case-grid__body {
    padding-right: 56px;
  }
  
  .case-grid__metric {
    padding-right: 32px;
  }
  
  .case-grid__offset-text {
    padding-right: 48px;
  }
  
  .case-stat__number {
    font-size: 44px;
    line-height: 50px;
  }
  
  .case-intro {
    font-size: 20px;
    line-height: 28px;
  }
  
  .case-body-text,
  .case-grid__body > p:not(.case-subheading),
  .case-section-block p:not(.case-label) {
    font-size: 17px;
    line-height: 24px;
  }
  
  .case-label {
    font-size: 17px;
    line-height: 24px;
  }
  
  .case-impact__title {
    font-size: 28px;
    line-height: 32px;
  }
  
  .case-subheading {
    font-size: 20px;
    line-height: 28px;
  }
  
  .case-impact__item {
    font-size: 20px;
    line-height: 28px;
  }
  
  .case-grid__offset-text p {
    font-size: 28px;
    line-height: 32px;
  }
  
  .case-metric {
    font-size: 24px;
    line-height: 30px;
  }
  
  .case-metric-sub {
    font-size: 20px;
    line-height: 26px;
  }
  
  .case-list li {
    font-size: 17px;
    line-height: 24px;
  }
  
  .case-section-block p:not(.case-label) + p:not(.case-label) {
    margin-top: 20px;
  }
  
  .case-testimonial__card {
    width: 100%;
  }

  /* --- Shared 18px text elements — scale to 17px --- */
  .bb-section-2col__body p {
    font-size: 17px;
    line-height: 24px;
  }

  .texet-numbered-list {
    font-size: 17px;
    line-height: 24px;
  }

  .texet-device-links a {
    font-size: 17px;
    line-height: 24px;
  }

  /* --- Panel left — compact desktop --- */
  html {
    font-size: 14px;
  }

  :root {
    --panel-left-width: 440px;
  }

  .panel-left {
    padding: 32px 28px 16px 18px;
  }

  .intro-phrase {
    font-size: 28px;
    line-height: 31px;
  }

  .nav-row {
    margin-top: 21px;
  }

  .about-content {
    padding-top: 4.5rem;
  }
}

@media (max-width: 1279px) {
  .case-headline {
    font-size: 40px;
    line-height: 44px;
  }
  
  .case-cta {
    font-size: 14px;
    line-height: 19px;
    padding: 4px 12px 5px 16px;
  }
  
  /* Grid padding adjustments */
  .case-grid__main,
  .case-grid__body {
    padding-right: 40px;
  }
  
  .case-grid__metric {
    padding-right: 24px;
  }
  
  .case-grid__offset-text {
    padding-right: 40px;
  }
  
  .case-stat {
    padding-right: 24px;
  }
  
  .case-stat__number {
    font-size: 40px;
    line-height: 46px;
  }
  
  .case-stat__label,
  .case-info-list__item {
    font-size: 14px;
    line-height: 19px;
  }
  
  .case-intro {
    font-size: 18px;
    line-height: 26px;
  }
  
  .case-body-text,
  .case-grid__body > p:not(.case-subheading),
  .case-section-block p:not(.case-label) {
    font-size: 16px;
    line-height: 22px;
  }
  
  .case-label {
    font-size: 16px;
    line-height: 22px;
  }
  
  .case-impact__footnote {
    font-size: 12px;
    line-height: 17px;
  }
  
  .case-grid__offset-text p {
    font-size: 24px;
    line-height: 28px;
  }
  
  .case-subheading {
    font-size: 19px;
    line-height: 26px;
  }
  
  .case-metric {
    font-size: 22px;
    line-height: 28px;
  }
  
  .case-metric-sub {
    font-size: 19px;
    line-height: 26px;
  }
  
  .case-list li {
    font-size: 16px;
    line-height: 22px;
  }
  
  .case-section-block p:not(.case-label) + p:not(.case-label) {
    margin-top: 18px;
  }
  
  .case-section-block + .case-section-block {
    margin-top: 20px;
  }
  
  .case-testimonial__text {
    font-size: 15px;
    line-height: 20px;
  }
  
  .case-testimonial__author {
    font-size: 15px;
    line-height: 20px;
  }

  /* --- Shared 18px text elements — scale to 16px --- */
  .bb-section-2col__body p {
    font-size: 16px;
    line-height: 22px;
  }

  .texet-numbered-list {
    font-size: 16px;
    line-height: 22px;
  }

  .texet-device-links a {
    font-size: 16px;
    line-height: 22px;
  }

  /* --- Gallery frame — reduce horizontal padding --- */
  .gallery-frame {
    padding-left: 60px;
    padding-right: 60px;
  }

  .bb-compare-frame {
    padding: 36px 72px;
  }

  /* --- Panel left — further decrease --- */
  html {
    font-size: 13px;
  }

  :root {
    --panel-left-width: 360px;
  }

  .panel-left {
    padding: 28px 24px 14px 16px;
  }

  .intro-phrase {
    font-size: 26px;
    line-height: 29px;
  }

  .about-content {
    padding-top: 4rem;
  }

  /* Lock nav pill sizing to 1280–1364px values (14px base) */
  .nav-pill {
    font-size: 12.25px;
    padding: 2px 10.5px 4px;
  }

  /* Lock project list sizing to 1280–1364px values (14px base) */
  .project-list {
    margin-bottom: 87.5px;
  }

  .project-list__header {
    grid-template-columns: 91px 91px 31.5px;
    column-gap: 17.5px;
    margin-bottom: 28px;
  }

  .project-list__col {
    font-size: 14px;
    line-height: 16.625px;
  }

  .project-list__items {
    gap: 7px;
  }

  .project-item {
    grid-template-columns: 91px 91px 31.5px;
    column-gap: 17.5px;
    padding-right: 14px;
  }

  .project-item__col {
    font-size: 14px;
    line-height: 23.625px;
  }

  .wert-statement {
    padding: var(--sp-64) 80px;
    padding-right: calc(80px + 12px);
  }

  .wert-quote-wrap {
    padding: 0 80px var(--sp-64);
    padding-right: calc(80px + 12px);
  }
}

@media (max-width: 900px) {
  /* Collapse 3-column grid to single column */
  .case-grid,
  .case-grid--offset,
  .case-grid--impact,
  .case-grid--section,
  .case-grid--bottom {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  
  .case-grid__main,
  .case-grid__info,
  .case-grid__body,
  .case-grid__metric,
  .case-grid__spacer,
  .case-grid__offset-text,
  .case-grid__cta,
  .case-grid__quote,
  .case-impact__title,
  .case-impact__list {
    grid-column: unset;
  }
  
  .case-grid__main,
  .case-grid__body,
  .case-grid__offset-text {
    padding-right: 0;
  }
  
  .case-grid__spacer {
    display: none;
  }
  
  .case-grid__info {
    padding-top: 0;
  }
  
  .case-grid__metric {
    padding-right: 0;
    position: relative;
    top: 0;
    order: -1;
  }
  
  .case-grid--impact {
    padding-right: 0;
  }
  
  .case-headline {
    padding-right: 0;
  }
  
  .case-hero-large {
    padding-right: 0;
  }

  .wert-dashboard-frame {
    padding-right: 0;
  }

  .wert-dashboard-frame__screenshot {
    padding: 32px 40px 0;
  }

  .wert-widget-demo {
    padding-right: 0;
  }

  .wert-statement {
    padding: var(--sp-48) 48px;
  }

  .wert-statement__text {
    font-size: 24px;
    line-height: 28px;
  }

  .wert-quote-wrap {
    padding: 0 48px var(--sp-48);
  }
  
  .case-hero-double {
    padding-right: 0;
    flex-direction: column;
    gap: 8px;
  }
  
  .case-testimonial__card {
    width: 100%;
  }

  /* --- BB 2-column sections → stack --- */
  .bb-section-2col {
    grid-template-columns: 1fr;
  }

  .bb-section-2col__headline {
    position: static;
    padding-right: 0;
    padding-bottom: 0;
  }

  .bb-section-2col--ops .bb-section-2col__headline {
    padding-bottom: 0;
  }

  .bb-section-2col__body {
    padding-right: 0;
  }

  .bb-section-2col__body--ops {
    padding-right: 0;
  }

  .bb-section-2col__body--ops .bb-section-2col__body-text {
    padding-right: 0;
  }

  /* --- BB gallery scroll — adjust for narrow screens --- */
  .bb-gallery-scroll-wrap {
    width: 100%;
  }

  .bb-gallery-scroll__phone {
    width: 220px;
  }

  /* --- BB image gallery — full width --- */
  .bb-image-gallery {
    padding-right: 0;
  }

  .bb-compare-frame {
    padding: 24px 48px;
    width: 100%;
  }

  /* --- BB gallery pair — stack vertically --- */
  .bb-gallery-pair {
    flex-direction: column;
    aspect-ratio: auto;
    height: auto;
  }

  .bb-gallery-pair__half {
    height: auto;
    aspect-ratio: 466 / 400;
  }

  .bb-gallery-pair__half--bikecard img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: auto;
    height: 100%;
    max-width: 100%;
  }

  /* --- BB mechanic hero — taller aspect in stacked view --- */
  .bb-hero-mechanic .case-hero-double__image {
    aspect-ratio: auto;
    min-height: 300px;
  }

  .bb-mechanic-phone-wrap .bb-phone-frame {
    position: relative;
    width: 55%;
    top: auto;
    left: auto;
    transform: none;
    margin: 40px auto;
  }

  /* --- BB booking — full width --- */
  .bb-booking-frame {
    padding-right: 0;
  }

  /* --- Case grid bottom — stack CTA + testimonial --- */
  .case-grid--bottom {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-right: 0;
  }

  .case-grid__cta {
    grid-column: unset;
  }

  .case-grid__quote {
    grid-column: unset;
  }

  /* --- Hero images — full bleed --- */

  /* Stacked hero halves — shorter aspect ratio */
  .case-hero-double__image {
    flex: none;
    aspect-ratio: 466 / 360;
  }

  /* Onboarding phones — keep proportional in stacked view */
  .bb-hero-onboarding .case-hero-double__image {
    aspect-ratio: 466 / 420;
  }

  /* Map phone — use width-based sizing when stacked */
  .bb-hero-map__phone {
    height: auto;
    width: 35%;
  }

  /* --- Metric text — scale down --- */
  .case-metric {
    font-size: 22px;
    line-height: 28px;
  }

  /* --- Metric padding reset in stacked layout --- */
  .case-grid__metric {
    padding-bottom: 0;
  }

  .case-grid--no-sticky .case-grid__metric {
    padding-bottom: 0;
  }

  /* --- Offset text — scale down slightly --- */
  .case-grid__offset-text p {
    font-size: 26px;
    line-height: 30px;
  }

  /* --- Impact title — scale down --- */
  .case-impact__title {
    font-size: 26px;
    line-height: 30px;
  }

  /* --- Clay gallery — full width, reduce padding --- */
  .gallery {
    padding-right: 0;
  }

  .gallery-frame {
    padding-left: 40px;
    padding-right: 40px;
  }

  .clay-hero-dark {
    padding: 20px 24px 0;
  }

  /* --- Clay DSX pair — stack vertically --- */
  .clay-dsx-pair {
    flex-direction: column;
    height: auto;
  }

  .clay-dsx-pair__half {
    height: 360px;
    padding: 24px;
  }

  .clay-dsx-pair__phone img {
    height: 100%;
    width: auto;
  }

  .clay-dsx-pair__screenshots {
    max-height: 100%;
  }

  /* --- Texet stats — scale down --- */
  .texet-stats__number {
    font-size: 36px;
    line-height: 42px;
    letter-spacing: -1px;
  }

  .texet-stats__item {
    padding-right: 16px;
  }

  /* --- Texet phone pair — stack --- */
  .texet-phone-pair {
    flex-direction: column;
    aspect-ratio: auto;
    padding-right: 0;
  }

  .texet-phone-pair__half {
    aspect-ratio: 466 / 360;
  }

  /* --- Content scroll — match main page margins --- */
  .case-active-tablet .content-scroll {
    padding-left: 24px;
    padding-right: 24px;
  }

  .case-active-tablet .mobile-nav {
    margin-left: -24px;
    margin-right: -24px;
  }
}

@media (max-width: 768px) {
  .case-headline {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -1px;
  }
  
  .case-stats {
    flex-direction: column;
    gap: 24px;
  }
  
  .case-stat {
    padding-right: 0;
  }
  
  .case-stat__number {
    font-size: 36px;
    line-height: 42px;
  }
  
  .case-intro {
    font-size: 18px;
    line-height: 26px;
  }
  
  .case-impact__item {
    font-size: 18px;
    line-height: 26px;
  }
  
  .case-grid__offset-text p {
    font-size: 22px;
    line-height: 26px;
  }
  
  .case-subheading {
    font-size: 18px;
    line-height: 26px;
  }
  
  .case-metric {
    font-size: 20px;
    line-height: 26px;
  }
  
  .case-metric-sub {
    font-size: 18px;
    line-height: 24px;
  }
  
  .case-testimonial__text {
    font-size: 14px;
    line-height: 19px;
  }
  
  .case-testimonial__author {
    font-size: 14px;
    line-height: 19px;
  }
  
  .case-testimonial__card {
    padding: 24px 20px;
  }
  
  .case-testimonial__bracket {
    width: 40px;
    height: 40px;
  }

  /* --- BB gallery scroll — compact for mobile --- */
  .bb-gallery-scroll {
    padding: 32px 24px;
    gap: 24px;
  }

  .bb-gallery-scroll__phone {
    width: 180px;
  }

  .bb-gallery-scroll__hint {
    font-size: 14px;
    top: 10px;
    left: 12px;
  }

  /* --- BB gallery pair — tighter on mobile --- */
  .bb-gallery-pair__half {
    aspect-ratio: 466 / 340;
  }

  .bb-gallery-pair__phone {
    width: 55%;
  }

  /* --- BB section body text — scale --- */
  .bb-section-2col__body p,
  .bb-section-2col__body--ops .bb-section-2col__body-text p {
    font-size: 16px;
    line-height: 24px;
  }

  /* --- BB mechanic — smaller phone --- */
  .bb-mechanic-phone-wrap .bb-phone-frame {
    width: 60%;
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .bb-hero-mechanic .case-hero-double__image {
    min-height: 240px;
  }

  /* --- BB gallery frames — wider screenshot on mobile --- */
  .bb-gallery-frame__screenshot {
    width: 88%;
  }

  .bb-gallery-frame--612 .bb-gallery-frame__screenshot {
    width: 90%;
  }

  .bb-compare-frame {
    padding: 16px 24px;
  }

  /* --- Case body text — scale --- */
  .case-body-text {
    font-size: 16px;
    line-height: 24px;
  }

  .case-grid__body > p:not(.case-subheading) {
    font-size: 16px;
    line-height: 24px;
  }

  .case-section-block p:not(.case-label) {
    font-size: 16px;
    line-height: 24px;
  }

  .case-list li {
    font-size: 16px;
    line-height: 24px;
  }

  .case-label {
    font-size: 16px;
    line-height: 24px;
  }

  .case-info-list__item {
    font-size: 14px;
    line-height: 19px;
  }

  .case-stat__label {
    font-size: 14px;
    line-height: 19px;
  }

  /* --- Impact title — further scale --- */
  .case-impact__title {
    font-size: 22px;
    line-height: 26px;
  }

  .case-impact__item {
    font-size: 16px;
    line-height: 24px;
  }

  /* --- CTA button — scale --- */
  .case-cta {
    font-size: 14px;
    line-height: 19px;
    padding: 5px 12px 6px 16px;
  }

  /* --- Clay gallery — tighter padding on mobile --- */
  .gallery-frame {
    padding-left: 24px;
    padding-right: 24px;
  }

  .gallery-frame--wide {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .clay-hero-dark {
    padding: 16px 16px 0;
  }

  .clay-dsx-pair__half {
    height: 300px;
    padding: 20px;
  }

  .clay-label-muted {
    font-size: 14px;
    line-height: 19px;
  }

  /* --- Comparison slider handle — smaller on mobile --- */
  .comparison-slider__handle {
    width: 32px;
    height: 32px;
  }

  .comparison-slider__handle svg {
    width: 16px;
    height: 16px;
  }

  /* --- Texet stats — stack on small mobile --- */
  .texet-stats {
    flex-direction: column;
    gap: 16px;
  }

  .texet-stats__item {
    padding-right: 0;
  }

  .texet-stats__number {
    font-size: 32px;
    line-height: 38px;
  }

  .texet-stats__label {
    font-size: 14px;
    line-height: 19px;
  }

  .texet-numbered-list {
    font-size: 16px;
    line-height: 24px;
  }

  .texet-phone-pair__half {
    aspect-ratio: 466 / 300;
    padding: 20px 0;
  }

  .texet-device-links a {
    font-size: 14px;
    line-height: 22px;
    padding-bottom: 8px;
  }

  /* --- Content scroll — tighter padding --- */
  .case-active-tablet .content-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }

  .case-active-tablet .mobile-nav {
    margin-left: -16px;
    margin-right: -16px;
  }

  .wert-statement {
    padding: var(--sp-40) 16px;
  }

  .wert-statement__text {
    font-size: 20px;
    line-height: 24px;
  }

  .wert-quote-wrap {
    padding: 0 16px var(--sp-40);
  }

  .wert-dashboard-frame__screenshot {
    padding: 24px 24px 0;
  }
}

/* Large screens - scale up */



/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.u-hidden { display: none !important; }
.u-visible { display: block !important; }


/* ==========================================================================
   MOBILE NAV (Case view ≤1023px)
   ========================================================================== */

.mobile-nav {
  display: none;
}

.mobile-nav__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-nav__tabs {
  display: flex;
  align-items: center;
  background: var(--color-surface-blend, #f2f2f2);
  border-radius: 100px;
  padding: 2px;
}

.mobile-nav__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 40px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text-primary);
  transition: opacity 0.15s ease;
}

.mobile-nav__btn:hover {
  opacity: 0.6;
}

.mobile-nav__btn svg {
  width: 15px;
  height: 11px;
  flex-shrink: 0;
}

.mobile-nav__title {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: -0.3px;
  color: var(--color-text-primary);
  padding: 2px 8px 3px;
}

.mobile-nav__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 100px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-text-primary);
  overflow: hidden;
}

.mobile-nav__moon,
.mobile-nav__sun {
  display: none;
}

.mobile-nav__moon {
  display: block;
}

[data-theme="dark"] .mobile-nav__moon {
  display: none;
}

[data-theme="dark"] .mobile-nav__sun {
  display: block;
}

.mobile-nav__close-wrap {
  background: var(--color-surface-blend, #f2f2f2);
  border-radius: 100px;
  padding: 2px;
}

.mobile-nav__close-wrap .mobile-nav__btn svg {
  width: 16px;
  height: 16px;
}

/* Desktop case close button (>1023px) */
.case-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 200;
}

.case-close__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border: none;
  cursor: pointer;
  border-radius: 40px;
  background: rgba(242, 242, 242, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  transition: opacity 0.15s ease;
}

.case-close__pill:hover {
  opacity: 0.6;
}

.case-close__icon {
  width: 16px;
  height: 16px;
  display: block;
}

[data-theme="dark"] .case-close__pill {
  background: rgba(37, 35, 34, 0.8);
}

@media (min-width: 1713px) {
  .case-close {
    right: calc((100vw - 1712px) / 2 + 12px);
  }
}


/* ==========================================================================
   RESPONSIVE — Single panel mode (< 1024px)
   Hides right panel, centers left panel as standalone page
   ========================================================================== */

@media (max-width: 1023px) {
  html {
    font-size: 15px;
  }

  .case-close {
    display: none;
  }

  /* Default: left panel fills screen, right panel hidden */
  .panel-left {
    position: relative;
    width: 100%;
    max-width: 540px;
    height: auto;
    min-height: 100vh;
    margin: 0 auto;
  }

  .panel-right,
  .scroll-mask {
    display: none !important;
  }

  .content-scroll {
    display: none !important;
  }

  /* Case active: flip visibility */
  .case-active-tablet .panel-left {
    display: none !important;
  }

  .case-active-tablet .content-scroll {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    padding: 0 40px;
    opacity: 1;
  }

  .case-active-tablet .content-scroll.content-scroll--hidden {
    display: none !important;
  }

  .case-active-tablet .panel-right {
    display: block !important;
  }

  .panel-transition {
    left: 0 !important;
    right: 0 !important;
  }

  /* Mobile nav — sticky bar */
  .case-active-tablet .mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(253, 253, 253, 0.8);
    -webkit-backdrop-filter: blur(50px);
    backdrop-filter: blur(50px);
    margin: 0 -40px;
    padding-left: 20px;
    padding-right: 20px;
  }

  [data-theme="dark"] .case-active-tablet .mobile-nav {
    background: rgba(26, 25, 25, 0.8);
  }
}


/* ==========================================================================
   RESPONSIVE — Project list bottom spacing (height-based)
   ========================================================================== */

@media (max-height: 800px) {
  .project-list {
    margin-bottom: 4.5rem;
  }
}

@media (max-height: 700px) {
  .project-list {
    margin-bottom: 3rem;
  }
}


/* ==========================================================================
   RESPONSIVE — Large screens (≥ 1713px)
   Scales up: 18px base (112.5%), wider panel
   ========================================================================== */


/* ==========================================================================
   RESPONSIVE — Content scroll padding overrides
   Must come after the 1023px block to win in the cascade
   ========================================================================== */

@media (max-width: 900px) {
  .case-active-tablet .content-scroll {
    padding-left: 24px;
    padding-right: 24px;
  }

  .case-active-tablet .mobile-nav {
    margin-left: -24px;
    margin-right: -24px;
  }
}

@media (max-width: 768px) {
  .case-active-tablet .content-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }

  .case-active-tablet .mobile-nav {
    margin-left: -16px;
    margin-right: -16px;
  }
}



/* ==========================================================================
   LIGHTBOX — Image/Video preview overlay (≤1023px only)
   ========================================================================== */

.lightbox {
  display: none;
}

@media (max-width: 1023px) {
  .lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .lightbox--active {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox--visible {
    opacity: 1;
  }

  .lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .lightbox__content {
    position: relative;
    z-index: 1;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox__img,
  .lightbox__video {
    display: none;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
  }

  .lightbox__img--active {
    display: block;
  }

  .lightbox__video--active {
    display: block;
  }

  .lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 100px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .lightbox__close:hover,
  .lightbox__close:active {
    background: rgba(255, 255, 255, 0.25);
  }

  .case-content .lightbox-target {
    cursor: zoom-in;
  }
}
