:root {
  --products-hero-image: url("products-command-center-hero-light.webp");
  --products-section-image: url("products-command-center-section-light.webp");
  --products-flow-line: rgba(200, 100, 60, 0.34);
  --products-flow-soft: rgba(95, 122, 79, 0.2);
}

:root[data-theme="dark"] {
  --products-hero-image: url("products-command-center-hero-dark.webp");
  --products-section-image: url("products-command-center-section-dark.webp");
  --products-flow-line: rgba(26, 167, 255, 0.38);
  --products-flow-soft: rgba(119, 215, 255, 0.18);
}

.product-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-image: none;
}

.product-hero::before,
.product-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.product-hero::before {
  z-index: -2;
  background:
    linear-gradient(90deg, var(--ink) 0%, color-mix(in oklab, var(--ink) 82%, transparent) 38%, color-mix(in oklab, var(--ink) 20%, transparent) 78%),
    var(--products-hero-image);
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.product-hero::after {
  z-index: -1;
  opacity: 0.42;
  background:
    linear-gradient(115deg, transparent 0 39%, var(--products-flow-line) 40%, transparent 42% 100%),
    linear-gradient(152deg, transparent 0 56%, var(--products-flow-soft) 57%, transparent 59% 100%);
  background-size: 190% 100%, 170% 100%;
  mix-blend-mode: screen;
}

.product-hero .hero-inner,
.product-command-section .wrap {
  position: relative;
  z-index: 1;
}

.product-hero-copy {
  position: relative;
  z-index: 2;
}

.product-media-lockup {
  width: fit-content;
  padding: 8px 12px 8px 8px;
  border: 1px solid color-mix(in oklab, var(--line-2) 72%, transparent);
  background: color-mix(in oklab, var(--ink) 58%, transparent);
  backdrop-filter: blur(18px);
}

.product-avatar {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: contain;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.product-hero-visual {
  position: relative;
  min-height: clamp(380px, 42vw, 620px);
  margin-right: clamp(-90px, -5vw, -28px);
  transform: translateY(24px);
}

.product-hero-visual::before {
  content: "";
  position: absolute;
  inset: 12% -8% 4% 12%;
  background:
    radial-gradient(circle at 62% 44%, var(--products-flow-line), transparent 24%),
    radial-gradient(circle at 76% 62%, var(--products-flow-soft), transparent 30%);
  filter: blur(22px);
  opacity: 0.68;
  pointer-events: none;
}

.product-cover-preview {
  position: absolute;
  inset: 0;
  width: 116%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  opacity: 0.7;
  filter: saturate(1.08) contrast(1.03);
  mix-blend-mode: screen;
  clip-path: polygon(12% 0, 100% 0, 100% 90%, 68% 100%, 4% 82%, 0 20%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 72%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 72%, transparent 100%);
}

.product-cover-preview-light {
  display: none;
}

.product-command-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.product-command-section::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 0;
  width: min(70vw, 1180px);
  height: min(48vw, 680px);
  min-height: 420px;
  background: var(--products-section-image) center right / cover no-repeat;
  opacity: 0.22;
  transform: translateX(12%);
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse at 72% 28%, #000 0 36%, transparent 72%);
  mask-image: radial-gradient(ellipse at 72% 28%, #000 0 36%, transparent 72%);
}

.command-center-visual {
  position: relative;
  height: clamp(250px, 31vw, 420px);
  margin: clamp(-8px, -1vw, 0px) 0 clamp(24px, 3vw, 42px);
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.command-center-visual::before,
.command-center-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.command-center-visual::before {
  z-index: 2;
  background:
    radial-gradient(circle at 24% 54%, color-mix(in oklab, var(--products-flow-line) 65%, transparent), transparent 22%),
    linear-gradient(90deg, var(--ink) 0%, color-mix(in oklab, var(--ink) 8%, transparent) 32%, transparent 62%, var(--ink) 100%);
}

.command-center-visual::after {
  z-index: 3;
  opacity: 0.5;
  background:
    linear-gradient(104deg, transparent 0 42%, var(--products-flow-line) 43%, transparent 45% 100%),
    linear-gradient(152deg, transparent 0 58%, var(--products-flow-soft) 59%, transparent 61% 100%);
  background-size: 180% 100%, 160% 100%;
  mix-blend-mode: screen;
}

.command-center-visual-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 108%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.86;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 72%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 72%, transparent 100%);
}

.command-center-visual-img-light {
  display: none;
}

.product-option {
  overflow: hidden;
}

.product-option::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 112px;
  height: 58px;
  opacity: 0.16;
  background:
    linear-gradient(90deg, var(--products-flow-line) 0 44%, transparent 44% 100%),
    linear-gradient(90deg, color-mix(in oklab, var(--paper) 62%, transparent) 0 64%, transparent 64% 100%),
    linear-gradient(90deg, var(--products-flow-soft) 0 74%, transparent 74% 100%);
  background-size: 100% 2px, 100% 2px, 100% 2px;
  background-position: 0 12px, 0 29px, 0 46px;
  background-repeat: no-repeat;
  pointer-events: none;
}

