/* Per-stop landscapes — only visible in planet mode (html[data-site-mode="planet"]). */

.bg-scape .scape-layer,
.bg-scape .scape-glow,
.bg-scape .scape-sky-obj {
  opacity: 0;
  transition:
    opacity 2.4s cubic-bezier(0.4, 0, 0.2, 1),
    background 2.8s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 2.8s ease,
    filter 2.8s ease,
    transform 2.8s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-site-mode="planet"] .bg-scape .scape-glow {
  inset: 0;
  opacity: 1;
  background: radial-gradient(ellipse 90% 55% at 50% 100%, var(--scape-glow), transparent 70%);
  filter: blur(8px);
}

/* —— Agents: mirror fjord + floating agent platforms —— */
html[data-site-theme="agents"][data-site-mode="planet"] .scape-sky-obj--a {
  width: 2.5rem;
  height: 2.5rem;
  top: 14%;
  right: 22%;
  border-radius: 50%;
  opacity: 0.9;
  background: radial-gradient(circle at 35% 35%, #e8f8ff, #88b8d8 70%);
  box-shadow: 0 0 24px rgba(92, 239, 255, 0.4);
}

html[data-site-theme="agents"][data-site-mode="planet"] .scape-sky-obj--b {
  width: 1.25rem;
  height: 1.25rem;
  top: 20%;
  right: 28%;
  border-radius: 50%;
  opacity: 0.75;
  background: #c8e0f0;
}

html[data-site-theme="agents"][data-site-mode="planet"] .scape-back {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 22%;
  height: 38%;
  background: linear-gradient(180deg, var(--scape-2) 0%, var(--scape-3) 100%);
  clip-path: polygon(
    0% 100%,
    0% 45%,
    12% 38%,
    28% 52%,
    42% 30%,
    58% 48%,
    72% 28%,
    88% 42%,
    100% 35%,
    100% 100%
  );
  filter: drop-shadow(0 -8px 20px rgba(92, 239, 255, 0.25));
}

html[data-site-theme="agents"][data-site-mode="planet"] .scape-mid {
  opacity: 1;
  width: 34%;
  height: 8%;
  left: 18%;
  bottom: 26%;
  background: linear-gradient(180deg, var(--scape-1), var(--scape-2));
  clip-path: polygon(8% 100%, 0% 35%, 25% 0%, 75% 0%, 100% 40%, 92% 100%);
  box-shadow:
    0 0 30px var(--theme-accent-soft),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

html[data-site-theme="agents"][data-site-mode="planet"] .scape-feature {
  opacity: 1;
  width: 28%;
  height: 6%;
  right: 20%;
  bottom: 28%;
  background: linear-gradient(180deg, var(--scape-1), var(--scape-3));
  clip-path: polygon(10% 100%, 5% 30%, 50% 0%, 95% 35%, 90% 100%);
  box-shadow: 0 0 24px rgba(92, 239, 255, 0.35);
}

html[data-site-theme="agents"][data-site-mode="planet"] .scape-water {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(20, 60, 90, 0.5) 25%,
    rgba(10, 40, 70, 0.85) 100%
  );
}

html[data-site-theme="agents"][data-site-mode="planet"] .scape-feature--b {
  opacity: 0.55;
  inset: 8% 0 auto;
  height: 35%;
  background: linear-gradient(
    125deg,
    transparent 30%,
    rgba(92, 239, 255, 0.15) 45%,
    rgba(140, 100, 255, 0.2) 55%,
    transparent 70%
  );
  filter: blur(20px);
  animation: scape-aurora 18s ease-in-out infinite;
}

/* —— Evals: benchmark ridge (histogram mountains) —— */
html[data-site-theme="evals"][data-site-mode="planet"] .scape-back {
  opacity: 0.6;
  left: 0;
  right: 0;
  bottom: 30%;
  height: 25%;
  background: var(--scape-3);
  clip-path: polygon(
    0% 100%,
    0% 70%,
    8% 70%,
    8% 40%,
    16% 40%,
    16% 75%,
    24% 75%,
    24% 25%,
    36% 25%,
    36% 80%,
    48% 80%,
    48% 35%,
    60% 35%,
    60% 65%,
    72% 65%,
    72% 20%,
    84% 20%,
    84% 55%,
    92% 55%,
    92% 45%,
    100% 45%,
    100% 100%
  );
}

html[data-site-theme="evals"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, var(--scape-2), var(--scape-3));
  clip-path: polygon(
    0% 100%,
    0% 55%,
    10% 55%,
    10% 30%,
    22% 30%,
    22% 60%,
    34% 60%,
    34% 15%,
    50% 15%,
    50% 50%,
    66% 50%,
    66% 25%,
    78% 25%,
    78% 45%,
    90% 45%,
    90% 35%,
    100% 35%,
    100% 100%
  );
}

