/* ==========================================================================
   PORTAFOLIO TOMÁS GONZÁLEZ - LIQUID GLASS DESIGN SYSTEM
   Tipografías: Plus Jakarta Sans (Display/Títulos) & Inter (Lectura/UI)
   Paleta: Obsidian/Alabaster + Electric Indigo (#4F46E5) + Mint/Emerald (#10B981)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800;900&display=swap');

:root {
  /* FONT FAMILIES (EXACTAMENTE DOS TIPOGRAFÍAS) */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* LIGHT THEME (MODO DÍA) */
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-card: rgba(255, 255, 255, 0.82);
  --surface-glass-hover: rgba(255, 255, 255, 0.95);
  --surface-modal: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-highlight: rgba(255, 255, 255, 0.8);
  --glass-border-hover: rgba(79, 70, 229, 0.3);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  
  --brand-primary: #4F46E5;
  --brand-primary-hover: #4338CA;
  --brand-glow: rgba(79, 70, 229, 0.15);
  
  --accent-emerald: #059669;
  --accent-emerald-bg: rgba(16, 185, 129, 0.1);
  --accent-emerald-border: rgba(16, 185, 129, 0.25);

  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 30px -4px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-glass: inset 0 1px 1px 0 rgba(255, 255, 255, 0.9), 0 20px 40px -15px rgba(15, 23, 42, 0.08);
  
  --ambient-orb-1: radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 45%);
  --ambient-orb-2: radial-gradient(circle at 85% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 45%);
}

html.dark {
  /* DARK THEME (MODO NOCHE) */
  --bg-primary: #070A12;
  --bg-secondary: #0D121F;
  --surface-glass: rgba(15, 21, 37, 0.55);
  --surface-glass-card: rgba(18, 25, 44, 0.65);
  --surface-glass-hover: rgba(23, 33, 58, 0.85);
  --surface-modal: rgba(13, 18, 32, 0.94);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-highlight: rgba(255, 255, 255, 0.22);
  --glass-border-hover: rgba(99, 102, 241, 0.45);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --brand-primary: #6366F1;
  --brand-primary-hover: #4F46E5;
  --brand-glow: rgba(99, 102, 241, 0.3);
  
  --accent-emerald: #10B981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(16, 185, 129, 0.3);

  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 10px 30px -4px rgba(0, 0, 0, 0.5), 0 2px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-glass: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15), 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  
  --ambient-orb-1: radial-gradient(circle at 20% 15%, rgba(99, 102, 241, 0.18) 0%, transparent 50%);
  --ambient-orb-2: radial-gradient(circle at 80% 70%, rgba(79, 70, 229, 0.12) 0%, transparent 50%);
}

/* BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
}

/* AMBIENT BACKGROUND GLOW */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--ambient-orb-1), var(--ambient-orb-2);
  transition: background-image 0.5s ease;
}

/* LIQUID GLASS SYSTEM */
.liquid-glass {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  position: relative;
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--glass-border-highlight) 0%, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.liquid-glass-card {
  background: var(--surface-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              background-color 0.35s ease;
}

.liquid-glass-card:hover {
  transform: translateY(-3px);
  background: var(--surface-glass-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glass), 0 0 30px var(--brand-glow);
}

.liquid-glass-pill {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

.liquid-glass-pill:hover {
  border-color: var(--brand-primary);
  background: var(--surface-glass-hover);
}

.liquid-glass-pill.active {
  background: var(--brand-primary);
  color: #FFFFFF !important;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 20px var(--brand-glow);
}

/* BUTTONS */
.btn-primary {
  background: var(--brand-primary);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px var(--brand-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-display);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--brand-glow);
}

.btn-secondary {
  background: var(--surface-glass);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
  font-family: var(--font-display);
}

.btn-secondary:hover {
  background: var(--surface-glass-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

/* INPUT LIQUID GLASS */
.liquid-input {
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.liquid-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
  background: var(--surface-glass-hover);
}

.liquid-input::placeholder {
  color: var(--text-muted);
}

/* METRIC CARDS WITH CLEAN RESULTS */
.metric-box {
  background: var(--surface-glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.metric-box:hover {
  border-color: var(--glass-border-highlight);
  transform: translateY(-2px);
}

/* BADGES - PURE & CLEAN (NO CHEESY GRADIENTS) */
.badge-clean {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  background: var(--surface-glass);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.badge-emerald {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.1);
  color: var(--brand-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* VIDEO CARD 9:16 PREVIEW */
.video-card-poster {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 1.5rem;
  overflow: hidden;
  background-color: #0B0F19;
}

.video-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-card:hover .video-card-poster img {
  transform: scale(1.06);
}

.play-overlay-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-card:hover .play-overlay-btn {
  transform: scale(1.15);
  background: var(--brand-primary);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 30px var(--brand-glow);
}

/* SMARTPHONE MOCKUP FOR MODAL PLAYER */
.phone-frame {
  position: relative;
  width: 100%;
  max-width: 330px;
  aspect-ratio: 9 / 16;
  background: #000000;
  border-radius: 2.75rem;
  padding: 8px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(255, 255, 255, 0.15),
              0 0 40px var(--brand-glow);
  display: flex;
  flex-direction: column;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2.25rem;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* VIDEO PLAYER SCRUBBER */
.video-scrubber-track {
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  position: relative;
  transition: height 0.2s ease;
}

.video-scrubber-track:hover {
  height: 8px;
}

.video-scrubber-fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 9999px;
  position: relative;
  width: 0%;
}

.video-scrubber-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* UTILITY SCROLLBAR */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* SELECTION */
::selection {
  background-color: var(--brand-primary);
  color: #FFFFFF;
}

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