/* ==========================================================================
   UX Peak–inspired polish layer
   25+ tactics layered on the existing white / black / red system
   ========================================================================== */

/* --- 1. 8pt spacing + type scale tokens --- */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --focus-ring: 0 0 0 3px rgba(225, 6, 0, 0.35);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.55);
}

/* --- 2. Page enter --- */
.page-enter {
  opacity: 0;
  transform: translateY(6px);
}
.page-enter--done {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

/* --- 3. Skip link (visible on focus) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus,
.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.75rem 1.1rem;
  background: #111;
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-lift);
}

/* --- 4. Scroll progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 10001;
  background: linear-gradient(90deg, #e10600, #ff4d45);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.45);
}

/* --- 5. Frosted sticky header that elevates --- */
.site-header {
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.site-header.is-scrolled {
  background: var(--glass) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}
.site-header--transparent.is-scrolled {
  --logo-filter: none;
  --social-filter: brightness(0);
  background: var(--glass) !important;
}
.site-header--transparent.is-scrolled .nav-links a,
.site-header--transparent.is-scrolled .nav-cta {
  color: #111 !important;
}

/* --- 6. Nav underline grow --- */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease-out);
}
.nav-links a:hover::after,
.nav-links a.is-active::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

/* --- 7. Focus only when keyboard --- */
.ux-mouse *:focus {
  outline: none;
}
.ux-keyboard *:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

/* --- 8. Button hierarchy + press states --- */
.btn,
.date-action,
.show-card__cta,
.filter-chip,
.mobile-sticky-cta__btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.btn:active,
.date-action:active,
.show-card__cta:active,
.mobile-sticky-cta__btn:active {
  transform: scale(0.97) !important;
}
.btn-primary,
.btn-hero-primary,
.nav-cta {
  box-shadow: 0 8px 22px rgba(225, 6, 0, 0.22);
}
.btn-primary:hover,
.btn-hero-primary:hover,
.nav-cta:hover {
  box-shadow: 0 12px 28px rgba(225, 6, 0, 0.32);
}

/* --- 9. Ripple --- */
.ux-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ux-ripple 0.55s var(--ease-out) forwards;
  pointer-events: none;
  z-index: 1;
}
@keyframes ux-ripple {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* --- 10. Magnetic buttons keep smoothness --- */
.ux-magnetic {
  will-change: transform;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out) !important;
}

/* --- 11. Staggered reveal --- */
.ux-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
  transition-delay: var(--stagger, 0ms);
}
.ux-reveal.is-revealed {
  opacity: 1;
  transform: none;
}

/* --- 12. Image fade-in --- */
img.ux-img {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
img.ux-img.is-loaded {
  opacity: 1;
}

/* --- 13. Cards: layered shadow + lift --- */
.show-card,
.date-row,
.testimonial-card,
.show-fact-card,
.coming-soon-panel {
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out);
}
.show-card:hover,
.date-row:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1), 0 2px 0 rgba(225, 6, 0, 0.08);
}

/* --- 14. Section breathing room + visual hierarchy --- */
.section-kicker {
  letter-spacing: 0.14em !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  color: #e10600 !important;
}
.section-title {
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-title--left {
  position: relative;
}
.section-head-row {
  margin-bottom: 1.75rem;
  align-items: flex-end;
  gap: 1rem;
}

/* --- 15. Soft mesh wash behind light sections --- */
.upcoming-strip,
.tour-section,
.contact-section,
.story {
  position: relative;
}
.upcoming-strip::before,
.tour-section::before,
.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(225, 6, 0, 0.05), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(0, 0, 0, 0.03), transparent 55%);
  z-index: 0;
}
.upcoming-strip > .container,
.tour-section > .container,
.contact-section > .container {
  position: relative;
  z-index: 1;
}

/* --- 16. Trust / social-proof stats strip --- */
.ux-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}
@media (min-width: 700px) {
  .ux-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}
.ux-stat {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  text-align: left;
}
.ux-stat__num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.ux-stat__num span {
  color: #e10600;
}
.ux-stat__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #666;
  font-weight: 600;
}

/* --- 17. Back to top --- */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  border: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out),
    background 0.2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.back-to-top:hover {
  background: #e10600;
}
@media (max-width: 899px) {
  .back-to-top {
    bottom: 5.25rem;
  }
}

/* --- 18. Mobile sticky CTA --- */
.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92) 30%);
  transform: translateY(110%);
  transition: transform 0.35s var(--ease-out);
  pointer-events: none;
}
.mobile-sticky-cta.is-visible {
  transform: none;
  pointer-events: auto;
}
.mobile-sticky-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 50px;
  border-radius: 999px;
  background: #e10600;
  color: #fff !important;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(225, 6, 0, 0.35);
}
@media (min-width: 900px) {
  .mobile-sticky-cta {
    display: none !important;
  }
}

