/* ==========================================================================
   Ollie Dental Clinic — COMPONENTS
   Marquee · Before/After Studio · Accordion · Form Fields · Modal · Floating UI
   ========================================================================== */

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.glass-light {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 36px rgba(16, 14, 6, 0.08);
}
.glass-dark {
  background: rgba(22, 22, 26, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- Infinite Marquee ---------- */
.marquee-band {
  background: var(--onyx-950);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0 1rem;
  overflow: hidden;
  position: relative;
}
.marquee-band__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--gold-400);
  margin-top: 0.75rem;
  opacity: 0.85;
}
.marquee-band__hint svg { width: 14px; height: 14px; }

.marquee {
  width: 100%;
  overflow: hidden;
  display: flex;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  will-change: transform;
  animation: scrollX 36s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee--reverse .marquee__track {
  animation: scrollXRev 38s linear infinite;
}
.marquee--reverse:hover .marquee__track {
  animation-play-state: paused;
}

/* Service Marquee Pill */
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-pill);
  color: var(--ivory-100);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--t-fast);
}
.marquee-item svg {
  width: 20px;
  height: 20px;
  color: var(--gold-400);
  transition: transform var(--t-fast);
}
.marquee-item:hover {
  background: rgba(207, 167, 75, 0.15);
  border-color: var(--gold-400);
  color: #ffffff;
  transform: translateY(-2px);
}
.marquee-item:hover svg {
  transform: scale(1.15);
}

/* ---------- Before & After (Smile Studio) ---------- */
.studio {
  background: var(--onyx-850);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 0.8rem + 1vw, 2rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}
.studio::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207, 167, 75, 0.12), transparent 70%);
  pointer-events: none;
}

.studio-view {
  position: relative;
  width: 100%;
  aspect-ratio: 2.1 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(207, 167, 75, 0.22);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
  user-select: none;
}
@media (max-width: 680px) {
  .studio-view { aspect-ratio: 1.6 / 1; }
}

.studio-view__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease-in-out;
}

.studio-view__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 14, 0.3) 0%, transparent 40%, rgba(12, 12, 14, 0.45) 100%);
  pointer-events: none;
  z-index: 2;
}

.studio-view__badge {
  position: absolute;
  top: 1.15rem;
  left: 1.15rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(14, 12, 10, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(207, 167, 75, 0.35);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold-300);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}
.studio-view__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 8px var(--gold-300);
}

.studio-view__toggle-btn {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  background: rgba(14, 12, 10, 0.92);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--gold-400);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.75), 0 0 16px rgba(207, 167, 75, 0.25);
  transition: all var(--t-fast) var(--ease);
}
[dir="rtl"] .studio-view__toggle-btn {
  right: auto;
  left: 1.25rem;
}
[dir="rtl"] .studio-view__badge {
  left: auto;
  right: 1.15rem;
}
.studio-view__toggle-btn:hover {
  background: var(--gold-grad);
  color: var(--onyx-950);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 30px rgba(207, 167, 75, 0.45);
}
.studio-view__toggle-btn svg {
  width: 14px;
  height: 14px;
  color: var(--gold-400);
  transition: color var(--t-fast);
}
.studio-view__toggle-btn:hover svg {
  color: var(--onyx-950);
}

.ba {
  position: relative;
  width: 100%;
  aspect-ratio: 2.1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  user-select: none;
  touch-action: pan-y;
  direction: ltr !important;
}
@media (max-width: 680px) {
  .ba { aspect-ratio: 1.7 / 1; }
}

