/* ============================================================
   AO Web Studio — styles.css
   Paleta, tipografía, layout y componentes del sitio.
   ============================================================ */

/* ── IMPORTS ── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS CUSTOM PROPERTIES ── */
:root {
  --bg-primary:    #F8F7F4;
  --bg-secondary:  #F1EFEA;
  --bg-dark:       #1C1C1C;
  --text-primary:  #1C1C1C;
  --text-secondary:#525252;
  --brand:         #0F766E;
  --brand-hover:   #115E59;
  --border:        #D6D3D1;
  --white:         #FFFFFF;

  --font-title:    'Montserrat', sans-serif;
  --font-body:     'Inter', sans-serif;

  --noise-url:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  /* Noise texture global */
  background-image: var(--noise-url);
  background-attachment: fixed;
}

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-title);
}

/* ── UTILITY CLASSES ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 5rem);
}

.section-label {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.25rem;
}

.section-label--light {
  color: rgba(255,255,255,0.5);
}

.brand-accent {
  color: var(--brand);
}

/* Reveal animation base */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.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; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background-color: var(--brand);
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-1px);
}

.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: color 0.2s ease, gap 0.2s ease;
}

.btn-text-link:hover {
  color: var(--brand);
  gap: 0.625rem;
}

.btn-text-link--brand {
  color: var(--brand);
}

.btn-text-link--brand:hover {
  color: var(--brand-hover);
}

/* ── SPLASH SCREEN ── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* CSS double safety: hide after 4.5s no matter what */
#splash {
  animation: splash-auto-hide 0s 4.5s forwards;
}

@keyframes splash-auto-hide {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.splash-wordmark {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.splash-wordmark span {
  color: var(--brand);
}

.splash-tagline {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -1.75rem;
}

.splash-progress-wrap {
  width: clamp(160px, 20vw, 240px);
  height: 2px;
  background-color: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--brand);
  border-radius: 999px;
  animation: progress-fill 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

@keyframes progress-fill {
  0%   { width: 0%; }
  60%  { width: 70%; }
  100% { width: 100%; }
}

/* ── NAVIGATION ── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: background-color 0.35s ease,
              backdrop-filter 0.35s ease,
              padding 0.35s ease,
              box-shadow 0.35s ease;
}

#nav.nav-scrolled {
  background-color: rgba(248, 247, 244, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
}

.nav-logo .logo-ao {
  color: var(--brand);
}

.nav-logo .logo-rest {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.85em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--brand);
  transition: width 0.25s ease;
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 0.625rem 1.25rem;
  font-size: 0.75rem;
}

/* Mobile menu */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
}

.nav-mobile-toggle span {
  display: block;
  height: 1.5px;
  background-color: var(--text-primary);
  border-radius: 999px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-mobile-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-mobile-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-mobile-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: rgba(248, 247, 244, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  /* Animación de deslizamiento suave */
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  padding-block: 0;
  border-top: 1px solid transparent;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.3s ease, 
              padding-block 0.4s ease,
              border-top-color 0.4s ease,
              visibility 0.4s ease;
}

.nav-mobile-menu.is-open {
  max-height: 400px; /* Altura suficiente para que bajen los enlaces */
  opacity: 1;
  visibility: visible;
  padding-block: 1rem;
  border-top-color: var(--border);
}

.nav-mobile-link {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 0.875rem clamp(1.25rem, 5vw, 5rem);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-mobile-link:hover {
  color: var(--brand);
  background-color: var(--bg-secondary);
}

.nav-mobile-cta {
  margin: 1rem clamp(1.25rem, 5vw, 5rem) 0;
  text-align: center;
}

/* ── HERO ── */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 7rem;
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-kicker {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem) !important;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-kicker::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background-color: var(--brand);
}

.hero-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 2rem;
  max-width: 900px;
}

.hero-title .line-accent {
  color: var(--brand);
  display: block;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 3rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  animation: scroll-bounce 2s ease-in-out infinite;
}

.hero-scroll-indicator span {
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero-scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 1.5px solid var(--brand);
  border-bottom: 1.5px solid var(--brand);
  transform: rotate(45deg);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* Logo decorativo gigante detrás del hero */
.hero-deco-logo {
  position: absolute;
  right: -1rem;
  bottom: 1rem;
  width: clamp(300px, 45vw, 800px); /* Esto lo hace gigante en PC y se adapta en móviles */
  opacity: 0.04; /* Nivel exacto de transparencia para que sea sutil */
  pointer-events: none;
  user-select: none;
}

/* ── SECTION SHARED STYLES ── */
.section {
  padding-block: clamp(5rem, 10vw, 9rem);
  position: relative;
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--white);
}

.section--secondary {
  background-color: var(--bg-secondary);
}

.section-header {
  margin-bottom: clamp(3.5rem, 6vw, 5.5rem);
}

.section-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.section-title--light {
  color: var(--white);
}

.section-number-deco {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(6rem, 15vw, 14rem);
  line-height: 0.85;
  color: var(--brand);
  opacity: 0.06;
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

/* ── SECTION 01 — QUIÉNES SOMOS ── */
#about {
  overflow: hidden;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.about-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.about-number-wrap {
  position: relative;
  height: 0;
  overflow: visible;
}

.about-number-deco {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(8rem, 18vw, 16rem);
  line-height: 1;
  color: var(--brand);
  opacity: 0.06;
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
  position: absolute;
  top: -2rem;
  left: -2rem;
}

.about-est-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--brand);
  padding: 0.375rem 0.875rem;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.25rem;
}