html[data-site-theme="evals"][data-site-mode="planet"] .scape-feature {
  opacity: 1;
  left: 8%;
  right: 8%;
  top: 38%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--theme-accent), transparent);
  box-shadow: 0 0 20px var(--theme-accent);
}

html[data-site-theme="evals"][data-site-mode="planet"] .scape-feature--b {
  opacity: 0.25;
  inset: 20% 10%;
  background-image:
    linear-gradient(rgba(122, 232, 120, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 232, 120, 0.15) 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: linear-gradient(180deg, black, transparent 85%);
}

/* —— 0→1: volcanic dawn / genesis —— */
html[data-site-theme="zerotone"][data-site-mode="planet"] .scape-sky-obj--a {
  width: min(42vw, 14rem);
  height: min(42vw, 14rem);
  left: 50%;
  bottom: 32%;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: 1;
  background: radial-gradient(circle at 40% 40%, #fff8e0, #ffb040 45%, rgba(255, 100, 40, 0.2) 72%);
  box-shadow: 0 0 80px rgba(255, 140, 60, 0.55);
}

html[data-site-theme="zerotone"][data-site-mode="planet"] .scape-back {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 22%;
  height: 40%;
  background: var(--scape-3);
  clip-path: polygon(0% 100%, 0% 50%, 20% 35%, 40% 55%, 55% 25%, 75% 45%, 100% 30%, 100% 100%);
}

html[data-site-theme="zerotone"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background:
    linear-gradient(180deg, var(--scape-2), var(--scape-3)),
    repeating-linear-gradient(
      95deg,
      transparent,
      transparent 40px,
      rgba(255, 120, 40, 0.35) 40px,
      rgba(255, 80, 20, 0.5) 44px
    );
  clip-path: polygon(0% 100%, 0% 40%, 15% 55%, 35% 35%, 55% 50%, 70% 30%, 100% 45%, 100% 100%);
  box-shadow: inset 0 12px 40px rgba(255, 100, 30, 0.35);
}

html[data-site-theme="zerotone"][data-site-mode="planet"] .scape-feature {
  opacity: 0.5;
  left: 0;
  right: 0;
  bottom: 28%;
  height: 20%;
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(255, 100, 40, 0.5), transparent);
  filter: blur(12px);
}

/* —— Platform: stratospheric cloud terraces —— */
html[data-site-theme="platform"][data-site-mode="planet"] .scape-back {
  opacity: 0.5;
  left: -5%;
  right: -5%;
  top: 18%;
  height: 12%;
  background: rgba(255, 255, 255, 0.12);
  transform: skewY(-3deg);
  border-radius: 40% 60% 0 0;
  box-shadow: 0 30px 60px rgba(40, 120, 220, 0.2);
}

html[data-site-theme="platform"][data-site-mode="planet"] .scape-mid {
  opacity: 0.65;
  left: -8%;
  right: -8%;
  top: 32%;
  height: 14%;
  background: rgba(200, 230, 255, 0.18);
  transform: skewY(-2deg);
  border-radius: 30% 70% 0 0;
}

html[data-site-theme="platform"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, var(--scape-1) 0%, var(--scape-2) 40%, var(--scape-3) 100%);
  clip-path: polygon(0% 100%, 0% 55%, 100% 35%, 100% 100%);
}

