/* Interactive tariff playground — ui-ux-pro-max: bento, motion, clear hierarchy */

.tariff-playground {
  --tp-accent: #0ea5e9;
  --tp-glow: rgba(14, 165, 233, 0.4);
  position: relative;
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--tp-accent) 12%, transparent), transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.tariff-playground::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}

.tariff-playground__grid {
  position: relative;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 1024px) {
  .tariff-playground__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: stretch;
  }
}

.tariff-playground__panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem;
  border-radius: 1.5rem;
  border: 1px solid var(--aw-border);
  background: var(--aw-surface);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.06);
}

.plan-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.35rem;
  border-radius: 1rem;
  background: #f1f5f9;
}

.plan-switcher__btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--aw-muted);
  background: transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.plan-switcher__btn:hover {
  color: var(--aw-text);
  background: rgba(255, 255, 255, 0.7);
}

.plan-switcher__btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--tp-accent), color-mix(in srgb, var(--tp-accent) 55%, #14b8a6));
  box-shadow: 0 8px 24px -8px var(--tp-glow);
  transform: translateY(-1px);
}

.tariff-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .tariff-metrics { grid-template-columns: repeat(4, 1fr); }
}

.tariff-metric {
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--aw-border);
  background: linear-gradient(180deg, #fff, #f8fafc);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.tariff-playground[data-active-plan] .tariff-metric {
  border-color: color-mix(in srgb, var(--tp-accent) 25%, var(--aw-border));
}

.tariff-metric__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--aw-muted);
  margin-bottom: 0.25rem;
}

.tariff-metric__value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--aw-text);
  transition: transform 0.2s;
}

.tariff-metric.is-bump .tariff-metric__value {
  animation: metric-bump 0.35s ease;
}

@keyframes metric-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); color: var(--tp-accent); }
  100% { transform: scale(1); }
}

.tariff-extra {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px dashed color-mix(in srgb, var(--tp-accent) 35%, var(--aw-border));
  background: color-mix(in srgb, var(--tp-accent) 4%, #fff);
  transition: opacity 0.25s;
}

.tariff-extra.is-disabled,
.tariff-extra[hidden] {
  opacity: 0.45;
  pointer-events: none;
}

.tariff-extra__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.tariff-extra input[type='range'] {
  width: 100%;
  accent-color: var(--tp-accent);
  cursor: pointer;
}

.tariff-extra__hint {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--aw-muted);
}

.tariff-price-card {
  padding: 1.25rem 1.35rem;
  border-radius: 1.15rem;
  background: linear-gradient(135deg, #0f172a, #0c4a6e 55%, #134e4a);
  color: #e2e8f0;
  box-shadow: 0 20px 50px -20px var(--tp-glow);
}

.tariff-price-card__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tariff-price-card__amount {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1;
}

.tariff-price-card__amount small {
  font-size: 1rem;
  font-weight: 600;
  color: #94a3b8;
}

.tariff-price-card__meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.tariff-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tariff-feature {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--aw-border);
  background: #f8fafc;
  color: var(--aw-muted);
  transition: all 0.25s;
}

.tariff-feature.is-on {
  border-color: color-mix(in srgb, var(--tp-accent) 40%, transparent);
  background: color-mix(in srgb, var(--tp-accent) 12%, #fff);
  color: color-mix(in srgb, var(--tp-accent) 80%, #0f172a);
}

.tariff-feature.is-off {
  opacity: 0.45;
  text-decoration: line-through;
}

/* Live infra SVG */
.infra-stage {
  position: relative;
  min-height: 320px;
  padding: 1rem;
  border-radius: 1.5rem;
  border: 1px solid var(--aw-border);
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--tp-accent) 14%, transparent), transparent 55%),
    #0a1220;
  overflow: hidden;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
}

.infra-stage__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.infra-stage__badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse-dot 2s ease infinite;
}

.infra-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
}

.infra-hub__core {
  fill: url(#infraHubGrad);
  filter: drop-shadow(0 0 18px var(--tp-glow));
}

.infra-hub__ring {
  fill: none;
  stroke: color-mix(in srgb, var(--tp-accent) 55%, transparent);
  stroke-width: 2;
  opacity: 0.7;
}

.infra-hub__label,
.infra-node__label,
.infra-more {
  fill: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  font-family: Inter, system-ui, sans-serif;
}

.infra-hub__label {
  fill: #e2e8f0;
  font-size: 11px;
}

.infra-node__core {
  fill: color-mix(in srgb, var(--tp-accent) 75%, #1e293b);
}

.infra-node__ring {
  fill: none;
  stroke: color-mix(in srgb, var(--tp-accent) 50%, transparent);
  stroke-width: 1.5;
  opacity: 0.85;
}

.infra-link {
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1;
}

.infra-pulse {
  fill: #38bdf8;
}

.infra-vm {
  fill: #a7f3d0;
  opacity: 0.85;
}

.infra-stage[data-tier='3'] .infra-vm { fill: #fde68a; }
.infra-stage[data-tier='1'] .infra-vm { fill: #cbd5e1; }

/* Hero live chips */
.hero-live {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.hero-live__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-live__chip strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Object gallery — volumetric platform objects */
.object-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

.object-tile {
  position: relative;
  padding: 1.15rem 1rem 1rem;
  border-radius: 1.15rem;
  border: 1px solid var(--aw-border);
  background: linear-gradient(165deg, color-mix(in srgb, var(--aw-surface) 92%, #0ea5e9 8%), var(--aw-surface));
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: default;
  overflow: hidden;
}

.object-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--obj-accent, #38bdf8) 18%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.object-tile:hover::before { opacity: 1; }

.object-tile:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--obj-accent, var(--aw-from)) 40%, var(--aw-border));
  box-shadow:
    0 16px 40px color-mix(in srgb, var(--obj-accent, #0ea5e9) 22%, transparent),
    0 0 0 1px color-mix(in srgb, var(--obj-accent, #0ea5e9) 12%, transparent);
}

.object-tile__visual {
  --obj-accent: #38bdf8;
  width: 58px;
  height: 58px;
  margin: 0 auto 0.7rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--obj-accent) 28%, #0f172a) 0%, #020617 100%);
  box-shadow:
    0 10px 24px color-mix(in srgb, var(--obj-accent) 35%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -3px 10px rgba(0, 0, 0, 0.35);
  transform: perspective(500px) rotateX(10deg);
  transition: transform 0.25s ease;
}

.object-tile:hover .object-tile__visual {
  transform: perspective(500px) rotateX(4deg) translateY(-3px) scale(1.06);
}

.object-tile__visual svg {
  width: 36px;
  height: 36px;
  display: block;
}

.object-tile__icon {
  font-size: 1.65rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}

.object-tile__name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.object-tile__meta {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--aw-muted);
}

.object-tile.is-live::after {
  content: '';
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: obj-live-pulse 2.2s ease-in-out infinite;
}

@keyframes obj-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
  .plan-switcher__btn.is-active { transform: none; }
  .object-tile:hover { transform: none; }
  .object-tile:hover .object-tile__visual { transform: none; }
  .object-tile.is-live::after { animation: none; }
  .tariff-metric.is-bump .tariff-metric__value { animation: none; }
}