.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba__before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  clip-path: polygon(0 0, var(--pos, 50%) 0, var(--pos, 50%) 100%, 0 100%);
  -webkit-clip-path: polygon(0 0, var(--pos, 50%) 0, var(--pos, 50%) 100%, 0 100%);
  pointer-events: none;
}
.ba__before .ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Labels */
.ba__label {
  position: absolute;
  top: 1rem;
  z-index: 4;
  padding: 0.35rem 0.9rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.ba__label--before {
  left: 1rem;
  background: rgba(12, 12, 14, 0.75);
  color: var(--ivory-100);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.ba__label--after {
  right: 1rem;
  background: var(--gold-grad);
  color: var(--onyx-950);
  box-shadow: 0 4px 15px rgba(207, 167, 75, 0.3);
}

/* Golden Handle Knob & Vertical Divider Line */
.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 0;
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
}
.ba__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--gold-grad);
  box-shadow: 0 0 12px rgba(207, 167, 75, 0.9), 0 0 4px #ffffff;
  transform: translateX(-50%);
  pointer-events: none;
}
.ba__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-grad);
  box-shadow: 0 0 0 4px rgba(12, 12, 14, 0.6), 0 8px 24px rgba(207, 167, 75, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--onyx-950);
  cursor: grab;
  transition: transform var(--t-fast);
}
.ba:hover .ba__knob {
  transform: translate(-50%, -50%) scale(1.08);
}
.ba__knob svg {
  width: 14px;
  height: 14px;
}

/* Range input overlay for full accessibility */
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 6;
  margin: 0;
  direction: ltr !important;
}

/* Hint overlay */
.ba__hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(12, 12, 14, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.9rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  color: var(--gold-200);
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.ba.is-interacted .ba__hint {
  opacity: 0;
}

/* Studio Footer: Disclaimer Note on one side & Navigation Buttons on opposite side */
.filmstrip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.15rem;
  padding: 0 0.5rem;
}
.filmstrip-footer .studio__note {
  margin-top: 0;
  text-align: start;
  font-size: var(--fs-xs);
  color: var(--muted);
  font-style: italic;
}
.filmstrip-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  user-select: none;
  flex-shrink: 0;
}
.filmstrip-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(207, 167, 75, 0.45);
  color: var(--gold-300);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
  user-select: none;
  touch-action: manipulation;
}
.filmstrip-btn:hover {
  background: var(--gold-grad);
  color: var(--onyx-950);
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(207, 167, 75, 0.5);
}
.filmstrip-btn:active,
.filmstrip-btn.is-active {
  transform: scale(0.94);
  background: var(--gold-grad);
  color: var(--onyx-950);
  box-shadow: 0 4px 12px rgba(207, 167, 75, 0.55);
}
.filmstrip-btn svg {
  display: block;
  pointer-events: none;
  transition: transform var(--t-fast);
}
.filmstrip-btn--prev:hover svg {
  transform: translateX(-3px);
}
.filmstrip-btn--next:hover svg {
  transform: translateX(3px);
}

/* Reverse arrow icons in Arabic RTL */
[dir="rtl"] .filmstrip-btn svg {
  transform: scaleX(-1);
}
[dir="rtl"] .filmstrip-btn--prev:hover svg {
  transform: scaleX(-1) translateX(-3px);
}
[dir="rtl"] .filmstrip-btn--next:hover svg {
  transform: scaleX(-1) translateX(3px);
}

@media (max-width: 680px) {
  .filmstrip-footer {
    gap: 0.85rem;
    margin-top: 0.95rem;
  }
  .filmstrip-btn {
    width: 40px;
    height: 40px;
  }
}

/* Studio Controls Bar */
.studio__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Segmented Control */
.segmented {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-pill);
  padding: 4px;
  position: relative;
}
.segmented__btn {
  padding: 0.45rem 1.1rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted-dark);
  position: relative;
  z-index: 2;
  transition: color var(--t-fast);
}
.segmented__btn.is-active {
  color: var(--onyx-950);
  background: var(--gold-grad);
  box-shadow: 0 2px 10px rgba(207, 167, 75, 0.4);
}
.studio__nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.studio__nav button svg.ic-pause { display: none; }
.studio__nav button.is-playing svg.ic-play { display: none; }
.studio__nav button.is-playing svg.ic-pause { display: block; }

.studio__progress {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: 1rem;
  overflow: hidden;
}
.studio__progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold-grad);
  transition: width 0.1s linear;
}

