/* =========================================================================
   PROP28 ACADEMY — SITE POLISH LAYER
   Loaded after the build's compiled stylesheet on purpose: this file fixes
   layout/contrast issues in the hero and normalizes typography + buttons
   across every page, and adds tasteful, modern motion.
   ========================================================================= */

/* ---------- 1. Smooth foundation ---------- */
html {
  scroll-behavior: smooth;
}

* {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 2. HERO: fix the badge/photo arrangement ---------- */
/* Give the image column breathing room so floating cards never crowd
   the subject's face or clip off the container edge. */
.hero-shell {
  grid-template-columns: 44% 56% !important;
  gap: clamp(24px, 4vw, 56px);
}

.hero-image-wrap {
  height: 420px !important;
  padding-right: 34px;
  display: flex;
  align-items: stretch;
}

.hero-image {
  width: 82% !important;
  max-width: 82%;
  flex-shrink: 0;
}

/* Rebuild the two floating stat cards as clean, high-contrast glass chips
   that live in the reserved gutter beside the photo — not on top of it. */
.glass-stat {
  width: 168px !important;
  right: 0 !important;
  left: auto !important;
  background: linear-gradient(150deg, #14103fee, #1c0d4bee) !important;
  border: 1px solid #ffffff26 !important;
  box-shadow: 0 18px 40px #08051f66, inset 0 1px #ffffff20 !important;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.stat-top {
  top: 6px !important;
}

.stat-bottom {
  bottom: 6px !important;
  right: 0 !important;
}

.glass-stat strong {
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -0.3px;
}

.glass-stat small {
  color: #cfd3ff !important;
  font-weight: 500;
  opacity: 0.9;
}

.stat-icon {
  flex-shrink: 0;
}

/* ---------- 3. HERO: calmer, more legible type scale ---------- */
.hero-copy h1 {
  font-size: clamp(40px, 4.4vw, 64px) !important;
  letter-spacing: -1.5px !important;
  font-weight: 800 !important;
  line-height: 1.04 !important;
}

.hero-copy h1 span {
  background-size: 200% auto;
  animation: p28TextShimmer 6s ease-in-out infinite;
}

@keyframes p28TextShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.eyebrow-script {
  font-size: 22px !important;
  font-weight: 700 !important;
}

.hero-copy p {
  font-size: 16px !important;
  max-width: 46ch;
}

/* ---------- 4. Buttons: guarantee visibility everywhere ---------- */
.button-primary,
.btn-primary,
.book-link,
.contact-form button,
.estimator-card button {
  color: #fff !important;
  font-weight: 800 !important;
  letter-spacing: .4px;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .3s var(--premium-ease, ease), box-shadow .3s ease !important;
}

.button-primary:hover,
.btn-primary:hover,
.book-link:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 22px 50px #2777ff5c !important;
}

.button-secondary,
.btn-ghost {
  font-weight: 800 !important;
  letter-spacing: .4px;
  border-radius: 999px !important;
  transition: all .3s ease !important;
}

/* Ensure ghost/secondary buttons stay readable on light backgrounds too */
body:not(.home-page) .button-secondary,
body:not(.home-page) .btn-ghost {
  color: var(--premium-text, #12142f);
  border-color: #8e48ff;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #20d7e8;
  outline-offset: 3px;
}

/* ---------- 5. Category / program cards: subtle lift + tilt ---------- */
.category-card,
.quote-card,
.program-card,
.gallery-item,
.pricing-card {
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease !important;
}

.category-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 45px #00000030;
}

.quote-card:hover,
.pricing-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 30px 70px #1624642a !important;
}

.gallery-item:hover {
  transform: scale(1.03) !important;
}

/* ---------- 6. Section headings: consistent, calmer hierarchy ---------- */
.section-heading h2,
.included-copy h2,
.pricing-card h2,
.contact-copy h2 {
  font-size: clamp(30px, 3.4vw, 46px) !important;
  letter-spacing: -1.2px !important;
  font-weight: 800 !important;
}

.section-heading small,
.included-copy > small,
.pricing-card > small,
.estimator-card > small,
.contact-copy > small {
  font-size: 12px !important;
}

/* ---------- 6b. Category cards: stop clipping the second line of text ---------- */
.category-row {
  align-items: stretch !important;
}

.category-card {
  min-height: 108px !important;
  padding: 16px 17px !important;
}

.category-card small {
  white-space: normal !important;
  line-height: 1.35 !important;
}

/* ---------- 7. Scroll reveal: smoother, staggered ---------- */
.reveal,
.reveal-up,
.reveal-left,
.reveal-right {
  transition-timing-function: cubic-bezier(.2,.8,.2,1) !important;
}

/* ---------- 8. Marquee ticker: real seamless auto-scroll ---------- */
.marquee {
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex !important;
  width: max-content;
  animation: p28MarqueeScroll 28s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes p28MarqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- 9. Auto-sliding testimonial / gallery carousels ---------- */
.testimonial-grid.p28-carousel-ready,
.gallery-grid.p28-carousel-ready {
  display: flex !important;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.testimonial-grid.p28-carousel-ready::-webkit-scrollbar,
.gallery-grid.p28-carousel-ready::-webkit-scrollbar {
  display: none;
}

.testimonial-grid.p28-carousel-ready > *,
.gallery-grid.p28-carousel-ready > * {
  flex: 0 0 min(380px, 86vw);
  scroll-snap-align: start;
}

.p28-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.p28-carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #d7d9f2;
  cursor: pointer;
  padding: 0;
  transition: all .3s ease;
}

.p28-carousel-dots button.active {
  width: 24px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--p28-cyan, #22d9ff), var(--p28-violet, #873cff));
}

/* ---------- 10. Scroll progress bar + back-to-top ---------- */
#p28-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--p28-cyan, #22d9ff), var(--p28-violet, #873cff), var(--p28-pink, #ff2aa6));
  z-index: 9999;
  transition: width .1s ease-out;
}

#p28-back-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #22d9ff, #873cff);
  color: #fff;
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 30px #08051f4d;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all .3s ease;
  z-index: 9998;
}

#p28-back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#p28-back-to-top:hover {
  transform: translateY(-4px);
}

/* ---------- 11. Responsive safety net ---------- */
@media (max-width: 860px) {
  .hero-shell {
    grid-template-columns: 1fr !important;
  }
  .hero-image-wrap {
    height: 320px !important;
    padding-right: 0;
    margin-top: 20px;
  }
  .glass-stat {
    width: 148px !important;
  }
}
