/* index page styles */

/* HERO */
.hero { 
  position: relative; 
  height: clamp(620px, 88vh, 880px); 
  min-height: 620px; 
  overflow: hidden; 
  color: #fff; 
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.06);
  transform-origin: center center;
  animation: heroKenBurnsOut 16s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes heroKenBurnsOut {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Oscurecido hacia la izquierda / arriba (zona del copy), alineado al navy de marca; la derecha respira para la foto */
  background:
    linear-gradient(
      180deg,
      rgba(15, 33, 64, 0.52) 0%,
      rgba(15, 33, 64, 0.1) 40%,
      transparent 68%
    ),
    linear-gradient(
      90deg,
      rgba(15, 33, 64, 0.82) 0%,
      rgba(15, 33, 64, 0.48) 36%,
      rgba(15, 33, 64, 0.2) 58%,
      rgba(15, 33, 64, 0.06) 82%,
      transparent 100%
    ),
    radial-gradient(90% 75% at 20% 42%, rgba(212, 168, 41, 0.07) 0%, transparent 58%);
}
/* Nav fija: el bloque arranca algo más abajo para que respire mejor y “flote” más al medio del hero. */
.hero-content {
  position: absolute;
  z-index: 2;
  top: clamp(152px, 20vh, 228px);
  bottom: auto;
  /* Misma columna que .nav-inner / .footer-inner (gutter + banda centrada max 1280) */
  --hero-gutter: var(--sp-6);
  left: calc(
    var(--hero-gutter)
    + max(0px, (100% - 2 * var(--hero-gutter) - var(--layout-container-max)) / 2)
  );
  --hero-column: min(var(--layout-container-max), calc(100% - 2 * var(--hero-gutter)));
  width: min(880px, var(--hero-column));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0;
  max-width: 880px;
}
@media (max-width: 860px) {
  .hero-content {
    top: clamp(108px, 18vh, 176px);
    --hero-gutter: 20px;
  }
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  font-weight: 500;
  margin: 0 0 24px;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  column-gap: 0.6em;
  white-space: nowrap;
}
.hero-eyebrow-city,
.hero-eyebrow-rest {
  letter-spacing: 0.25em;
  margin-inline-end: -0.25em;
  flex: 0 0 auto;
}
.hero-eyebrow-sep {
  letter-spacing: 0;
  flex: 0 0 auto;
}
@media (max-width: 420px) {
  .hero-eyebrow {
    font-size: 10px;
  }
}
.hero-title {
  font-family: var(--font-sans);
  font-weight: var(--fw-title);
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  text-wrap: balance;
  color: #fff;
}
.hero-sub { font-size: 20px; color: rgba(255,255,255,.88); max-width: 560px; margin: 0 0 26px; line-height: 1.5; }
.hero-badge {
  display: inline-block;
  background: rgba(212,168,41,.92);
  color: #1A1A1A;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #fff;
  opacity: .9;
  text-decoration: none;
  border-bottom: none;
}
.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: heroScrollHint 2.6s var(--ease-out) infinite;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.55)) drop-shadow(0 1px 2px rgba(15, 33, 64, 0.55));
}
.hero-scroll-line {
  display: block;
  width: 1px;
  height: 14px;
  background: currentColor;
  opacity: .92;
}
.hero-scroll-chevron { display: block; opacity: .95; }
.hero-scroll-wheel {
  animation: heroScrollWheel 2.6s var(--ease-out) infinite;
}
@keyframes heroScrollHint {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50%      { transform: translateY(5px); opacity: 1; }
}
@keyframes heroScrollWheel {
  0%, 100% { opacity: 1; }
  45%, 55% { opacity: .2; }
}
@media (max-width: 860px) {
  .hero-scroll {
    bottom: 18px;
    gap: 6px;
    padding: 8px 12px;
  }
  .hero-scroll-mouse { width: 18px; height: 28px; }
  .hero-scroll-line { height: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-img {
    animation: none;
    transform: none;
  }
  .hero-scroll-hint,
  .hero-scroll-wheel { animation: none; }
}

/* PORTAFOLIO (home): fondo limpio --bg-paper (section-alt) */
#portafolio-preview.section.section-alt {
  background-color: var(--bg-paper);
}

