/* Branded hardware refresh — shared by Blue Dream and Sour Diesel */
:root {
  --hardware-accent: #8bb7ff;
  --hardware-accent-rgb: 139, 183, 255;
  --hardware-deep: #07164d;
  --hardware-ink: #ecf4ff;
  --hardware-surface: #040819;
}

body.brand-bluedream {
  --hardware-accent: #8bb7ff;
  --hardware-accent-rgb: 139, 183, 255;
  --hardware-deep: #061044;
  --hardware-ink: #eff5ff;
  --hardware-surface: #030718;
}

body.brand-sourdiesel {
  --hardware-accent: #c7ff45;
  --hardware-accent-rgb: 199, 255, 69;
  --hardware-deep: #124432;
  --hardware-ink: #f5ffe1;
  --hardware-surface: #050907;
}

.brand-refresh .hero-bg {
  background-position: center center !important;
  filter: saturate(1.08) contrast(1.06);
  transform: scale(1.02);
}

.brand-refresh .hero-grad {
  background: linear-gradient(90deg, rgba(2, 5, 15, .98) 0%, rgba(2, 5, 15, .85) 38%, rgba(2, 5, 15, .18) 72%, rgba(2, 5, 15, .28) 100%) !important;
}

.brand-refresh .hero-inner {
  position: relative;
  z-index: 2;
}

.brand-refresh .hero-product {
  align-self: end;
  isolation: isolate;
}

.brand-refresh .hero-product::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 15% 5% 2%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--hardware-accent-rgb), .4), rgba(var(--hardware-accent-rgb), 0) 68%);
  filter: blur(28px);
}

.brand-refresh .hero-product img {
  max-height: min(69vh, 690px) !important;
  width: auto !important;
  object-fit: contain;
  filter: drop-shadow(0 30px 48px rgba(0, 0, 0, .52)) drop-shadow(0 0 28px rgba(var(--hardware-accent-rgb), .22));
  animation: hardware-float 6.5s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes hardware-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(1deg); }
}

.hardware-scroll {
  --p: 0;
  --intro: 1;
  --detail: 0;
  --finish: 0;
  height: 290vh;
  position: relative;
  background:
    radial-gradient(ellipse at 52% 40%, rgba(var(--hardware-accent-rgb), .18), transparent 39%),
    radial-gradient(circle at 16% 72%, rgba(var(--hardware-accent-rgb), .1), transparent 25%),
    linear-gradient(180deg, #03050b 0%, var(--hardware-surface) 48%, #020306 100%);
  color: var(--hardware-ink);
  overflow: clip;
}

.hardware-scroll::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .34;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at center, #000, transparent 75%);
  mask-image: radial-gradient(circle at center, #000, transparent 75%);
}

.hardware-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.35fr) minmax(260px, .9fr);
  align-items: center;
  gap: clamp(20px, 4vw, 68px);
  padding: clamp(84px, 10vh, 116px) max(24px, calc((100vw - 1320px) / 2));
  isolation: isolate;
}

.hardware-stage {
  position: relative;
  height: min(78svh, 820px);
  min-height: 520px;
  display: grid;
  place-items: center;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.hardware-aura,
.hardware-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
}

.hardware-aura {
  width: min(46vw, 620px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(var(--hardware-accent-rgb), calc(.09 + var(--p) * .22)) 0%, rgba(var(--hardware-accent-rgb), .04) 44%, transparent 70%);
  filter: blur(calc(12px + var(--p) * 18px));
  transform: scale(calc(.78 + var(--p) * .45));
}

.hardware-ring {
  width: min(38vw, 540px);
  aspect-ratio: 1;
  border: 1px solid rgba(var(--hardware-accent-rgb), calc(.2 + var(--p) * .42));
  box-shadow: inset 0 0 70px rgba(var(--hardware-accent-rgb), .04), 0 0 70px rgba(var(--hardware-accent-rgb), .08);
  transform: rotateX(71deg) rotateZ(calc(-24deg + var(--p) * 76deg)) scale(calc(.72 + var(--p) * .32));
}

.hardware-ring::before,
.hardware-ring::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(var(--hardware-accent-rgb), .18);
  border-radius: inherit;
}

.hardware-ring::after { inset: 24%; }

.hardware-product-zoom {
  position: relative;
  z-index: 3;
  height: min(74svh, 760px);
  width: auto;
  max-width: min(36vw, 440px);
  object-fit: contain;
  transform-origin: 50% 58%;
  transform:
    translate3d(calc((var(--p) - .5) * -2vw), calc((.35 - var(--p)) * 4vh), calc(var(--p) * 120px))
    rotateY(calc(-8deg + var(--p) * 15deg))
    rotateZ(calc(-2deg + var(--p) * 2deg))
    scale(calc(.72 + var(--p) * .74));
  filter: drop-shadow(0 calc(34px - var(--p) * 10px) 52px rgba(0, 0, 0, .72)) drop-shadow(0 0 calc(18px + var(--p) * 42px) rgba(var(--hardware-accent-rgb), calc(.15 + var(--p) * .18)));
  will-change: transform, filter;
}

.hardware-copy {
  position: relative;
  z-index: 4;
  max-width: 390px;
}

.hardware-copy--intro {
  opacity: var(--intro);
  transform: translate3d(calc(var(--p) * -26px), 0, 0);
}

.hardware-copy--detail {
  opacity: var(--finish);
  transform: translate3d(calc((1 - var(--finish)) * 24px), 0, 0);
  justify-self: end;
}

.hardware-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--hardware-accent);
}

