/* Feeld — Mobile-First Design System 2026 */

/* Fonts: Clash Display (display) + Satoshi (body) */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@700,600,500&f[]=satoshi@400,500,700&display=swap');

@import "tailwindcss";

/* ─── Design Tokens ─── */
:root {
  /* Navigation */
  --nav-width: 0px;
  --nav-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* Surfaces — warm charcoal, not pure black */
  --color-void: #121212;
  --color-midnight: #161618;
  --color-deep: #1a1a1e;
  --color-surface: #1E1E22;
  --color-surface-elevated: #262628;
  --color-surface-hover: #2e2e32;

  /* Accent — saturated purple + rose for dating context */
  --color-desire: #7c3aed;
  --color-desire-glow: #a855f7;
  --color-desire-soft: rgba(124, 58, 237, 0.15);
  --color-rose: #be3144;
  --color-rose-glow: #e91e63;
  --color-rose-gold: #b76e79;

  /* Status */
  --color-liked: #22c55e;
  --color-liked-soft: rgba(34, 197, 94, 0.12);
  --color-passed: #ef4444;
  --color-passed-soft: rgba(239, 68, 68, 0.12);
  --color-warning: #f59e0b;

  /* Text — WCAG-compliant opacity levels */
  --color-text: rgba(255, 255, 255, 0.87);
  --color-text-primary: rgba(255, 255, 255, 0.87);
  --color-text-secondary: rgba(255, 255, 255, 0.60);
  --color-text-muted: rgba(255, 255, 255, 0.38);

  /* Gradients */
  --gradient-desire: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --gradient-rose: linear-gradient(135deg, #be3144 0%, #e91e63 100%);
  --gradient-surface: linear-gradient(180deg, rgba(30, 30, 34, 0.8) 0%, rgba(18, 18, 18, 0.95) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-photo-overlay: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.6) 75%, rgba(0, 0, 0, 0.92) 100%);

  /* Effects */
  --glow-desire: 0 0 24px rgba(124, 58, 237, 0.25);
  --glow-subtle: 0 0 48px rgba(124, 58, 237, 0.08);
  --shadow-elevated: 0 16px 48px -8px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);

  /* Glass morphism */
  --glass-bg: rgba(30, 30, 34, 0.72);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(20px);

  /* Typography */
  --font-display: 'Clash Display', sans-serif;
  --font-body: 'Satoshi', sans-serif;

  /* 8px spacing grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Desktop nav offset */
@media (min-width: 768px) {
  :root {
    --nav-width: 80px;
  }
}

/* ─── Base Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  background-color: var(--color-void);
  color: var(--color-text);
  min-height: 100dvh;
  line-height: 1.5;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Ambient glow — subtle purple in top-left */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 70% 40% at 20% -10%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 90% 100%, rgba(190, 49, 68, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Subtle film grain texture */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.012;
  pointer-events: none;
  z-index: 1000;
}

#root {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ─── Typography ─── */
.font-display {
  font-family: var(--font-display);
}

.text-gradient {
  background: var(--gradient-desire);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface-elevated);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-surface-hover);
}

/* Hide scrollbar on mobile */
@media (max-width: 767px) {
  ::-webkit-scrollbar {
    display: none;
  }
  body {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
}

/* ─── Selection ─── */
::selection {
  background: var(--color-desire);
  color: white;
}

/* ─── Focus ─── */
:focus-visible {
  outline: 2px solid var(--color-desire);
  outline-offset: 2px;
}

/* ─── Animations ─── */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: var(--glow-desire);
  }
  50% {
    box-shadow: 0 0 32px rgba(124, 58, 237, 0.35);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility classes */
.animate-fade-up {
  animation: fadeSlideUp var(--transition-spring) both;
}

.animate-fade-in {
  animation: fadeIn var(--transition-slow) both;
}

.animate-scale-in {
  animation: scaleIn var(--transition-slow) both;
}

.animate-slide-right {
  animation: slideInRight var(--transition-slow) both;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-card-appear {
  animation: cardAppear 350ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stagger delays */
.stagger-1 { animation-delay: 40ms; }
.stagger-2 { animation-delay: 80ms; }
.stagger-3 { animation-delay: 120ms; }
.stagger-4 { animation-delay: 160ms; }
.stagger-5 { animation-delay: 200ms; }
.stagger-6 { animation-delay: 240ms; }
.stagger-7 { animation-delay: 280ms; }
.stagger-8 { animation-delay: 320ms; }

/* ─── Glass morphism ─── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.glass-subtle {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Shimmer loading ─── */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--color-surface) 0%,
    var(--color-surface-elevated) 50%,
    var(--color-surface) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ─── Image zoom on hover (desktop only) ─── */
@media (hover: hover) {
  .img-zoom {
    transition: transform var(--transition-spring);
  }
  .img-zoom:hover {
    transform: scale(1.03);
  }
}

/* ─── Button press effect ─── */
.btn-press {
  transition: transform var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
}

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

/* ─── No scrollbar utility ─── */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ─── Scroll snap for carousels ─── */
.snap-x {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.snap-center {
  scroll-snap-align: center;
}

.snap-start {
  scroll-snap-align: start;
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Safe area utilities ─── */
.safe-top {
  padding-top: env(safe-area-inset-top, 0px);
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.safe-x {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
