/* Bubble Curtain case study */

:root {
  color-scheme: dark;
}

body {
  min-height: 100svh;
  background: var(--c-bg-deep);
}

.bubble-study {
  overflow-x: clip;
}

.bubble-study main > section:not(:first-of-type) > .site {
  animation: none !important;
}

.bc-hero {
  position: relative;
  display: grid;
  height: 100svh;
  min-height: 46rem;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  overflow: clip;
  padding-block: 1.35rem 1.5rem;
  background:
    radial-gradient(
      circle at 76% 42%,
      rgba(0, 166, 214, 0.16),
      transparent 31rem
    ),
    linear-gradient(
      180deg,
      rgba(31, 37, 46, 0.97),
      rgba(23, 28, 35, 0.99)
    );
  border-bottom: 1px solid rgba(217, 240, 246, 0.08);
  isolation: isolate;
}

.bc-hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(
      rgba(217, 240, 246, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(217, 240, 246, 0.025) 1px,
      transparent 1px
    );
  background-size: 5rem 5rem;
  mask-image:
    radial-gradient(
      circle at 74% 42%,
      black,
      transparent 72%
    );
}

.bc-hero__top,
.bc-hero__grid,
.bc-hero__facts {
  width: min(94vw, 92rem);
  max-width: none;
}

