/* =============================================================
   Artífices – Landing Diagnóstico de Potencial de Marca
   CSS Final Optimizado (sin modo oscuro) – 11 ago 2025
   =============================================================
   Índice:
   01. Variables & Fuentes
   02. Reset & Base
   03. Utilidades
   04. Tipografías y Textos
   05. Layout Global
   06. Componentes
       6.1. Header
       6.2. Hero y Botones
       6.3. Scroller de Marcas
       6.4. Efecto Fade-in
       6.5. Beneficios
       6.6. Formulario
       6.7. Testimonios
       6.8. Disclaimer reCAPTCHA
       6.9. Cookie Banner
       6.10. Footer
   07. Misceláneo
   08. Animaciones (Keyframes)
   09. Media Queries (Agrupadas)
   ============================================================= */


/* ========== 01. VARIABLES & FUENTES ========== */

:root {
  /* Paleta de Colores */
  --primary:      #FF003D;
  --secondary:    #272727;
  --gray-50:      #EDEDED;
  --gray-300:     #898989;
  --gray-500:     #535353;
  --gray-600:     #6B7280;
  --gray-800:     #272727;
  --gray-900:     #191919;

  /* Tipografía Fluida */
  --fs-h2:        clamp(2rem, 6vw, 3rem);
  --fs-body:      clamp(0.95rem, 2.8vw, 1.125rem);

  /* Tokens para Botones */
  --btn-fs:         clamp(1rem, 2.6vw, 1.125rem);
  --btn-py:         clamp(0.85rem, 2.8vw, 1rem);
  --btn-px:         clamp(1.5rem, 6vw, 2.5rem);
  --btn-radius:     0.5rem;
  --btn-shadow:     0 6px 12px rgba(0, 0, 0, 0.15);
  --btn-shadow-hover: 0 12px 20px rgba(0, 0, 0, 0.2);
  --btn-ring:       0 0 0 3px rgba(255, 0, 61, 0.25);

  /* Variables para Cookie Banner */
  --cb-bg:          #ffffffcc;
  --cb-border:      #00000012;
  --cb-text:        #111;
  --cb-link:        #000;
  --cb-shadow:      0 16px 50px rgba(0, 0, 0, 0.12);
  --cb-radius:      20px;
  --cb-primary:     var(--primary);
  --cb-primary-text: #fff;
  --cb-secondary-bg: #f5f5f5;
  --cb-secondary-text: #111;
}


/* ========== 02. RESET & BASE ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  line-height: 1.2;
  text-wrap: balance;
}


/* ========== 03. UTILIDADES ========== */

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
}

.section--gray50 {
  background: var(--gray-50);
}

.font-bold {
  font-weight: 700;
}


/* ========== 04. TIPOGRAFÍAS Y TEXTOS ========== */

.font-primary {
  font-family: "clarendon-urw", Georgia, serif;
}

.tagline {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-top: -6px;
}

.brands-title,
.benefits-title,
.testimonials-heading-alt,
.form-title {
  font-weight: 450;
  color: var(--gray-800);
  font-size: var(--fs-h2);
}

.brands-title {
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
}

.testimonials-heading-alt {
  color: var(--gray-900);
  margin: 0.5rem 0 2rem;
}

.form-intro {
  color: var(--gray-500);
  margin-top: 0.5rem;
}


/* ========== 05. LAYOUT GLOBAL ========== */

/* Los ajustes responsive se agrupan en la sección 09 */


/* ========== 06. COMPONENTES ========== */

/** 6.1. Header **/
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

header .container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

header a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.header-logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-logo-stack img {
  height: 1.75rem;
}

/** 6.2. Hero y Botones **/
.hero h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  color: var(--gray-800);
  margin: 0 auto;
  max-width: 48rem;
  line-height: 1;
}

.hero p {
  font-size: var(--fs-body);
  color: var(--gray-500);
  margin: 1.5rem auto 0;
  max-width: 38rem;
}

.btn-primary,
.submit-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--btn-fs);
  line-height: 1;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--btn-radius);
  box-shadow: var(--btn-shadow);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary {
  margin-top: 2.5rem;
}

.btn-primary:hover,
.submit-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--btn-shadow-hover);
  background: #e60037;
}

