/* =========================================================
   Base + accesibilidad
   ========================================================= */
*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; }
}

body{
  margin:0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

img{ max-width:100%; display:block; height:auto; }
a{ color: inherit; text-decoration: none; }

button{ font: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Sticky navbar: espacio para anchors */
section[id]{ scroll-margin-top: 90px; }

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:12px;
  background: var(--white);
  border:1px solid var(--separator);
  padding:10px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.skip-link:focus{ left:12px; z-index: 999; }

/* =========================================================
   Layout
   ========================================================= */
.container{
  width: min(1100px, 92%);
  margin-inline: auto;
  padding-block: var(--space-6);
}

/* =========================================================
   Navbar
   ========================================================= */
.navbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--separator);
}

.navbar .inner{
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative; /* para el menú desplegable móvil */
}

.navbar .brand{
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--primary);
}

.navbar .menu{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap: 12px;
}

.navbar .menu a{
  font-size: var(--fs-small);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
}

.navbar .menu a:hover{
  color: var(--primary);
  background: var(--primary-10);
}

/* CTA en navbar (desktop) */
.navbar .cta{
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary);
  color:#fff;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition: background .2s ease, transform .15s ease;
}
.navbar .cta:hover{
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Botón hamburguesa (móvil) */
.nav-toggle{
  display:none;
  background: transparent;
  border: 1px solid var(--separator);
  border-radius: 12px;
  padding: 10px 12px;
}
.nav-toggle i{ font-size: 22px; color: var(--primary); }

/* Menú móvil */
@media (max-width: 820px){
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }

  .navbar .menu{
    display:none;
    position:absolute;
    top:64px;
    left:0;
    right:0;
    margin: 0 4%;
    background: var(--white);
    border: 1px solid var(--separator);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
  }

  .navbar .cta{ display:none; } /* CTA queda en el Hero */
  .navbar .menu.is-open{ display:flex; }
}

/* =========================================================
   Tipografía / secciones
   ========================================================= */
.section-title{
  font-size: var(--fs-h2);
  margin: 0 0 var(--space-4);
  color: var(--ink);
  line-height: 1.15;
}

.section-lead{
  color: var(--muted);
  margin: 0 0 var(--space-5);
}

/* =========================================================
   Hero (desktop) - GRID
   (texto + botones a la izquierda, foto a la derecha)
   ========================================================= */
.hero{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "txt photo"
    "actions photo";
  align-items: center;
  column-gap: var(--space-6);
  row-gap: var(--space-4);
  padding-block: clamp(40px, 8vw, 96px);
}

.hero .txt{
  grid-area: txt;
  min-width: 0;
}

