/* ================================================================
   LEDGE — GLOBAL DESIGN POLISH
   Applies across all pages. Include before </head>.
================================================================ */

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Page fade-in ── */
body {
  animation: ledge-fadein 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes ledge-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
body.page-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

/* ── Frosted glass nav (all pages) ── */
.nav {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* ── Purple button: shimmer sweep + glow lift ── */
.btn--primary,
.btn-continue,
.btn-share,
button.btn--primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease,
              opacity 0.15s ease !important;
}
/* shimmer layer */
.btn--primary::after,
.btn-continue::after,
.btn-share::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 62%,
    transparent 100%
  );
  transform: translateX(-100%) skewX(-8deg);
  transition: transform 0s;
  pointer-events: none;
}
.btn--primary:not(:disabled):hover,
.btn-continue:not(:disabled):hover,
.btn-share:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 30px rgba(122, 0, 92, 0.30) !important;
  opacity: 1 !important;
}
.btn--primary:not(:disabled):hover::after,
.btn-continue:not(:disabled):hover::after,
.btn-share:hover::after {
  transform: translateX(220%) skewX(-8deg);
  transition: transform 0.55s ease;
}
.btn--primary:not(:disabled):active,
.btn-continue:not(:disabled):active,
.btn-share:active {
  transform: translateY(0) scale(0.97) !important;
  box-shadow: none !important;
  transition-duration: 0.08s !important;
}

/* ── Scroll-reveal — DISABLED ── */
/* [data-reveal] animations removed per design review */
[data-reveal] { opacity: 1; transform: none; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ── Input / select focus glow ── */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(122, 0, 92, 0.10) !important;
  outline: none !important;
}

/* ── Footer noise texture ── */
.footer { position: relative; overflow: hidden; }
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.footer .footer__inner,
.footer nav,
.footer a,
.footer p,
.footer div,
.footer svg { position: relative; z-index: 1; }

/* ── Logo size override (all pages) ── */
.nav__logo svg  { height: 28px !important; width: auto !important; }
.footer__logo svg { height: 30px !important; width: auto !important; }

/* ── Gradient mesh hero card (landing + form pages) ── */
.hero__card,
.page-card-bg {
  background:
    radial-gradient(ellipse 70% 60% at 15% 40%, rgba(122, 0, 92, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 80% 70% at 85% 15%, rgba(199, 230, 251, 0.95) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 55% 85%, rgba(255, 242, 234, 0.6) 0%, transparent 55%),
    #C7E6FB !important;
}

/* ── Hero image colour grade overlay ── */
.hero__grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse 80% 60% at 70% 70%, rgba(122, 0, 92, 0.09) 0%, transparent 70%);
  mix-blend-mode: multiply;
}

/* ── Gradient text on hero title ── */
.hero__title {
  background: linear-gradient(140deg, #191717 0%, #3a0030 55%, #7A005C 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #191717; /* fallback */
}

/* ── Glassmorphism on form/entry cards ── */
.entry-card,
.vtype-card,
.signin-card,
.price-card {
  background: rgba(255, 255, 255, 0.76) !important;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.90) !important;
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.95) inset !important;
}

/* ── Step progress bar ── */
.step-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
}
.step-progress-bar__fill {
  height: 100%;
  background: var(--c-primary, #7A005C);
  border-radius: 0 2px 2px 0;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Select custom arrow glow on focus-within ── */
.select-wrap:focus-within::after {
  border-color: rgba(122, 0, 92, 0.6);
}

/* ── Outlined button hover ── */
.btn-search:hover,
.btn--outline:hover {
  border-color: #BDBDBD !important;
  background: rgba(0,0,0,0.025) !important;
}

/* ── Result price value glow ── */
.price-value {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}

/* ── Chart card subtle depth ── */
.chart-card,
.dep-section .chart-card {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05) !important;
}

/* ── Loading spinner glow ── */
.spinner {
  box-shadow: 0 0 12px rgba(122, 0, 92, 0.15);
}


/* ================================================================
   PREMIUM MOBILE FINISHING LAYER
   Native-app feel: tap response, safe areas, smooth scroll,
   honest focus states, reduced-motion respect.
================================================================ */

/* -- 1. Kill the grey iOS/Android tap flash; we draw our own -- */
* { -webkit-tap-highlight-color: transparent; }

/* -- 2. Lock font scaling + momentum scroll + no rubber-band chaining -- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -- 3. Safe-area insets for notched / gesture-bar devices -- */
.nav    { padding-top: env(safe-area-inset-top, 0px); }
.footer { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)) !important; }

/* -- 4. Honest focus: keyboard users get a ring, touch/mouse don't -- */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) { outline: none; box-shadow: none; }
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgba(122, 0, 92, 0.55);
  outline-offset: 3px;
  border-radius: 8px;
}

/* -- 5. Universal tap feedback: quick springy press on tappables -- */
a, button, [role="button"], .btn,
.nav__mob-btn, .nav__logo, .footer__logo,
.team-card, .vtype-card, .pill, .time-btn {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.nav__mob-btn, .nav__logo, .footer__logo,
.mnav-link, .mnav-close, .time-btn, .pill {
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.12s ease;
}
.nav__mob-btn:active,
.nav__logo:active,
.footer__logo:active,
.mnav-close:active { transform: scale(0.90); }
.mnav-link:active  { transform: scale(0.97); }

/* -- 6. Generous tap targets (Apple HIG >= 44px) -- */
.nav__mob-btn { min-width: 44px; min-height: 44px; }
.mnav-link    { min-height: 48px; }

/* -- 7. Drawer: contain scroll, respect safe area, smoother easing -- */
.mnav-drawer {
  overscroll-behavior: contain !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1) !important;
}

/* -- 8. Crisp media, no accidental image drag/selection -- */
img, svg { -webkit-user-drag: none; user-select: none; }
img { image-rendering: -webkit-optimize-contrast; }

/* -- 9. Prevent horizontal jitter on small screens -- */
html, body { max-width: 100%; overflow-x: hidden; }

/* -- 10. Respect users who ask for less motion -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { animation: none !important; }
}
