/* Bielfor shared design tokens — lifted from src/app/globals.css */
:root {
  --background: #ffffff;
  --foreground: #0a0a0a;
  --card: #f6f6f8;
  --card-foreground: #0a0a0a;
  --popover: #ffffff;
  --popover-foreground: #0a0a0a;
  --primary: #0a0a0a;
  --primary-foreground: #ffffff;
  --secondary: #efeff1;
  --secondary-foreground: #0a0a0a;
  --muted: #eeeef0;
  --muted-foreground: #5a5a5f;
  --accent: #eeeef0;
  --accent-foreground: #0a0a0a;
  --border: #d7d7db;
  --input: #d7d7db;
  --ring: #0013b1;
  --brand: #0013b1;
  --brand-foreground: #ffffff;
  --radius: 0.75rem;
  /* Unified shadow tokens — every hover card, glass container, and raised
     surface across the site pulls from these so depth feels consistent. */
  --shadow-soft: 0 18px 44px -20px rgba(0,0,0,0.14);
  --shadow-lift: 0 24px 56px -24px rgba(0,0,0,0.20);
}

.dark {
  --background: #000000;
  --foreground: #fafafa;
  --card: #0d0d0d;
  --card-foreground: #fafafa;
  --popover: #0d0d0d;
  --popover-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #000000;
  --secondary: #161616;
  --secondary-foreground: #fafafa;
  --muted: #161616;
  --muted-foreground: #8f8f8f;
  --accent: #161616;
  --accent-foreground: #fafafa;
  --border: rgba(255, 255, 255, 0.10);
  --input: rgba(255, 255, 255, 0.14);
  --ring: #4a63ff;
  --brand: #3a52ff;
  --brand-foreground: #fafafa;
  /* Shadows on dark theme need a bit more presence to read against black. */
  --shadow-soft: 0 18px 44px -20px rgba(0,0,0,0.45);
  --shadow-lift: 0 24px 56px -24px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "itc-avant-garde-gothic-pro", "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "rlig" 1, "calt" 1;
}
body.dark { background: var(--background); color: var(--foreground); }

::selection { background: rgba(58, 82, 255, 0.25); color: var(--foreground); }

.font-mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.font-display { font-family: "itc-avant-garde-gothic-pro", "Jost", system-ui, sans-serif; }

/* Iridescent chrome text — animated (slow glass-facet drift) */
@keyframes iridescent-shift {
  0%   { background-position: 0% 50%, 100% 50%, 50% 100%, 0% 0%; }
  25%  { background-position: 50% 40%, 75% 60%, 20% 80%, 40% 20%; }
  50%  { background-position: 100% 50%, 0% 50%, 80% 20%, 100% 100%; }
  75%  { background-position: 60% 60%, 40% 40%, 60% 60%, 60% 80%; }
  100% { background-position: 0% 50%, 100% 50%, 50% 100%, 0% 0%; }
}
.text-iridescent {
  /* plain white, crisp (no gradient) */
  color: #ffffff;
}
body.light .text-iridescent {
  color: var(--foreground);
}

/* Occupation wall — desktop gravity pile powered by Matter.js. Each
   DOM pill stays a span styled by CSS (tint + hover invert); only its
   transform is driven by the engine every frame. Data-ready gates
   opacity so pills don't flash at (0,0) while positions settle. Mobile
   falls back to a single rotating pill (<OccupationRotator/>). */
.occupation-wall {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  /* Snug height — just enough for the pile to settle without leaving
     a dead zone above it. Pills drop from above the top edge, pile
     at the floor; container height = pile height + small headroom. */
  height: clamp(360px, 32vw, 460px);
  padding: 0;
  overflow: visible;
}
.occupation-pill {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  /* Default state — subtle outline + dim label, no background fill.
     Reads like ghost tokens that fade into the page. */
  border: 1.5px solid color-mix(in srgb, var(--foreground), transparent 82%);
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--foreground), transparent 52%);
  /* Match "Made for" heading typography: display font + weight 600 +
     tight tracking. */
  font-family: "itc-avant-garde-gothic-pro", "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  cursor: default;
  transform-origin: center;
  will-change: transform;
  opacity: 0;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* Staggered fade-in — --pill-i is set inline per pill. Cascade lasts
   ~1.2s across 34 pills, mirrors the physics cascade so visual
   reveal tracks drop order. */
.occupation-wall[data-ready="true"] .occupation-pill {
  opacity: 1;
  transition-delay: calc(var(--pill-i, 0) * 28ms);
}
/* Size variants — bumped so pills feel display-grade, matching the
   "Made for" H2 presence rather than reading as tiny chips. */