html[data-site-theme="platform"][data-site-mode="planet"] .scape-feature,
html[data-site-theme="platform"][data-site-mode="planet"] .scape-feature--b,
html[data-site-theme="platform"][data-site-mode="planet"] .scape-feature--c {
  opacity: 1;
  height: 6%;
  background: linear-gradient(90deg, var(--scape-1), var(--scape-2));
  border-radius: 4px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

html[data-site-theme="platform"][data-site-mode="planet"] .scape-feature {
  width: 22%;
  left: 12%;
  bottom: 38%;
  transform: perspective(400px) rotateX(55deg) rotateZ(-4deg);
}

html[data-site-theme="platform"][data-site-mode="planet"] .scape-feature--b {
  width: 28%;
  left: 38%;
  bottom: 48%;
  transform: perspective(400px) rotateX(58deg);
}

html[data-site-theme="platform"][data-site-mode="planet"] .scape-feature--c {
  width: 20%;
  right: 14%;
  bottom: 42%;
  transform: perspective(400px) rotateX(52deg) rotateZ(5deg);
}

/* —— Compliance: monument pillars —— */
html[data-site-theme="compliance"][data-site-mode="planet"] .scape-back {
  opacity: 0.4;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 90%, rgba(232, 192, 64, 0.15), transparent);
}

html[data-site-theme="compliance"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(180deg, var(--scape-2), var(--scape-3));
  clip-path: polygon(0% 100%, 0% 60%, 100% 50%, 100% 100%);
}

html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature,
html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature--b,
html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature--c {
  opacity: 1;
  width: 5%;
  bottom: 18%;
  height: 42%;
  background: linear-gradient(180deg, var(--scape-1), var(--scape-3));
  border-radius: 2px 2px 0 0;
  box-shadow: inset 0 0 0 2px rgba(232, 192, 64, 0.35);
  position: absolute;
}

html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature {
  left: 18%;
}

html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature--b {
  left: 42%;
  height: 52%;
}

html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature--c {
  right: 20%;
  height: 38%;
}

html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature::after,
html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature--b::after,
html[data-site-theme="compliance"][data-site-mode="planet"] .scape-feature--c::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  top: 0;
  height: 8%;
  background: var(--theme-accent);
  box-shadow: 0 0 16px var(--theme-accent-soft);
}

/* —— Teams: firefly hills + constellation links —— */
html[data-site-theme="teams"][data-site-mode="planet"] .scape-back {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 28%;
  height: 35%;
  background: var(--scape-3);
  clip-path: ellipse(75% 100% at 50% 100%);
  filter: blur(1px);
}

html[data-site-theme="teams"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, var(--scape-2), var(--scape-3));
  clip-path: ellipse(90% 100% at 45% 100%);
}

