/* ============================================================================
   MOMBAY · HOJA DE ESTILOS PRINCIPAL
   Proyecto: Landing page Mombay Comunicación Digital
   Arquitectura: variables → base → tipografía → layout → componentes →
                 secciones → responsive → accesibilidad

   MEDIDAS
   - Los rem se calculan sobre el tamaño raíz del navegador (16 px por defecto).
   - Referencia de Figma: lienzo de 1440 px, grilla de 12 columnas.
   - Ancho máximo de referencia: 1440 px, con márgenes internos fluidos.
   - No se modifica font-size en html para respetar las preferencias del usuario.
   ============================================================================ */

/* ============================================================================
   01 · DESIGN TOKENS / VARIABLES GLOBALES
   Cambiar aquí colores, tamaños tipográficos, contenedores y espaciados.
   No modificar font-size de html: 1rem sigue la preferencia del navegador.
   ============================================================================ */
:root {
  /* Paleta */
  --color-navy: #17252e;/* verde oscuro */
  --color-ink: #111b20;/* verde muy oscuro */
  --color-pink: #942041;/* rojo */
  --color-pink-hover: #b02a54;/* rojo-hover */
  --color-mint: #d9efbd;/* verde claro */
  --color-text: #eff4dc;/* blanco crema  */
  --color-border: #829579;/* verde medio */

  /* Tipografía: modificar acá para cambiar la jerarquía general */
  --font-primary: 'Rubik', Arial, sans-serif;
  --text-body: 1rem;
  --text-lead: 1.125rem;
  --text-card: 0.96rem;
  --text-project-title: 1.17rem;
  --text-process-title: 2.25rem;
  --text-faq-title: 2rem;
  --text-hero-support: clamp(1rem, 1.15vw, 1.2rem);
  --text-small: 0.78rem;
  --text-eyebrow: 0.82rem;
  --text-button: 0.9rem;
  --text-h1: clamp(2.6rem, 4vw, 4.5rem);
  --text-h2: clamp(2.1rem, 3.4vw, 3rem);
  --text-h3: clamp(1.55rem, 2vw, 2.1rem);
  --line-body: 1.55;
  --line-heading: 1.15;

  /* Layout */
  --container-max: 90rem; /* Lienzo Figma: 1440 px */
  --page-gutter: clamp(1.375rem, 7.5vw, 6.875rem);
  --section-space: 5rem;
  --radius-card: 1rem;
  --radius-button: 0.75rem;
  --nav-height: 5rem;/* 80px */

  /* Grilla de referencia: 12 columnas y espaciado reutilizable */
  --grid-columns: 12;
  --grid-gap: 3rem;
  --focus-ring: 0.1875rem solid var(--color-mint);
}

/* 02. RESET Y ESTILOS BASE ------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  
}

body {
  margin: 0;
  background: var(--color-ink);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: var(--text-body);
  overflow-wrap: break-word;
  line-height: var(--line-body);
  padding-top: 0;
}

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

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

button {
  font: inherit;
}

/* Navegación con teclado: foco siempre visible */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  padding: 12px;
  background: #fff;
  color: #111;
}

.skip-link:focus {
  top: 10px;
}

/* ============================================================================
   03 · JERARQUÍA TIPOGRÁFICA
   Un H1, encabezados H2 de sección y H3 de tarjetas. No usar H por apariencia:
   los tokens controlan el estilo, la etiqueta conserva semántica.
   ============================================================================ */
/* Los tamaños base y los fluidos se controlan desde :root. */
h1,
h2,
h3,
p {
  margin-top: 0;
}

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

h1 {
  font-size: var(--text-h1);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 500; /* Medium */
  
}

h3 {
  font-size: var(--text-h3);
 /* letter-spacing: -0.03em;*/
}

.eyebrow {
  margin-bottom: 0.45rem;
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6; /* 80% de opacidad */
}

