﻿/* =========================================================
   Salguero Constructora — Home
   Paleta tomada de la referencia + rojo del logo como acento
   ========================================================= */
:root {
  --shell-bg: #1c1f1e;
  --card-bg: #2e3331;
  --card-bg-2: #262a29;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f2f2ee;
  --text-muted: #a9ada9;
  --text-dim: #7d817e;
  --white: #ffffff;
  --dark: #1c1f1e;
  --brand: #e30e2b;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --pill: 999px;

  --site-width: 85%;          /* ancho del contenido respecto a la ventana */
  --pad: clamp(20px, 3vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  color: var(--text);
  background: var(--shell-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, address { margin: 0; }
address { font-style: normal; }
button { font-family: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.page { background: var(--shell-bg); }

.shell {
  width: var(--site-width);
  margin: 0 auto;
  padding: 16px 0 24px;
}

/* Sin padding horizontal: el contenido alinea con el borde del hero */
.section { padding: 64px 0; }

.card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
}

/* ---------- Tipografía ---------- */
.h2 {
  font-size: clamp(28px, 3.3vw, 46px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.h2 strong { font-weight: 600; }

.section__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.section__num { color: var(--text-dim); }
.section__name { color: var(--text); font-weight: 400; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 18px;
  border-radius: var(--pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease;
}
.btn--light { background: var(--white); color: var(--dark); }
.btn--light:hover { transform: translateY(-1px); }
.btn__icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  background: var(--white);
}
.btn--outline {
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 18px;
}
.btn--full { width: 100%; justify-content: space-between; padding: 13px 16px 13px 20px; }
.btn--full .chev { font-size: 16px; }
.btn--light.btn--full:hover { background: #f4f4f0; transform: none; }
.btn--outline:hover { background: rgba(255,255,255,.06); }

.circle-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.circle-btn:hover { border-color: var(--text); }
.circle-btn--light { background: var(--white); color: var(--dark); border-color: var(--white); }
.circle-btn--sm { width: 28px; height: 28px; font-size: 13px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--pill);
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(28,31,30,.35);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 400;
  color: var(--text);
}

.see-all {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text);
}
/* Línea con punta de flecha, como en la referencia */
.see-all__arrow {
  position: relative;
  width: 36px; height: 1px;
  background: currentColor;
  display: inline-block;
  transition: width .2s;
}
.see-all__arrow::after {
  content: "";
  position: absolute; right: 0; top: -3px;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.see-all:hover .see-all__arrow { width: 52px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: clamp(560px, 46vw, 720px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px var(--pad) 32px;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,22,21,.55) 0%, rgba(20,22,21,.2) 35%, rgba(20,22,21,.25) 65%, rgba(20,22,21,.75) 100%),
    linear-gradient(90deg, rgba(20,22,21,.55) 0%, rgba(20,22,21,.25) 40%, rgba(20,22,21,0) 70%);
}
.hero > :where(:not(.hero__bg, .hero__overlay)) { position: relative; z-index: 1; }
.hero > .header { z-index: 10; }

/* Variante compacta para páginas internas / "Próximamente" */
.hero--compact { min-height: 420px; }
.hero--compact .hero__content { padding-top: 40px; padding-bottom: 24px; justify-content: center; }
.hero--compact .hero__title { font-size: clamp(34px, 4.6vw, 60px); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: var(--pill);
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(28,31,30,.35);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500;
}
.hero__eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn--ghost { border: 1px solid rgba(255,255,255,.4); color: var(--text); padding: 12px 20px; }
.btn--ghost:hover { background: rgba(255,255,255,.08); }

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header__logo img { height: 55px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--pill);
  background: rgba(60,64,62,.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
}
.nav__link {
  padding: 8px 18px;
  border-radius: var(--pill);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  transition: color .2s ease, background .2s ease;
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active { background: rgba(255,255,255,.14); color: var(--text); }

/* Submenú Proyectos */
.nav__item { position: relative; display: flex; align-items: center; }
.nav__item > .nav__link { display: inline-flex; align-items: center; gap: 6px; }
.nav__caret { font-size: 12px; transition: transform .2s; }
.nav__sub-toggle { display: none; }
.nav__sub {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(38,42,41,.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 30;
}
.nav__sub::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav__item:hover .nav__sub,
.nav__item:focus-within .nav__sub,
.nav__item.is-open .nav__sub { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__item:hover .nav__caret,
.nav__item.is-open .nav__caret { transform: rotate(180deg); }
.nav__sub a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.nav__sub a:hover { background: rgba(255,255,255,.08); color: var(--text); }
.nav__sub-all { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.nav__sub-all a { font-size: 12px; color: var(--text); }
.nav__badge {
  font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 7px; border-radius: var(--pill);
  background: var(--brand); color: var(--white);
}
.nav__badge--soft { background: rgba(255,255,255,.14); color: var(--text); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(28,31,30,.4);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 1.5px; background: var(--white); display: block; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* Contenido */
.hero__content { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding-top: 48px; }
.hero__title {
  max-width: 880px;
  font-size: clamp(40px, 5.8vw, 74px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.hero__subtitle {
  max-width: 480px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(242,242,238,.85);
}

.hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
}
.hero__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-width: 360px;
}

.hero__slider { width: 56%; min-width: 0; }
.hero__counter {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--text);
  margin-bottom: 10px;
  padding: 0 4px;
}
.hero__counter-line { flex: 1; height: 1px; background: rgba(255,255,255,.5); }
.hero__nav { display: flex; gap: 6px; margin-left: 8px; }

.hero__cards {
  display: flex; gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 2px;
  cursor: grab;
}
.hero__cards.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.hero__cards.is-dragging .mini-card { pointer-events: none; }
.hero__cards::-webkit-scrollbar { display: none; }

.mini-card {
  flex: 0 0 min(310px, 78%);
  scroll-snap-align: start;
  display: flex; gap: 12px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(28,31,30,.35);
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.mini-card:hover { background: rgba(28,31,30,.55); }
.mini-card img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; flex: none; }
.mini-card__body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.mini-card h4 { font-size: 14px; font-weight: 500; line-height: 1.25; }
.mini-card p { font-size: 12px; color: var(--text-muted); }

/* =========================================================
   01 NOSOTROS
   ========================================================= */
.about { padding-top: 96px; padding-bottom: 96px; }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: stretch;
}
/* Columna izquierda: etiqueta arriba, párrafo abajo (alineado con el botón) */
.about__side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
}
.about .section__label { margin-bottom: 0; }
.about__text {
  max-width: 400px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}
.about__main { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; align-items: flex-start; }
.about__main .h2 { width: 100%; margin-top: -0.2em; }

/* =========================================================
   02 SERVICIOS
   ========================================================= */
.services { padding: 0; }
.services__card { padding: 36px var(--pad) 40px; }

.services__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}
.services__title { max-width: 680px; }
.services .section__label { margin-bottom: 20px; }

/* Como en la referencia: el primer ítem queda centrado verticalmente con el bloque
   de la etiqueta "(02) Nuestros servicios", y los ítems llevan un paso de ~38px */
.services__list { text-align: left; min-width: 200px; margin-top: 10px; }
.services__list li {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-dim);
  padding: 0 0 16px;
  cursor: pointer;
  transition: color .2s;
}
.services__list li:hover { color: var(--text-muted); }
.services__list li.is-active { color: var(--text); }

/* Leyenda a la izquierda alineada con la base de las imágenes;
   controles debajo del carrusel, alineados con su borde izquierdo */
.services__bottom {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto auto;
  column-gap: 40px;
  row-gap: 20px;
  align-items: end;
  margin-top: 40px;
}
.services__caption { grid-column: 1; grid-row: 1; align-self: end; }
.services__caption h3 { font-size: 19px; font-weight: 400; line-height: 1.3; }
.services__caption p { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.services__controls { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.slider-nav { display: flex; gap: 8px; }

.services__track {
  grid-column: 2; grid-row: 1;
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  /* el carrusel sangra hasta el borde derecho de la tarjeta */
  margin-right: calc(-1 * var(--pad));
  padding-right: var(--pad);
}
.services__track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.services__track::-webkit-scrollbar { display: none; }
.services__slide img { pointer-events: none; user-select: none; }
.services__slide {
  flex: 0 0 min(560px, 85%);
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--card-bg-2);
}
.services__slide img {
  width: 100%; height: 100%; object-fit: cover;
  /* Solo la slide activa a color */
  filter: grayscale(1) brightness(.85);
  transition: filter .4s ease;
}
.services__slide.is-active img { filter: none; }

/* =========================================================
   03 PROYECTOS
   ========================================================= */
.projects { padding-top: 96px; }
.projects__head {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 40px;
}
.projects__head .h2 { max-width: 620px; }
.projects__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 420px; justify-self: end; }
.projects__aside p { font-size: 15px; line-height: 1.6; color: var(--text-muted); }

/* 7 proyectos: Artemira destacado ocupa dos filas; los otros 6 en 3x2 */
.projects__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  grid-auto-rows: minmax(360px, auto);
  gap: 14px;
}
.project {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 360px;
  background: var(--card-bg);
}
.project--featured { grid-row: span 2; }
.project img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project:hover img { transform: scale(1.04); }
.project::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,22,21,0) 40%, rgba(20,22,21,.85) 100%);
}
.project__tags {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px;
  max-width: 70%;
}
.project__body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.project__body h3 { font-size: 22px; font-weight: 500; line-height: 1.2; }
.project__body p { font-size: 14px; color: var(--text-muted); line-height: 1.5; max-width: 400px; }
.project__body .btn { margin-top: 8px; }
.project--featured .project__body h3 { font-size: 28px; }

