/* ===================================================================
   ALTHEA SOUL — EMIL KOWALSKI DESIGN ENGINEERING MOTION SYSTEM
   Sitewide, unhurried, graceful scroll reveals & tactile micro-physics.
   =================================================================== */

:root {
  /* Emil's signature gentle quintic ease-out curve */
  --ease-emil: cubic-bezier(0.16, 1, 0.3, 1);
  /* Responsive press feedback curve */
  --ease-press: cubic-bezier(0.23, 1, 0.32, 1);
  /* Serene hover curve */
  --ease-hover: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Unhurried duration calibrated for luxury mindfulness */
  --duration-reveal: 850ms;
}

/* --------------------------------------------------
   1. Universal Scroll Reveals
   Starts with gentle 22px translation + opacity.
   Never scale(0) — physical weight preserved.
   -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--duration-reveal) var(--ease-emil),
              transform var(--duration-reveal) var(--ease-emil);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scale & Translation reveal for imagery, emblems, and portraits */
.reveal-scale {
  opacity: 0;
  transform: scale(0.96) translateY(14px);
  transition: opacity 950ms var(--ease-emil),
              transform 950ms var(--ease-emil);
  will-change: opacity, transform;
}

.reveal-scale.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* --------------------------------------------------
   2. Cascading Stagger System
   Rhythmic, cascading delays between adjacent elements.
   -------------------------------------------------- */
.stagger-group > *:nth-child(1) { transition-delay: 40ms; }
.stagger-group > *:nth-child(2) { transition-delay: 110ms; }
.stagger-group > *:nth-child(3) { transition-delay: 180ms; }
.stagger-group > *:nth-child(4) { transition-delay: 250ms; }
.stagger-group > *:nth-child(5) { transition-delay: 320ms; }
.stagger-group > *:nth-child(6) { transition-delay: 390ms; }
.stagger-group > *:nth-child(7) { transition-delay: 460ms; }
.stagger-group > *:nth-child(8) { transition-delay: 530ms; }
.stagger-group > *:nth-child(9) { transition-delay: 600ms; }
.stagger-group > *:nth-child(10) { transition-delay: 670ms; }

/* --------------------------------------------------
   3. Tactile Button & Link Feedback
   Button scales to 0.97 on press for instant sensory feedback.
   -------------------------------------------------- */
button,
a[class*="rounded-full"],
.btn-press,
input[type="submit"] {
  transition: transform 160ms var(--ease-press),
              background-color 220ms ease,
              border-color 220ms ease,
              box-shadow 220ms ease,
              color 220ms ease;
}

button:active,
a[class*="rounded-full"]:active,
.btn-press:active,
input[type="submit"]:active {
  transform: scale(0.97) !important;
}

/* --------------------------------------------------
   4. Tactile Hover Physics (Gated for Pointer Devices)
   Avoids hover sticking on iOS/Android touchscreen taps.
   -------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  /* All card-like containers, packages, badges, policy blocks */
  .hover-lift,
  .faq-item,
  div[class*="rounded-2xl"]:not(nav *):not(#mobileDrawer *),
  div[class*="rounded-3xl"]:not(nav *):not(#mobileDrawer *) {
    transition: transform 380ms var(--ease-hover),
                border-color 300ms ease,
                background-color 300ms ease,
                box-shadow 300ms ease;
  }

  .hover-lift:hover,
  .faq-item:hover,
  div[class*="rounded-2xl"]:not(nav *):not(#mobileDrawer *):hover,
  div[class*="rounded-3xl"]:not(nav *):not(#mobileDrawer *):hover {
    transform: translateY(-2px);
  }

  .hover-glow:hover {
    box-shadow: 0 14px 38px -8px rgba(215, 160, 87, 0.18);
  }

  /* Grid cell hovers (5x2 grid) */
  .grid-cell-hover {
    transition: background-color 300ms ease, transform 300ms var(--ease-hover);
  }
  .grid-cell-hover:hover {
    background-color: rgba(28, 25, 23, 0.85);
  }
  .grid-cell-hover:hover svg {
    transform: scale(1.09);
  }
  .grid-cell-hover svg {
    transition: transform 350ms var(--ease-hover);
  }

  /* Buttons gentle hover float */
  button:hover,
  a[class*="rounded-full"]:hover {
    transform: translateY(-1px);
  }

  /* Interactive Links */
  nav a,
  footer a,
  .text-gold {
    transition: color 200ms ease, transform 200ms var(--ease-hover);
  }
  nav a:hover,
  footer a:hover {
    transform: translateY(-1px);
  }
}

/* --------------------------------------------------
   5. Form Inputs Focus Polish
   -------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  transition: border-color 220ms ease,
              box-shadow 220ms ease,
              background-color 220ms ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(215, 160, 87, 0.6);
  box-shadow: 0 0 0 3px rgba(215, 160, 87, 0.12);
}

/* --------------------------------------------------
   6. Accessibility: prefers-reduced-motion
   Completely bypasses transforms for users with motion sensitivity.
   -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-scale,
  .stagger-group > *,
  div[class*="rounded-2xl"],
  div[class*="rounded-3xl"],
  .faq-item {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 200ms ease !important;
  }

  button:active,
  a[class*="rounded-full"]:active,
  .btn-press:active,
  button:hover,
  a[class*="rounded-full"]:hover,
  .hover-lift:hover {
    transform: none !important;
  }
}
