/* ============================================================
   PDM — styles.css
   Paleta y tipografía según Manual de Marca v6.
   Estructura por secciones: busca "S1", "S2"… para localizar.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --navy: #233d4d;
  --navy-deep: #1a2f3d;
  --vino: #9b4b54;
  --vino-dark: #87404a;
  --coral: #d1523d;
  --lavanda: #cabad7;
  --crema: #f5f3f0;
  --blanco: #ffffff;
  --negro: #0d0d0d;
  --texto-suave: #4d5d68;

  --font: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;

  --radius-card: 28px 28px 28px 6px; /* eco de la geometría del logo */
  --radius-soft: 18px;
  --maxw: 1140px;
  --nav-h: 64px;

  --shadow-card: 0 2px 24px rgba(35, 61, 77, 0.07);
  --shadow-card-hover: 0 12px 40px rgba(35, 61, 77, 0.14);
  --trans: 0.35s cubic-bezier(0.25, 0.6, 0.3, 1);
}

/* ---------- Reset mínimo ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
  font-family: var(--font);
  background: var(--crema);
  color: var(--negro);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
}

/* ---------- Tipografía ---------- */
h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
}
h1,
h2 {
  text-wrap: balance;
}
.display {
  font-size: clamp(2.5rem, 6.5vw, 4.4rem);
}
.h-section {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  margin-bottom: 20px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vino);
  margin-bottom: 14px;
}
.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--texto-suave);
  max-width: 56ch;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--trans), box-shadow var(--trans),
    background var(--trans), color var(--trans);
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: var(--vino);
  color: var(--blanco);
  box-shadow: 0 6px 20px rgba(155, 75, 84, 0.35);
}
.btn-primary:hover {
  background: var(--vino-dark);
  box-shadow: 0 10px 28px rgba(155, 75, 84, 0.45);
}
.btn-ghost-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--blanco);
}
.btn-ghost-light:hover {
  border-color: var(--blanco);
  background: rgba(255, 255, 255, 0.08);
}
.btn-ghost-dark {
  border-color: rgba(35, 61, 77, 0.3);
  color: var(--navy);
}
.btn-ghost-dark:hover {
  border-color: var(--navy);
}
.btn-lg {
  padding: 17px 36px;
  font-size: 1.08rem;
}

/* ============================================================
   S0 — NAVEGACIÓN
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(26, 47, 61, 0.25);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background var(--trans), border-color var(--trans);
}
.nav.scrolled {
  background: rgba(35, 61, 77, 0.88);
  border-bottom-color: rgba(202, 186, 215, 0.12);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo img {
  height: 30px;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a:not(.btn) {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.93rem;
  font-weight: 600;
  transition: color var(--trans);
}
.nav-links a:not(.btn):hover {
  color: var(--blanco);
}
.nav .btn {
  padding: 9px 20px;
  font-size: 0.9rem;
}
.nav-login {
  color: var(--lavanda) !important;
}

/* Menú móvil */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanco);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform var(--trans), opacity var(--trans);
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    padding: 12px 24px 24px;
    transform: translateY(calc(-100% - var(--nav-h) - 24px));
    visibility: hidden;
    transition: transform var(--trans), visibility 0s linear 0.35s;
    border-bottom: 1px solid rgba(202, 186, 215, 0.15);
  }
  .nav-links.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform var(--trans);
  }
  .nav-links a:not(.btn) {
    padding: 14px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-links .btn {
    margin-top: 16px;
    justify-content: center;
  }
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ============================================================
   S1 — HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--navy-deep);
  color: var(--blanco);
  padding: calc(var(--nav-h) + 64px) 0 110px;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      rgba(13, 21, 28, 0.86) 0%,
      rgba(26, 47, 61, 0.62) 48%,
      rgba(26, 47, 61, 0.22) 100%
    ),
    linear-gradient(to top, rgba(13, 21, 28, 0.55) 0%, transparent 28%);
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 2;
  width: 1px;
  height: 52px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.hero-scroll span {
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--lavanda);
  animation: scrollcue 2.2s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes scrollcue {
  0% { top: -40%; }
  70%, 100% { top: 110%; }
}
.hero-playpause {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: rgba(13, 21, 28, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--blanco);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--trans), background var(--trans);
}
.hero-playpause:hover {
  border-color: var(--blanco);
  background: rgba(13, 21, 28, 0.5);
}
.hero-playpause .ico-play { display: none; }
.hero-playpause.paused .ico-play { display: block; }
.hero-playpause.paused .ico-pause { display: none; }
.hero-content {
  max-width: 720px;
}
.hero .eyebrow {
  color: var(--lavanda);
}
.hero h1 {
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--lavanda);
}
.hero .lead {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 38px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-meta {
  margin-top: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}
.hero-meta span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  margin-right: 9px;
  vertical-align: 2px;
}