html[data-site-theme="teams"][data-site-mode="planet"] .scape-feature {
  opacity: 1;
  inset: 0;
  background:
    radial-gradient(circle at 22% 58%, var(--theme-accent) 0%, transparent 0.35%),
    radial-gradient(circle at 38% 48%, #fff 0%, transparent 0.3%),
    radial-gradient(circle at 55% 52%, var(--theme-accent) 0%, transparent 0.35%),
    radial-gradient(circle at 72% 45%, #fff 0%, transparent 0.28%),
    radial-gradient(circle at 85% 55%, var(--theme-accent) 0%, transparent 0.32%),
    linear-gradient(
      125deg,
      transparent 21%,
      rgba(240, 160, 192, 0.35) 22%,
      rgba(240, 160, 192, 0.35) 22.2%,
      transparent 22.5%,
      transparent 37%,
      rgba(240, 160, 192, 0.3) 37.2%,
      transparent 38%,
      transparent 54%,
      rgba(240, 160, 192, 0.28) 54.3%,
      transparent 55%,
      transparent 71%,
      rgba(240, 160, 192, 0.25) 71.2%,
      transparent 72%
    );
  animation: scape-fireflies 6s ease-in-out infinite;
}

/* —— UH: Houston skyline + bayou —— */
html[data-site-theme="uh"][data-site-mode="planet"] .scape-back {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 32%;
  height: 38%;
  background: linear-gradient(180deg, #4a0818, var(--scape-3));
  clip-path: polygon(
    0% 100%,
    0% 55%,
    5% 55%,
    5% 35%,
    9% 35%,
    9% 60%,
    14% 60%,
    14% 25%,
    20% 25%,
    20% 70%,
    28% 70%,
    28% 40%,
    35% 40%,
    35% 15%,
    42% 15%,
    42% 65%,
    50% 65%,
    50% 30%,
    58% 30%,
    58% 75%,
    65% 75%,
    65% 20%,
    72% 20%,
    72% 55%,
    80% 55%,
    80% 38%,
    88% 38%,
    88% 62%,
    94% 62%,
    94% 45%,
    100% 45%,
    100% 100%
  );
}

html[data-site-theme="uh"][data-site-mode="planet"] .scape-mid {
  opacity: 1;
  left: 38%;
  right: 38%;
  bottom: 34%;
  height: 22%;
  background: linear-gradient(180deg, #c8102e, #880818);
  clip-path: polygon(0% 100%, 15% 0%, 85% 0%, 100% 100%);
  filter: drop-shadow(0 0 20px rgba(200, 16, 46, 0.4));
}

html[data-site-theme="uh"][data-site-mode="planet"] .scape-water {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: linear-gradient(180deg, rgba(40, 10, 20, 0.3), rgba(20, 5, 15, 0.9));
}

html[data-site-theme="uh"][data-site-mode="planet"] .scape-feature {
  opacity: 0.35;
  left: 0;
  right: 0;
  bottom: 18%;
  height: 12%;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    rgba(240, 208, 112, 0.15) 8px,
    rgba(240, 208, 112, 0.08) 12px
  );
  transform: scaleY(-1);
  filter: blur(2px);
}

/* —— Rocket: Martian badlands —— */
html[data-site-theme="rocket"][data-site-mode="planet"] .scape-back {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 25%;
  height: 45%;
  background: var(--scape-3);
  clip-path: polygon(0% 100%, 0% 40%, 25% 55%, 45% 25%, 65% 50%, 85% 20%, 100% 45%, 100% 100%);
}

html[data-site-theme="rocket"][data-site-mode="planet"] .scape-mid {
  opacity: 0.85;
  left: 0;
  right: 0;
  bottom: 12%;
  height: 35%;
  background: var(--scape-2);
  clip-path: polygon(0% 100%, 0% 50%, 30% 65%, 55% 35%, 80% 55%, 100% 30%, 100% 100%);
}

html[data-site-theme="rocket"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, var(--scape-1), var(--scape-3));
  clip-path: polygon(0% 100%, 0% 35%, 20% 55%, 45% 25%, 70% 45%, 100% 20%, 100% 100%);
}

html[data-site-theme="rocket"][data-site-mode="planet"] .scape-feature {
  opacity: 0.4;
  left: 10%;
  right: 10%;
  bottom: 8%;
  height: 25%;
  background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(255, 100, 80, 0.35), transparent);
  filter: blur(16px);
}

/* —— Wagepoint: prairie sunrise —— */
html[data-site-theme="wagepoint"][data-site-mode="planet"] .scape-sky-obj--a {
  width: 5rem;
  height: 5rem;
  left: 18%;
  bottom: 42%;
  border-radius: 50%;
  opacity: 0.95;
  background: radial-gradient(circle at 40% 40%, #fff8d0, #ffd060 60%, rgba(255, 180, 60, 0.2));
  box-shadow: 0 0 50px rgba(255, 200, 80, 0.45);
}

html[data-site-theme="wagepoint"][data-site-mode="planet"] .scape-back {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 30%;
  height: 30%;
  background: linear-gradient(180deg, #78c890, var(--scape-2));
  clip-path: ellipse(95% 100% at 50% 100%);
}

html[data-site-theme="wagepoint"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35%;
  background: linear-gradient(180deg, var(--scape-1), var(--scape-3));
  clip-path: ellipse(105% 100% at 40% 100%);
}

html[data-site-theme="wagepoint"][data-site-mode="planet"] .scape-feature {
  opacity: 1;
  width: 14%;
  height: 12%;
  left: 62%;
  bottom: 32%;
  background: linear-gradient(180deg, #8a5030, #5a3020);
  clip-path: polygon(0% 100%, 20% 40%, 50% 0%, 80% 35%, 100% 100%);
}

html[data-site-theme="wagepoint"][data-site-mode="planet"] .scape-feature--b {
  opacity: 1;
  width: 3%;
  height: 8%;
  left: 68%;
  bottom: 32%;
  background: #6a4030;
  border-radius: 2px 2px 0 0;
}

/* —— Workday: cumulus cathedral —— */
html[data-site-theme="workday"][data-site-mode="planet"] .scape-back {
  opacity: 0.85;
  width: 45%;
  height: 22%;
  left: 8%;
  top: 22%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff, rgba(200, 230, 255, 0.55) 50%, transparent 72%);
  filter: blur(2px);
}

html[data-site-theme="workday"][data-site-mode="planet"] .scape-mid {
  opacity: 0.9;
  width: 55%;
  height: 28%;
  right: 5%;
  top: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 55% 45%, #f0f8ff, rgba(120, 180, 240, 0.45) 55%, transparent 75%);
}

html[data-site-theme="workday"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  width: 38%;
  height: 18%;
  left: 32%;
  top: 32%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), transparent 70%);
  box-shadow: 40px 20px 0 -10px rgba(180, 220, 255, 0.45);
}

html[data-site-theme="workday"][data-site-mode="planet"] .scape-water {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(20, 80, 140, 0.35) 30%, var(--scape-3) 100%);
}