.btn-primary:active,
.submit-btn:active {
  transform: scale(0.98) translateY(1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:focus-visible,
.submit-btn:focus-visible {
  outline: none;
  box-shadow: var(--btn-shadow), var(--btn-ring);
}

.btn-primary:disabled,
.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--btn-shadow);
}

/** 6.3. Scroller de Marcas **/
.scroller {
  position: relative;
  overflow: hidden;
  margin-top: 2.5rem;
}

.scroller:hover .scroller-track {
  animation-play-state: paused;
}

.scroller-track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  align-items: center;
  gap: 3.5rem;
  padding-inline: 1rem;
  margin: 0;
  list-style-type: none;
  animation: scroll 60s linear infinite;
}

.scroller-item {
  display: flex;
}

.scroller-item img {
  max-height: 55px; /* Límite superior para logos altos */
  filter: grayscale(100%) opacity(0.8);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.scroller-item:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

.scroller--fade {
  --fade-color: #FFFFFF;
}

.section--gray50 .scroller--fade {
  --fade-color: var(--gray-50);
}

.scroller--fade::before,
.scroller--fade::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.scroller--fade::before {
  left: 0;
  background: linear-gradient(to right, var(--fade-color) 20%, transparent);
}

.scroller--fade::after {
  right: 0;
  background: linear-gradient(to left, var(--fade-color) 20%, transparent);
}

/** 6.4. Efecto Fade-in **/
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/** 6.5. Beneficios **/
.benefits {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  margin-top: 3rem;
}

.benefit {
  display: flex;
  align-items: flex-start;
}

.benefit-text {
  margin-left: 1rem;
}

.benefit svg {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.benefit h4 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-800);
}

.benefit p {
  margin: 0;
  color: var(--gray-500);
}

/** 6.6. Formulario **/
.form-wrapper {
  max-width: 36rem;
  margin: 0 auto;
  background: #fff;
  padding: 2rem 1.5rem;
  border: 1px solid var(--gray-50);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

form#lead-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group-last {
  margin-bottom: 2rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
}

input {
  width: 100%;
  margin-top: 0.25rem;
  padding: 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-50);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 0, 61, 0.2);
}

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
}

.form-status {
  /* Estilos base para mensajes de estado del formulario */
  margin-top: 1rem;
  text-align: center;
}

.form-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.form-intro {
  text-wrap: balance;
}

/** 6.7. Testimonios **/
.testimonials-section .section-tagline {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.testimonials-v3-wrapper {
  max-width: 1000px;
  margin: 3rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2rem);
  justify-content: center;
}

.testimonials-v3-card {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  padding: 3.5rem 2rem 2.5rem;
  flex: 0 0 300px;
}

.testimonials-v3-card p {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--gray-600);
  margin: 0 0 1.5rem;
}

.testimonials-v3-card .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
}

.testimonial-author {
  font-weight: 600;
  color: var(--gray-800);
}

.testimonial-role {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.rating-stars {
  font-size: 0.875rem;
  color: var(--primary);
  letter-spacing: 1px;
  margin-top: 1rem;
  text-align: right;
}

/** 6.8. Disclaimer reCAPTCHA **/
.recaptcha-disclaimer {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--gray-600);
}

.recaptcha-disclaimer a {
  color: inherit;
  text-decoration: underline;
}

footer .recaptcha-disclaimer--footer {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--gray-500);
}

/** 6.9. Cookie Banner **/
.cookie-banner {
  position: fixed;
  inset: auto 0 24px 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding-inline: 16px;
  pointer-events: none;
}

.cookie-banner__inner {
  width: min(960px, 100%);
  background: var(--cb-bg);
  color: var(--cb-text);
  border: 1px solid var(--cb-border);
  box-shadow: var(--cb-shadow);
  border-radius: var(--cb-radius);
  backdrop-filter: blur(10px);
  padding: clamp(16px, 3vw, 28px);
  pointer-events: auto;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  display: grid;
  gap: 16px;
}