.occupation-pill.size-sm { padding: 10px 20px; font-size: clamp(15px, 1.15vw, 18px); }
.occupation-pill.size-md { padding: 12px 24px; font-size: clamp(18px, 1.4vw, 22px); }
.occupation-pill.size-lg { padding: 14px 28px; font-size: clamp(22px, 1.8vw, 28px); border-width: 2px; }
.occupation-pill.size-xl { padding: 16px 32px; font-size: clamp(26px, 2.2vw, 34px); border-width: 2px; }
/* No hover — physics-driven transform writes every RAF, so colour
   flips on hover were framey. Pills stay in their default ghost
   state; the pile is decor, not interactive. */

/* About-page slides — scroll-driven crossfade. Each slide's body
   materialises (blur + scale + rise) as it enters the viewport,
   locks while centered, then dissolves (reverse) as the next slide
   takes over. Pure CSS via `animation-timeline: view()` — no JS on
   every scroll. Falls back to always-visible on browsers without
   scroll-driven-animation support. */
.about-slide > div { opacity: 1; }
@supports (animation-timeline: view()) {
  .about-slide > div {
    animation: aboutSlideFade linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
}
@keyframes aboutSlideFade {
  0%   { opacity: 0; transform: translateY(40px) scale(0.96); filter: blur(10px); }
  30%  { opacity: 1; transform: translateY(0) scale(1);      filter: blur(0); }
  70%  { opacity: 1; transform: translateY(0) scale(1);      filter: blur(0); }
  100% { opacity: 0; transform: translateY(-40px) scale(0.96); filter: blur(10px); }
}

/* iOS Safari — kill the native "tap to play" overlay that shows up when
   autoplay is blocked, plus any default media controls chrome. We control
   playback imperatively via the AutoplayVideo wrapper. */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-panel-container,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-overlay-enclosure,
video::-webkit-media-controls-start-playback-glyph {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* AutoplayVideo fade-in — avoid the brief flash where iOS might paint its
   default play glyph before our imperative play() lands. The wrapper adds
   data-ready="1" on the first `playing` event; before that we keep the
   video fully transparent so no placeholder chrome can appear. */
video[data-autoplay-ready="0"] { opacity: 0 !important; }
video[data-autoplay-ready="1"] {
  opacity: 1;
  transition: opacity 140ms linear;
}

/* Social-proof toast — live-signal green dot that softly pulses. */
.proof-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  animation: proofPulse 2s ease-in-out infinite;
}
@keyframes proofPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.35); }
}

/* Footer links — center-expanding underline on hover. Uses ::after
   pseudo-element so it doesn't fight the default text-decoration.
   Colour lifts from muted to full foreground when hovered. */
.footer-link {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: color-mix(in srgb, var(--foreground), transparent 20%);
  text-decoration: none;
  transition: color 200ms ease;
}
.footer-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-link:hover {
  color: var(--foreground);
}
.footer-link:hover::after {
  width: 100%;
}

/* Closing caption below the wall — matches the "Made for" heading
   in size + weight so it reads as a sibling line, not a footnote.
   Generous top margin pushes it clear of the falling pills. */
.occupation-wall-close {
  margin: 56px auto 0;
  text-align: center;
  font-style: normal;
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

/* Mobile rotator — single pill that cycles through the occupation
   list. The shell holds a hidden spacer sized to the widest label so
   the line never jumps; labels stack absolutely and crossfade with a
   soft blur-swap. */
.occupation-rotator {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  padding: 8px 12px;
  min-height: 70px;
}
.occupation-rotator-shell {
  position: relative;
  /* Unset the wall-level absolute positioning so the pill sits inline. */
  left: auto;
  top: auto;
  transform: none;
  opacity: 1;
  overflow: hidden;
}
.occupation-rotator-spacer {
  visibility: hidden;
  white-space: nowrap;
}
.occupation-rotator-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 520ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  padding: inherit;
}

/* Liquid glass toggle button — real frosted glass with backdrop-filter so
   anything behind (video, photos, gradients) is blurred through the pill. */