/* ============================================================
   S2 — CREDIBILIDAD
   ============================================================ */
.cred {
  background: var(--blanco);
  padding: 26px 0;
  border-bottom: 1px solid rgba(35, 61, 77, 0.06);
}
.cred p {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-suave);
}

/* ---------- Base de sección ---------- */
.section {
  padding: clamp(72px, 10vw, 120px) 0;
}
.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* ============================================================
   S3 — SERVICIOS (catálogo data-driven)
   ============================================================ */
#servicios {
  background: var(--crema);
}

/* Pestañas de categoría (segmented control) */
.tabs {
  display: flex;
  gap: clamp(20px, 3.5vw, 38px);
  margin-bottom: 44px;
  border-bottom: 1px solid rgba(35, 61, 77, 0.12);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  padding: 2px 2px 16px;
  border: 0;
  background: none;
  color: var(--texto-suave);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color var(--trans);
}
.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  transition: background var(--trans);
}
.tab:hover {
  color: var(--navy);
}
.tab.active {
  color: var(--navy);
}
.tab.active::after {
  background: var(--vino);
}

/* Grid de cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.card {
  background: var(--blanco);
  border: 1px solid rgba(35, 61, 77, 0.12);
  border-radius: 24px;
  padding: 34px 30px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--trans), box-shadow var(--trans),
    border-color var(--trans);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(35, 61, 77, 0.3);
  box-shadow: 0 18px 44px rgba(35, 61, 77, 0.1);
}
.card.destacado {
  background: var(--navy);
  border-color: var(--navy);
}
.card-badge {
  position: absolute;
  top: -12px;
  right: 22px;
  background: var(--vino);
  color: var(--blanco);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 999px;
}
.card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vino);
  margin-bottom: 16px;
}
.card-precio {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.card-precio .num {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--navy);
}
.card-precio .antes {
  font-size: 1.15rem;
  color: var(--texto-suave);
  text-decoration: line-through;
}
.card-precio .iva {
  font-size: 0.82rem;
  color: var(--texto-suave);
}
.card-desc {
  color: var(--texto-suave);
  font-size: 0.95rem;
  flex: 1;
}
.card-detalles {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(35, 61, 77, 0.08);
  display: grid;
  gap: 9px;
}
.card-detalles li {
  font-size: 0.88rem;
  color: var(--navy);
  padding-left: 22px;
  position: relative;
}
.card-detalles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50% 50% 50% 0;
  background: var(--lavanda);
}
.card .btn {
  margin-top: 24px;
  width: 100%;
}
/* Card destacada: invertida sobre navy */
.card.destacado h3 {
  color: var(--lavanda);
}
.card.destacado .card-precio .num {
  color: var(--blanco);
}
.card.destacado .card-precio .iva,
.card.destacado .card-precio .antes {
  color: rgba(255, 255, 255, 0.6);
}
.card.destacado .card-desc {
  color: rgba(255, 255, 255, 0.75);
}
.card.destacado .card-detalles {
  border-top-color: rgba(255, 255, 255, 0.16);
}
.card.destacado .card-detalles li {
  color: rgba(255, 255, 255, 0.92);
}
.cards-nota {
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--texto-suave);
}

/* ============================================================
   S4 — CÓMO FUNCIONA
   ============================================================ */
#como-funciona {
  background: var(--blanco);
}
.pasos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(28px, 4vw, 48px);
}
.paso-num {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: 12px;
}
.paso h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.paso p {
  color: var(--texto-suave);
  font-size: 0.97rem;
}

