/* =========================================================
   MJ | GESTORÍA INTEGRAL DEL AUTOMOTOR — DESIGN SYSTEM
   style.css — Reset, Variables, Tipografía, Nav Panel,
               Footer, Botones, WhatsApp, Utilidades, Formularios
   ========================================================= */

/* ---------------------------------------------------------
   VARIABLES
   --------------------------------------------------------- */
:root {
  --bg:           #0a0a0a;
  --bg-alt:         #111111;
  --bg-3:         #0d1500;
  --surface:      #141414;
  --primary:      #b5f23d;
  --accent:       #d4ff70;
  --secondary:    #1a2e00;
  --text:         #f0f8e0;
  --text-muted:   rgba(240, 248, 224, 0.6);
  --text-dark:    #0a0a0a;
  --light-bg:     #141414;
  --light-text:   #f0f8e0;
  --border:       rgba(181, 242, 61, 0.15);
  --border-light: rgba(240, 248, 224, 0.1);

  --font-display: 'Outfit', sans-serif;
  --font-body:    'Outfit', sans-serif;

  --radius:       4px;
  --transition-base:   0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  --header-height: 80px;
  --max-width: 1320px; /* HFV-DEVIATION: --max-width: 1320px — decisión de diseño del proyecto, spec sugiere 1280px */
  --container-pad: clamp(1.25rem, 5vw, 3rem);
  --section-py:    clamp(4rem, 8vw, 7.5rem);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select { font-family: inherit; }

/* ---------------------------------------------------------
   TIPOGRAFÍA BASE
   --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); font-weight: 800; }
h2 { font-size: clamp(1.875rem, 4vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.75rem); font-weight: 600; }

p { line-height: 1.75; }

/* Tensión tipográfica: cuerpo descriptivo más liviano que los títulos */
.servicio-desc,
.tramite-desc,
.stats-desc,
.mandatario-punto-text {
  font-weight: 300;
  letter-spacing: 0.005em;
}

/* ---------------------------------------------------------
   CONTAINER
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---------------------------------------------------------
   BOTONES
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.875rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: var(--transition-base);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-dark);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--text-dark);
}

.btn .arrow {
  display: inline-block;
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.btn:hover .arrow {
  transform: translate(3px, -3px);
}

/* ---------------------------------------------------------
   LOGO IMAGEN
   --------------------------------------------------------- */

/* Hero: logo flotante top-left sobre fondo oscuro */
.hero-logo {
  position: absolute;
  top: 1.5rem;
  left: var(--container-pad);
  z-index: 2;
  display: block;
  line-height: 0; /* elimina espacio debajo del img */
}

.logo-img {
  height: 132px;
  width: auto;
  display: block;
  border-radius: 6px;
  padding: 4px 8px;
  background: rgb(255 255 255 / 0%);
}

/* Nav panel: logo más grande */
.logo-img--nav {
  height: 64px;
  padding: 6px 12px;
}

/* Footer: tamaño intermedio, margen inferior antes del tagline */
.logo-img--footer {
  height: 150px;
  margin-bottom: 1rem;
  padding: 5px 10px;
}

/* ---------------------------------------------------------
   BOTÓN HAMBURGER / NAV TRIGGER
   --------------------------------------------------------- */
.nav-trigger {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-base);
}

.nav-trigger:hover {
  border-color: var(--primary);
}

.nav-trigger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: var(--transition-base);
  transform-origin: center;
}

.nav-trigger.is-open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-trigger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-trigger.is-open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------------------------------------------------------
   PANEL DE NAVEGACIÓN FULL-VIEWPORT (DASHBOARD)
   --------------------------------------------------------- */
.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-panel.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav-panel-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 300px;
  min-height: 100vh;
}

.nav-panel-main {
  padding: 3rem var(--container-pad);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.nav-panel-logo {
  margin-bottom: 2.5rem;
  line-height: 0;
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  align-content: start;
}

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.375rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition-base);
  color: var(--text);
}

.nav-card:hover {
  border-color: var(--primary);
  background: rgba(181, 242, 61, 0.04);
  transform: translateY(-2px);
}

.nav-card.is-featured {
  background: var(--primary);
  color: var(--text-dark);
  border-color: var(--primary);
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.nav-card.is-featured:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* Texto dentro de la card destacada: forzar color oscuro visible */
.nav-card.is-featured .nav-card-label,
.nav-card.is-featured .nav-card-title,
.nav-card.is-featured .nav-card-arrow {
  color: var(--text-dark);
  opacity: 1;
}

.nav-card.is-featured > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-card-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.nav-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-card-arrow {
  font-size: 1.375rem;
  font-weight: 300;
  margin-left: auto;
  transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-arrow {
  transform: translate(3px, -3px);
}

.nav-panel-sidebar {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: var(--bg-alt);
}

.nav-sidebar-block {}

.nav-sidebar-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.nav-contact-link {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.375rem 0;
  transition: color 0.3s;
}

.nav-contact-link:hover { color: var(--primary); }

.nav-contact-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.125rem;
}

.nav-close-hint {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand {}

/* .footer-logo-text reemplazado por .logo-img--footer */

.footer-tagline {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.65;
}

.footer-dnrpa {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
}

.footer-nav-col {}

.footer-nav-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--text); }

.footer-contact-col {}

.footer-contact-items {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.footer-contact-item-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.8;
}

