/* =========================================================
   RAEV Soluciones Informática - Estilos globales
   Arquitectura: variables > base > layout > componentes > utilidades
========================================================= */

:root {
  --color-bg: #0b1220;
  --color-surface: #111827;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-heading: #f8fafc;
  --color-text: #cbd5e1;
  --color-border: #273449;
  --color-success: #16a34a;

  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-elevated: 0 18px 45px rgba(15, 23, 42, 0.16);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --container: 1200px;
  --header-height: 78px;

  --transition: 0.28s ease;
}

/* Reseteo básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--color-text);
  background: radial-gradient(circle at 5% 5%, rgba(37, 99, 235, 0.15), transparent 35%),
    radial-gradient(circle at 95% 10%, rgba(59, 130, 246, 0.09), transparent 30%),
    var(--color-bg);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Contenedor principal reutilizable */
.container {
  width: min(92%, var(--container));
  margin-inline: auto;
}

/* Tipografías de secciones */
.section {
  padding: 90px 0;
}

.section-alt {
  background: linear-gradient(180deg, #0d1729 0%, #0f1d33 100%);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 42px;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1,
h2,
h3 {
  color: var(--color-heading);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  margin-bottom: 14px;
}

h3 {
  font-size: 1.25rem;
}

/* ================= HEADER ================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(11, 18, 32, 0.9);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.nav-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-weight: 800;
  padding: 8px 11px;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.brand-text {
  font-weight: 600;
  color: #e2e8f0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

.nav-cta {
  background: var(--color-primary);
  color: #eff6ff;
  padding: 9px 14px;
  border-radius: 999px;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--color-primary-dark);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #e2e8f0;
  margin: 5px 0;
  transition: transform var(--transition);
}

/* ================= HERO ================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 85px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.hero-subtitle {
  max-width: 62ch;
  font-size: 1.06rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-visual img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  object-fit: cover;
  aspect-ratio: 9 / 7;
  border: 1px solid var(--color-border);
}

.hero-bg-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-bg-shape-a {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 70%);
  top: -160px;
  right: -120px;
}

.hero-bg-shape-b {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.2) 0%, rgba(29, 78, 216, 0) 68%);
  bottom: -180px;
  left: -130px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  list-style: none;
  gap: 14px;
}

.hero-metrics li {
  background: #0f1a2f;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.hero-metrics strong {
  display: block;
  color: #f8fafc;
  font-size: 1.15rem;
}

.hero-metrics span {
  font-size: 0.86rem;
}

/* ================= BOTONES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
}

.btn-outline {
  border-color: #3b82f6;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.08);
}

.btn-sm {
  padding: 9px 14px;
  border-radius: 10px;
  background: #1e293b;
  color: #e2e8f0;
}

/* ================= ABOUT ================= */
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
}

.about-card {
  background: #111b2e;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}

.about-card ul {
  margin-top: 16px;
  list-style: none;
}

.about-card li {
  padding: 8px 0;
  border-bottom: 1px solid #23344d;
}

/* ================= TARJETAS ================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  background: #111b2e;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover,
.service-card:hover {
  transform: translateY(-5px);
  border-color: #bfd2fc;
  box-shadow: var(--shadow-elevated);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(29, 78, 216, 0.25));
  margin-bottom: 14px;
  color: var(--color-primary);
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-card p {
  margin-top: 8px;
  font-size: 0.95rem;
}

/* ================= TECNOLOGIAS ================= */
.tech-cloud {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.tech-badge {
  background: #111b2e;
  border: 1px solid #314764;
  color: #dbeafe;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.tech-badge:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ================= PROYECTOS ================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #111b2e;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-elevated);
}

.project-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-body {
  padding: 18px;
}

.project-body p {
  margin: 10px 0 15px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 10px;
  background: #1e293b;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ================= ESTADISTICAS ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  border-radius: var(--radius-md);
  background: #111b2e;
  border: 1px solid var(--color-border);
  text-align: center;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.stat-card h3 {
  font-size: 1.8rem;
  color: var(--color-primary-dark);
}

/* ================= TIMELINE ================= */
.timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
}

.timeline-step {
  position: relative;
  background: #111b2e;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 18px 10px;
  box-shadow: var(--shadow-soft);
}

.timeline-step .num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #2563eb;
  color: #eff6ff;
  border-radius: 50%;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

/* ================= CONTACTO ================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.contact-form-wrap,
.contact-info {
  background: #111b2e;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  font-weight: 500;
  color: var(--color-heading);
}

.contact-form input,
.contact-form textarea {
  border: 1px solid #314764;
  background: #0f1a2f;
  color: #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 0;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #94a3b8;
}

.form-message {
  min-height: 24px;
  font-size: 0.92rem;
  font-weight: 500;
}

.form-message.success {
  color: var(--color-success);
}

.form-message.error {
  color: #dc2626;
}

.contact-info ul {
  list-style: none;
  margin-top: 14px;
}

.contact-info li {
  display: grid;
  gap: 3px;
  margin-bottom: 14px;
}

.contact-info strong {
  color: var(--color-heading);
}

.contact-info a {
  color: var(--color-primary-dark);
}

/* ================= FOOTER ================= */
.footer {
  background: #0a1020;
  color: #e2e8f0;
  padding: 28px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #3b4f6b;
  border-radius: 999px;
  transition: background var(--transition);
}

.social-links svg {
  width: 16px;
  height: 16px;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: #1b2840;
}

/* ================= FLOTANTES ================= */
.floating-whatsapp,
.back-to-top {
  position: fixed;
  right: 20px;
  z-index: 1001;
  border-radius: 999px;
  box-shadow: var(--shadow-elevated);
}

.floating-whatsapp {
  bottom: 84px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
}

.floating-whatsapp svg {
  width: 18px;
  height: 18px;
}

.back-to-top {
  bottom: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  background: #1d4ed8;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ================= PREGUNTAS FRECUENTES (FAQ) ================= */
.faq-accordion {
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}

.faq-item:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(17, 24, 39, 0.9);
}

.faq-item[open] {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: var(--shadow-soft);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--color-heading);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color var(--transition);
}

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

.faq-question:hover {
  color: #60a5fa;
}

.faq-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--transition), background-color var(--transition), color var(--transition);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
}