.hero .actions{
  grid-area: actions;
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero .hi{ color: var(--muted); margin:0 0 var(--space-2); }
.hero h1{ font-size: var(--fs-hero); margin:0 0 var(--space-3); }
.hero .sub{ margin:0 0 var(--space-3); font-weight:600; color: var(--ink); }
.hero .lead{ color: var(--muted); margin: 0; }

/* Foto hero */
.hero .photo{
  grid-area: photo;
  justify-self: end;
  width: clamp(220px, 28vw, 320px);
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 6px solid var(--white);
  object-fit: cover;
  object-position: center 15%;
}

/* =========================================================
   Hero (responsive)
   texto -> foto -> botones
   ========================================================= */
@media (max-width: 900px){
  .hero{
    grid-template-columns: 1fr;
    grid-template-areas:
      "txt"
      "photo"
      "actions";
    text-align: center;
    justify-items: center;
  }

  .hero .photo{
    justify-self: center;
    width: min(280px, 78vw);
    margin-top: 18px;
    border-width: 4px;
  }

  .hero .actions{
    justify-content: center;
    margin-top: 14px;
  }
}

/* Botones uno debajo del otro y centrados (pantallas pequeñas) */
@media (max-width: 520px){
  .hero .actions{
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .hero .actions .btn{
    width: min(320px, 100%);
    justify-content: center;
  }
}

/* Desktop: botones del mismo ancho */
@media (min-width: 901px){
  .hero .actions{
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: var(--space-3);
    max-width: 560px;
  }

  .hero .actions .btn{
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 900px){
  #proyectos .section-title,
  #proyectos .section-lead,
  #contacto .section-title,
  #contacto .contact-lead,
  #especialidades .section-title,
  #especialidades .section-lead{
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  /* Por si quieres que el lead no se estire demasiado */
  #proyectos .section-lead,
  #contacto .contact-lead,
  #especialidades .section-lead{
    max-width: 42ch;
  }
}

/* =========================================================
   Botones
   ========================================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 18px;
  border-radius:999px;
  border:1px solid transparent;
  background: var(--rose);
  color: var(--ink);
  transition: background .2s ease, transform .15s ease;
}

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

.btn.outline{
  background: transparent;
  color: var(--mauve);
  border-color: var(--mauve);
}

.btn.outline:hover{
  background: rgba(229,152,155,.18);
}

/* =========================================================
   Grid
   ========================================================= */
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

/* =========================================================
   Cards
   ========================================================= */
.card{
  background: var(--card);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover{
  transform: translateY(-2px);
  border-color: var(--primary-35);
  box-shadow: var(--shadow-hover);
}

.card h3{
  margin: 0 0 var(--space-2);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: .1px;
}

.h3-sub{
  display:block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.card p{
  margin: 0 0 var(--space-2);
  color: var(--muted);
  line-height: 1.6;
}

.card .icon{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-14);
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.card .icon i{ font-size: 32px; }

/* =========================================================
   Cita 
   ========================================================= */

.quote-section{
  padding: 0;            
  margin: 0;
}

.quote{
  width: 100%;
  margin: 0;
  border-radius: 0;

  background:var(--rose); 
  color: rgba(255,255,255,.92); /* MISMO color para texto y comilla (blanco suave) */

  min-height: clamp(240px, 28vw, 380px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 22px;

  /* padding interno alineado a tu container de 1100px */
  padding-block: clamp(56px, 7vw, 96px);
  padding-inline: max(16px, calc((100vw - 1100px)/2));

  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.6;
  font-weight: 600;
}

.quote::before{
  content: "““"; 
  font-size: clamp(90px, 10vw, 150px);
  line-height: 1;
  letter-spacing: -0.10em;
  color: rgba(255,255,255,.92); 
}


/* =========================================================
   Chips
   ========================================================= */
.chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.chip{
  font-size: 12px;
  padding:6px 10px;
  border-radius: 999px;
  background: var(--peach);
  color: var(--ink);
}

#proyectos .card{
  display: flex;
  flex-direction: column;
  padding-bottom: 18px; 
}

#proyectos .card .chips,
#proyectos .card .actions{
  margin-top: auto;    
  padding-top: 12px;    
}

/* =========================================================
   Contacto (lista + formulario)
   ========================================================= */
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(28px, 4vw, 64px);
  align-items:start;
}


.contact-lead{
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.7;
}

/* Links (izquierda) */
.contact-links{
  list-style:none;
  padding:0;
  margin: 22px 0 0;
  display:grid;
  gap: 14px;
}

.contact-link{
  display:flex;
  align-items:center;
  gap: 12px;
  color: var(--muted);
  text-decoration:none;
}

.contact-link i{
  font-size: 22px;
  color: var(--mauve);
}

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

.contact-link:hover i{
  color: var(--rose);
}

.contact-link.no-link{
  cursor: default;
}

/* Form (derecha) */
.contact-form{
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display:flex;
  flex-direction: column;
  gap: 14px;
}

/* Nombre + Apellido en 2 columnas */
.form-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin: 0;
}

.contact-form label{
  font-weight: 600;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea{
  font: inherit;
  padding: 14px 14px;
  border-radius: 999px;
  border: 1px solid rgba(181,131,141,.22);
  background: rgba(181,131,141,.08);
}

.contact-form textarea{
  border-radius: 18px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus{
  outline: 2px solid rgba(229,152,155,.35);
  border-color: rgba(229,152,155,.35);
}

/* Botón como ADA: no full width */
.contact-form .btn{
  width: fit-content;
  padding-inline: 26px;
  margin-top: 6px;
}

/* Responsive */
@media (max-width: 900px){
  .contact-grid{ grid-template-columns: 1fr; }
  .form-grid{ grid-template-columns: 1fr; }
  .contact-form .btn{ width: 100%; }
}

/* =========================================================
   Footer
   ========================================================= */
.footer{
  background: var(--rose);
  color: rgba(255,255,255,.92);
  border-top: 1px solid rgba(255,255,255,.30);
}

.footer .container{
  padding-block: var(--space-5); 
}

.footer-inner{
  display:flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

/* Nav */
.footer-nav{
  display:flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a{
  color: rgba(255,255,255,.92);
  font-weight: 600;
  font-size: 16px;             
  letter-spacing: .2px;
}

.footer-nav a:hover{
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.footer-social{
  display:flex;
  gap: 16px;                    
  justify-content:center;
  margin-top: 4px;
}

.footer-social a{
  width: 54px;                  
  height: 54px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  background: rgba(255,255,255,.95); 
  color: var(--mauve);               
  box-shadow: 0 10px 24px rgba(11,18,32,.12);

  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.footer-social a i{
  font-size: 22px;             
}

.footer-social a:hover{
  transform: translateY(-2px);
  background: transparent;      
  color: #fff;                  
  box-shadow: none;
  outline: 2px solid rgba(255,255,255,.65);
  outline-offset: -2px;
}

/* Copy */
.footer-copy{
  margin: 0;
  text-align: center;
  font-size: 15px;             
  color: rgba(255,255,255,.90);
}

/* Ajustes mobile */
@media (max-width: 520px){
  .footer .container{ padding-block: var(--space-4); }
  .footer-nav{ gap: 18px; }
  .footer-nav a{ font-size: 15px; }
  .footer-social a{ width: 50px; height: 50px; }
  .footer-social a i{ font-size: 20px; }
}