.footer-contact-item a,
.footer-contact-item span {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-contact-item a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-social-link {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-social-link:hover { color: var(--primary); }

.footer-legal {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   BOTÓN WHATSAPP FLOTANTE (inline SVG)
   --------------------------------------------------------- */
.btn-whatsapp {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 997;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: var(--transition-base);
}

.btn-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
}

/* ---------------------------------------------------------
   REVEAL ANIMATIONS
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ---------------------------------------------------------
   UTILIDADES
   --------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* .eyebrow-dark eliminada — el sitio es 100% dark, no se necesita */

.text-primary   { color: var(--primary); }
.text-muted     { color: var(--text-muted); }
.text-dark      { color: var(--text-dark); }

.bg-dark        { background-color: var(--bg); }
.bg-surface     { background-color: var(--surface); }
.bg-light       { background-color: var(--light-bg); color: var(--light-text); }
.bg-neutral     { background-color: var(--bg-alt); }
.bg-forest      { background-color: var(--bg-3); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   FORMULARIOS — Estilo 363: solo línea inferior, sin caja
   --------------------------------------------------------- */

/* Form 363 — grid con divisiones por líneas */
.form-363 { width: 100%; }

.form-363-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(240, 248, 224, 0.1);
}

.form-363-field {
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(240, 248, 224, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-363-field:nth-child(odd):not(.full) {
  padding-right: 3rem;
  border-right: 1px solid rgba(240, 248, 224, 0.1);
}

.form-363-field:nth-child(even):not(.full) {
  padding-left: 3rem;
}

.form-363-field.full {
  grid-column: span 2;
}

.form-363-label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 248, 224, 0.38);
  display: block;
}

.form-363-input,
.form-363-textarea,
.form-363-select {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-363-input::placeholder,
.form-363-textarea::placeholder {
  color: rgba(240, 248, 224, 0.2);
}

.form-363-select option { background: #111; color: var(--text); }

.form-363-textarea {
  min-height: 90px;
  resize: none;
  line-height: 1.6;
}

/* Footer del form: contacto alt + submit derecha */
.form-363-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.form-363-alt {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-363-alt a {
  color: var(--primary);
  font-weight: 500;
  transition: opacity 0.2s;
}

.form-363-alt a:hover { opacity: 0.75; }

.form-363-submit {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  padding: var(--space-sm) var(--space-lg);
  background: var(--primary);
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  border-radius: 0;
  white-space: nowrap;
}

.form-363-submit:hover { background: var(--accent); }

.form-363-submit-icon {
  font-size: 1.125rem;
  display: inline-block;
  transition: transform 0.3s ease;
}

.form-363-submit:hover .form-363-submit-icon {
  transform: translate(3px, -3px);
}

.form-error {
  font-size: 0.75rem;
  color: #ff6b6b;
  margin-top: 0.375rem;
}

/* Cuando un input-363 tiene error, la celda cambia de tono */
.form-363-field:has(.form-error) {
  border-bottom-color: rgba(255, 107, 107, 0.45);
}

.form-363-field:has(.form-error) .form-363-label {
  color: rgba(255, 107, 107, 0.7);
}

.form-success-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0;
  color: var(--primary);
  font-size: 1rem;
  border-top: 1px solid rgba(181, 242, 61, 0.2);
  margin-top: 1.5rem;
}

/* Compat: mantener form-grid para posibles páginas secundarias */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-grid .form-group-full { grid-column: span 2; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.form-input, .form-textarea { padding: 0.875rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 1rem; transition: border-color 0.3s; outline: none; width: 100%; }
.form-input:focus, .form-textarea:focus { border-color: var(--primary); }
.form-textarea { min-height: 120px; resize: vertical; }

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav-panel-inner {
    grid-template-columns: 1fr;
  }

  .nav-panel-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: clamp(3rem, 7vw, 5rem);
  }

  .nav-cards {
    grid-template-columns: 1fr;
  }

  .nav-card.is-featured {
    grid-column: span 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

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

  .form-grid .form-group-full {
    grid-column: span 1;
  }

  /* Form 363 — mobile: una columna */
  .form-363-grid {
    grid-template-columns: 1fr;
  }

  .form-363-field:nth-child(odd):not(.full) {
    padding-right: 0;
    border-right: none;
  }

  .form-363-field:nth-child(even):not(.full) {
    padding-left: 0;
  }

  .form-363-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .form-363-submit {
    width: 100%;
    justify-content: space-between;
  }
}

/* ---------------------------------------------------------
   HFV v1.0 — ACCESIBILIDAD (Paso 9)
   --------------------------------------------------------- */

/* Punto 1 — Skip link */
.skip-link, .hfv-skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--primary);
  color: var(--text-dark);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus, .hfv-skip-link:focus {
  top: 1rem;
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  white-space: normal;
}

/* Punto 9 — Progressive enhancement: reveal solo activo con JS */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sin JS: todo visible por defecto */
.reveal {
  opacity: 1;
  transform: none;
}

/* Punto 8 — Prefers 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;
  }
  .js-enabled .reveal { opacity: 1; transform: none; }
}

/* HFV header wrapper — contenedor semántico del nav-trigger.
   El trigger ya tiene position:fixed, el header es un wrapper neutro */
.hfv-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  pointer-events: none; /* clicks pasan al trigger hijo */
}

.hfv-header .nav-trigger {
  pointer-events: all;
}