.liquid-glass-toggle {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.32) 55%,
      rgba(255, 255, 255, 0.42) 100%
    );
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: color-mix(in srgb, var(--foreground), transparent 25%);
  box-shadow:
    0 4px 18px -6px rgba(0, 0, 0, 0.18),
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 1),
    inset 0 -1px 2px rgba(255, 255, 255, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition: color 0.2s, transform 0.2s, box-shadow 0.3s;
}
body.dark .liquid-glass-toggle {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.08) 55%,
      rgba(255, 255, 255, 0.14) 100%
    );
  border-color: rgba(255, 255, 255, 0.28);
  color: color-mix(in srgb, #ffffff, transparent 15%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow:
    0 6px 22px -6px rgba(0, 0, 0, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px 2px rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.liquid-glass-toggle:hover {
  color: var(--foreground);
  transform: translateY(-1px);
}
body.dark .liquid-glass-toggle:hover {
  color: #ffffff;
}

/* Marquee */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.animate-marquee { animation: marquee 60s linear infinite; will-change: transform; }

/* Border beam (rotating conic) */
@property --beam-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes rotate-beam { from { --beam-angle: 0deg; } to { --beam-angle: 360deg; } }
.border-beam { position: relative; isolation: isolate; --beam-color: var(--brand); }
/* On light theme the blue brand glow read as garish accent stripes on every CTA.
   Swap to a soft neutral grey so the effect stays subtle on white. */
body.light .border-beam { --beam-color: color-mix(in srgb, var(--foreground), transparent 60%); }
.border-beam::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--beam-angle), transparent 70%, var(--beam-color) 82%, var(--beam-color) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rotate-beam 3s linear infinite; pointer-events: none;
}

/* Noise overlay */
.noise-overlay {
  position: fixed; inset: 0; pointer-events: none;
  z-index: 100; opacity: 0.055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 320px 320px;
}

/* Utility */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.bg-dot-grid { background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0); background-size: 24px 24px; }

/* Liquid navbar — glassy container. Inset rim highlights carry the "liquid"
   look even without the heavy drop shadows we used to stack on top. One soft
   drop layer (from the shared shadow token) + the inset highlights is enough.
   Scroll no longer triggers a shadow swap — the previous two-layer change
   made the navbar visibly "reshadow" as you scrolled. */
.liquid-navbar {
  position: relative;
  isolation: isolate;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.32) 55%,
      rgba(255, 255, 255, 0.42) 100%
    );
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(255, 255, 255, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
body.dark .liquid-navbar {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.05) 55%,
      rgba(255, 255, 255, 0.09) 100%
    );
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    inset 0 -1px 1px rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* .is-scrolled now inherits the base shadow — no visual jump on scroll. */

/* Liquid pill nav styling */
.liquid-pill-wrap {
  position: relative;
  display: inline-grid;
  height: 44px;
  padding: 2px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.liquid-pill-glide {
  position: absolute; inset: 2px; z-index: -1;
  border-radius: 999px;
  background: rgba(0,0,0,0.05);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 8px rgba(0,0,0,0.03),
    0 2px 6px rgba(0,0,0,0.08),
    inset 3px 3px 0.5px -3.5px rgba(255,255,255,0.09),
    inset -3px -3px 0.5px -3.5px rgba(255,255,255,0.85),
    inset 1px 1px 1px -0.5px rgba(255,255,255,0.6),
    inset -1px -1px 1px -0.5px rgba(255,255,255,0.6),
    inset 0 0 6px 6px rgba(255,255,255,0.12),
    inset 0 0 2px 2px rgba(255,255,255,0.06),
    0 0 12px rgba(0,0,0,0.15);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), width 0.5s cubic-bezier(0.16,1,0.3,1);
}
.light .liquid-pill-glide {
  background: rgba(255,255,255,0.96);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.04),
    0 4px 14px rgba(0,0,0,0.08),
    inset 0 1px 1px rgba(255,255,255,1),
    inset 0 -1px 1px rgba(0,0,0,0.05),
    inset 0 0 0 1px rgba(0,0,0,0.06);
}
.liquid-pill-item {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 40px; padding: 0 18px;
  border-radius: 999px;
  color: color-mix(in srgb, var(--foreground), transparent 30%);
  white-space: nowrap;
  transition: color 0.2s;
  cursor: pointer;
}
body.dark .liquid-pill-item {
  color: color-mix(in srgb, #ffffff, transparent 20%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.liquid-pill-item.active { color: var(--foreground); }
body.dark .liquid-pill-item.active { color: #ffffff; }
.liquid-pill-item:hover { color: var(--foreground); }
body.dark .liquid-pill-item:hover { color: #ffffff; }

/* Hero CTA pill */
.cta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px 0 22px;
  border-radius: 999px;
  background: var(--foreground); color: var(--background);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-primary:hover { transform: scale(1.02); box-shadow: 0 10px 30px -8px rgba(0,0,0,0.4); }
.cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--background), transparent 40%);
  color: var(--foreground);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: all 0.2s;
}
.cta-primary, .cta-primary:hover, .cta-primary:focus, .cta-primary:visited,
.cta-secondary, .cta-secondary:hover, .cta-secondary:focus, .cta-secondary:visited {
  text-decoration: none;
}

/* Header "Get Banana MAX" button — clean white-stroke hover, no gradient */
.header-cta {
  position: relative;
  transition: transform 0.2s, background 0.3s, color 0.3s, box-shadow 0.3s;
}
.header-cta:hover {
  transform: translateY(-1px);
  background: transparent !important;
  color: var(--foreground) !important;
  box-shadow: inset 0 0 0 1.5px var(--foreground);
}
body.dark .header-cta:hover {
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1.5px #ffffff;
}
.cta-secondary:hover { border-color: color-mix(in srgb, var(--foreground), transparent 70%); background: var(--muted); }

a, button { cursor: pointer; }
button { border: 0; background: none; color: inherit; font: inherit; padding: 0; }

/* Subtle scroll ease for inner previews */
.preview-scroll {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--foreground), transparent 70%) transparent;
}
.preview-scroll::-webkit-scrollbar { width: 6px; }
.preview-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--foreground), transparent 70%); border-radius: 3px; }
.preview-scroll::-webkit-scrollbar-track { background: transparent; }

