/* =========================================
   ATELIERSS — Estilos principales
   ========================================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --negro: #0a0a0a;
  --gris-oscuro: #333;
  --gris-medio: #666;
  --gris-claro: #eee;
  --fondo-alt: #f7f7f5;
  --blanco: #fff;
  --fuente: 'Inter', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fuente);
  color: var(--negro);
  line-height: 1.65;
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   CONTENEDOR
   ========================================= */
.container {
  max-width: 1160px;
  margin: auto;
  padding: 100px 24px;
}

/* =========================================
   HEADER
   ========================================= */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gris-claro);
  z-index: 1000;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  max-width: 1160px;
  margin: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--negro);
}

.logo-mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.menu a {
  margin-left: 32px;
  text-decoration: none;
  color: var(--gris-oscuro);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.01em;
  position: relative;
  transition: color 0.2s;
}

.menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--negro);
  transition: width 0.25s var(--ease-out);
}

.menu a:hover {
  color: var(--negro);
}

.menu a:hover::after {
  width: 100%;
}

/* =========================================
   HERO
   ========================================= */
#hero {
  padding: 160px 24px 130px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 780px;
  margin: 0 auto 24px;
}

.section-intro {
  text-align: center;
  color: var(--gris-medio);
  font-size: 15px;
  max-width: 540px;
  margin: 0 auto 20px;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--gris-medio);
  font-size: 17px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
  background: var(--negro);
  color: var(--blanco);
  padding: 13px 28px;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 100px;
  border: 1px solid var(--negro);
  transition: background 0.2s, color 0.2s;
}

.btn-primary:hover {
  background: #222;
  border-color: #222;
}

.btn-secondary {
  border: 1px solid #ccc;
  padding: 13px 28px;
  text-decoration: none;
  color: var(--negro);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 100px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--negro);
  background: var(--negro);
  color: var(--blanco);
}

/* =========================================
   REDES SOCIALES — HERO
   ========================================= */
.hero-social {
  margin-top: 52px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.social-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gris-claro);
  border-radius: 50%;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.social-icon svg {
  width: 17px;
  height: 17px;
  fill: var(--gris-oscuro);
  transition: fill 0.2s;
}

.social-icon:hover {
  border-color: var(--negro);
  transform: translateY(-2px);
}

.social-icon:hover svg {
  fill: var(--negro);
}

/* =========================================
   SECCIONES — encabezados
   ========================================= */
section h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.2;
}

/* =========================================
   NOSOTROS
   ========================================= */
#nosotros {
  background: var(--fondo-alt);
}

.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.nosotros-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.nosotros-info h2 {
  text-align: left;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.nosotros-info p {
  color: var(--gris-medio);
  margin-bottom: 18px;
  line-height: 1.7;
  font-size: 15px;
}

/* =========================================
   SERVICIOS
   ========================================= */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gris-claro);
  border: 1px solid var(--gris-claro);
  margin-top: 60px;
}

.servicio {
  padding: 44px 36px;
  background: var(--blanco);
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}

.servicio:hover {
  background: var(--fondo-alt);
}

.servicio-numero {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #aaa;
  margin-bottom: 20px;
  display: block;
}

.servicio h3 {
  margin-bottom: 12px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.servicio-descripcion {
  color: var(--gris-medio);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.65;
}

.servicio-lista {
  padding-left: 0;
  margin-bottom: 32px;
  color: var(--gris-medio);
  font-size: 13px;
  list-style: none;
}

.servicio-lista li {
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.servicio-lista li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 1px;
  background: #aaa;
}

.servicio-cta {
  margin-top: auto;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  color: var(--negro);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s var(--ease-out);
}

.servicio-cta::after {
  content: '→';
}

.servicio-cta:hover {
  gap: 10px;
}

/* =========================================
   PROCESO
   ========================================= */
.proceso-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--gris-claro);
  margin-top: 60px;
}

.paso {
  text-align: left;
  padding: 36px 30px;
  border-right: 1px solid var(--gris-claro);
  transition: background 0.2s;
}

.paso:last-child {
  border-right: none;
}

.paso:hover {
  background: var(--fondo-alt);
}

.numero {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #aaa;
  display: block;
  margin-bottom: 16px;
}

.paso h3 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 500;
}

.paso p {
  color: var(--gris-medio);
  font-size: 13px;
  line-height: 1.6;
}

/* =========================================
   PORTAFOLIO
   ========================================= */
