/*
 * ============================================================
 * Browns Digital — Proprietary Software
 * ============================================================
 * Copyright (c) 2026 Robert Brown / Browns Digital. All rights reserved.
 *
 * CONFIDENTIAL — NOT FOR DISTRIBUTION
 *
 * Unauthorised reproduction, distribution, modification, or
 * reverse engineering of this material is strictly prohibited.
 * No licence is granted except by express written agreement.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
 * Governing Law: Republic of South Africa | contact@brownsdigital.org
 * ============================================================
 */
.page.active [data-reveal]:not(.is-revealed):not(.is-animating) {
  opacity: 0;
  transition: none;
}

.page.active [data-reveal].is-revealed {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 768px) {
  /* Mobile: only bypass reveals for low-power mode; let GSAP animate normally */
  html.low-power #about.page.active:not(.is-entering):not(.is-exiting) [data-reveal],
  html.low-power #experience.page.active:not(.is-entering):not(.is-exiting) [data-reveal],
  html.low-power #examples.page.active:not(.is-entering):not(.is-exiting) [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    transition: none !important;
  }
}


.page.active [data-reveal="fade-up"]:not(.is-revealed) {
  transform: translate3d(0, 48px, 0);
}

.page.active [data-reveal="fade-down"]:not(.is-revealed) {
  transform: translate3d(0, -32px, 0);
}

.page.active [data-reveal="fade"]:not(.is-revealed) {
  transform: translateZ(0);
}

.page.active [data-reveal="scale"]:not(.is-revealed) {
  transform: scale(0.92) translateZ(0);
}

.page.active [data-reveal="slide-left"]:not(.is-revealed) {
  transform: translate3d(40px, 0, 0);
}

.page.active [data-reveal="slide-right"]:not(.is-revealed) {
  transform: translate3d(-40px, 0, 0);
}

/* Parallax media */
[data-parallax] {
  will-change: transform;
  transform: translateZ(0);
}

html.low-power [data-parallax] {
  will-change: auto;
}

/* ── Scroll-driven background ── */
body {
  --scroll-progress: 0;
  --bg-shift: calc(var(--scroll-progress) * 12%);
}

.hero-glow {
  transform: translateX(-50%) translateY(calc(var(--scroll-progress) * 24px));
  opacity: calc(1 - var(--scroll-progress) * 0.35);
  transition: opacity 0.15s ease-out;
}

html.low-power .hero-glow {
  transform: translateX(-50%);
  opacity: 0.7;
}

/* ── Package compare ── */
.compare-section {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.compare-heading {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #111;
  margin: 0 0 12px;
  text-align: center;
}

.compare-lead {
  font-size: 17px;
  color: #6e6e73;
  text-align: center;
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

.compare-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.compare-stage-wrap {
  position: sticky;
  top: 110px;
}

.compare-stage {
  perspective: 1200px;
  perspective-origin: 50% 40%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 40px 100px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

html.low-power .compare-stage {
  backdrop-filter: none;
  background: rgba(255, 255, 255, 0.92);
}

.compare-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(53, 92, 255, calc(0.06 + var(--scroll-progress) * 0.04)),
    transparent 55%
  );
  pointer-events: none;
  transition: background 0.4s ease;
}

.compare-product {
  position: relative;
  width: 200px;
  height: 260px;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(8deg) translateZ(0);
  transition: transform 0.1s linear;
  will-change: transform;
}

.compare-product__face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(160deg, #ffffff 0%, #f0f2f8 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  backface-visibility: hidden;
}

.compare-product__face--back {
  transform: rotateY(180deg) translateZ(2px);
}

.compare-product__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6e6e73;
  margin-bottom: 8px;
}

.compare-product__name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1d1d1f;
  margin: 0 0 4px;
}

.compare-product__price {
  font-size: 15px;
  color: #1d1d1f;
  font-weight: 600;
  margin-bottom: 16px;
}

.compare-product__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
  overflow: hidden;
}