.about-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.about-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-data-table {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.about-data-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--border);
}

.about-data-row:last-child {
  border-bottom: none;
}

.about-data-key {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.about-data-val {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.about-images {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  align-items: start;
}

.about-img-large {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 2px;
}

.about-img-small {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 2px;
  margin-top: 3rem;
}

.about-img-large img,
.about-img-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-img-large:hover img,
.about-img-small:hover img {
  transform: scale(1.04);
}

/* ── TARJETAS VERTICALES DE SERVICIOS (CON IMÁGENES) ── */
#services {
  /* Reducimos el padding inferior excesivo */
  padding-top: clamp(5rem, 10vw, 8rem);
  padding-bottom: 3rem; 
  background-color: var(--bg-secondary);
}

/* Forzamos la separación entre el título y las tarjetas */
.services-header {
  margin-bottom: 4.5rem !important; 
}

.vertical-cards-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.v-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden; /* Clave para que la imagen no se salga de los bordes curvos */
}

.v-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(28, 28, 28, 0.08);
}

/* Contenedor de la imagen superior */
.v-card-img-wrap {
  width: 100%;
  height: 220px; /* Esto le da la altura alargada a la tarjeta */
  overflow: hidden;
}

.v-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.v-card:hover .v-card-img {
  transform: scale(1.05); /* Efecto elegante al pasar el mouse */
}

/* Contenedor de los textos debajo de la imagen */
.v-card-content-wrap {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Empuja el botón al fondo */
}

.v-card-category {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.75rem;
}

.v-card-title {
  font-family: var(--font-title);
  color: var(--brand);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.v-card-content {
  flex-grow: 1;
  margin-bottom: 2.5rem;
}

.v-card-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin: 0;
}

.v-card-action .btn-outline {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 2px solid var(--brand);
  color: var(--brand);
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s ease;
  width: 100%; /* El botón ocupa todo el ancho, se ve muy bien en móviles y web */
}

.v-card-action .btn-outline:hover {
  background: var(--brand);
  color: var(--white);
}

/* ── SECTION 03 — CLIENTES ── */
#clients {
  background-color: var(--bg-secondary);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.client-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  cursor: default;
}

.client-card:hover {
  background-color: var(--white);
  box-shadow: 0 8px 32px rgba(28, 28, 28, 0.08);
  transform: translateY(-4px);
}

.client-icon {
  color: var(--brand);
  width: 2.25rem;
  height: 2.25rem;
}

.client-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.3;
}