.microcopy {
  margin-top: 0.32rem;
  font-size: var(--text-small);
}

/* ============================================================================
   04 · LAYOUT COMPARTIDO
   Contenedor de hasta 1440 px de referencia; padding lateral flexible.
   Grillas de 3 columnas con minmax(0,1fr) para evitar overflow.
   ============================================================================ */
.container {
  width: min(calc(100% - 2 * var(--page-gutter)), var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

.section-heading {
  max-width: 47.5rem;
  margin: 0 auto 1.8rem;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 0.8125rem;
}

.section-heading > p:last-child {
  font-size: var(--text-card);
  line-height: 1.6;
}

.section-action {
  margin-top: 3.75rem;
  text-align: center;
}

/* 05. COMPONENTES REUTILIZABLES: BOTONES ---------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 2.8125rem;
  padding: 0.75rem 1.4375rem;
  border-radius: var(--radius-button);
  font-size: var(--text-button);
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--color-pink);
  color: #fff;
}

.button-primary:hover {
  background: var(--color-pink-hover);
}

.button-outline-light {
  border: 1px solid rgba(246, 249, 231, 0.9);
  color: var(--color-text);
}

.button-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
}
.button-icon {
  width: 1.25rem;  /* 20px */
  height: 1.25rem;
  flex-shrink: 0;
  object-fit: contain;
  color: var(--color-text);
}

/* 06. HEADER Y NAVEGACIÓN ------------------------------------------------- */
/* ========================================
   HEADER / NAVBAR
======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height); /* 80px en escritorio */
  z-index: 1000;
  background-color: transparent;
 }
/* Navbar cuando hacemos scroll */
.site-header.scrolled {
  background-color: var(--color-navy); /* Fondo al hacer scroll */
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .logo img {
  display: block;
  height: 3rem; /* 48px */
  width: auto;
  object-fit: contain;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.625rem;
  height: var(--nav-height);
  padding-inline: 1.125rem;
  }

.logo-link {
  display: inline-block;
  flex-shrink: 0;
}

.logo-link img {
  width: 9.9375rem;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.8vw, 2.5rem);
}

.main-nav > a {
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav > a:hover {
  color: var(--color-mint);
}

.main-nav > .nav-contact {
  padding: 0.4375rem 0.6875rem;
  border: 1px solid var(--color-pink);
  border-radius: 0.4375rem;
}

/* Oculto en escritorio; se activa al pasar a navegación compacta (900 px). */
.menu-toggle {
  display: none;
}

/* Foco visible sobre las secciones claras de proyectos y testimonios. */
.projects-section a:focus-visible,
.testimonials-section a:focus-visible,
.testimonials-section button:focus-visible {
  outline-color: var(--color-navy);
}

/* 07. HERO ---------------------------------------------------------------- */
.hero  {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(35rem, 48vw, 42rem);
  background-image:
    linear-gradient(
      90deg,
      rgba(16, 29, 37, 0.38) 0%,
      rgba(16, 29, 37, 0.1) 65%
    ),
    url('../assets/hero.webp');

  background-size: cover, auto 115%;
  background-position: center, center 90%;
  background-repeat: no-repeat;
}

.hero-content {
  padding-bottom: 3.75rem;
  padding-top: 12rem;
}

.hero h1 {
  max-width: 45rem;
  margin-bottom: 1.5rem;
}

.hero-content > p:not(.microcopy) {
  max-width: 44.375rem;
  font-size: var(--text-hero-support);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  margin-top: 1.5rem;
}

/* 08. SOLUCIONES ---------------------------------------------------------- */
.solutions-section,
.process-section {
  background: var(--color-ink);
}



/* Card destacada: landing pages */
.featured-solution {
  display: grid;
  /* minmax evita desbordamiento: los porcentajes + gap sumaban más de 100 %. */
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 0.65fr);
  align-items: center;
  gap: 1.5625rem;
  margin-bottom: 2.125rem;
  padding: 2rem 3.5rem;
  border: 2px solid var(--color-mint);
  border-radius: 1.125rem;
}

