/* ============================================
   ARF SOFTWARE — LANDING STYLES
   Paleta púrpura ARF · Dark mode obligatorio
   ============================================ */

:root {
  --arf-purple-primary: #7C1FD6;
  --arf-purple-light: #B600FF;
  --arf-gradient: linear-gradient(135deg, #7C1FD6 0%, #B600FF 100%);
  --arf-deep: #0a0118;
  --arf-darker: #050009;
  --arf-glass: rgba(255, 255, 255, 0.05);
  --arf-glass-border: rgba(255, 255, 255, 0.1);
  --arf-accent: #B600FF;
  --arf-success: #10b981;
  --arf-warning: #f59e0b;
  --arf-text-primary: #ffffff;
  --arf-text-secondary: rgba(255, 255, 255, 0.7);
  --arf-text-muted: rgba(255, 255, 255, 0.4);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--arf-deep);
  color: var(--arf-text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

::selection {
  background: var(--arf-purple-light);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--arf-darker);
}
::-webkit-scrollbar-thumb {
  background: rgba(124, 31, 214, 0.4);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--arf-purple-primary);
}

/* ============================================
   GLASS CARD
   ============================================ */
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(124, 31, 214, 0.12);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-gradient {
  background: linear-gradient(135deg, #7C1FD6, #B600FF);
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(124, 31, 214, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,0.3), transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 31, 214, 0.5);
}
.btn-gradient:hover::after {
  transform: translateX(100%);
}
.btn-gradient:active {
  transform: translateY(0);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ============================================
   GRID PATTERN BG
   ============================================ */
.grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}

/* ============================================
   EYEBROW (small section labels)
   ============================================ */
.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(182, 0, 255, 0.12);
  border: 1px solid rgba(182, 0, 255, 0.3);
  color: var(--arf-purple-light);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ============================================
   NAV
   ============================================ */
.nav-inner {
  transition: padding 0.3s;
}
.nav-compact .nav-inner {
  background: rgba(10, 1, 24, 0.85);
}

/* ============================================
   HERO 3D MOCKUP
   ============================================ */
.perspective-container {
  perspective: 1500px;
}

.dashboard-mockup.transform-3d {
  transform: rotateY(-8deg) rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.dashboard-mockup.transform-3d:hover {
  transform: rotateY(-4deg) rotateX(2deg);
}

.floating-notif {
  animation: float 5s ease-in-out infinite;
}
.floating-mockup {
  animation: float 6s ease-in-out infinite 0.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* ============================================
   TRUST AVATARS
   ============================================ */
.trust-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: white;
  border: 2px solid var(--arf-deep);
  margin-left: -8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.trust-avatar:first-child { margin-left: 0; }

/* ============================================
   PROBLEM SECTION
   ============================================ */
.problem-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 22px;
  flex-shrink: 0;
}

.inbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.badge-unread {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ============================================
   JULI CHAT (WhatsApp mockup)
   ============================================ */
.chat-msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  animation: msgIn 0.3s ease-out;
}
.chat-msg-patient {
  background: #202c33;
  color: white;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  margin-right: auto;
}
.chat-msg-juli {
  background: #005c4b;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}
.chat-msg-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-btn {
  text-align: center;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: #53bdeb;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.chat-btn.clicked {
  background: rgba(83, 189, 235, 0.2);
}
.chat-typing {
  display: inline-flex;
  gap: 3px;
  padding: 8px 12px;
  background: #202c33;
  border-radius: 10px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: typing 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

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

#hero-chat, #juli-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 420px;
}

/* ============================================
   BENTO GRID — auto-rows tweaks
   ============================================ */
.bento-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.tilt-card {
  will-change: transform;
}

/* Override auto-rows for smaller breakpoints */
@media (max-width: 768px) {
  .grid.auto-rows-\[280px\] {
    grid-auto-rows: auto !important;
  }
  .bento-card {
    min-height: 240px;
  }
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison-table {
  width: 100%;
}
.comp-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  transition: background 0.2s;
}
.comp-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.comp-row > div:first-child {
  padding-left: 16px;
  color: var(--arf-text-secondary);
  font-weight: 500;
}
.comp-arf {
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 31, 214, 0.15), rgba(182, 0, 255, 0.15));
  border-left: 1px solid rgba(182, 0, 255, 0.3);
  border-right: 1px solid rgba(182, 0, 255, 0.3);
  padding: 12px 8px;
  font-weight: 600;
}
.comp-other {
  text-align: center;
  padding: 12px 8px;
  color: var(--arf-text-muted);
}
.comp-row-highlight {
  background: rgba(124, 31, 214, 0.08);
  border-radius: 0 0 16px 16px;
  margin-top: 6px;
}
.comp-row-highlight .comp-arf {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  border-bottom: 1px solid rgba(182, 0, 255, 0.3);
}

.comparison-arf {
  background: linear-gradient(135deg, rgba(124, 31, 214, 0.25), rgba(182, 0, 255, 0.25));
  border: 1px solid rgba(182, 0, 255, 0.4);
  border-bottom: none;
}