.client-desc {
  font-family: var(--font-body);
  font-size: 0.825rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── SECTION 04 — PORTAFOLIO ── */
#work {
  background-color: var(--bg-primary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 3rem 2rem;
  margin-top: 1rem;
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
}

.portfolio-img-wrap {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4/3;
  margin-bottom: 1.25rem;
  background-color: var(--border);
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.portfolio-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .portfolio-img-wrap img {
  transform: scale(1.05);
}

.portfolio-info {
  padding-right: 1rem;
}

.portfolio-category {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.portfolio-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.portfolio-card:hover .portfolio-title {
  color: var(--brand);
}

/* ── SECTION 05 — DIFERENCIADORES (TARJETAS OSCURAS) ── */

/* 1. Forzamos el fondo oscuro para toda la sección */
#why {
  background-color: #1a1c1b; /* Restaura tu color oscuro de fondo */
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* 2. Aseguramos que el título principal sea blanco para que resalte */
#why .section-title {
  color: #ffffff;
}

/* 3. Contenedor principal de la cuadrícula */
.why-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
}

/* 4. Estructura de la tarjeta */
.why-card {
  background: rgba(255, 255, 255, 0.04); 
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, background 0.3s ease;
}

/* Efecto hover sutil */
.why-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.08);
}

/* Número gigante en color acento */
.why-card-number {
  font-family: var(--font-title);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--brand); /* Mantiene tu verde/teal original */
  line-height: 1;
  margin-bottom: 1.2rem;
  letter-spacing: -0.03em;
}

/* Título de la tarjeta */
.why-card-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand); /* ← Aquí aplicamos tu color verde característico */
  margin-bottom: 1rem;
}

/* Descripción de la tarjeta */
.why-card-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7); /* Gris claro */
  margin: 0;
  flex-grow: 1;
}

/* ── SECTION 06 — CONTACTO ── */
#contact {
  background-color: var(--bg-primary);
}

.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-form-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.contact-form-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 3rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.form-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-label {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-label .field-num {
  color: var(--brand);
  margin-right: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  outline: none;
  width: 100%;
  transition: border-color 0.25s ease;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(82, 82, 82, 0.4);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-bottom-color: var(--brand);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-submit {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  justify-content: center;
  margin-top: 1rem;
}

.contact-info-panel {
  padding-top: 5.5rem;
}

.contact-info-block {
  margin-bottom: 2.5rem;
}

.contact-info-label {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.contact-info-value {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.contact-info-value a {
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.contact-info-value a:hover {
  color: var(--brand);
}

.contact-divider {
  width: 2rem;
  height: 1px;
  background-color: var(--border);
  margin-block: 2.5rem;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-top: 1.25rem;
  transition: gap 0.2s ease, color 0.2s ease;
}

.whatsapp-link:hover {
  color: var(--brand-hover);
  gap: 0.875rem;
}

/* ── FOOTER ── */
#footer {
  background-color: var(--bg-dark);
  padding-block: clamp(4rem, 7vw, 6rem);
}

.footer-brand-headline {
  font-family: var(--font-title);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  letter-spacing: -0.01em;
  color: var(--white);
  opacity: 0.9;
  margin-bottom: 4rem;
  line-height: 1.2;
}

.footer-brand-headline strong {
  font-weight: 800;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-block: 3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}

.footer-col-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1.25rem;
}

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

.footer-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s ease;
  line-height: 1.5;
}

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

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.footer-contact-label {
  font-family: var(--font-title);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.footer-contact-value {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

.footer-legal-text a {
  color: rgba(255,255,255,0.45);
  transition: color 0.2s ease;
}

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

.footer-back-top {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  transition: color 0.2s ease;
}

.footer-back-top:hover {
  color: var(--brand);
}

/* ── BOTÓN FLOTANTE ── */
#floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 90;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#floating-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-cta-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.5rem;
  background-color: var(--brand);
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(15, 118, 110, 0.4);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.floating-cta-btn:hover {
  background-color: var(--brand-hover);
  box-shadow: 0 6px 28px rgba(15, 118, 110, 0.5);
  transform: translateY(-2px);
}

/* ── FORM SUCCESS ── */
.form-success-msg {
  display: none;
  background-color: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.3);
  border-radius: 2px;
  padding: 1.5rem;
  text-align: center;
  margin-top: 1rem;
}

.form-success-msg.is-visible {
  display: block;
}

.form-success-msg p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--brand);
  line-height: 1.6;
}

/* ── ABOUT LAYOUT DESKTOP ── */
@media (min-width: 900px) {
  .about-inner {
    grid-template-columns: 60% 40%;
    gap: 5rem;
    align-items: start;
  }

  .about-top {
    grid-template-columns: 1fr;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item:nth-child(1) { grid-column: span 7; grid-row: span 5; }
  .gallery-item:nth-child(2) { grid-column: span 5; grid-row: span 4; }
  .gallery-item:nth-child(3) { grid-column: span 5; grid-row: span 3; }
  .gallery-item:nth-child(4) { grid-column: span 7; grid-row: span 4; }
  .gallery-item:nth-child(5) { grid-column: span 7; grid-row: span 4; }
  .gallery-item:nth-child(6) { grid-column: span 5; grid-row: span 3; }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .service-inner {
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
  }

  .service-content-top {
    grid-template-columns: 1fr;
  }

  .service-body {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info-panel {
    padding-top: 0;
  }

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

  .diff-item {
    grid-template-columns: 70px 1fr;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 60px;
  }

  .gallery-item:nth-child(1) { grid-column: span 6; grid-row: span 5; }
  .gallery-item:nth-child(2) { grid-column: span 4; grid-row: span 4; }
  .gallery-item:nth-child(3) { grid-column: span 2; grid-row: span 3; }
  .gallery-item:nth-child(4) { grid-column: span 3; grid-row: span 4; }
  .gallery-item:nth-child(5) { grid-column: span 6; grid-row: span 4; }
  .gallery-item:nth-child(6) { grid-column: span 3; grid-row: span 3; }

  .whyus-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .form-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

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

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .service-number {
    font-size: 2.5rem;
  }

  .gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .gallery-item {
    aspect-ratio: 16/9;
  }

  .gallery-item:nth-child(2) {
    aspect-ratio: 4/3;
  }

  .diff-item {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
    padding-block: 1.75rem;
  }

  #floating-cta {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .floating-cta-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .about-images {
    grid-template-columns: 1fr;
  }

  .about-img-small {
    display: none;
  }
}

/* ── REDUCIR FRANJA DEL LOGO EN EL FOOTER ── */
.footer-brand-headline {
  margin-top: 0 !important;
  margin-bottom: 2rem !important; /* Separación con la línea divisoria */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1 !important;
}

/* Limpieza de espacios residuales tras borrar el portafolio */
#work {
  display: none !important;
}

/* Ajuste de separación superior del footer */
footer, .site-footer {
  padding-top: 4rem !important;
  margin-top: 4rem !important;
}

/* ── REDUCIR ESPACIO SUPERIOR DE TODO EL FOOTER ── */
footer, .site-footer {
  padding-top: 3rem !important; /* Reduce el colchón gigante de arriba */
}

/* ── ELIMINAR PATRÓN DE TÍTULOS A DOS COLORES ── */
.hero-title .line-accent,
.section-title .brand-accent,
.whyus-title .accent {
  color: inherit !important;
}

/* ── AJUSTE DE ESPACIO SUPERIOR HERO (MÓVILES) ── */
@media (max-width: 768px) {
  #hero {
    justify-content: flex-start !important; /* Quita el centrado automático */
    padding-top: 8rem !important; /* Fija la distancia exacta desde arriba */
  }
}

