/* ==========================================================================
   SWASLife · Components
   Reusable building blocks. Tailwind handles atomic layout; these handle
   custom behaviour, state and motion.
   ========================================================================== */

/* ==========================================================================
   1. BACKGROUNDS & DECORATION
   ========================================================================== */

.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;
}

.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--outline {
  background: transparent;
  border: 1.5px dashed rgba(233, 78, 27, 0.45);
  opacity: 0.5;
}

/* ==========================================================================
   2. SURFACES
   ========================================================================== */

.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);
}

/* ==========================================================================
   3. 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-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.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);
}

/* WhatsApp-specific button tint */
.btn-whatsapp {
  background-image: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
  box-shadow:
    0 14px 40px -12px rgba(29, 168, 81, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-whatsapp:hover {
  box-shadow:
    0 22px 50px -14px rgba(29, 168, 81, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   4. NAVIGATION
   ========================================================================== */

.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); }

.mobile-panel {
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;          /* keeps the 8 links out of the tab order */
  transition:
    opacity var(--duration-fast) ease,
    transform var(--duration-fast) ease,
    visibility 0s linear var(--duration-fast);
}
.mobile-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity var(--duration-fast) ease,
    transform var(--duration-fast) ease,
    visibility 0s;
}

.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); }

/* ==========================================================================
   5. HERO CAROUSEL
   Two slides, cross-faded. Grid-stacked so the tallest slide defines
   the height — prevents any layout shift when slides change.
   ========================================================================== */

.carousel {
  display: grid;
}
.carousel__slide {
  grid-area: 1 / 1;              /* all slides stack in the same cell */
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition:
    opacity var(--duration-base) ease,
    transform var(--duration-base) var(--ease-out-soft),
    visibility 0s linear var(--duration-base);
  pointer-events: none;
}
.carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity var(--duration-base) ease,
    transform var(--duration-base) var(--ease-out-soft),
    visibility 0s;
}

/* Dot navigation */
.carousel__dots {
  display: flex;
  align-items: center;
  gap: 2.5rem;   /* >= 36px so the 44px hit zones cannot overlap */
}
.carousel__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(30, 30, 30, 0.2);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: width var(--duration-fast) var(--ease-out-soft), background var(--duration-fast) ease;
}
/* Invisible 44x44 hit area — the visible dot is only 8px, far below the
   WCAG 2.5.5 / Apple HIG minimum touch target. */
.carousel__dot::after {
  content: "";
  position: absolute;
  inset: -18px;
}
.carousel__dot.is-active {
  width: 28px;
  background: var(--brand-gradient);
}

/* ==========================================================================
   6. WORD ROTATOR  (used inside hero slide 2)
   Ghost element reserves width+height so nothing shifts.
   ========================================================================== */

/* Grid-stacked so the ghost and the items share one cell. The ghost MUST use
   the same font-weight as the items — a 400-weight ghost under 700-weight items
   under-measures by ~8%, which silently clips the longest phrase. */
.cycle {
  display: grid;
  overflow: hidden;
  line-height: 1.35;
}
.cycle .ghost,
.cycle .item {
  grid-area: 1 / 1;
  font-weight: 700;
}
.cycle .ghost {
  visibility: hidden;
  pointer-events: none;
}
.cycle .item {
  opacity: 0;
  transform: translateY(60%);
  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;
  will-change: opacity, transform;
}
.cycle .item.active  { opacity: 1; transform: translateY(0); }
.cycle .item.leaving { opacity: 0; transform: translateY(-60%); }

/* ==========================================================================
   7. SERVICES ACCORDION
   Content stays in the DOM at all times (SEO-safe); only height animates.
   ========================================================================== */

.accordion__item {
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.accordion__item:hover {
  border-color: rgba(233, 78, 27, 0.28);
  box-shadow: 0 18px 40px -28px rgba(233, 78, 27, 0.5);
}
.accordion__item.is-open {
  border-color: rgba(233, 78, 27, 0.35);
  box-shadow: 0 22px 50px -30px rgba(233, 78, 27, 0.55);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;   /* long titles wrap; keep the +/x pinned to the top line */
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.accordion__icon {
  flex: 0 0 auto;
  margin-top: 0.125rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-600);
  transition: transform var(--duration-base) var(--ease-out-soft), background var(--duration-fast) ease;
}
.accordion__item.is-open .accordion__icon {
  transform: rotate(45deg);
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
}

/* Height animation via grid-template-rows (animatable, unlike `height: auto`) */
.accordion__panel {
  display: grid;
  grid-template-rows: 1fr;         /* open by default -> works without JS */
  transition: grid-template-rows var(--duration-base) var(--ease-out-soft);
}
.js-ready .accordion__panel            { grid-template-rows: 0fr; }
.js-ready .accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__panel-inner {
  overflow: hidden;
  min-height: 0;
}

/* ==========================================================================
   8. TESTIMONIALS
   ========================================================================== */

.testimonial {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* NB: em here resolves against this pseudo-element's own 5rem font-size, so a
   negative top pushes the glyph clean outside the card. Keep it positive. */
.testimonial::before {
  content: "\201C";                    /* opening curly quote */
  position: absolute;
  top: 0.15em;
  left: 0.35rem;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  background: var(--brand-gradient-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.26;
  pointer-events: none;
}
.testimonial__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  flex: 0 0 auto;
}

/* ==========================================================================
   9. AUDIENCE CATEGORY PICKER  (final CTA)
   ========================================================================== */

.picker__option {
  cursor: pointer;
  border: 1.5px solid rgba(30, 30, 30, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.75);
  transition:
    border-color var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out-soft),
    color var(--duration-fast) ease;
}
.picker__option:hover {
  border-color: rgba(233, 78, 27, 0.45);
  transform: translateY(-2px);
}
/* Native radio is visually hidden but stays focusable + accessible */
.picker__input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.picker__input:checked + .picker__option {
  border-color: transparent;
  background-image: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(233, 78, 27, 0.6);
}
.picker__input:focus-visible + .picker__option {
  outline: 2px solid var(--brand-600);
  outline-offset: 3px;
}

/* Confirmation panel — hidden until a request is sent */
.confirmation {
  display: none;
}
.confirmation.is-visible {
  display: block;
  animation: fadeInUp var(--duration-base) var(--ease-out-soft) both;
}

/* ==========================================================================
   10. MISC
   ========================================================================== */

/* Domain chips (Expert Mentoring) */
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out-soft);
}
.chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(247, 181, 0, 0.5);
  transform: translateY(-2px);
}

/* Footer social row — reads "LinkedIn | Instagram | Facebook | WA Channel".
   The separator trails its own item, so a wrapped line never opens with "|". */
.footer-social li:not(:last-child)::after {
  content: "|";
  margin-left: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
}

/* A handle with no URL yet: shown, but not a link */
.footer-social .is-muted {
  cursor: default;
  opacity: 0.7;
}