/* Filmstrip Showcase & Auto-Moving Strip */
.filmstrip-wrap {
  position: relative;
  width: 100%;
  margin-top: 1.75rem;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.filmstrip {
  direction: ltr;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto !important;
  padding: 0.85rem 0.5rem 1.25rem;
  scrollbar-width: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  will-change: scroll-position;
}
.filmstrip::-webkit-scrollbar { display: none; }
.filmstrip:active { cursor: grabbing; }

.thumb {
  flex: 0 0 clamp(195px, 16vw + 20px, 245px);
  min-height: 125px;
  aspect-ratio: 16 / 10.5;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  position: relative;
  background: #0d0d10;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
  transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t);
  flex-shrink: 0;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.thumb__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 12, 0.75) 0%, rgba(10, 10, 12, 0.15) 50%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.thumb__phase {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(12, 12, 14, 0.82);
  color: var(--gold-300);
  border: 1px solid rgba(207, 167, 75, 0.3);
  backdrop-filter: blur(6px);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.thumb__phase::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 6px var(--gold-300);
}
[dir="rtl"] .thumb__phase {
  left: auto;
  right: 8px;
}

.thumb__toggle {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(15, 14, 12, 0.88);
  border: 1px solid rgba(207, 167, 75, 0.55);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: all var(--t-fast) var(--ease);
}
[dir="rtl"] .thumb__toggle {
  right: auto;
  left: 8px;
}
.thumb__toggle:hover {
  background: var(--gold-grad);
  color: var(--onyx-950);
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(207, 167, 75, 0.5);
}
.thumb__toggle svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  transition: transform var(--t-fast);
}
.thumb__toggle:hover svg {
  transform: rotate(180deg);
}

.thumb:hover {
  transform: translateY(-4px);
  border-color: rgba(207, 167, 75, 0.65);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.85), 0 0 16px rgba(207, 167, 75, 0.25);
}
.thumb:hover img {
  opacity: 1;
  transform: scale(1.03);
}
.thumb.is-active {
  border-color: var(--gold-400);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95), 0 0 24px rgba(207, 167, 75, 0.5);
}
.thumb.is-active img {
  opacity: 1;
}