.compare-product__bar span {
  display: block;
  height: 100%;
  width: 65%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d1d1f, #555);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.compare-product__meta {
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.45;
  margin-top: auto;
}

.compare-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.compare-tab {
  flex: 1;
  min-width: 90px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
  color: #6e6e73;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: inherit;
}
/* @bd-origin:BD-A6B0-E400-D904 */

.compare-tab:hover {
  color: #1d1d1f;
  transform: translateY(-1px);
}

.compare-tab.is-active {
  color: #111;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.compare-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #6e6e73;
  margin-bottom: 16px;
  cursor: pointer;
  user-select: none;
}

.compare-toggle input {
  accent-color: #1d1d1f;
  width: 16px;
  height: 16px;
}

.compare-table-wrap {
  border-radius: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.compare-table-wrap:not(.is-expanded) [data-plan]:not(.is-highlight) {
  opacity: 0.42;
}

.compare-table-wrap.is-expanded [data-plan] {
  opacity: 1;
}

html.low-power .compare-table-wrap {
  backdrop-filter: none;
  background: rgba(255, 255, 255, 0.95);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.compare-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6e6e73;
  background: rgba(0, 0, 0, 0.02);
}

.compare-table td {
  color: #1d1d1f;
  transition: background 0.3s ease;
}

.compare-table col.is-highlight {
  background: rgba(0,0,0,0.03);
}

.compare-table th.is-highlight,
.compare-table td.is-highlight {
  background: rgba(0,0,0,0.04);
  font-weight: 600;
}

.compare-table .cell-no {
  color: #dc2626;
}

.compare-table .cell-yes {
  color: #15803d;
}

.compare-cta {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.compare-cta .hero-cta,
.compare-cta .panel-link {
  margin: 0;
}

.compare-note {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 16px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .compare-layout {
    grid-template-columns: 1fr;
  }

  .compare-stage-wrap {
    position: relative;
    top: 0;
  }

  .compare-stage {
    min-height: 260px;
  }

  .compare-product {
    width: 170px;
    height: 220px;
  }

  .compare-table-wrap {
    overflow-x: auto;
  }

  .compare-table {
    min-width: 520px;
  }
}

@media (max-width: 768px) {
  .compare-section {
    margin-top: 64px;
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    box-sizing: border-box;
  }

  .compare-heading {
    font-size: 28px;
  }

  .compare-lead {
    font-size: 15px;
    margin-bottom: 28px;
    padding: 0 4px;
  }

  .compare-layout {
    gap: 24px;
    width: 100%;
    min-width: 0;
  }

  .compare-panel {
    width: 100%;
    min-width: 0;
  }

  .compare-stage {
    min-height: 200px;
  }

  .compare-product {
    width: 150px;
    height: 200px;
  }

  .compare-tabs {
    gap: 6px;
  }

  .compare-tab {
    min-width: 0;
    padding: 10px 12px;
    font-size: 12px;
  }

  .compare-toggle {
    font-size: 12px;
    line-height: 1.4;
    align-items: flex-start;
  }

  .compare-table-wrap {
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* Collapsed: only Feature + selected plan (fits screen) */
  .compare-table-wrap:not(.is-expanded) th[data-plan]:not(.is-highlight),
  .compare-table-wrap:not(.is-expanded) td[data-plan]:not(.is-highlight) {
    display: none;
  }

  .compare-table-wrap:not(.is-expanded) .compare-table {
    min-width: 0;
    width: 100%;
  }

  .compare-table-wrap.is-expanded .compare-table {
    min-width: 480px;
  }

  .compare-table th,
  .compare-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .compare-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .compare-cta .hero-cta,
  .compare-cta .panel-link {
    width: 100%;
    text-align: center;
    margin-top: 0 !important;
    position: static;
  }

  .compare-note {
    font-size: 11px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .compare-stage-wrap {
    display: none;
  }

  .compare-heading {
    font-size: 24px;
  }
}
