/* ==========================================================================
   SWASLife · Components
   Reusable building blocks: buttons, cards, nav, hero rotator, etc.
   Tailwind handles layout/atomic classes; these handle custom behavior.
   ========================================================================== */

/* -------- Hero background (animated mesh) -------- */
.mesh-bg {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(40% 40% at 20% 20%, rgba(255, 181, 0, 0.45) 0%, transparent 70%),
    radial-gradient(40% 40% at 80% 10%, rgba(255, 122, 26, 0.40) 0%, transparent 65%),
    radial-gradient(45% 45% at 70% 80%, rgba(233, 78, 27, 0.32) 0%, transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(247, 181, 0, 0.30) 0%, transparent 70%);
  filter: blur(40px);
  animation: drift 18s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

/* -------- Floating shapes -------- */
.float-dot {
  position: absolute;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-yellow), var(--brand-600));
  opacity: 0.35;
  animation: floaty 9s ease-in-out infinite;
  filter: blur(0.4px);
}
.float-dot.ring {
  background: transparent;
  border: 1.5px dashed rgba(233, 78, 27, 0.45);
  opacity: 0.5;
}

/* -------- Glassmorphism card -------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.55) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 20px 50px -24px rgba(30, 30, 30, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: box-shadow var(--duration-base) var(--ease-out-soft);
}
.glass:hover {
  box-shadow:
    0 30px 70px -24px rgba(233, 78, 27, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* -------- Buttons -------- */
.btn-primary {
  background-image: var(--brand-gradient);
  background-size: 200% 200%;
  background-position: 0% 50%;
  transition:
    transform var(--duration-fast) var(--ease-out-soft),
    box-shadow var(--duration-fast) var(--ease-out-soft),
    background-position var(--duration-base) ease;
  box-shadow:
    0 14px 40px -12px rgba(233, 78, 27, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 50px -14px rgba(233, 78, 27, 0.70),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  background-position: 100% 50%;
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  transition:
    transform var(--duration-fast) var(--ease-out-soft),
    border-color var(--duration-fast) ease,
    background-color var(--duration-fast) ease;
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--brand-600);
  background-color: rgba(233, 78, 27, 0.04);
}

/* -------- Navigation link underline -------- */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-yellow), var(--brand-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-fast) ease;
}
.nav-link:hover::after { transform: scaleX(1); }

/* -------- Process timeline rail -------- */
.process-line {
  background: linear-gradient(
    90deg,
    rgba(247, 181, 0, 0.35),
    rgba(255, 122, 26, 0.6),
    rgba(233, 78, 27, 0.35)
  );
}

/* -------- Hero word rotator (own-line, slot-machine, zero shift) -------- */
.cycle {
  position: relative;
  display: block;
  overflow: hidden;           /* masks vertical slide */
  line-height: 1.05;
}
.cycle .ghost {
  visibility: hidden;         /* reserves exact width + height of widest word */
  display: inline-block;
  white-space: nowrap;
  pointer-events: none;
}
.cycle .item {
  position: absolute;
  left: 0; top: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(70%);
  transition:
    opacity var(--duration-base) ease,
    transform var(--duration-base) var(--ease-out-soft);
  background: var(--brand-gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-style: italic;
  will-change: opacity, transform;
}
.cycle .item.active  { opacity: 1; transform: translateY(0); }
.cycle .item.leaving { opacity: 0; transform: translateY(-70%); }

/* -------- Mobile menu panel + hamburger -------- */
.mobile-panel {
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}
.mobile-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.hamburger span {
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px)  rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