.studio__note {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

/* ---------- Accordion (FAQ) ---------- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.faq-item {
  border: 1px solid var(--line);
  background: var(--ivory-50);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.faq-item.is-open {
  border-color: var(--gold-500);
  box-shadow: var(--shadow-sm);
}
.faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.6rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.4vw, 1.35rem);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: none;
}
.faq-btn svg {
  width: 20px;
  height: 20px;
  color: var(--gold-600);
  flex-shrink: 0;
  transition: transform var(--t) var(--ease);
}
.faq-item.is-open .faq-btn svg {
  transform: rotate(45deg);
}
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t) var(--ease);
}
.faq-body {
  padding: 0 1.6rem 1.4rem;
  color: var(--ink-soft);
  font-size: var(--fs-base);
  line-height: 1.7;
}

/* ---------- Floating Form Fields ---------- */
.booking {
  border-radius: var(--r-lg);
  padding: clamp(1.8rem, 1.4rem + 1.2vw, 2.8rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.booking__title {
  font-size: var(--fs-h3);
  color: var(--ivory-50);
  margin-bottom: 0.5rem;
}
.booking__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 600px) {
  .booking__row { grid-template-columns: 1fr; }
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.field__label {
  position: static;
  transform: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-300);
  pointer-events: auto;
  line-height: 1.2;
}
.field__input {
  width: 100%;
  padding: 0.95rem 1.15rem;
  background: rgba(16, 14, 12, 0.88);
  border: 1px solid rgba(207, 167, 75, 0.24);
  border-radius: 14px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.field__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
}
.field__input:focus {
  background: rgba(24, 21, 18, 0.96);
  border-color: var(--gold-400);
  box-shadow: 0 0 16px rgba(207, 167, 75, 0.22);
  outline: none;
}
.field--select {
  position: relative;
}
.field--select select.field__input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  cursor: pointer;
}
[dir="rtl"] .field--select select.field__input {
  padding-right: 1.15rem;
  padding-left: 2.75rem;
}
.field--select .field__chev,
.field--select .field__arrow {
  position: absolute;
  right: 1.1rem;
  bottom: 1.05rem;
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  color: var(--gold-400);
  pointer-events: none;
  transform: none;
  display: block;
}
[dir="rtl"] .field--select .field__chev,
[dir="rtl"] .field--select .field__arrow {
  right: auto;
  left: 1.1rem;
}
.field--select select option {
  background: var(--onyx-900);
  color: var(--ivory-100);
  padding: 0.5rem;
}
textarea.field__input {
  resize: vertical;
  min-height: 110px;
  padding: 0.95rem 1.15rem;
  line-height: 1.6;
}
.booking__submit {
  width: 100%;
  margin-top: 0.5rem;
}
.booking__error {
  color: #ff6b6b;
  font-size: var(--fs-xs);
  padding: 0.5rem 0.8rem;
  background: rgba(255, 107, 107, 0.12);
  border-radius: 8px;
}
.booking__note {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: center;
}

/* ---------- Service Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility var(--t);
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 6, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.modal__panel {
  position: relative;
  z-index: 2;
  width: min(100%, 640px);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--onyx-850);
  border: 1px solid rgba(207, 167, 75, 0.25);
  border-radius: 28px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.85), 0 0 40px rgba(207, 167, 75, 0.08);
  color: var(--ivory-100);
  transform: translateY(20px) scale(0.96);
  transition: transform var(--t) var(--ease-spring);
}
.modal.is-open .modal__panel {
  transform: translateY(0) scale(1);
}
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: rgba(18, 16, 14, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.modal__close:hover {
  background: rgba(207, 167, 75, 0.2);
  border-color: var(--gold-400);
  color: #ffffff;
}
.modal__banner {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--onyx-950);
  flex-shrink: 0;
}
.modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal__banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 16, 14, 0.3) 0%, rgba(18, 16, 14, 0.95) 100%);
}
.modal__banner .modal__head {
  position: absolute;
  bottom: 1rem;
  left: 1.75rem;
  right: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  z-index: 2;
}
.modal__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(18, 16, 14, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(207, 167, 75, 0.4);
  display: grid;
  place-items: center;
  color: var(--gold-400);
}
.modal__icon svg { width: 24px; height: 24px; }
.modal__num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold-300);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.modal__body {
  padding: 1.5rem 1.75rem 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  color: #ffffff;
  margin-bottom: 0.65rem;
}
.modal__desc {
  font-size: var(--fs-md);
  color: var(--ivory-200);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.modal__steps-wrap {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.modal__steps-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-400);
  margin-bottom: 1rem;
}
.modal__steps-title svg { width: 14px; height: 14px; }
.steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  font-size: var(--fs-sm);
  color: var(--ivory-100);
  line-height: 1.55;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-brand);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-400);
  background: rgba(207, 167, 75, 0.1);
  border: 1px solid rgba(207, 167, 75, 0.28);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
}
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 26px;
  bottom: -10px;
  width: 2px;
  background: linear-gradient(180deg, rgba(207, 167, 75, 0.6) 0%, rgba(207, 167, 75, 0.15) 100%);
}
.modal__actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 520px) {
  .modal__actions { grid-template-columns: 1fr; }
}
.modal__cta,
.modal__cta-form {
  justify-content: center;
  padding: 0.75rem 1rem;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

/* ---------- Floating Action Button (WhatsApp) & To Top ---------- */
.fab-wa {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  z-index: 850;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.fab-wa svg {
  width: 32px;
  height: 32px;
}
.fab-wa:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.6);
}
.fab-wa::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25d366;
  opacity: 0.6;
  animation: pulseOut 2.4s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.to-top {
  position: fixed;
  bottom: 24px;
  right: 92px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--onyx-850);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ivory-50);
  display: grid;
  place-items: center;
  z-index: 840;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--t-fast) var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  background: var(--gold-400);
  color: var(--onyx-950);
  border-color: var(--gold-400);
}
.to-top__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.to-top__ring circle {
  fill: none;
  stroke: var(--gold-400);
  stroke-width: 2;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--scroll, 0));
  transition: stroke-dashoffset 0.1s linear;
}
.to-top__arrow {
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
}