.faq-answer {
  padding: 0 24px 22px 24px;
  color: var(--color-text);
  font-size: 0.98rem;
  line-height: 1.7;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  padding-top: 16px;
}

.faq-answer p {
  margin: 0;
}

/* ================= ANIMACIONES ================= */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
  .hero-grid,
  .two-col,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid,
  .stats-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: min(78vw, 320px);
    height: calc(100vh - var(--header-height));
    background: #0f1a2f;
    border-left: 1px solid #2b3c55;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .section {
    padding: 70px 0;
  }

  .projects-grid,
  .stats-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .floating-whatsapp {
    right: 14px;
    bottom: 80px;
  }

  .back-to-top {
    right: 14px;
    bottom: 20px;
  }
}

@media (max-width: 420px) {
  :root {
    --header-height: 70px;
  }

  .container {
    width: min(94%, var(--container));
  }

  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .section {
    padding: 58px 0;
  }

  .hero {
    padding: 48px 0 62px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .brand-text {
    font-size: 0.86rem;
  }

  .brand-mark {
    padding: 7px 10px;
  }

  .nav {
    width: min(86vw, 320px);
    padding: 18px;
  }

  .project-body,
  .about-card,
  .contact-form-wrap,
  .contact-info,
  .service-card,
  .stat-card,
  .timeline-step {
    padding: 16px;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .floating-whatsapp {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .faq-question {
    padding: 16px 18px;
    font-size: 0.98rem;
  }

  .faq-answer {
    padding: 0 18px 18px 18px;
    font-size: 0.92rem;
  }
}