/* Progressive-blur shortcut (cheap version — three stacked blurs) */
.progressive-blur-bottom {
  position: absolute; inset-inline: 0; bottom: 0; height: 30%;
  pointer-events: none; z-index: 10;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 50%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 50%, #000 100%);
}

/* Spotlight card — pointer-follow glow */
.spotlight-card {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.3s;
}
.spotlight-card::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand), transparent 85%), transparent 50%);
  opacity: 0; transition: opacity 0.3s;
  z-index: 1;
}
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card:hover { border-color: color-mix(in srgb, var(--foreground), transparent 80%); }

/* ================================================================
   Theme transition — smooth cross-fade between dark and light
   ================================================================
   Two paths:
   1. Modern browsers (Chrome/Edge/Safari 18+) use View Transitions API.
      The whole page is snapshotted, DOM mutates, and the browser animates
      between old and new snapshots — handles colors, gradients, shadows,
      and media all at once.
   2. Fallback: `.theme-flipping` class enables a one-shot transition on
      every element for ~420ms while the theme swap happens.
   ================================================================ */

@supports (view-transition-name: root) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 420ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  }
  /* Cross-fade rather than Chrome's default slide — feels like a smooth
     color morph rather than a wipe. */
  ::view-transition-old(root) {
    animation-name: bfTransitionFadeOut;
  }
  ::view-transition-new(root) {
    animation-name: bfTransitionFadeIn;
  }
  @keyframes bfTransitionFadeOut { to { opacity: 0; } }
  @keyframes bfTransitionFadeIn  { from { opacity: 0; } }
}

/* Fallback for Firefox and other older browsers. Scoped to the moment of
   swap via the .theme-flipping class so it doesn't stomp normal UI
   transitions (hover, focus, etc.) at rest. */
html.theme-flipping,
html.theme-flipping body,
html.theme-flipping body *,
html.theme-flipping body *::before,
html.theme-flipping body *::after {
  transition:
    background-color 420ms cubic-bezier(0.22, 1, 0.36, 1),
    background 420ms cubic-bezier(0.22, 1, 0.36, 1),
    color 320ms ease,
    border-color 420ms ease,
    fill 320ms ease,
    stroke 320ms ease,
    box-shadow 420ms ease !important;
}

/* Cross-fade keyframes for mobile showcase step transitions. */
@keyframes bmaxStepFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Mobile responsive pass (≤ 768px)
   ================================================================
   Most heavy layout forks happen in React now (hamburger navbar, vertical
   showcase stack), but every page still relies on inline-style grids and
   big padding values that need to collapse below 768px. Attribute
   selectors hit the inline `style=""` strings directly so we don't need
   to touch each component.
   ================================================================ */