.port-filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 32px 0 48px;
}
 
.port-fil {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-family: 'Inter', sans-serif;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid #ddd;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.18s;
}
 
.port-fil:hover {
  border-color: #0a0a0a;
  color: #0a0a0a;
}
 
.port-fil.active {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}
 
.port-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 240px 200px 180px;
  gap: 10px;
}
 
/* posiciones asignadas dinámicamente por portafolio.js */
 
.proyecto {
  border: 1px solid #eee;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s;
}
 
.proyecto.oculto {
  display: none;
}
 
.proyecto:hover {
  border-color: #bbb;
}
 
.proy-img-wrap {
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
 
.proy-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
 
.proyecto:hover .proy-img-wrap img {
  transform: scale(1.04);
}
 
/* Info card grande y card ancha — layout normal */
.proy-info {
  padding: 20px 22px 22px;
  flex-shrink: 0;
}
 
.proy-top-der .proy-info,
.proy-bot-der .proy-info {
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
 
/* Card ancha horizontal */
.proy-ancho {
  flex-direction: row;
}
 
.proy-ancho .proy-img-wrap {
  flex: 0 0 340px;
  height: 100%;
}
 
.proy-info-lateral {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
 
.proy-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 6px;
  display: block;
}
 
.proy-info h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: #0a0a0a;
}
 
.proy-info-lateral h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
 
.proy-info p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 18px;
}
 
.proy-info-lateral p {
  margin-bottom: 22px;
}
 
.proy-btn {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: #0a0a0a;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 100px;
  width: fit-content;
  transition: background 0.18s;
}
 
.proy-btn::after {
  content: '→';
  margin-left: 7px;
  transition: margin 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
 
.proy-btn:hover {
  background: #222;
}
 
.proy-btn:hover::after {
  margin-left: 11px;
}
 
/* =========================================
   CTA
   ========================================= */
#cta {
  background: var(--gris-claro);
  text-align: center;
}

#cta .container {
  max-width: 680px;
}

#cta h2 {
  color: var(--negro);
}

.cta-text {
  margin: 20px auto 36px;
  color: #666;
  font-size: 15px;
}

#cta .btn-primary {
  background: var(--blanco);
  color: var(--negro);
  border-color: var(--blanco);
  
}

#cta .btn-primary:hover {
  background: #000000;
  border-color: #eee;
  color: var(--blanco);
}

.cta-note {
  margin-top: 22px;
  font-size: 13px;
  color: #444;
}

/* =========================================
   CONTACTO
   ========================================= */
.contacto-container {
  max-width: 600px;
  margin: auto;
  text-align: center;
}

.form-contacto {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.campo label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gris-oscuro);
  letter-spacing: 0.01em;
}

input:not([type="checkbox"]),
textarea {
  padding: 13px;
  border: 1px solid #ccc;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  border-radius: 4px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  accent-color: #000;
  cursor: pointer;
  flex-shrink: 0;
}

textarea {
  height: 130px;
  resize: none;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--negro);
}

input::placeholder,
textarea::placeholder {
  color: #bbb;
}

button.btn-primary1 {
  margin-top: 6px;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--fuente);
  letter-spacing: 0.01em;
  background: var(--negro);
  color: var(--blanco);
  border: 1px solid var(--negro);
  cursor: pointer;
  border-radius: 100px;
  align-self: center;
  transition: background 0.2s;
}

button.btn-primary1:hover {
  background: #222;
}

.respuesta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--gris-medio);
  text-align: center;
}

.g-recaptcha {
  margin: 10px 0;
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 700px) {
  .contacto-container {
    padding: 0;
  }

  .form-contacto {
    gap: 16px;
  }

  button.btn-primary1 {
    width: 100%;
  }
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #000;
  padding: 0;
  border: none;
}

.checkbox-label a {
  color: #000;
  text-decoration: underline;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  accent-color: #000;
  cursor: pointer;
  flex-shrink: 0;
}

/* =========================================
   WHATSAPP
   ========================================= */
.whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: transform 0.2s var(--ease-out);
  text-decoration: none;
}

.whatsapp:hover {
  transform: scale(1.08);
}

.whatsapp svg {
  width: 26px;
  height: 26px;
  fill: white;
}

/* =========================================
   PÁGINAS LEGALES
   ========================================= */
.legal-page {
  max-width: 720px;
  margin: auto;
  padding: 80px 24px 100px;
}