/* =========================================================
   04 TESTIMONIALES (estilo lista + imagen, como "Awards" en la referencia)
   ========================================================= */
.testimonials { padding-top: 96px; }
.testimonials__head { display: flex; justify-content: flex-end; margin-bottom: 40px; }
.testimonials__head .h2 { max-width: 680px; }
.testimonials .section__label { margin-bottom: -40px; }

.testimonials__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

.testimonials__item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-family: inherit;
  transition: background .2s;
}
.testimonials__item:hover { background: rgba(255,255,255,.03); }
.testimonials__item.is-active { background: var(--card-bg); border-bottom-color: transparent; }
.testimonials__item.is-active .circle-btn { background: var(--white); color: var(--dark); border-color: var(--white); }
.testimonials__project { font-size: 18px; font-weight: 400; }
.testimonials__name { font-size: 18px; font-weight: 400; }

.testimonials__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg-2);
}
.testimonials__media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.testimonials__media img.is-fading { opacity: 0; }
.testimonials__figure figcaption { padding: 18px 4px 0; position: relative; }
.testimonials__mark {
  display: block;
  font-size: 44px; line-height: .5;
  color: var(--brand);
  font-weight: 600;
  height: 18px;
  margin-bottom: 8px;
}
.testimonials__figure p { font-size: 16px; line-height: 1.6; color: var(--text); }
.testimonials__figure h4 { font-size: 15px; font-weight: 500; margin-top: 16px; }
.testimonials__figure > figcaption > span:last-child { font-size: 13px; color: var(--text-muted); }