.hardware-kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.hardware-copy h2 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5.2vw, 82px);
  line-height: .91;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.hardware-copy--detail h3 {
  margin: 0 0 16px;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: .95;
  letter-spacing: -.045em;
}

.hardware-copy p {
  margin: 0;
  max-width: 35ch;
  color: rgba(239, 246, 255, .71);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.68;
}

.hardware-metric {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.hardware-metric strong {
  font-size: clamp(32px, 3.5vw, 54px);
  line-height: 1;
  color: var(--hardware-accent);
  letter-spacing: -.05em;
}

.hardware-metric span {
  max-width: 13ch;
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hardware-callout {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: var(--detail);
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate3d(0, calc((1 - var(--detail)) * 12px), 0);
}

.hardware-callout::before {
  content: "";
  width: clamp(40px, 6vw, 82px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hardware-accent));
}

.hardware-callout::after {
  content: "";
  order: -1;
  width: 6px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--hardware-accent);
  box-shadow: 0 0 16px var(--hardware-accent);
}

.hardware-callout--window { top: 22%; right: -7%; }
.hardware-callout--display { bottom: 27%; left: -9%; flex-direction: row-reverse; }
.hardware-callout--display::before { background: linear-gradient(90deg, var(--hardware-accent), transparent); }

.hardware-scroll-cue {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 24px;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, calc(.58 - var(--p) * .8));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hardware-scroll-cue::before {
  content: "";
  width: 1px;
  height: 30px;
  background: linear-gradient(var(--hardware-accent), transparent);
  animation: cue-pulse 1.8s ease-in-out infinite;
}

@keyframes cue-pulse {
  0%, 100% { transform: scaleY(.55); transform-origin: top; opacity: .45; }
  50% { transform: scaleY(1); opacity: 1; }
}

.brand-refresh .story-media img {
  object-position: center;
  filter: saturate(1.04) contrast(1.02);
}

.brand-refresh .buy-card > img,
.brand-refresh .buy-product img,
.brand-refresh [data-buy-card] > img {
  object-fit: contain;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, .28));
}

@media (max-width: 980px) {
  .brand-refresh .hero-grad {
    background: linear-gradient(180deg, rgba(2, 5, 15, .33) 0%, rgba(2, 5, 15, .92) 58%, #02050f 100%) !important;
  }

  .brand-refresh .hero-bg { background-position: 67% center !important; }

  .hardware-scroll { height: 260vh; }
  .hardware-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    align-content: center;
    gap: 0;
    min-height: 620px;
    padding: 88px 24px 48px;
  }

  .hardware-copy {
    position: absolute;
    left: 24px;
    right: 24px;
    max-width: 560px;
  }

  .hardware-copy--intro { top: 92px; }
  .hardware-copy--detail { bottom: 48px; justify-self: auto; }
  .hardware-copy h2 { font-size: clamp(42px, 11vw, 72px); }
  .hardware-copy--detail h3 { font-size: clamp(30px, 7.5vw, 48px); }
  .hardware-copy p { font-size: 15px; max-width: 34ch; }
  .hardware-metric { display: none; }

  .hardware-stage {
    grid-row: 1 / -1;
    height: 100%;
    min-height: 540px;
  }

  .hardware-product-zoom {
    height: min(67svh, 650px);
    max-width: 58vw;
    transform:
      translate3d(14vw, calc((.38 - var(--p)) * 4vh), 0)
      rotateY(calc(-8deg + var(--p) * 12deg))
      scale(calc(.66 + var(--p) * .6));
  }

  .hardware-aura { width: 78vw; }
  .hardware-ring { width: 69vw; }
  .hardware-callout { display: none; }
}

@media (max-width: 760px) {
  .brand-refresh .buy-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-refresh .buy-card > *,
  .brand-refresh .buy-media,
  .brand-refresh .buy-info,
  .brand-refresh .variants,
  .brand-refresh .variant,
  .brand-refresh .buy-actions,
  .brand-refresh .buy-perks {
    min-width: 0;
    max-width: 100%;
  }

  .brand-refresh .buy-actions {
    flex-wrap: wrap;
  }

  .brand-refresh .buy-add {
    min-width: min(180px, 100%);
  }
}

@media (max-width: 640px) {
  .brand-refresh .hero-product img {
    max-height: 48vh !important;
    animation-duration: 7.5s;
  }

  .hardware-scroll { height: 235vh; }
  .hardware-sticky { padding-inline: 18px; }
  .hardware-copy { left: 18px; right: 18px; }
  .hardware-copy--intro { top: 86px; }
  .hardware-copy--detail { bottom: 62px; }
  .hardware-copy h2 { max-width: 8ch; }
  .hardware-copy p { max-width: 30ch; line-height: 1.55; }
  .hardware-product-zoom {
    height: min(61svh, 570px);
    max-width: 64vw;
    transform:
      translate3d(18vw, calc((.38 - var(--p)) * 3vh), 0)
      rotateY(calc(-6deg + var(--p) * 10deg))
      scale(calc(.62 + var(--p) * .52));
  }
  .hardware-scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-refresh .hero-product img,
  .hardware-scroll-cue::before { animation: none !important; }
  .hardware-scroll { height: auto; }
  .hardware-sticky {
    position: relative;
    min-height: 820px;
  }
  .hardware-product-zoom {
    transform: scale(.95) rotateY(4deg) !important;
    will-change: auto;
  }
  .hardware-copy--intro { opacity: 1; transform: none; }
  .hardware-copy--detail { opacity: 1; transform: none; }
  .hardware-callout { opacity: 1; transform: none; }
}