.bc-hero__top {
  display: flex;
  justify-content: flex-end;
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.bc-hero__grid {
  display: grid;
  grid-template-columns:
    minmax(27rem, 0.82fr)
    minmax(38rem, 1.18fr);
  gap: clamp(3rem, 5vw, 5.5rem);
  align-items: center;
}

.bc-hero__copy {
  display: grid;
  min-width: 0;
  gap: var(--sp-4);
  justify-items: start;
}

.bc-hero h1 {
  max-width: 14ch;
  font-size: clamp(3rem, 4.35vw, 4.65rem);
  line-height: 0.99;
  text-wrap: balance;
}

.bc-hero__copy .lead {
  max-width: 39rem;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
}

.bc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.bc-tags li {
  padding: 0.44rem 0.72rem;
  color: var(--c-text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(217, 240, 246, 0.1);
  border-radius: var(--r-pill);
  font-size: var(--fs-200);
}

.bc-hero__visual {
  position: relative;
  width: min(100%, 46rem);
  min-width: 0;
  justify-self: end;
}

.bc-hero .bubble-hero .controls-panel {
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.bc-hero .bubble-hero .inputs-grid,
.bc-hero .bubble-hero .results-grid {
  gap: 0.5rem;
}

.bc-hero .bubble-hero .slider-card {
  padding: 0.65rem 0.75rem;
}

.bc-hero .bubble-hero .result-card {
  min-height: 4.75rem;
  padding: 0.65rem 0.75rem;
}

.bc-hero .bubble-hero .control-unit,
.bc-hero .bubble-hero .result-detail {
  display: none;
}

.bc-hero .bubble-hero .result-value {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.bc-hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: rgba(38, 46, 57, 0.56);
  border: 1px solid rgba(217, 240, 246, 0.1);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.bc-hero__facts article {
  display: grid;
  grid-template-rows: 1.2rem minmax(2.6rem, auto);
  gap: 0.35rem;
  align-content: start;
  padding: 0.82rem 1.05rem;
}

.bc-hero__facts article + article {
  border-left: 1px solid rgba(217, 240, 246, 0.08);
}

.bc-hero__facts span,
.bc-overview span {
  color: var(--c-main-2);
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.bc-hero__facts strong {
  color: var(--c-text-soft);
  font-family: var(--font-display);
  font-size: var(--fs-200);
  line-height: 1.4;
}

.bubble-hero {
  --bubble-deep: var(--c-bg-deep);
  --bubble-bg: var(--c-bg);
  --bubble-soft: var(--c-bg-soft);
  --bubble-surface: var(--c-surface-solid);
  --bubble-main: var(--c-main);
  --bubble-main-2: var(--c-main-2);
  --bubble-main-soft: var(--c-main-soft);
  --bubble-text: var(--c-text);
  --bubble-text-soft: var(--c-text-soft);
  --bubble-muted: var(--c-muted);
  --bubble-line: var(--c-main-line);
  width: 100%;
  color: var(--bubble-text);
}

.bubble-hero button,
.bubble-hero input {
  font: inherit;
}

.bubble-hero .visual-card {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bubble-hero .tank-section {
  padding: 0;
}

.bubble-hero .tank-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 52%,
      rgba(0, 166, 214, 0.08),
      transparent 44%
    );
  border-radius: var(--r-sm);
}

.bubble-hero #tankSvg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bubble-hero .tank-water {
  fill: url("#waterGradient");
}

.bubble-hero .tank-ambient-light {
  fill: url("#waterGlow");
}

.bubble-hero .tank-back {
  fill: rgba(23, 28, 35, 0.5);
  stroke: rgba(110, 187, 213, 0.13);
  stroke-width: 1;
}

.bubble-hero .tank-edge-main {
  fill: none;
  stroke: rgba(217, 240, 246, 0.6);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bubble-hero .tank-edge-soft {
  fill: none;
  stroke: rgba(0, 166, 214, 0.23);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bubble-hero .tank-inner-edge {
  fill: none;
  stroke: rgba(217, 240, 246, 0.18);
  stroke-width: 1;
}

.bubble-hero .tank-floor-glow {
  fill: url("#floorReflection");
}

.bubble-hero .water-surface {
  fill: none;
  stroke: rgba(217, 240, 246, 0.88);
  stroke-width: 1.7;
}

.bubble-hero .surface-underlay {
  fill: none;
  stroke: rgba(0, 166, 214, 0.32);
  stroke-width: 1;
}

.bubble-hero .tube-body {
  fill: url("#tubeGradient");
  stroke: rgba(217, 240, 246, 0.4);
  stroke-width: 1.1;
}

.bubble-hero .tube-highlight {
  fill: none;
  stroke: rgba(247, 251, 253, 0.36);
  stroke-width: 1;
  stroke-linecap: round;
}

.bubble-hero .tube-hole {
  fill: var(--bubble-main-2);
}

.bubble-hero .bubble-body {
  fill: rgba(217, 240, 246, 0.035);
  stroke: rgba(247, 251, 253, 0.92);
  stroke-width: 1;
}

.bubble-hero .bubble-highlight {
  fill: rgba(247, 251, 253, 0.94);
}

.bubble-hero .surface-ripple {
  fill: none;
  stroke: rgba(110, 187, 213, 0.82);
  stroke-width: 1.05;
}

.bubble-hero .surface-particle {
  fill: rgba(217, 240, 246, 0.82);
}

.bubble-hero .controls-panel {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
  padding: 0;
}

.bubble-hero .inputs-grid,
.bubble-hero .results-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.bubble-hero .slider-card,
.bubble-hero .result-card {
  min-width: 0;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.012)
    ),
    rgba(38, 46, 57, 0.62);
  border: 1px solid rgba(110, 187, 213, 0.15);
  border-radius: var(--r-sm);
  box-shadow: 0 0.7rem 1.8rem rgba(0, 0, 0, 0.12);
}

.bubble-hero .slider-card {
  padding: 0.8rem 0.9rem;
  transition:
    border-color var(--dur-fast) var(--ease-soft),
    background-color var(--dur-fast) var(--ease-soft),
    transform var(--dur-fast) var(--ease-soft);
}

.bubble-hero .slider-card.effect-active {
  background: rgba(0, 166, 214, 0.09);
  border-color: rgba(110, 187, 213, 0.55);
  transform: translateY(-1px);
}

.bubble-hero .slider-heading {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}

.bubble-hero .control-name {
  color: var(--bubble-text-soft);
  font-size: 0.78rem;
  font-weight: var(--fw-semibold);
}

.bubble-hero .control-unit {
  margin-top: 0.16rem;
  color: var(--bubble-muted);
  font-size: 0.62rem;
  line-height: 1.35;
}

.bubble-hero .input-value {
  flex: 0 0 auto;
  padding: 0.3rem 0.42rem;
  color: var(--bubble-main-2);
  background: rgba(23, 28, 35, 0.62);
  border: 1px solid rgba(110, 187, 213, 0.18);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.bubble-hero input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--bubble-main);
  cursor: pointer;
}

.bubble-hero .slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.34rem;
  color: var(--bubble-subtle, var(--c-subtle));
  font-size: 0.56rem;
}

.bubble-hero .result-card {
  display: flex;
  min-height: 6rem;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem 0.95rem;
  background:
    radial-gradient(
      circle at 88% 22%,
      rgba(0, 166, 214, 0.1),
      transparent 38%
    ),
    rgba(31, 37, 46, 0.68);
}

.bubble-hero .result-label {
  color: var(--bubble-text-soft);
  font-size: 0.58rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bubble-hero .result-value {
  margin-top: 0.3rem;
  color: var(--bubble-main);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bubble-hero .result-detail {
  margin: 0.42rem 0 0;
  color: var(--bubble-muted);
  font-size: 0.58rem;
  line-height: 1.38;
}

.bubble-hero .tank-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle at 50% 62%,
      rgba(0, 166, 214, 0.2),
      transparent 36%
    );
}

.bubble-hero .tank-flash.active {
  animation: tankFlash 0.5s ease-out;
}

.bc-section {
  position: relative;
  background:
    linear-gradient(
      180deg,
      rgba(31, 37, 46, 0.62),
      rgba(23, 28, 35, 0.95)
    );
}

.bc-section.section {
  padding-block: clamp(4.5rem, 7vw, 7rem);
}

.bc-section--surface {
  background:
    radial-gradient(
      circle at 80% 18%,
      rgba(0, 166, 214, 0.08),
      transparent 26rem
    ),
    linear-gradient(
      180deg,
      rgba(23, 28, 35, 0.98),
      rgba(31, 37, 46, 0.74)
    );
  border-block: 1px solid rgba(217, 240, 246, 0.07);
}

.bc-section__head,
.bc-outcome__grid {
  display: grid;
  grid-template-columns:
    minmax(0, 0.94fr)
    minmax(22rem, 1.06fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
}

.bc-section__head > div:first-child,
.bc-section__intro,
.bc-outcome__grid > div {
  display: grid;
  gap: var(--sp-4);
}

.bc-section__head h2,
.bc-feature h2,
.bc-outcome h2 {
  max-width: 14ch;
  font-size: clamp(2.25rem, 3.75vw, 3.9rem);
  line-height: 1.02;
  text-wrap: balance;
}

.bc-section__head > p,
.bc-section__intro {
  justify-self: end;
}

.bc-run {
  width: fit-content;
  padding: 0.55rem 0.8rem;
  color: var(--c-main-soft);
  background: rgba(0, 166, 214, 0.08);
  border: 1px solid rgba(110, 187, 213, 0.2);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  font-weight: var(--fw-bold);
  letter-spacing: 0.03em;
}

.bc-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
  background: rgba(38, 46, 57, 0.5);
  border: 1px solid rgba(217, 240, 246, 0.1);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
}

.bc-overview article {
  display: grid;
  min-height: 15rem;
  grid-template-rows:
    1.4rem
    minmax(3.4rem, auto)
    auto;
  gap: var(--sp-3);
  align-content: start;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.bc-overview article + article {
  border-left: 1px solid rgba(217, 240, 246, 0.09);
}

.bc-overview h3 {
  font-size: clamp(1.3rem, 2vw, 1.85rem);
}

.bc-overview p,
.bc-feature__copy > p:not(.lead),
.bc-outcome__copy > p:not(.lead) {
  color: var(--c-muted);
}

.bc-media,
.bc-video,
.bc-gallery figure {
  overflow: hidden;
  margin: 0;
  background: rgba(38, 46, 57, 0.56);
  border: 1px solid rgba(217, 240, 246, 0.1);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
}

.bc-media--pipeline {
  width: min(calc(100% - 2rem), 86rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  margin-inline: auto;
}

.bc-media--pipeline img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.bc-media figcaption,
.bc-video figcaption,
.bc-gallery figcaption {
  padding: 1rem 1.2rem;
  color: var(--c-muted);
  font-size: var(--fs-200);
  line-height: 1.55;
}

.bc-media--pipeline figcaption {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}

.bc-media--pipeline figcaption span {
  color: var(--c-text-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-100);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-align: center;
}

.bc-feature {
  display: grid;
  grid-template-columns:
    minmax(0, 0.92fr)
    minmax(20rem, 1.08fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.bc-feature--reverse {
  grid-template-columns:
    minmax(20rem, 1.08fr)
    minmax(0, 0.92fr);
}

.bc-feature__copy {
  display: grid;
  gap: var(--sp-4);
}

.bc-media--portrait {
  width: min(100%, 29rem);
  justify-self: end;
}

.bc-feature--reverse .bc-media--portrait {
  justify-self: start;
}

.bc-media--portrait img {
  display: block;
  width: 100%;
  max-height: 38rem;
  object-fit: contain;
  background: rgba(23, 28, 35, 0.82);
}

.bc-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-5);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.bc-video video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: #070d12;
  object-fit: contain;
}

.bc-video figcaption {
  display: grid;
  gap: var(--sp-2);
}

.bc-video strong {
  color: var(--c-text);
  font-family: var(--font-display);
}

.bc-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.bc-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 0.604;
  object-fit: cover;
}

.bc-outcome {
  display: grid;
  min-height: 72svh;
  align-content: center;
  background:
    radial-gradient(
      circle at 78% 32%,
      rgba(0, 166, 214, 0.1),
      transparent 28rem
    ),
    linear-gradient(
      180deg,
      rgba(31, 37, 46, 0.74),
      rgba(23, 28, 35, 0.99)
    );
  border-top: 1px solid rgba(217, 240, 246, 0.08);
}

.bc-outcome__grid {
  align-items: center;
}

.bc-outcome__copy {
  display: grid;
  gap: var(--sp-4);
}

.bubble-study .page-top {
  animation: none !important;
  opacity: 1 !important;
  filter: none !important;
  translate: 0 0 !important;
  scale: 1 !important;
}

.bubble-study .page-top a {
  filter: none;
}

@media (max-width: 82rem) {
  .bc-hero__grid {
    grid-template-columns:
      minmax(24rem, 0.84fr)
      minmax(34rem, 1.16fr);
    gap: 2.5rem;
  }

  .bc-hero h1 {
    font-size: clamp(2.8rem, 4.4vw, 4rem);
  }

  .bc-hero__visual {
    width: min(100%, 40rem);
  }
}

@media (max-width: 68rem) {
  .bc-hero {
    height: auto;
    min-height: 100svh;
    padding-block: 1rem 2.5rem;
  }

  .bc-hero__grid,
  .bc-section__head,
  .bc-feature,
  .bc-feature--reverse,
  .bc-outcome__grid {
    grid-template-columns: 1fr;
  }

  .bc-hero__grid {
    gap: 1.5rem;
  }

  .bc-hero__visual {
    width: min(100%, 42rem);
    justify-self: center;
  }

  .bc-section__head > p,
  .bc-section__intro {
    justify-self: start;
  }

  .bc-media--portrait,
  .bc-feature--reverse .bc-media--portrait {
    justify-self: center;
  }
}

@media (max-width: 48rem) {
  .bc-hero {
    height: 100svh;
    min-height: 0;
    padding-block: 0.8rem 1rem;
  }

  .bc-hero__top {
    font-size: 0.58rem;
  }

  .bc-hero__copy {
    gap: 0.7rem;
  }

  .bc-hero h1 {
    max-width: none;
    font-size: clamp(2.15rem, 9.7vw, 3rem);
    line-height: 0.98;
  }

  .bc-hero__copy .lead {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .bc-tags {
    gap: 0.35rem;
  }

  .bc-tags li {
    padding: 0.32rem 0.5rem;
    font-size: 0.66rem;
  }

  .bc-hero__visual {
    width: min(100%, 26rem);
  }

  .bc-hero .bubble-hero .controls-panel {
    margin-top: 0.3rem;
  }

  .bc-hero .bubble-hero .slider-card,
  .bc-hero .bubble-hero .result-card {
    padding: 0.48rem 0.55rem;
  }

  .bc-hero .bubble-hero .slider-heading {
    margin-bottom: 0.35rem;
  }

  .bc-hero .bubble-hero .result-card {
    min-height: 3.55rem;
  }

  .bc-hero .bubble-hero .result-value {
    margin-top: 0.15rem;
    font-size: 1.15rem;
  }

  .bc-hero__facts article {
    grid-template-rows: 1rem minmax(2.1rem, auto);
    padding: 0.55rem 0.5rem;
  }

  .bc-hero__facts span {
    font-size: 0.52rem;
  }

  .bc-hero__facts strong {
    font-size: 0.63rem;
    line-height: 1.3;
  }

  .bc-section__head h2,
  .bc-feature h2,
  .bc-outcome h2 {
    max-width: none;
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }

  .bc-overview,
  .bc-videos,
  .bc-gallery {
    grid-template-columns: 1fr;
  }

  .bc-overview article + article {
    border-top: 1px solid rgba(217, 240, 246, 0.09);
    border-left: 0;
  }

  .bc-overview article {
    min-height: 12rem;
    grid-template-rows: 1.2rem auto auto;
  }

  .bc-media,
  .bc-video,
  .bc-gallery figure,
  .bc-overview {
    border-radius: var(--r-lg);
  }

  .bc-media--pipeline {
    width: 100%;
  }

  .bc-media--pipeline figcaption {
    grid-template-columns: repeat(2, 1fr);
  }

  .bc-outcome {
    min-height: 76svh;
  }
}


@keyframes tankFlash {
  0% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
  }
}

/* Mobile hero flow */

@media (max-width: 48rem) {
  .bc-hero {
    height: auto;
    min-height: 100svh;
    grid-template-rows: auto auto auto;
    align-content: start;
    overflow: visible;
    padding-block: 1.15rem 1.25rem;
  }

  .bc-hero__grid {
    min-height: 0;
    gap: 0.9rem;
    align-items: start;
  }

  .bc-hero__copy {
    gap: 0.6rem;
  }

  .bc-hero__visual {
    align-self: start;
  }

  .bc-hero .bubble-hero .result-card {
    min-height: 4.65rem;
    justify-content: flex-start;
    padding: 0.58rem 0.55rem;
  }

  .bc-hero .bubble-hero .result-label {
    min-height: 2.25em;
    line-height: 1.15;
  }

  .bc-hero .bubble-hero .result-value {
    margin-top: 0.22rem;
  }

  .bc-hero__facts {
    position: relative;
    z-index: 2;
    margin-top: 0.75rem;
  }
}