/* =========================================================
   06 CONTACTO / FOOTER
   ========================================================= */
.contact { padding: 96px 0 0; }
.contact__card { padding: 36px var(--pad) 28px; }
.contact .section__label { margin-bottom: 40px; }

.contact__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.contact__title {
  font-size: clamp(36px, 4.6vw, 58px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 800px;
}
.contact__title strong { font-weight: 600; }
.contact__cta { vertical-align: middle; margin: 0 8px; font-size: 12px; }

.contact__info {
  text-align: right;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.contact__info a:hover { color: var(--text); }

/* Footer en una sola fila, como la referencia: logo | enlaces | copyright */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 28px;
}
.footer__logo img { height: 44px; width: auto; }
.footer__nav { display: flex; gap: 28px; font-size: 14px; color: var(--text-muted); }
.footer__nav a:hover { color: var(--text); }
.footer__copy { font-size: 13px; color: var(--text-muted); text-align: right; }
.footer__credit { display: block; font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* =========================================================
   ANIMACIONES
   ========================================================= */
/* Entrada del hero al cargar la página */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: none; }
}
.hero__bg img { animation: heroZoom 1.8s cubic-bezier(.2,.7,.2,1) both; }
.hero .header      { animation: heroIn .8s cubic-bezier(.2,.7,.2,1) both; }
.hero__eyebrow     { animation: heroIn .8s .1s cubic-bezier(.2,.7,.2,1) both; }
.hero__title       { animation: heroIn .9s .18s cubic-bezier(.2,.7,.2,1) both; }
.hero__subtitle    { animation: heroIn .9s .32s cubic-bezier(.2,.7,.2,1) both; }
.hero__actions,
.hero__tags        { animation: heroIn .9s .46s cubic-bezier(.2,.7,.2,1) both; }
.hero__slider      { animation: heroIn .9s .58s cubic-bezier(.2,.7,.2,1) both; }