.featured-solution h3 {
  margin-bottom: 0.4375rem;
  font-size: 1.8rem;
}

.featured-solution p {
  margin: 0;
}

.featured-solution ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: var(--text-card);
}

.featured-solution li {
  padding-block: 0.25rem;
}

/* Tres cards reutilizables */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 25.625rem;
  padding: 1.75rem 1.5625rem 2.125rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-card);
}

.service-card > img {
  align-self: flex-end;
  width: 3.5rem;
  height: 3.25rem;
  margin-bottom: 2rem;
  object-fit: contain;
}

.service-label {
  margin: 2.25rem 0 0.625rem;
  font-size: var(--text-small);
  text-transform: uppercase;
}

.service-card h3 {
  margin-bottom: 0.875rem;
  color: var(--color-mint);
}

.service-card > p:last-child {
  margin: 0;
  font-size: var(--text-card);
  line-height: 1.5;
}

/* 09. PROYECTOS ----------------------------------------------------------- */
.projects-section {
  background: var(--color-mint);
  color: var(--color-ink);
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-card > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.04 / 1;
  margin-bottom: 1.5625rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 3px solid var(--color-border);
}

.project-card h3 {
  margin-bottom: 0.8125rem;
  font-size: var(--text-project-title);
  letter-spacing: -0.02em;
}

.project-card p {
  margin-bottom: 1.875rem;
  font-size: var(--text-card);
  line-height: 1.45;
}

/* Variante del componente .button para proyectos */
.button-project {
  min-height: 2.375rem;
  margin-top: auto;
  padding: 0.4375rem 0.9375rem;
  border: 1px solid var(--color-navy);
  border-radius: 0.625rem;
  color: var(--color-navy);
}

.button-project:hover {
  background: var(--color-navy);
  color: var(--color-mint);
}

/* 10. PROCESO ------------------------------------------------------------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4.25rem;
}

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

.process-step > img {
  width: 12.5rem;
  height: 12.5rem;
  margin: 0 auto 1.5625rem;
  border-radius: 50%;
  object-fit: cover;
}

.process-step h3 {
  margin-bottom: 0;
  font-size:var(--text-h3); 
  font-weight: 500;
}

.step-subtitle {
  margin-bottom: 1.25rem;
  color: var(--color-mint);
  font-size: 1.12rem;
  font-weight: 500;
}

.process-step > p:last-child {
  font-size: 0.97rem;
  text-align: center;
}

/* ========================================
   11. TESTIMONIOS
======================================== */

/* Fondo general de la sección */
.testimonials-section {
  background-color: var(--color-mint);
  color: var(--color-navy);
}

/* Grilla de dos testimonios */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: stretch;
}

/* Card principal */
.testimonial-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(2rem, 4vw, 3.5rem);

  background-color: var(--color-navy);
  color: var(--color-text);
  border-radius: var(--radius-card);
}

/* Contenedor de la cita */
.testimonial-card blockquote {
  margin: 0;
}

/* Comillas decorativas */
.testimonial-card blockquote::before {
  content: "“";
  display: block;

  height: 4.5rem;

  font-family: Georgia, serif;
  font-size: 7rem;
  line-height: 1;

  color: var(--color-mint);
  opacity: 0.5;
}

/* Frase destacada */
.testimonial-quote {
  margin-bottom: 1.5rem;
  font-size: var(--text-project-title);
  letter-spacing: -0.025em;
  }

/* Descripción del testimonio */
.testimonial-description {
  margin: 0;
  font-size: var(--text-body);
  color: var(--color-mint);
  line-height: 1.6;
  opacity: 0.85;
}