/* ============================================
   TIMELINE STEPS
   ============================================ */
.step-num {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--arf-purple-primary), var(--arf-purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(124, 31, 214, 0.4);
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown-box {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(182, 0, 255, 0.3);
  border-radius: 16px;
  padding: 16px 14px;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(124, 31, 214, 0.25);
}
.cd-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 38px;
  line-height: 1;
  background: linear-gradient(135deg, white, var(--arf-purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
}
.cd-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--arf-text-muted);
  margin-top: 6px;
}
.cd-sep {
  font-size: 30px;
  font-weight: 700;
  color: rgba(182, 0, 255, 0.5);
  align-self: center;
}

/* ============================================
   PRICING FEATURES
   ============================================ */
.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-feature .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.pricing-feature.text-arf-light .check {
  background: rgba(182, 0, 255, 0.2);
  color: var(--arf-purple-light);
}

/* Progress bar animation */
.progress-fill {
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   FAQ
   ============================================ */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 0;
}
.faq-item summary {
  cursor: pointer;
  padding: 22px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--arf-purple-light);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item summary:hover {
  color: var(--arf-purple-light);
}
.faq-answer {
  padding: 0 0 22px 0;
  color: var(--arf-text-secondary);
  font-size: 15px;
  line-height: 1.7;
  max-width: 90%;
  animation: faqOpen 0.4s ease-out;
}

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

/* ============================================
   FOOTER
   ============================================ */
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--arf-text-secondary);
  transition: all 0.2s;
}
.social-link:hover {
  background: var(--arf-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ============================================
   FLOATING NOTIFICATIONS (toast)
   ============================================ */
.toast-notif {
  background: rgba(10, 1, 24, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(182, 0, 255, 0.3);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  min-width: 280px;
  transform: translateX(-120%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast-notif.show {
  transform: translateX(0);
}
.toast-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-content .name {
  font-size: 13px;
  font-weight: 600;
}
.toast-content .meta {
  font-size: 11px;
  color: var(--arf-text-muted);
}

/* ============================================
   MOBILE LINKS
   ============================================ */
.mobile-link {
  color: var(--arf-text-secondary);
  transition: color 0.2s;
}
.mobile-link:hover {
  color: white;
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 640px) {
  .countdown-box {
    min-width: 64px;
    padding: 12px 10px;
  }
  .cd-num {
    font-size: 28px;
  }
  .cd-sep {
    font-size: 22px;
  }
  .step-num {
    width: 52px;
    height: 52px;
    font-size: 18px;
    border-radius: 16px;
  }
}

/* ============================================
   ANIMATIONS UTILS
   ============================================ */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(182, 0, 255, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(182, 0, 255, 0); }
}

.pulse-glow {
  animation: pulseGlow 2s infinite;
}

/* Print styles */
@media print {
  body { background: white; color: black; }
  .glass-card { background: white; border: 1px solid #ccc; }
}

/* ============================================
   ANIMATED GRADIENT MESH (hero background)
   Gradiente multi-radial que se mueve lento, infinito.
   ============================================ */
.hero-mesh {
  background:
    radial-gradient(40% 50% at 18% 28%, rgba(124, 31, 214, 0.30), transparent 70%),
    radial-gradient(45% 55% at 82% 22%, rgba(182, 0, 255, 0.24), transparent 72%),
    radial-gradient(50% 50% at 50% 88%, rgba(124, 31, 214, 0.18), transparent 75%);
  background-size: 200% 200%;
  background-position: 0% 0%;
  animation: meshDrift 26s ease-in-out infinite;
  opacity: 0.7;
  will-change: background-position;
  pointer-events: none;
}
@keyframes meshDrift {
  0%   { background-position: 0% 0%,   100% 0%,  50% 100%; }
  33%  { background-position: 30% 20%, 70% 30%,  40% 70%; }
  66%  { background-position: 60% 10%, 40% 60%,  60% 90%; }
  100% { background-position: 0% 0%,   100% 0%,  50% 100%; }
}

/* ============================================
   SPLIT-TEXT WORDS (hero H1 stagger)
   ============================================ */
.reveal-word {
  display: inline-block;
  will-change: transform, opacity;
}

/* ============================================
   TILT CARD — glow que sigue el mouse
   ============================================ */
.tilt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    180px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(182, 0, 255, 0.22),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: screen;
}
.tilt-card:hover::before {
  opacity: 1;
}

/* ============================================
   SCROLL REVEAL — estado inicial (JS lo anima a visible)
   ============================================ */
.reveal-ready {
  opacity: 0;
  will-change: transform, opacity, filter;
}

/* ============================================
   REDUCED MOTION — respeto a la preferencia del usuario
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mesh { animation: none; }
  .floating-notif,
  .floating-mockup { animation: none; }
  .pulse-glow { animation: none; }
  .reveal-ready,
  .reveal-word { opacity: 1 !important; transform: none !important; filter: none !important; }
}
