/* ============================================
   CARD DECK SECTION — Ooi Solutions
   Tinder-style swipeable service cards
   Adapted from CardDeck reference with Ooi tokens
   ============================================ */

/* ── SECTION CONTAINER ── */
.card-deck-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #0a0f0d;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 80px;
  overflow: hidden;
}

/* ── AMBIENT ORBS ── */
.cd-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.cd-orb--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(29,124,110,0.35), transparent 70%);
  top: -10%; left: -10%;
  animation: cdOrbFloat1 12s ease-in-out infinite;
}
.cd-orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,200,122,0.2), transparent 70%);
  bottom: -10%; right: -10%;
  animation: cdOrbFloat2 15s ease-in-out infinite;
}
.cd-orb--3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(29,124,110,0.2), transparent 70%);
  top: 50%; left: 60%;
  animation: cdOrbFloat3 10s ease-in-out infinite;
}
@keyframes cdOrbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes cdOrbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.1); }
}
@keyframes cdOrbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 50px) scale(0.9); }
}

/* Grain overlay */
.card-deck-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ── HEADER ── */
.cd-header {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-bottom: 40px;
}
.cd-header__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(29, 124, 110, 0.08);
  border: 1px solid rgba(29, 124, 110, 0.15);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.cd-header__title {
  font-family: var(--font-primary);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.5px;
  text-transform: uppercase;
  color: var(--fg);
}
.cd-header__title .accent-word {
  background: linear-gradient(135deg, var(--accent), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cd-header__sub {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 400;
}

/* ── DECK WRAPPER ── */
.cd-deck-wrapper {
  position: relative;
  z-index: 10;
  width: 340px;
  height: 460px;
  perspective: 1200px;
}

/* ── INDIVIDUAL CARD ── */
.cd-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: rgba(18, 58, 52, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  will-change: transform, opacity;
  transition: box-shadow 0.3s ease;
}
.cd-card:active { cursor: grabbing; }
.cd-card:hover {
  box-shadow: 0 30px 80px rgba(29, 124, 110, 0.15);
}

.cd-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cd-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cd-card__category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  width: fit-content;
}
.cd-card__category i { font-size: 10px; }

.cd-card__title {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--fg);
}

.cd-card__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cd-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.cd-card__stat-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cd-card__stat-label .stat-value {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 800;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cd-card__stat-label .stat-key {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.cd-card__stat-icons {
  display: flex;
  gap: 14px;
}
.cd-card__stat-icon {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.cd-card__stat-icon i { font-size: 11px; }
.cd-card__stat-icon--liked { color: var(--accent); }

/* ── SWIPE LABELS ── */
.cd-swipe-label {
  position: absolute;
  top: 30px;
  padding: 8px 20px;
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transform: rotate(-15deg);
  transition: opacity 0.15s ease;
}
.cd-swipe-label--like {
  right: 24px;
  color: #22c55e;
  border: 3px solid #22c55e;
}
.cd-swipe-label--nope {
  left: 24px;
  color: #ef4444;
  border: 3px solid #ef4444;
  transform: rotate(15deg);
}
.cd-swipe-label--super {
  top: auto;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  color: var(--accent-gold);
  border: 3px solid var(--accent-gold);
}

/* ── ACTION BUTTONS ── */
.cd-actions {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}
.cd-action-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.08);
  background: rgba(18, 58, 52, 0.6);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.cd-action-btn:hover {
  transform: scale(1.12);
  border-color: rgba(255,255,255,0.15);
}
.cd-action-btn:active { transform: scale(0.95); }

.cd-action-btn--nope { color: #ef4444; }
.cd-action-btn--nope:hover { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }

.cd-action-btn--super { width: 48px; height: 48px; font-size: 16px; color: var(--accent-gold); }
.cd-action-btn--super:hover { border-color: rgba(232,200,122,0.3); background: rgba(232,200,122,0.08); }

.cd-action-btn--like { color: #22c55e; }
.cd-action-btn--like:hover { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }

.cd-action-btn--rewind { width: 44px; height: 44px; font-size: 14px; color: var(--muted); }
.cd-action-btn--rewind:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.03); }

/* ── COUNTER DOTS ── */
.cd-counter {
  position: relative;
  z-index: 10;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cd-counter__dots {
  display: flex;
  gap: 5px;
}
.cd-counter__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: all 0.4s ease;
}
.cd-counter__dot--active {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(29,124,110,0.4);
  width: 18px;
  border-radius: 100px;
}

/* ── EMPTY STATE ── */
.cd-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 5;
}
.cd-empty-state--visible {
  opacity: 1;
  pointer-events: auto;
}
.cd-empty-state__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(29,124,110,0.08);
  border: 1px solid rgba(29,124,110,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--accent);
  animation: cdEmptyPulse 2s ease-in-out infinite;
}
@keyframes cdEmptyPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(29,124,110,0.1); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 16px rgba(29,124,110,0); }
}
.cd-empty-state__text {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--fg);
}
.cd-empty-state__sub {
  font-size: 13px;
  color: var(--muted);
}
.cd-empty-state__btn {
  margin-top: 8px;
  padding: 10px 28px;
  border-radius: 100px;
  border: 1px solid rgba(29,124,110,0.2);
  background: rgba(29,124,110,0.08);
  color: var(--accent);
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cd-empty-state__btn:hover {
  background: rgba(29,124,110,0.15);
  border-color: rgba(29,124,110,0.35);
  transform: translateY(-1px);
}

/* ── TOAST ── */
.cd-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(18, 58, 52, 0.9);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(30px);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.cd-toast--visible {
  transform: translateX(-50%) translateY(0);
}
.cd-toast i { font-size: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 400px) {
  .cd-deck-wrapper { width: 300px; height: 420px; }
  .cd-card__image { height: 170px; }
  .cd-card__body { padding: 18px; }
  .card-deck-section { padding: 80px 16px 60px; }
}

@media (max-width: 767px) {
  .card-deck-section { padding: 80px 16px 60px; }
  .cd-header__title { font-size: clamp(28px, 8vw, 44px); }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .cd-orb, .cd-empty-state__icon { animation: none !important; }
  .cd-card, .cd-action-btn, .cd-toast, .cd-counter__dot {
    transition-duration: 0.01ms !important;
  }
}