/* Autor del testimonio */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Fotografía circular */
.testimonial-author img {
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;

  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

/* Información del autor */
.testimonial-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.testimonial-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.testimonial-role {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ========================================
   RESPONSIVE · TABLET Y MÓVIL
   Hasta 900px
======================================== */

@media (max-width: 56.25rem) {

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .testimonial-card {
    gap: 2.5rem;
    padding: 2rem;
  }

  .testimonial-quote {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }

  .testimonial-card blockquote::before {
    font-size: 5.5rem;
    height: 3.5rem;
  }

}


/* 12. PREGUNTAS FRECUENTES ------------------------------------------------ */
.faq-section {
  background: var(--color-ink);
}

.faq-inner {
  max-width: 56.25rem;
}

.faq-inner h2 {
  margin-bottom: 1.625rem;
  font-size: var(--text-faq-title);
  text-align: center;
}

.faq-inner details {
  padding-block: 1rem;
  border-bottom: 1px solid #63735d;
}

.faq-inner summary {
  cursor: pointer;
  font-weight: 600;
}

.faq-inner details p {
  margin: 0.75rem 0 0;
  color: #d8e4cf;
}

/* 13. CIERRE Y CTA -------------------------------------------------------- */
.closing-section {
  background: var(--color-mint);
  color: var(--color-ink);
  text-align: center;
}

.closing-inner h2 {
  margin-bottom: 2rem;
  color: var(--color-ink);
  font-size: clamp(2rem, 3vw, 3rem);
}

.closing-inner > .eyebrow {
  margin-bottom: 0.875rem;
  color: var(--color-ink);
}

.closing-inner > .button {
  margin: 0.3rem 0 1.375rem;
}

.closing-caption {
  font-size: 0.8rem;
}

/* 14. FOOTER -------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy);
  padding-bottom: 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
}

.footer-content > div > a > img {
  width: 12.5rem;
  height: auto;
  margin-bottom: 1.75rem;
}

.footer-content p {
  font-size: 0.88rem;
  padding-top: 1rem;
  line-height: 1.5;
}

.footer-content small {
  font-size: 0.72rem;
}

.footer-contact {
  min-width: 14.0625rem;
  padding-top: 1rem;
}

.footer-contact p {
  margin-bottom: 0.375rem;
}

/* Redes sociales del footer */
.footer-social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-mint);
  border-radius: 50%;
}

.footer-social img {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  object-fit: contain;
}

.footer-social a:hover {
  background-color: var(--color-pink);
  border-color: var(--color-pink);
}

/* ============================================================================
   15. RESPONSIVE · TABLET Y PORTÁTILES PEQUEÑOS
   Breakpoint: hasta 62.5rem (~1000 px a 16 px por rem)
   Ajustes: márgenes, menú, grid y posición de imagen del hero.
   ============================================================================ */
@media (max-width: 62.5rem) {
  :root {
    --page-gutter: 2.1875rem;
  }

  .main-nav {
    gap: 0.9375rem;
  }

  .main-nav > a {
    font-size: 0.65rem;
  }

  .hero {
    background-position: 62% center;
  }

  .hero h1,
  .hero-content > p:not(.microcopy) {
    max-width: 33.125rem;
  }

  .services-grid,
  .projects-grid {
    gap: 1.375rem;
  }

  .featured-solution {
    padding: 2.25rem 1.875rem;
  }

  .process-grid {
    gap: 1.625rem;
  }
}

/* ============================================================================
   16. RESPONSIVE · NAVEGACIÓN COMPACTA / TABLET Y MÓVIL
   Breakpoint: hasta 56.25rem (~900 px)
   Ajustes: navegación hamburguesa, hero y cards en una sola columna.
   ============================================================================ */