/* Home: ritmo vertical de LO QUE HACEMOS + PROYECTOS DESTACADOS */
#servicios.section,
#portafolio-preview.section {
  --home-section-y: clamp(48px, 5vw, 72px);
  --home-section-join: clamp(28px, 3vw, 40px);
  --home-head-gap: clamp(24px, 2.8vw, 32px);
}
#servicios.section {
  padding-top: var(--home-head-gap);
  padding-bottom: var(--home-section-join);
}
#portafolio-preview.section {
  padding-top: var(--home-section-join);
  padding-bottom: var(--home-section-y);
}
#portafolio-preview .section-sub {
  margin-bottom: var(--home-head-gap);
}
#servicios .home-serv-head {
  --home-copy-gap: clamp(12px, 1.4vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--home-copy-gap);
  margin-bottom: var(--home-head-gap);
}
#servicios .home-serv-head .eyebrow {
  margin: 0;
}
#servicios .home-serv-head .section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--home-copy-gap);
  margin: 0;
}
#servicios .home-serv-head .section-title-lead {
  margin-bottom: 0;
}
#servicios .home-serv-head .section-sub {
  margin-top: 0;
  margin-bottom: 0;
}

/* SERVICIOS — asymmetric grid */
.serv-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.serv-card {
  display: block;
  border-radius: 22px;
  padding: 36px;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  position: relative;
  min-height: 380px;
}
.serv-card:hover { transform: scale(1.02); box-shadow: 0 20px 40px rgba(15,33,64,.12); }
.serv-card h3 { font-family: var(--font-sans); font-size: 28px; font-weight: var(--fw-title); margin: 0 0 10px; line-height: 1.15; letter-spacing: -0.01em; }
.serv-card p { font-size: 15px; line-height: 1.55; margin: 0; }
.serv-tag { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; font-weight: 900; margin: 0 0 12px; opacity: .8; }

.serv-large {
  grid-row: span 1;
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.serv-large-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(15,33,64,.85) 100%); border-radius: inherit; }
.serv-large-body { position: relative; z-index: 1; }
.serv-large h3 { color: #fff; font-size: 36px; }
.serv-large p { color: rgba(255,255,255,.88); max-width: 460px; }
.serv-large .serv-tag { color: var(--accent-secondary); }

.serv-small { background: var(--bg-paper); color: var(--fg-1); }
.serv-small .serv-tag { color: var(--accent-primary); }
.serv-small p { color: var(--fg-2); }
.serv-icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-surface);
  color: var(--accent-primary);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
}

/* PORTAFOLIO — tarjeta editorial: esquinas redondeadas, texto en gradiente fijo abajo, CTA circular al hover */
.port-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
#portafolio-preview .port-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) {
  #portafolio-preview .port-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  #portafolio-preview .port-grid { grid-template-columns: 1fr; }
}
.port-card {
  --port-radius: 28px;
  position: relative;
  border-radius: var(--port-radius);
  overflow: hidden;
  display: block;
  isolation: isolate;
  box-shadow: var(--shadow-1);
}
.port-img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--port-radius);
}
.port-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.65s var(--ease-out);
}
.port-card:hover .port-img img { transform: scale(1.06); }
.port-caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 24px 26px;
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(12, 14, 18, 0) 0%,
    rgba(12, 14, 18, 0.12) 38%,
    rgba(12, 14, 18, 0.58) 62%,
    rgba(12, 14, 18, 0.92) 100%
  );
  pointer-events: none;
}
.port-caption .port-cat {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-secondary);
  margin: 0 0 8px;
  font-weight: 600;
}
.port-caption h3 {
  font-family: var(--font-sans);
  font-weight: var(--fw-title);
  font-size: clamp(18px, 2.1vw, 22px);
  margin: 0;
  line-height: 1.2;
  color: #fff;
  text-wrap: balance;
}
.port-line {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}
.port-hover-cta {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: none;
}
.port-card:hover .port-hover-cta {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.port-hover-cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(74, 52, 38, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
@media (prefers-reduced-motion: reduce) {
  .port-img img { transition: none; }
  .port-card:hover .port-img img { transform: none; }
  .port-hover-cta { display: none; }
}

.port-cta { text-align: center; margin-top: 56px; }

/* METRICS */
.metrics { padding: 80px 32px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.metric { padding: 8px 32px; text-align: center; border-right: 1px solid rgba(255,255,255,.15); }
.metric:last-child { border-right: none; }
.metric-num { font-family: var(--font-sans); font-weight: var(--fw-title); font-size: clamp(48px, 5.5vw, 80px); color: var(--accent-secondary); line-height: 1; letter-spacing: -0.02em; margin-bottom: 10px; }
.metric-label { font-family: var(--font-body); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--chrome-nav-fg-muted); font-weight: 500; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 55fr 45fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.about-img { border-radius: var(--radius-photo); overflow: hidden; aspect-ratio: 4/5; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text { font-size: 17px; color: var(--fg-2); line-height: 1.65; margin: 12px 0 28px; max-width: 540px; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .serv-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 32px 0; }
  .metric { padding: 16px; border-right: none; }
  .metric:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.15); }
  .about-grid { grid-template-columns: 1fr; }
}