.product-option[aria-pressed="true"]::after,
.product-option:hover::after,
.product-option:focus-visible::after {
  opacity: 0.3;
}

.product-rail {
  isolation: isolate;
}

.product-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background:
    radial-gradient(circle at 90% 12%, var(--products-flow-line), transparent 30%),
    linear-gradient(150deg, transparent 0 58%, var(--products-flow-soft) 59%, transparent 61% 100%);
  pointer-events: none;
}

html:root[data-theme="light"] body .product-hero {
  min-height: 86vh;
  padding-top: clamp(96px, 11vw, 142px);
  padding-bottom: clamp(46px, 6vw, 76px);
  color: #2a2520;
  background-color: #faf7f0;
}

html:root[data-theme="light"] body .product-hero::before {
  background:
    linear-gradient(90deg, #faf7f0 0%, rgba(250, 247, 240, 0.86) 36%, rgba(250, 247, 240, 0.28) 74%, rgba(250, 247, 240, 0.12) 100%),
    var(--products-hero-image);
  background-size: cover;
  background-position: center right;
  opacity: 0.95;
}

html:root[data-theme="light"] body .product-hero::after,
html:root[data-theme="light"] body .command-center-visual::after {
  mix-blend-mode: multiply;
  opacity: 0.34;
}

html:root[data-theme="light"] body .product-hero .hero-inner {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  min-height: calc(86vh - 118px);
}

html:root[data-theme="light"] body .product-hero-visual {
  display: block;
}

html:root[data-theme="light"] body .product-cover-preview-dark,
html:root[data-theme="light"] body .command-center-visual-img-dark {
  display: none;
}

html:root[data-theme="light"] body .product-cover-preview-light,
html:root[data-theme="light"] body .command-center-visual-img-light {
  display: block;
}

html:root[data-theme="light"] body .product-cover-preview {
  opacity: 0.56;
  filter: saturate(0.7) contrast(1.02);
  mix-blend-mode: multiply;
}

html:root[data-theme="light"] body .command-center-visual::before {
  background:
    radial-gradient(circle at 24% 54%, rgba(200, 100, 60, 0.16), transparent 24%),
    linear-gradient(90deg, #faf7f0 0%, rgba(250, 247, 240, 0.06) 34%, transparent 62%, #faf7f0 100%);
}

html:root[data-theme="light"] body .product-media-lockup {
  background: rgba(255, 253, 248, 0.66);
  border-color: rgba(169, 78, 44, 0.2);
}

@media (prefers-reduced-motion: no-preference) {
  .product-hero::after,
  .command-center-visual::after {
    animation: products-flow-drift 16s ease-in-out infinite alternate;
  }

  .product-cover-preview {
    animation: products-panel-drift 18s ease-in-out infinite alternate;
  }
}

@keyframes products-flow-drift {
  from {
    background-position: 0% 0%, 18% 0%;
  }
  to {
    background-position: 18% 0%, 0% 0%;
  }
}

@keyframes products-panel-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-10px, -6px, 0) scale(1.015);
  }
}

@media (max-width: 980px) {
  .product-hero-visual {
    margin-right: 0;
  }

  html:root[data-theme="light"] body .product-hero .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .product-hero {
    min-height: auto;
    padding-top: 104px;
    padding-bottom: 44px;
  }

  .product-hero::before {
    opacity: 0.72;
    background-position: 64% 50%;
  }

  .product-hero::after {
    opacity: 0.22;
  }

  .product-media-lockup {
    width: 100%;
    max-width: 340px;
  }

  .product-hero-visual {
    min-height: 228px;
    transform: none;
    margin-top: 8px;
  }

  .product-cover-preview {
    width: 112%;
    opacity: 0.5;
    clip-path: polygon(0 6%, 100% 0, 100% 84%, 70% 100%, 0 76%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 82%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 82%, transparent 100%);
  }

  .product-command-section::before {
    width: 120%;
    height: 460px;
    min-height: 0;
    opacity: 0.16;
    transform: translateX(8%);
  }

  .command-center-visual {
    height: 220px;
    margin-top: 0;
  }

  .command-center-visual-img {
    width: 120%;
    object-position: 70% center;
  }

  .product-option::after {
    width: 88px;
    right: 16px;
    bottom: 16px;
  }

  html:root[data-theme="light"] body .product-hero {
    min-height: auto;
    padding-top: 104px;
    padding-bottom: 44px;
  }
}
