/* BYOP — interactive Build Your Own Package */

.byop-page {
  --byop-ink: #071018;
  --byop-panel: rgba(12, 22, 38, 0.72);
  --byop-line: rgba(255, 255, 255, 0.1);
  --byop-hot: #ff7a1a;
  --byop-mint: #3dd6c6;
  --byop-sky: #4ea1ff;
}

.byop {
  padding: calc(var(--header-h) + 1.5rem) 0 4.5rem;
}

.byop-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2.25rem;
}

.byop-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--byop-mint);
}

.byop-pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--byop-mint);
  box-shadow: 0 0 0 0 rgba(61, 214, 198, 0.55);
  animation: byopPulse 1.8s var(--ease) infinite;
}

@keyframes byopPulse {
  70% { box-shadow: 0 0 0 12px rgba(61, 214, 198, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 214, 198, 0); }
}

.byop-mark {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.06em 0.12em 0.08em 0.02em;
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 5.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow: visible;
  background: linear-gradient(120deg, #fff 10%, var(--byop-hot) 55%, #ffd28a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: byopMarkIn 0.9s var(--ease) both;
}

.byop-hero h1 {
  margin: 0 0 0.9rem;
  overflow: visible;
}

@keyframes byopMarkIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.byop-title {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.6vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.byop-lead {
  max-width: 34rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.byop-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.byop-step {
  border: 1px solid var(--byop-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, color 0.25s, background 0.25s;
}

.byop-step:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: rgba(255, 122, 26, 0.45);
}

.byop-step.is-active {
  color: #1a1208;
  background: linear-gradient(120deg, #ffb067, var(--byop-hot));
  border-color: transparent;
}

.byop-orbit {
  position: relative;
  min-height: 340px;
  display: grid;
  place-items: center;
}

.byop-orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  animation: byopSpin linear infinite;
}

.byop-orbit-ring-1 {
  width: 150px;
  height: 150px;
  animation-duration: 22s;
}

.byop-orbit-ring-2 {
  width: 210px;
  height: 210px;
  animation-duration: 30s;
  animation-direction: reverse;
  border-style: solid;
  border-color: rgba(78, 161, 255, 0.12);
}

.byop-orbit-ring-3 {
  width: 270px;
  height: 270px;
  animation-duration: 38s;
  border-color: rgba(255, 122, 26, 0.16);
}

.byop-orbit-ring-4 {
  width: 330px;
  height: 330px;
  animation-duration: 48s;
  animation-direction: reverse;
  border-style: solid;
  border-color: rgba(61, 214, 198, 0.12);
}

@keyframes byopSpin {
  to { transform: rotate(360deg); }
}

.byop-orbit-slot {
  position: absolute;
  inset: 0;
  transform: rotate(var(--a, 0deg));
}

.byop-orbit-badge {
  position: absolute;
  top: 0;
  left: 50%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #f8fafc;
  background: rgba(10, 18, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  animation-name: byopSpin;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: reverse;
}

.byop-orbit-ring-1 .byop-orbit-badge { animation-duration: 22s; }
.byop-orbit-ring-2 .byop-orbit-badge {
  animation-duration: 30s;
  animation-direction: normal;
}
.byop-orbit-ring-3 .byop-orbit-badge { animation-duration: 38s; }
.byop-orbit-ring-4 .byop-orbit-badge {
  animation-duration: 48s;
  animation-direction: normal;
}

.byop-orbit-badge svg {
  width: 15px;
  height: 15px;
  display: block;
}

.byop-orbit-core {
  position: relative;
  z-index: 2;
  width: 108px;
  height: 108px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
  background: linear-gradient(145deg, rgba(255, 122, 26, 0.28), rgba(78, 161, 255, 0.18));
  border: 1px solid rgba(255, 122, 26, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: byopCore 3.2s ease-in-out infinite;
}

@keyframes byopCore {
  50% { transform: translateY(-6px) scale(1.03); }
}

.byop-layout {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 360px);
  gap: 1.25rem;
  align-items: start;
}

.byop-builder {
  display: grid;
  gap: 1rem;
}

.byop-stage {
  background: var(--byop-panel);
  border: 1px solid var(--byop-line);
  border-radius: 22px;
  padding: 1.25rem 1.3rem 1.4rem;
  backdrop-filter: blur(14px);
  transform: translateY(10px);
  opacity: 0;
  animation: byopRise 0.7s var(--ease) forwards;
}

.byop-stage:nth-child(2) { animation-delay: 0.08s; }
.byop-stage:nth-child(3) { animation-delay: 0.16s; }

@keyframes byopRise {
  to { opacity: 1; transform: none; }
}

.byop-stage.is-focus {
  border-color: rgba(255, 122, 26, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 122, 26, 0.18), 0 18px 40px rgba(0, 0, 0, 0.25);
}

.byop-stage-nested {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  animation: none;
  opacity: 1;
  transform: none;
}

.byop-stage-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.byop-stage-num {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--byop-hot);
  background: rgba(255, 122, 26, 0.12);
  border: 1px solid rgba(255, 122, 26, 0.28);
}

.byop-stage-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.byop-stage-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.byop-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.byop-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 1rem 0.9rem;
  border-radius: 18px;
  border: 1px solid var(--byop-line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.28s, background 0.28s, box-shadow 0.28s;
}

.byop-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.byop-tile:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.22);
}

.byop-tile.is-on,
.byop-tile:has(input:checked) {
  border-color: rgba(255, 122, 26, 0.55);
  background: linear-gradient(160deg, rgba(255, 122, 26, 0.16), rgba(78, 161, 255, 0.08));
  box-shadow: 0 12px 28px rgba(255, 122, 26, 0.12);
}

.byop-tile.is-pop {
  animation: byopPop 0.45s var(--ease);
}

@keyframes byopPop {
  40% { transform: scale(1.04); }
}

.byop-tile-icon {
  width: 44px;
  height: 44px;
  color: var(--byop-hot);
}

.byop-tile-icon svg {
  width: 100%;
  height: 100%;
}

.byop-tile-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.byop-tile-body strong {
  font-size: 0.95rem;
}

.byop-tile-body span {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.byop-tile-meta {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: start;
}

.byop-tile-check {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  opacity: 0.45;
  transition: 0.25s var(--ease);
}

.byop-tile:has(input:checked) .byop-tile-check {
  opacity: 1;
  background: var(--byop-hot);
  border-color: var(--byop-hot);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.byop-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
}

.byop-includes li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 650;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(61, 214, 198, 0.08);
  border: 1px solid rgba(61, 214, 198, 0.22);
  color: #d7fff9;
}

.byop-sliders {
  display: grid;
  gap: 0.85rem;
}

.byop-slider label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}