/* --- 19. Toasts --- */
.toast-host {
  position: fixed;
  top: calc(var(--header-h) + 0.75rem);
  right: 0.75rem;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.toast {
  background: #111;
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.toast.is-in {
  opacity: 1;
  transform: none;
}
.toast--success {
  background: #0f7a3f;
}
.toast--error {
  background: #b80500;
}

/* --- 20. Form UX: floating-feel labels, invalid, focus glow --- */
.form-field {
  position: relative;
  transition: transform 0.2s ease;
}
.form-field label {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #555;
  transition: color 0.2s ease;
}
.form-field input,
.form-field textarea,
.form-field select {
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 12px !important;
  min-height: 48px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  background: #fff !important;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: #e10600 !important;
  box-shadow: 0 0 0 4px rgba(225, 6, 0, 0.12) !important;
  outline: none !important;
}
.form-field.is-filled label {
  color: #111;
}
.form-field.is-invalid input,
.form-field.is-invalid textarea {
  border-color: #e10600 !important;
  background: #fff8f7 !important;
}
.form-field.is-invalid::after {
  content: "Please check this field";
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #e10600;
  font-weight: 600;
}
.btn[disabled],
.btn.is-loading {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}
.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: ux-spin 0.7s linear infinite;
}

/* Honeypot — never show to humans */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-email-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.45;
}

.form-field .optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #888;
  font-size: 0.72rem;
}

.form-message a {
  color: #e10600;
  font-weight: 700;
  text-decoration: underline;
}
@keyframes ux-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- 21. Horizontal chip scroll affordance --- */
.ux-scroll-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.ux-scroll-row > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

/* --- 22. Hit targets 44px --- */
.filter-chip,
.nav-toggle,
.date-action,
.nav-social a {
  min-height: 44px;
}
.nav-social a {
  min-width: 44px;
  display: inline-grid;
  place-items: center;
}

/* --- 23. Breadcrumbs --- */
.ux-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.85rem;
}
.ux-breadcrumb a {
  color: #111;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.ux-breadcrumb a:hover {
  border-bottom-color: #e10600;
  color: #e10600;
}
.ux-breadcrumb__sep {
  opacity: 0.4;
}
.ux-breadcrumb__current {
  color: #888;
  font-weight: 600;
}

/* --- 24. Announcement / trust bar under hero --- */
.ux-announcement {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  background: #111;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ux-announcement span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.ux-announcement svg {
  flex-shrink: 0;
  opacity: 0.9;
}

/* --- 25. Empty / loading skeleton --- */
.page-loader {
  transition: opacity 0.35s ease;
}
.page-loader.is-done {
  opacity: 0;
}
.ux-skeleton {
  background: linear-gradient(90deg, #eee 25%, #f7f7f7 37%, #eee 63%);
  background-size: 400% 100%;
  animation: ux-shimmer 1.2s ease infinite;
  border-radius: 10px;
}
@keyframes ux-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* --- 26. Pause marquees --- */
.logo-track.is-paused,
.video-marquee__track.is-paused,
.marquee-track.is-paused {
  animation-play-state: paused !important;
}

/* --- 27. Save-data: no heavy hover video --- */
.ux-save-data .show-card__badge {
  display: none;
}

/* --- 28. Contact quick actions --- */
.ux-contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.25rem;
}
.ux-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  min-height: 44px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.ux-contact-chip:hover {
  border-color: #e10600;
  color: #e10600;
  background: #fff8f7;
}

/* --- 29. Hero CTA group breathing --- */
.hero-actions {
  gap: 0.65rem !important;
}
.hero-actions .btn {
  min-height: 48px;
  padding-inline: 1.25rem;
}

/* --- 30. Reduced motion hard stop --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ux-reveal,
  .page-enter,
  .page-enter--done,
  img.ux-img,
  .btn,
  .date-action,
  .show-card,
  .date-row {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ux-ripple {
    display: none !important;
  }
  .scroll-progress {
    display: none;
  }
}

/* --- 31. Content measure for readable text --- */
.rich-text,
.page-intro,
.show-hero__desc {
  max-width: 65ch;
}

/* --- 32. Sticky filters on tour dates (desktop) --- */
@media (min-width: 900px) {
  .filters--show {
    position: sticky;
    top: calc(var(--header-h) + 0.5rem);
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
  }
}

/* --- 33. Show card body micro hierarchy --- */
.show-card__body h3 {
  font-size: 0.98rem !important;
}
.show-card__cta {
  min-height: 44px;
}

/* --- 34. Subtle noise on white page (optional grain via CSS only) --- */
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* --- 35. Selection colour brand --- */
::selection {
  background: rgba(225, 6, 0, 0.18);
  color: #111;
}

/* --- Share bar (FB / LinkedIn / X / Pinterest) --- */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.15rem;
}
.share-bar__label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  margin-right: 0.25rem;
}
.share-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease,
    transform 0.15s ease;
}
.share-bar__btn:hover {
  border-color: #e10600;
  color: #e10600;
  background: #fff8f7;
}
.share-bar__btn--native {
  background: #111;
  color: #fff;
  border-color: #111;
}
.share-bar__btn--native:hover {
  background: #e10600;
  border-color: #e10600;
  color: #fff;
}
.share-bar__btn.is-copied {
  background: #0f7a3f;
  border-color: #0f7a3f;
  color: #fff;
}

.page-main .share-bar {
  margin-bottom: 1.25rem;
}
