/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  border: none;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  isolation: isolate;
  overflow: hidden;
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(124, 58, 237, 0.38); }

/* Glass / iOS-style button */
.btn-glass {
  background: rgba(255, 255, 255, 0.55);
  color: var(--violet-700);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 16px rgba(46, 16, 101, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: translateY(-2px);
}

.btn-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.7) 45%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-out);
}

.btn-glass:hover::before { transform: translateX(120%); }

.btn-dark {
  background: var(--ink-900);
  color: #fff;
}

.btn-dark:hover { background: var(--violet-700); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--violet-700);
  padding: 14px 8px;
}

.btn-ghost .btn-arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--violet-100);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.btn-ghost:hover .btn-arrow { background: var(--violet-500); color: #fff; transform: translateX(3px); }

.btn-sm { padding: 11px 20px; font-size: 14px; }

/* ===== Cards ===== */
.card {
  background: var(--surface-0);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-lg);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.icon-tile {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--violet-50);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--violet-600);
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.icon-tile img, .icon-tile svg { width: 26px; height: 26px; }

.card:hover .icon-tile { background: var(--gradient-brand); transform: rotate(-6deg) scale(1.05); }
.card:hover .icon-tile img { filter: brightness(0) invert(1); }

/* ===== Badges / pills ===== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-100);
  font-size: 13px; font-weight: 600;
  color: var(--ink-700);
}

.pill-active { background: var(--gradient-brand); color: #fff; }

/* ===== Image placeholder (used until real photos are supplied) ===== */
.ph {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--violet-50), var(--surface-100));
  color: var(--violet-300, var(--violet-400));
  overflow: hidden;
}

.ph::after {
  content: attr(data-label);
  position: absolute;
  bottom: 12px; left: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--violet-500);
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.ph svg { width: 30%; height: 30%; opacity: 0.35; }

/* ===== Before / After slider ===== */
.ba-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  user-select: none;
  touch-action: none;
  box-shadow: var(--shadow-lg);
}

/* One-time auto-demo sweep (see main.js) — real dragging stays instant/
   unlagged since this transition only applies while .is-demo is present. */
.ba-slider.is-demo .ba-after,
.ba-slider.is-demo .ba-handle {
  transition: clip-path 0.7s cubic-bezier(0.4, 0, 0.2, 1), left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.ba-slider .ba-after,
.ba-slider .ba-before { position: absolute; inset: 0; }

.ba-slider .ba-after { clip-path: inset(0 0 0 50%); }

.ba-slider .ba-handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 4px; background: #fff;
  transform: translateX(-50%);
  cursor: ew-resize;
}

.ba-slider .ba-handle::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.ba-slider .ba-handle::after {
  content: '⇔';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  color: var(--violet-600);
  font-weight: 700;
  font-size: 16px;
}

.ba-tag {
  position: absolute; top: 16px;
  padding: 6px 14px;
  background: rgba(27, 19, 48, 0.65);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  backdrop-filter: blur(6px);
}

.ba-tag.before { left: 16px; }
.ba-tag.after { right: 16px; }

/* ===== Testimonial card ===== */
.testimonial {
  background: var(--surface-50);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}

.testimonial .stars { color: #F5A623; font-size: 14px; letter-spacing: 2px; }

.testimonial .who { display: flex; align-items: center; gap: 12px; }

.testimonial .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 8px; }

.field label { font-size: 13px; font-weight: 600; color: var(--ink-700); }

.field input, .field textarea, .field select {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--surface-line);
  background: var(--surface-50);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--violet-500);
  background: #fff;
}

.field textarea { resize: vertical; min-height: 110px; }

/* ===== Section CTA banner ===== */
.cta-banner {
  background: var(--gradient-brand);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.cta-banner h3 { font-size: clamp(22px, 3vw, 30px); }
.cta-banner p { opacity: 0.85; margin-top: 8px; }