/* ============================================================
   S5 — OFERTA DE BIENVENIDA
   ============================================================ */
#bienvenida {
  background: var(--crema);
}
.bienvenida-box {
  position: relative;
  background: linear-gradient(150deg, var(--lavanda), #bda9cd 90%);
  border-radius: 36px 36px 36px 8px;
  padding: clamp(44px, 7vw, 80px);
  color: var(--navy);
  overflow: hidden;
}
.bienvenida-box .eyebrow {
  color: var(--vino-dark);
}
.bienvenida-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.bienvenida-foto {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(35, 61, 77, 0.28);
}
.bienvenida-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
@media (max-width: 820px) {
  .bienvenida-grid {
    grid-template-columns: 1fr;
  }
}
.bienvenida-box h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  margin-bottom: 8px;
}
.bienvenida-box .sub {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  margin-bottom: 18px;
}
.bienvenida-box p.desc {
  max-width: 54ch;
  margin-bottom: 32px;
  color: rgba(35, 61, 77, 0.85);
}

/* ============================================================
   S6 — QUIÉNES SOMOS
   ============================================================ */
#quienes-somos {
  background: var(--blanco);
}
.quienes {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}
@media (max-width: 760px) {
  .quienes {
    grid-template-columns: 1fr;
  }
}
.quienes p {
  color: var(--texto-suave);
  margin-bottom: 16px;
}
.quienes .firma {
  font-weight: 800;
  color: var(--navy);
}

/* ---------- Placeholders de foto (Miguel sustituye) ---------- */
.ph {
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background: linear-gradient(155deg, var(--navy) 30%, var(--lavanda) 160%);
  border: 2px dashed rgba(202, 186, 215, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ph-hero {
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(13, 13, 13, 0.35);
}
.ph-land {
  aspect-ratio: 4 / 3;
  border-radius: 20px;
}
/* Mosaico de portfolio */
.mosaico {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.m-item {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  background: var(--navy);
}
.m-feature {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
  border-radius: 24px;
}
.m-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.25, 1);
}
.m-item:hover img {
  transform: scale(1.045);
}
.m-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 18px 14px;
  background: linear-gradient(to top, rgba(13, 21, 28, 0.62), transparent);
  color: var(--blanco);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mosaico .m-item:nth-child(2) { transition-delay: 0.06s; }
.mosaico .m-item:nth-child(3) { transition-delay: 0.12s; }
.mosaico .m-item:nth-child(4) { transition-delay: 0.18s; }
.mosaico .m-item:nth-child(5) { transition-delay: 0.24s; }
.mosaico .m-item:nth-child(6) { transition-delay: 0.1s; }
.mosaico .m-item:nth-child(7) { transition-delay: 0.16s; }
.mosaico .m-item:nth-child(8) { transition-delay: 0.22s; }
.mosaico .m-item:nth-child(9) { transition-delay: 0.28s; }
@media (max-width: 860px) {
  .mosaico {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .m-feature {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 10;
  }
}

/* Interludio full-bleed */
.interlude {
  position: relative;
  height: clamp(420px, 72vh, 720px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.interlude img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.interlude-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 21, 28, 0.66) 0%, transparent 55%);
}
.interlude-content {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(40px, 7vh, 72px);
  color: var(--blanco);
}
.interlude-quote {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
  max-width: 18ch;
}
.interlude-caption {
  margin-top: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* ============================================================
   S7 — CTA FINAL + FOOTER
   ============================================================ */
.cta-final {
  background: var(--navy);
  color: var(--blanco);
  text-align: center;
}
.cta-final h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin-bottom: 14px;
}
.cta-final p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 46ch;
  margin: 0 auto 34px;
  text-wrap: balance;
}

.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.65);
  padding: 56px 0 40px;
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer img {
  height: 34px;
  margin-bottom: 14px;
}
.footer a:hover {
  color: var(--blanco);
}
.footer-links {
  display: grid;
  gap: 8px;
}
.footer-tag {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Animación de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .card {
    transition: none;
  }
}