@media (max-width: 768px) {
  /* Collapse every multi-column grid to one column. Chrome serializes inline
     style values in kebab-case with `0px` (not bare `0`) — so the selectors
     below match the actual DOM output of React's `gridTemplateColumns` props.
     A camelCased selector like `gridTemplateColumns` never matches anything,
     because the rendered attribute is always `grid-template-columns`. */
  [style*="grid-template-columns: repeat(2, minmax(0, 1fr))"],
  [style*="grid-template-columns: repeat(2,minmax(0, 1fr))"],
  [style*="grid-template-columns: repeat(2, minmax(0px, 1fr))"],
  [style*="grid-template-columns: repeat(3, minmax(0, 1fr))"],
  [style*="grid-template-columns: repeat(3,minmax(0, 1fr))"],
  [style*="grid-template-columns: repeat(3, minmax(0px, 1fr))"],
  [style*="grid-template-columns: minmax(0, 1fr) minmax(0, 1fr)"],
  [style*="grid-template-columns: minmax(0px, 1fr) minmax(0px, 1fr)"],
  /* Hero split on Banana MAX / YouTube Summarizer / product pages. */
  [style*="minmax(0px, 1.25fr)"],
  [style*="minmax(0, 1.25fr)"],
  [style*="minmax(0px, 1.5fr)"],
  [style*="minmax(0, 1.5fr)"],
  /* Heart showcase + products/home teaser grids. */
  [style*="grid-template-columns: 1fr 1.1fr"],
  [style*="grid-template-columns: 1fr 1.25fr"],
  [style*="grid-template-columns: 1fr 1.5fr"],
  /* Footer 5-column grid. */
  [style*="grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr"],
  [style*="grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr"] {
    /* minmax(0, 1fr) lets the track shrink below its intrinsic min-content
       so wide children (pricing card, screenshots) don't blow the grid out
       past the viewport edge. */
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 32px !important;
  }

  /* Grid children themselves sometimes carry min-width from content.
     Neutralise explicit fixed width strips so copy doesn't blow out. */
  [style*="max-width: 560"],
  [style*="max-width: 640"] { max-width: 100% !important; }

  /* Big display type — scale every clamp(…) heading down one step. */
  h1, h2 { font-size: clamp(28px, 7vw, 44px) !important; line-height: 1.1 !important; }
  h3 { font-size: clamp(22px, 5vw, 32px) !important; }

  /* "…and probably you." reads as a sibling line to the "Made for" h2,
     so it must track the same mobile clamp. It's a <p> not an <h2>, so
     the rule above doesn't catch it — apply it explicitly. */
  .occupation-wall-close {
    font-size: clamp(28px, 7vw, 44px) !important;
    line-height: 1.1 !important;
    margin-top: 32px !important;
  }

  /* Section padding — inline `padding: "128px 24px 96px"` etc can be way too
     airy on mobile. Tighten left/right to 16px and trim hero top padding. */
  section[style*="padding: 128px 24px 96px"],
  section[style*="padding: 96px 24px"],
  section[style*="padding: 80px 24px"],
  section[style*="padding: 128px 24px 48px"] {
    padding-top: 64px !important;
    padding-bottom: 56px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Product card padding + borderRadius — tighter. */
  [style*="padding: 32px"][style*="borderRadius: 28"],
  [style*="padding: 32px"][style*="borderRadius: 24"],
  [style*="padding: 40px"][style*="borderRadius: 28"],
  [style*="padding: 40px"][style*="borderRadius: 24"] {
    padding: 20px !important;
    border-radius: 20px !important;
  }

  /* Pricing card inner padding + tagline wrap — the "Bring your Gemini API key"
     strip at the bottom uses `whiteSpace: nowrap` which overflows narrow
     viewports. Always let it wrap. */
  p[style*="whiteSpace: nowrap"] { white-space: normal !important; }

  /* Final CTA card: inline padding 64 is unusable on mobile. */
  [style*="padding: 64px"][style*="borderRadius: 24"] {
    padding: 32px 20px !important;
  }

  /* Pricing hero $72 → scale down a bit */
  [style*="fontSize: 72"] { font-size: 56px !important; }

  /* Product card media — make it taller so the banana/YouTube glossy icons
     read much bigger on mobile. Desktop stays at 4/3. The transform: scale
     applies only to <img> + <video>; <canvas> from StackedAlphaVideo stays
     at 1.0 so its alpha-mask edges don't get magnified into a halo. */
  .product-card-media { aspect-ratio: 1 / 1 !important; }
  .product-card-media video,
  .product-card-media img { transform: scale(1.15) !important; }
  .product-card-media canvas { transform: scale(1.0) !important; }

  /* Tighten home gap between marquee strip and the "Made for" products
     section — the section's own 80px top padding stacked on the marquee's
     own 24px + 40px FadeUp margin felt like an empty floor on mobile. */
  .home-products-section { padding: 32px 20px !important; }

  /* ProductCard footer row — keep "Learn more" / "Notify me" CTA on a
     single line on tight phones; nowrap + flex-shrink lets the price
     column take what it needs and the button never breaks. */
  .product-card-cta { font-size: 12px !important; padding: 8px 14px !important; }

  /* Release timeline — spine hidden because entries stack vertically. */
  .release-spine { display: none !important; }

  /* Home banner video — flush with the very top of the viewport. The
     fixed-position nav buttons (B + theme + hamburger) float on top of
     the video as originally designed. `object-position: center 65%`
     pulls the visible frame DOWN within the wrap so the BIELFOR
     wordmark reads clearly below the nav row instead of being cropped
     at the top. */
  .home-hero-video {
    object-fit: cover !important;
    object-position: center 65% !important;
    transform: scale(1.0) !important;
  }
  .home-hero-video-wrap {
    height: min(50vh, 420px) !important;
    margin-top: 0 !important;
    margin-bottom: -140px !important;
  }
  .home-hero-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Banana MAX hero — centered text on mobile, H1 sized so "Banana 🍌 MAX"
     fits inside a 390px viewport without bumping the edges. Subhead
     smaller than before (was ~17px → now ~14-15px). Spec row is a tight
     horizontal marquee-ish strip with tiny type and no vertical dividers. */
  .bmax-hero-text { text-align: center !important; }
  .bmax-hero-h1 {
    justify-content: center !important;
    font-size: clamp(36px, 11vw, 56px) !important;
  }
  .bmax-hero-banana { height: 1.3em !important; width: 1.3em !important; }
  .bmax-hero-sub {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 420px !important;
    font-size: clamp(13px, 3.7vw, 15px) !important;
    line-height: 1.45 !important;
  }
  .bmax-hero-specs {
    justify-content: center !important;
    column-gap: 10px !important;
    row-gap: 4px !important;
  }
  /* Hide the vertical divider spans in the spec row on mobile — they
     waste space when each item has to wrap anyway. */
  .bmax-hero-specs > [aria-hidden] { display: none !important; }
  .bmax-hero-specs > .font-mono { font-size: 9px !important; letter-spacing: 0.12em !important; }

  /* Home hero H1 — copy is now 2 lines: "Tools For" / "Creative PROs."
     Widest line is "Creative PROs." (14 chars incl space+period). Font
     clamp calibrated so it fits on one line: 10vw at 390 = 39, at 480 =
     48, at 768 = 64 (clamped). No wrapping ever. */
  .home-hero-h1 {
    font-size: clamp(36px, 10vw, 64px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.03em !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  .home-hero-h1 > div {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
  }
  .home-hero-h1 > div > span { display: inline !important; }
  .home-hero-h1 > div > span > span { display: inline-block !important; }
  .home-hero-sub {
    font-size: 16px !important;
    max-width: 520px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Extra squeeze for phones ≤ 480px */
@media (max-width: 480px) {
  h1, h2 { font-size: clamp(28px, 8vw, 44px) !important; }
  .occupation-wall-close { font-size: clamp(28px, 8vw, 44px) !important; }
  section[style*="padding"] { padding-left: 16px !important; padding-right: 16px !important; }
  /* Home hero must bleed edge-to-edge — the catch-all above would add
     16px side padding and letterbox the banner video. Opt out. */
  section.home-hero-section { padding-left: 0 !important; padding-right: 0 !important; }
  /* Home hero H1 — huge hero statement. Plain `display: block` with
     `text-align: center` so each wrapped line centers naturally. Force
     all inline ancestors to behave as inline so text-align inheritance
     works cleanly. */
  .home-hero-h1 {
    /* Tight phones ≤480 — matches 768 rule. Lower clamp so
       "Creative PROs." (14 chars) fits on one line. */
    font-size: clamp(32px, 10vw, 48px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.03em !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  .home-hero-h1 > div {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
  }
  .home-hero-h1 > div > span { display: inline !important; }
  .home-hero-h1 > div > span > span { display: inline-block !important; }
  /* Home subhead shrinks to 16px so it sits clearly below the ~50px H1
     without competing with it. */
  .home-hero-sub { font-size: 16px !important; }
  /* Banana MAX H1 tightens on narrow phones so "Banana 🍌 MAX" stays
     on one line, with the animated banana still 1.35em. */
  .bmax-hero-h1 { font-size: clamp(46px, 13vw, 60px) !important; }
}