html[data-site-theme="workday"][data-site-mode="planet"] .scape-feature {
  opacity: 0.55;
  inset: auto 0 0;
  height: 25%;
  background: linear-gradient(180deg, transparent, rgba(61, 154, 232, 0.25));
}

/* —— Anna: monsoon campus coast —— */
html[data-site-theme="anna"][data-site-mode="planet"] .scape-back {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 28%;
  height: 42%;
  background: linear-gradient(180deg, #2868c8, var(--scape-3));
  clip-path: polygon(
    0% 100%,
    0% 50%,
    8% 50%,
    12% 15%,
    16% 15%,
    18% 45%,
    22% 45%,
    24% 10%,
    28% 10%,
    30% 40%,
    34% 40%,
    36% 8%,
    40% 8%,
    42% 38%,
    46% 38%,
    48% 12%,
    52% 12%,
    54% 42%,
    100% 55%,
    100% 100%
  );
}

html[data-site-theme="anna"][data-site-mode="planet"] .scape-mid {
  opacity: 1;
  width: 8%;
  height: 28%;
  left: 24%;
  bottom: 30%;
  background: linear-gradient(180deg, #c8a060, #6a4020);
  clip-path: polygon(30% 100%, 50% 0%, 70% 100%);
  filter: drop-shadow(4px 0 0 rgba(0, 0, 0, 0.2));
}

html[data-site-theme="anna"][data-site-mode="planet"] .scape-front {
  opacity: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32%;
  background: linear-gradient(180deg, var(--scape-1), var(--scape-2));
  clip-path: polygon(0% 100%, 0% 60%, 100% 45%, 100% 100%);
}

html[data-site-theme="anna"][data-site-mode="planet"] .scape-feature {
  opacity: 0.35;
  right: 12%;
  bottom: 28%;
  width: 18%;
  height: 35%;
  background: linear-gradient(165deg, transparent 40%, rgba(40, 100, 60, 0.5) 42%, rgba(30, 80, 50, 0.6) 100%);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

html[data-site-theme="anna"][data-site-mode="planet"] .scape-feature--b {
  opacity: 0.2;
  inset: 10% 0 0;
  background: repeating-linear-gradient(
    95deg,
    transparent,
    transparent 3px,
    rgba(180, 220, 255, 0.25) 3px,
    rgba(180, 220, 255, 0.08) 6px
  );
  animation: scape-rain 0.8s linear infinite;
}

@keyframes scape-aurora {
  0%,
  100% {
    transform: translateX(0) skewX(-5deg);
    opacity: 0.45;
  }
  50% {
    transform: translateX(4%) skewX(5deg);
    opacity: 0.65;
  }
}

@keyframes scape-fireflies {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

@keyframes scape-rain {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scape-feature--b,
  html[data-site-theme="teams"] .scape-feature,
  html[data-site-theme="agents"] .scape-feature--b {
    animation: none;
  }
}
