/* ============================================================
   Rest Comanda — Landing Page
   Estilos custom complementarios a Tailwind CDN
   ============================================================ */

/* ---------- Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Focus visible accesible en el sitio */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Fondo del hero ---------- */
.hero-glow {
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.28), rgba(245, 158, 11, 0.06) 60%, transparent 100%);
  filter: blur(24px);
}

.bg-grid {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}

/* ---------- Botones ---------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0.9rem;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #d97706);
  color: #0f172a;
  box-shadow: 0 10px 30px -8px rgba(245, 158, 11, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -10px rgba(245, 158, 11, 0.65);
  filter: brightness(1.06);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.06);
}

.btn-xl {
  padding: 1rem 2rem;
  border-radius: 1.1rem;
}

/* ---------- Nav ---------- */
.nav-link {
  position: relative;
  padding: 0.45rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #fbbf24;
}

.nav-link.active {
  color: #fbbf24;
}

.mobile-link {
  display: block;
  padding: 0.7rem 0.6rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: all 0.2s ease;
}

.mobile-link:hover {
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

/* ---------- Secciones ---------- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin-top: 1rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
}

/* ---------- Tarjetas ---------- */
.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1.4rem;
  padding: 1.8rem;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.9rem;
}

.feature-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1.4rem;
  padding: 1.7rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 20px 45px -20px rgba(245, 158, 11, 0.25);
}

.role-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border-radius: 1.4rem;
  padding: 1.8rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.role-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
}

.role-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.report-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1.2rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.report-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ---------- Marco de teléfono ---------- */
.phone-frame {
  position: relative;
  aspect-ratio: 1216 / 2562;
  width: 100%;
  border-radius: 2.6rem;
  padding: 0.8rem;
  background: linear-gradient(160deg, #1e293b, #0f172a 60%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 0 6px rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone-frame img {
  border-radius: 2rem;
  display: block;
}

.phone-notch {
  position: absolute;
  top: 1.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 1.7rem;
  border-radius: 999px;
  background: #020617;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-frame-sm {
  position: relative;
  width: min(13.5rem, 46vw);
  border-radius: 1.9rem;
  padding: 0.55rem;
  background: linear-gradient(160deg, #1e293b, #0f172a 60%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.85);
}

.phone-frame-sm img {
  border-radius: 1.5rem;
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Pasos ---------- */
.step-number {
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.07), 0 15px 35px -12px rgba(245, 158, 11, 0.4);
}

/* ---------- Galería ---------- */
.carousel {
  touch-action: pan-y;
}

.carousel-track {
  will-change: transform;
}

.carousel-slide {
  display: flex;
  align-items: center;
}

.gallery-btn {
  position: absolute;
  z-index: 20;
  display: flex;
  height: 2.9rem;
  width: 2.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.gallery-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.gallery-dot {
  height: 0.55rem;
  width: 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  transition: all 0.3s ease;
  border: none;
  padding: 0;
  cursor: pointer;
}

.gallery-dot:hover {
  background: rgba(148, 163, 184, 0.7);
}

.gallery-dot.active {
  width: 1.6rem;
  background: #f59e0b;
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item[open] {
  border-color: rgba(245, 158, 11, 0.4);
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: #f1f5f9;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary:hover {
  color: #fbbf24;
}

.faq-icon {
  flex-shrink: 0;
  height: 1.15rem;
  width: 1.15rem;
  color: #f59e0b;
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 1.35rem 1.2rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #94a3b8;
}

/* ---------- Footer ---------- */
.footer-link {
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fbbf24;
}

/* ---------- Animaciones ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion: respeta la preferencia del usuario */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate-float {
    animation: none;
  }

  .carousel-track {
    transition: none;
  }
}