/* ============================================================
   TARJETAS FLIP (SERVICIOS)
   ============================================================ */
.flip-card {
  height: 720px; /* Altura fija necesaria para que no colapse con position absolute */
  perspective: 1000px;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Evitamos el hover de elevación original para priorizar el giro */
.flip-card:hover {
  transform: none !important;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  border-radius: 8px;
}

/* 1. El toque con el dedo activa el giro en cualquier dispositivo */
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 12px 30px rgba(28, 28, 28, 0.08);
}

/* 2. El giro automático al pasar el mouse SOLO funciona en computadoras */
@media (hover: hover) and (pointer: fine) {
  .flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
    box-shadow: 0 12px 30px rgba(28, 28, 28, 0.08);
  }
}

.flip-card-front, .flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.flip-card-front {
  background-color: var(--white);
  border: 1px solid var(--border);
}

.flip-card-back {
  transform: rotateY(180deg);
  background-color: var(--bg-primary);
  border: 2px solid var(--brand);
  padding: 2.5rem 1.5rem;
  text-align: left;
}

.flip-content-back {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.flip-content-back h4 {
  color: var(--brand);
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-title);
}

.flip-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.flip-list li {
  font-size: 0.85rem;
  color: var(--text-primary);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.4;
}

.flip-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

.flip-ideal {
  background-color: rgba(15, 118, 110, 0.08);
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}