.cookie-banner.is-visible .cookie-banner__inner {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__text {
  font-size: clamp(0.92rem, 1.2vw, 1rem);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner__text a {
  color: var(--cb-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.cookie-banner__text a:hover {
  opacity: 0.85;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.cookie-banner .btn-primary,
.cookie-banner .btn-secondary {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s, border-color 0.2s;
}

.cookie-banner .btn-primary {
  background: var(--cb-primary);
  color: var(--cb-primary-text);
  box-shadow: 0 8px 18px rgba(255, 0, 61, 0.22);
}

.cookie-banner .btn-primary:hover {
  transform: translateY(-1px);
}

.cookie-banner .btn-secondary {
  background: var(--cb-secondary-bg);
  color: var(--cb-secondary-text);
  border-color: var(--cb-border);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.cookie-banner .btn-secondary:hover {
  opacity: 0.92;
}

.cookie-banner .btn-primary:focus-visible,
.cookie-banner .btn-secondary:focus-visible {
  outline: 2px solid var(--cb-primary);
  outline-offset: 2px;
}

/** 6.10. Footer **/
footer {
  background: var(--gray-900);
  color: #fff;
  padding: 2rem 0;
}

footer .links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

footer a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.875rem;
}

footer a:hover {
  color: #fff;
}

footer p {
  margin: 0;
  text-align: center;
  color: var(--gray-300);
}


/* ========== 07. MISCELÁNEO ========== */

#diagnostico {
  scroll-margin-top: 6rem; /* Ajuste para el ancla del formulario */
}


/* ========== 08. ANIMACIONES (KEYFRAMES) ========== */

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}


/* ========== 09. MEDIA QUERIES (AGRUPADAS) ========== */

/** Tablets y superior (≥ 768px) **/
@media (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
  .benefits {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .form-wrapper {
    padding: 3rem;
  }
}

/** Tablets medianas (768px - 1023px) **/
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding: 0 2rem;
  }
  .testimonials-v3-wrapper {
    gap: 1.5rem;
  }
}

/** Móviles y tablets pequeñas (≤ 767px) **/
@media (max-width: 767px) {
  /* Scroller */
  .scroller-track {
    gap: 2.5rem;
    animation-duration: 45s;
  }
  .scroller-item img {
    max-height: 40px;
  }
  .scroller--fade::before,
  .scroller--fade::after {
    width: 50px;
  }

  /* Testimonios V3 en modo carrusel */
  .testimonials-fader-frame {
    position: relative;
  }
  .testimonials-fader-frame::before,
  .testimonials-fader-frame::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 2rem;
    pointer-events: none;
    background: linear-gradient(to right, var(--gray-50) 0%, rgba(247, 247, 247, 0) 100%);
  }
  .testimonials-fader-frame::before {
    left: 0;
  }
  .testimonials-fader-frame::after {
    right: 0;
    transform: scaleX(-1);
  }
  .testimonials-v3-wrapper {
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1.25rem;
    padding: 3rem 1.25rem 1.5rem; /* Espacio para avatares y scroll */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .testimonials-v3-wrapper::-webkit-scrollbar {
    display: none;
  }
  .testimonials-v3-card {
    flex: 0 0 90%;
    max-width: 360px;
    scroll-snap-align: center;
    min-height: 350px; /* Evita saltos de layout al deslizar */
  }
}

/** Móviles pequeños (≤ 480px) **/
@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }
  .btn-primary {
    width: 100%;
    margin-top: 2rem;
    text-align: center;
  }
  .benefit svg {
    width: 1.5rem;
    height: 1.5rem;
  }
  .benefit-text {
    margin-left: 0.75rem;
  }
  .form-wrapper {
    padding: 1.75rem 1.25rem;
  }
  input {
    padding: 0.875rem;
    font-size: 0.9rem;
  }
  .submit-btn {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
  footer .links {
    gap: 1rem;
    flex-wrap: wrap;
  }
  /* Cookie Banner */
  .cookie-banner .btn-primary,
  .cookie-banner .btn-secondary {
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    width: 100%;
  }
  .cookie-banner__actions {
    flex-direction: column-reverse;
    gap: 10px;
  }
}

/** Cookie Banner en Desktop (≥ 900px) **/
@media (min-width: 900px) {
  .cookie-banner__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
  }
}

/** Preferencias de Usuario **/
@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .submit-btn,
  .cookie-banner .btn-primary,
  .cookie-banner .btn-secondary {
    transition: none;
    transform: none !important;
  }
  .scroller-track {
    animation: none;
  }
  .scroller-item img {
    transition: none;
  }
  .fade-in-section {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ========== 07. MISCELÁNEO ========== */

#diagnostico {
  scroll-margin-top: 6rem;
  background-image: url('/assets/images/background-form.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#phone::placeholder { color: var(--gray-600); }