@media (max-width: 56.25rem) {
  :root {
    --page-gutter: 1.375rem;
    --nav-height: 4.5rem; /* 72px */
    --section-space: 4.0625rem;
  }

  /* Header / menú móvil */
    .site-header {
    height: var(--nav-height); /* 72px */
  }

  .site-header .logo img {
    height: 2.5rem; /* 40px */
  }

  
  .nav-wrap {
    height: var(--nav-height);
    padding: 0;
  }

  .logo-link img {
    width: 7.8125rem;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3125rem;
    width: 2.8125rem;
    height: 2.6875rem;
    border: 1px solid #87987c;
    border-radius: 0.5rem;
    background: rgba(23, 37, 46, 0.85);
    cursor: pointer;
  }

  .menu-toggle span {
    width: 1.375rem;
    height: 0.125rem;
    background: var(--color-mint);
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.1875rem;
    padding: 1.375rem var(--page-gutter) 1.6875rem;
    background: var(--color-navy);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav > a {
    font-size: 0.86rem;
  }

  .main-nav > .nav-contact {
    align-self: flex-start;
  }

  /* Hero móvil: degradado para mantener la legibilidad */
  .hero {
    min-height: 44.375rem;
    background-image:
      linear-gradient(90deg, rgba(12, 25, 32, 0.78), rgba(12, 25, 32, 0.38)),
      url('../assets/hero.webp');
    background-position: 64% center;
  }

  .hero-content {
    padding-top: 12.5rem;
    padding-bottom: 6.25rem;
  }

  .hero h1 br {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.4rem);
  }

  .hero-content > p:not(.microcopy) {
    font-size: 1rem;
  }

  .hero-actions {
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 2.125rem;
  }

  .button {
    padding: 0.6875rem 0.9375rem;
    font-size: 0.84rem;
  }

  /* Encabezados */
  .section-heading {
    margin-bottom: 2.5rem;
  }

  .section-heading p:last-child br {
    display: none;
  }

  /* Soluciones */
  .featured-solution {
    grid-template-columns: 1fr;
    gap: 1.0625rem;
    padding: 1.5rem 1.4375rem;
  }

  .featured-solution h3 {
    font-size: 1.7rem;
  }

  .featured-solution ul {
    font-size: 0.9rem;
  }

  .services-grid,
  .projects-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    gap: 1.125rem;
  }

  .service-card {
    min-height: 0;
    padding: 1.4375rem;
  }

  .service-card > img {
    margin-bottom: 0.625rem;
  }

  .service-label {
    margin-top: 0.5rem;
  }

  .service-card h3 br {
    display: none;
  }

  /* Proyectos */
  .projects-grid {
    gap: 3.125rem;
  }

  .project-card > img {
    max-height: 27.5rem;
    object-fit: contain;
  }

  .project-card p {
    margin-bottom: 1rem;
  }

  /* Proceso */
  .process-grid {
    gap: 3.375rem;
  }

  .process-section {
    padding-bottom: 5rem;
  }

  .process-step > img {
    width: 10.3125rem;
    height: 10.3125rem;
  }

  .process-step > p:last-child {
    max-width: 27.5rem;
    margin-inline: auto;
    text-align: center;
  }

  /* Cierre y footer */
  .closing-section {
    padding: 5rem 0 4.0625rem;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-contact {
    padding-top: 0;
  }
}

/* ============================================================================
   17. RESPONSIVE · MÓVILES PEQUEÑOS
   Breakpoint: hasta 23.4375rem (~375 px)
   Ajustes puntuales para mantener botones y encabezados legibles.
   ============================================================================ */
@media (max-width: 23.4375rem) {
  :root {
    --page-gutter: 1.0625rem;
  }

  .hero {
    min-height: 42.5rem;
  }

  .hero h1 {
    font-size: var(--text-process-title);
  }

  .hero-actions .button {
    white-space: normal;
    padding-inline: 0.6875rem;
    font-size: 0.76rem;
  }

  .service-card h3 {
    font-size: 1.65rem;
  }
}

/* ============================================================================
   18. ACCESIBILIDAD · MOVIMIENTO REDUCIDO
   Respeta la preferencia del sistema operativo del usuario.
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