.byop-slider output {
  font-family: var(--display);
  color: var(--byop-hot);
}

.byop-slider input[type="range"] {
  width: 100%;
  accent-color: var(--byop-hot);
}

.byop-plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.65rem;
}

.byop-plat {
  position: relative;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
  padding: 0.95rem 0.55rem;
  border-radius: 16px;
  border: 1px solid var(--byop-line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.byop-plat input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.byop-plat:hover {
  transform: translateY(-3px);
}

.byop-plat.is-locked {
  cursor: default;
  border-color: rgba(61, 214, 198, 0.28);
  background: rgba(61, 214, 198, 0.07);
}

.byop-plat:has(input:checked) {
  border-color: rgba(255, 122, 26, 0.55);
  background: rgba(255, 122, 26, 0.12);
  transform: translateY(-3px) scale(1.02);
}

.byop-plat-icon {
  width: 28px;
  height: 28px;
  color: var(--text);
  display: grid;
  place-items: center;
}

.byop-plat-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.byop-plat strong {
  font-size: 0.78rem;
}

.byop-plat em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.byop-custom {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.byop-custom input {
  flex: 1;
  border-radius: 12px;
  border: 1px solid var(--byop-line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 0.7rem 0.85rem;
}

.byop-dock {
  position: sticky;
  top: calc(var(--header-h) + 3rem);
  padding: 1.3rem 1.25rem 1.4rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 122, 26, 0.28);
  background: linear-gradient(165deg, rgba(20, 28, 46, 0.95), rgba(10, 14, 24, 0.98));
  overflow: hidden;
}

.byop-dock-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 55%;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.22), transparent 70%);
  pointer-events: none;
}

.byop-dock-kicker {
  position: relative;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--byop-hot);
}

.byop-stack {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 2.4rem;
  margin-bottom: 1rem;
}

.byop-stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: byopChipIn 0.35s var(--ease) both;
}

@keyframes byopChipIn {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

.byop-total {
  position: relative;
  margin: 0.15rem 0 0.35rem;
  font-family: var(--display);
  font-size: 2.25rem;
  letter-spacing: -0.04em;
  transition: transform 0.25s var(--ease), color 0.25s;
}

.byop-total.is-bump {
  color: #ffd28a;
  transform: scale(1.05);
}

.byop-cta {
  width: 100%;
  justify-content: center;
  margin-top: 0.35rem;
  animation: byopCtaGlow 2.8s ease-in-out infinite;
}

@keyframes byopCtaGlow {
  50% { box-shadow: 0 0 0 6px rgba(255, 122, 26, 0.12); }
}

.plan-disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.25);
}

@media (max-width: 980px) {
  .byop-hero,
  .byop-layout,
  .byop-tiles,
  .byop-plat-grid {
    grid-template-columns: 1fr;
  }

  .byop-orbit {
    min-height: 300px;
    order: -1;
  }

  .byop-orbit-ring-1 { width: 120px; height: 120px; }
  .byop-orbit-ring-2 { width: 170px; height: 170px; }
  .byop-orbit-ring-3 { width: 220px; height: 220px; }
  .byop-orbit-ring-4 { width: 270px; height: 270px; }
  .byop-orbit-badge { width: 30px; height: 30px; margin-left: -15px; margin-top: -15px; }
  .byop-orbit-badge svg { width: 13px; height: 13px; }

  .byop-dock {
    position: static;
  }

  .byop-plat-grid {
    grid-template-columns: 1fr 1fr;
  }
}