.legal-header {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--gris-claro);
  margin-bottom: 56px;
}

.legal-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 16px;
}

.legal-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.legal-meta {
  font-size: 13px;
  color: #aaa;
}

.legal-lead {
  font-size: 16px;
  line-height: 1.75;
  color: var(--gris-oscuro);
  margin-bottom: 48px;
}

.legal-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--gris-claro);
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-align: left;
  letter-spacing: 0;
}

.legal-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #aaa;
  flex-shrink: 0;
}

.legal-section p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--gris-medio);
  margin-bottom: 12px;
}

.legal-section ul {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: none;
}

.legal-section ul li {
  font-size: 14px;
  color: var(--gris-medio);
  padding: 8px 0 8px 16px;
  position: relative;
  border-bottom: 1px solid var(--gris-claro);
  line-height: 1.6;
}

.legal-section ul li:last-child {
  border-bottom: none;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 5px;
  height: 1px;
  background: #ccc;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: #0a0a0a;
  color: var(--blanco);
  padding: 60px 24px 24px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  max-width: 1100px;
  margin: auto;
}

.footer h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.footer h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #444;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-brand p {
  color: #555;
  font-size: 13px;
  line-height: 1.65;
  max-width: 220px;
}

.footer-links a {
  display: block;
  color: #555;
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--blanco);
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: border-color 0.2s;
}

.social-icons a:hover {
  border-color: #555;
}

.social-icons svg {
  width: 16px;
  height: 16px;
  fill: #555;
  transition: fill 0.2s;
}

.social-icons a:hover svg {
  fill: var(--blanco);
}

.footer-bottom {
  text-align: center;
  margin-top: 48px;
  border-top: 1px solid #161616;
  padding-top: 22px;
  font-size: 12px;
  color: #444;
  letter-spacing: 0.01em;
}

/* =========================================
   ANIMACIONES
   ========================================= */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in:nth-child(1) { transition-delay: 0ms; }
.fade-in:nth-child(2) { transition-delay: 80ms; }
.fade-in:nth-child(3) { transition-delay: 160ms; }
.fade-in:nth-child(4) { transition-delay: 240ms; }

@keyframes heroEntrada {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1      { animation: heroEntrada 0.9s var(--ease-out) both; }
.hero p       { animation: heroEntrada 0.9s var(--ease-out) 0.12s both; }
.hero-buttons { animation: heroEntrada 0.9s var(--ease-out) 0.22s both; }
.hero-social  { animation: heroEntrada 0.9s var(--ease-out) 0.32s both; }

@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in.visible,
  .hero h1, .hero p, .hero-buttons, .hero-social {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================
   MENÚ MÓVIL
   ========================================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  position: relative;
  padding: 4px;
}

.menu {
  z-index: 1000;
}

.menu-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--negro);
  display: block;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .container {
    padding: 70px 20px;
  }

  .menu {
    position: absolute;
    top: 61px;
    left: 0;
    width: 100%;
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-claro);
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 24px 0;
  }

  .menu a {
    margin: 8px 0;
    font-size: 15px;
  }

  .menu a::after {
    display: none;
  }

  .menu.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    flex-direction: row;
  }

  #hero {
    padding: 110px 20px 90px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .nosotros-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nosotros-img img {
    height: 280px;
  }

  .servicios-grid {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .proceso-grid {
    grid-template-columns: 1fr 1fr;
  }

  .paso {
    border-bottom: 1px solid var(--gris-claro);
  }

  .paso:nth-child(even) {
    border-right: none;
  }

@media (max-width: 900px) {
  .port-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .proy-grande,
  .proy-top-der,
  .proy-bot-der,
  .proy-ancho {
    grid-column: span 1;
    grid-row: auto;
  }

  .proy-img-wrap { height: 220px; }

  .proy-info-overlay {
    position: static;
    transform: none;
    border-top: 1px solid #eee;
  }

  .proy-ancho {
    flex-direction: column;
  }

  .proy-ancho .proy-img-wrap {
    flex: none;
    width: 100%;
    height: 220px;
  }

  .proy-info-lateral {
    padding: 20px 22px 22px;
  }
}

  .proyecto img {
    height: 220px;
  }

  .whatsapp {
    width: 46px;
    height: 46px;
    bottom: 18px;
    right: 18px;
  }
}

@media (max-width: 500px) {
  .proceso-grid {
    grid-template-columns: 1fr;
  }

  .paso {
    border-right: none;
  }
}