/* Aparición al hacer scroll (la clase .reveal la asigna js/main.js) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero__bg img, .hero .header, .hero__eyebrow, .hero__title, .hero__subtitle,
  .hero__actions, .hero__tags, .hero__slider { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
/* Pantallas medianas: Artemira a todo el ancho y el resto en 3 columnas */
@media (max-width: 1300px) {
  .projects__grid { grid-template-columns: repeat(3, 1fr); }
  .project--featured { grid-row: auto; grid-column: 1 / -1; min-height: 440px; }
}

/* Navegación compacta antes de colapsar */
@media (max-width: 1240px) {
  .nav__link { padding: 8px 13px; }
  .header__logo img { height: 48px; }
}

/* Header colapsado a menú móvil */
@media (max-width: 1100px) {
  .nav { display: none; position: absolute; top: 84px; left: 24px; right: 24px; flex-direction: column; align-items: stretch; padding: 8px; border-radius: 18px; background: rgba(28,31,30,.92); z-index: 20; }
  .nav.is-open { display: flex; }
  .nav__link { padding: 12px 16px; font-size: 14px; }
  .header__cta { display: none; }
  .nav-toggle { display: flex; }

  /* Submenú en móvil: acordeón */
  .nav__item { flex-wrap: wrap; }
  .nav__item > .nav__link { flex: 1; }
  .nav__caret { display: none; }
  .nav__sub-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 0; background: transparent; color: var(--text-muted); font-size: 16px;
    transition: transform .2s;
  }
  .nav__item.is-open .nav__sub-toggle { transform: rotate(180deg); }
  .nav__sub {
    position: static; width: 100%;
    display: none; opacity: 1; visibility: visible; transform: none;
    background: rgba(255,255,255,.04); box-shadow: none; border: 0;
    margin: 4px 0 8px; padding: 6px;
  }
  .nav__item:hover .nav__sub, .nav__item:focus-within .nav__sub { display: none; }
  .nav__item.is-open .nav__sub { display: block; }
}

/* Tablet: contenedor al 100% y secciones a una columna */
@media (max-width: 960px) {
  :root { --site-width: 100%; --pad: 28px; }
  .shell { padding: 16px 16px 24px; }

  .hero__bottom { flex-direction: column; align-items: stretch; }
  .hero__slider { width: 100%; }

  .about__grid, .services__top, .services__bottom, .projects__head, .testimonials__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__side { gap: 24px; }
  .about__grid { gap: 32px; }
  .projects__aside { justify-self: start; }
  .services__list { display: flex; flex-wrap: wrap; gap: 6px 18px; min-width: 0; }
  .services__bottom { grid-template-rows: auto auto auto; gap: 20px; }
  .services__caption { grid-column: 1; grid-row: 1; }
  .services__track { grid-column: 1; grid-row: 2; }
  .services__controls { grid-column: 1; grid-row: 3; }
  .testimonials .section__label { margin-bottom: 24px; }
  .testimonials__head { justify-content: flex-start; }
  .contact__info { text-align: left; }
  .footer { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer__nav { flex-wrap: wrap; gap: 12px 20px; }
  .footer__copy { text-align: left; }
}

@media (max-width: 640px) {
  .shell { padding: 8px 8px 16px; }
  :root { --pad: 20px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .hero { padding: 16px 16px 20px; min-height: 560px; }
  .header__logo img { height: 44px; }
  .hero__content { padding-top: 40px; }
  .hero__title { font-size: 36px; }
  .hero__subtitle { font-size: 14px; margin-top: 16px; }
  .services__card, .contact__card { padding: 28px 20px; }
  .projects__grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .project, .project--featured { min-height: 340px; grid-column: auto; }
  .project__tags { position: static; justify-content: flex-start; max-width: none; padding: 16px 16px 0; position: relative; z-index: 2; }
  .testimonials__item { grid-template-columns: 80px 1fr auto; padding: 16px 12px; }
  .testimonials__project, .testimonials__name { font-size: 16px; }
  .contact__cta { margin: 6px 0; }
  .footer__logo img { height: 38px; }
}
