/* ==========================================================================
   Executive Luminary — Dr. Yaw Perbi Mobile Card & Slide-In Choreography
   ========================================================================== */

:root {
  --surface: #0b1326;
  --surface-lowest: #060e20;
  --surface-low: #131b2e;
  --surface-container: #171f33;
  --surface-high: #222a3d;
  --surface-highest: #2d3449;
  --on-surface: #dae2fd;
  --on-surface-variant: #d8c3ad;
  --primary: #ffc174;
  --primary-container: #f59e0b;
  --border-subtle: rgba(148, 163, 184, 0.12);
  --ease-executive: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  background-color: var(--surface);
  color: var(--on-surface);
}

body {
  overscroll-behavior-y: none;
  background-color: var(--surface);
  overflow-x: hidden;
}

::-webkit-scrollbar {
  display: none;
}

/* Ambient Background Canvas */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Refined Glassmorphism & Tonal Luxury Surfaces */
.glass-panel {
  position: relative;
  background: rgba(19, 27, 46, 0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-subtle);
  box-shadow:
    inset 0 1px 0 0 rgba(245, 158, 11, 0.24),
    0 24px 60px -15px rgba(6, 14, 32, 0.85);
}

.glass-tile {
  position: relative;
  background: rgba(23, 31, 51, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition:
    transform 0.32s var(--ease-executive),
    border-color 0.32s ease,
    background-color 0.32s ease,
    box-shadow 0.32s ease,
    opacity 0.65s var(--ease-executive);
}

.glass-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 193, 116, 0.45),
    transparent 65%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.glass-tile:hover::before {
  opacity: 1;
}

.glass-tile:hover {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(34, 42, 61, 0.82);
  box-shadow: 0 10px 28px -8px rgba(245, 158, 11, 0.16);
}

/* Tactile slide nudge on access rows */
.access-row.is-visible:hover {
  transform: translateX(4px);
}

/* Avatar Rotating Conic Halo */
.avatar-ring-wrap {
  position: relative;
  border-radius: 9999px;
  padding: 3px;
  background: linear-gradient(135deg, #ffc174 0%, #f59e0b 40%, #2d3449 100%);
  box-shadow: 0 0 36px -6px rgba(245, 158, 11, 0.35);
  transition: transform 0.45s var(--ease-executive), box-shadow 0.45s ease;
}

.avatar-ring-wrap::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 260deg,
    rgba(255, 193, 116, 0.78) 310deg,
    transparent 360deg
  );
  z-index: -1;
  animation: spinSlow 8s linear infinite;
  opacity: 0.75;
}

.avatar-ring-wrap:hover {
  transform: scale(1.04);
  box-shadow: 0 0 46px -4px rgba(245, 158, 11, 0.5);
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Primary CTA Shimmer Sweep */
.btn-gold-shimmer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(105deg, #ffc174 0%, #f59e0b 50%, #ff9837 100%);
  transition: transform 0.25s var(--ease-executive), box-shadow 0.3s ease;
}

.btn-gold-shimmer::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.42),
    transparent
  );
  transform: skewX(-25deg);
  animation: shimmerSweep 4.2s ease-in-out infinite;
}

.btn-gold-shimmer:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.45);
}

.btn-gold-shimmer:active {
  transform: translateY(0) scale(0.985);
}

@keyframes shimmerSweep {
  0%, 60% {
    left: -75%;
  }
  100% {
    left: 135%;
  }
}

/* ==========================================================================
   Executive Slide-In Choreography
   ========================================================================== */
.slide-item {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity 0.65s var(--ease-executive),
    transform 0.65s var(--ease-executive),
    border-color 0.32s ease,
    background-color 0.32s ease,
    box-shadow 0.32s ease;
}

.slide-from-top {
  transform: translateY(-14px);
}

.slide-from-bottom {
  transform: translateY(20px);
}

.slide-from-left {
  transform: translateX(-26px);
}

.slide-from-right {
  transform: translateX(24px);
}

.slide-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Confirmation toast slide-up */
@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-slide-in {
  animation: toastSlideUp 0.32s var(--ease-executive) forwards;
}

/* Accordion Smooth Expand */
.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.36s var(--ease-executive);
}

.accordion-item.is-open .accordion-body {
  grid-template-rows: 1fr;
}

.accordion-inner {
  overflow: hidden;
}

.accordion-chevron {
  transition: transform 0.32s var(--ease-executive);
}

.accordion-item.is-open .accordion-chevron {
  transform: rotate(180deg);
}

/* Modal Backdrop & Bottom-Sheet Slide-Up Entrance */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  transform: translateY(34px);
  transition: transform 0.38s var(--ease-executive);
}
.modal-overlay.is-open .modal-card {
  transform: translateY(0);
}

/* Floating Ambient Orbs */
@keyframes floatSlow {
  0%, 100% {
    transform: translate3d(-50%, 0, 0);
  }
  50% {
    transform: translate3d(-50%, -16px, 0);
  }
}

.animate-float-slow {
  animation: floatSlow 9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .avatar-ring-wrap::after,
  .btn-gold-shimmer::after,
  .animate-float-slow,
  .toast-slide-in {
    animation: none;
  }
  .slide-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .glass-tile,
  .accordion-body,
  .modal-card {
    transition: none;
  }
}
