/* =========================================================
   Página de un proyecto v2 (clases h-). Plantilla: Grupo Humec
   Primera pantalla: título con "Visitar sitio web" y "Ver detalles"
   y, debajo, el slider vertical de láminas · panel de detalles
   (dialog) · otros proyectos (gris)
   ========================================================= */
.h-page { --h-ink: #0b0b0d; --h-grey: #f4f4f6; --h-r: calc(1.25 * var(--v-u)); --h-gap: .75rem; }
.h-page .v-ic { --ic-ac: var(--v-purple); }
.h-page .v-title--ic > span:last-child { white-space: nowrap; }
.h-page .v-title em { color: var(--v-purple); }
.h-page .v-tbadge { background: rgba(115, 31, 184, .09); }

/* ---------- 1 · Una pantalla: título con botones y, debajo, el slider de láminas ---------- */
.h-show { background: #fff; color: var(--h-ink); display: flex; flex-direction: column; gap: 1.6rem; padding: calc(var(--header-h, 4rem) + 1.2rem) var(--v-gut) 3rem; }
.h-top { display: flex; flex-direction: column; gap: 1.1rem; }
.h-top__main { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.h-top__title { font-weight: 800; letter-spacing: -.055em; line-height: .92; font-size: clamp(2.8rem, 14vw, 4.4rem); margin: 0; }
.h-top__title em { font-style: normal; color: var(--v-purple); }
@media (max-width: 40rem) { .h-top__title--long { font-size: clamp(2rem, 10.4vw, 2.8rem); } }
.h-top__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.h-show .n-ac__btn--ghost { color: var(--h-ink); border-color: rgba(11, 11, 13, .2); }
.h-show .n-ac__btn--ghost:hover { color: #fff; }

/* ---------- 2 · Panel de detalles (se abre con "Ver detalles") ---------- */
.h-tag { display: inline-flex; align-items: center; gap: .5em; padding: .45em 1em .45em .8em; border-radius: 999px; background: rgba(115, 31, 184, .08); color: var(--v-purple); font-size: .8rem; font-weight: 700; }
.h-tag .v-ic { width: 1.4em; height: 1.4em; }
.h-det { position: fixed; inset: 0 0 0 auto; margin: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; padding: 0; border: 0; background: #fff; color: var(--h-ink); overflow-y: auto; overscroll-behavior: contain; transform: translateX(100%); transition: transform .55s var(--v-ease), overlay .55s allow-discrete, display .55s allow-discrete; }
.h-det[open] { transform: none; }
@starting-style { .h-det[open] { transform: translateX(100%); } }
.h-det::backdrop { background: rgba(11, 11, 13, 0); transition: background .55s ease, overlay .55s allow-discrete, display .55s allow-discrete; }
.h-det[open]::backdrop { background: rgba(11, 11, 13, .55); }
@starting-style { .h-det[open]::backdrop { background: rgba(11, 11, 13, 0); } }
.h-det__in { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; padding: 1.2rem var(--v-gut) 2.5rem; }
.h-det__head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.h-det__kicker { margin: 0; color: #6b6b73; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.h-det__close { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid rgba(11, 11, 13, .15); background: #fff; color: var(--h-ink); cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.h-det__close:hover { background: var(--v-purple); border-color: var(--v-purple); color: #fff; }
.h-det__close svg { width: 1.2rem; height: 1.2rem; }
.h-det__title { margin: .4rem 0 0; font-size: 2.6rem; font-weight: 800; letter-spacing: -.05em; line-height: .95; }
.h-det__title em { font-style: normal; color: var(--v-purple); }
.h-det__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.h-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; width: 100%; margin: 0; padding: 1.1rem 0; border-top: 1px solid rgba(11, 11, 13, .1); border-bottom: 1px solid rgba(11, 11, 13, .1); }
.h-facts dt { color: #8a8a93; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .3rem; }
.h-facts dd { margin: 0; font-size: 1rem; font-weight: 600; }
.h-facts a { color: var(--h-ink); transition: color .3s; }
.h-facts a:hover { color: var(--v-purple); }
.h-det__lead { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.25; }
.h-det__p { margin: 0; color: #5d5d66; line-height: 1.55; }
.h-det__sub { margin: .4rem 0 0; color: #8a8a93; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.h-deliv { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.h-deliv li { display: flex; align-items: center; gap: .55rem; padding: .6rem .95rem; border-radius: 999px; background: var(--h-grey); font-weight: 600; font-size: .88rem; }
.h-deliv .v-ic { width: 1.35em; height: 1.35em; flex: none; }
.h-det__btn { margin-top: .6rem; }
html:has(.h-det[open]) { overflow: hidden; }

/* ---------- 3 · El proyecto (blanco): slider vertical de láminas, como el de proyectos del home ---------- */
.h-gal { display: grid; gap: 1.5rem; }
.h-gal__media { position: relative; display: grid; aspect-ratio: 1 / 1; border-radius: var(--h-r, 1rem); overflow: hidden; background: var(--h-grey); border: 1px solid rgba(11, 11, 13, .1); isolation: isolate; }
.h-gal__slide { grid-area: 1 / 1; margin: 0; visibility: hidden; clip-path: inset(100% 0 0 0); transition: clip-path .9s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .9s; }
.h-gal__slide.is-on { visibility: visible; clip-path: inset(0); z-index: 2; transition: clip-path .9s cubic-bezier(.7, 0, .2, 1), visibility 0s; }
.h-gal__slide.is-prev { visibility: visible; clip-path: inset(0); z-index: 1; transition: none; }
.h-gal__slide img { width: 100%; height: 100%; object-fit: contain; display: block; transform: scale(1.12); transition: transform 1.3s var(--v-ease); }
.h-gal__slide.is-on img { transform: none; }
.h-gal__slide.is-prev img { transform: scale(.92); transition: transform .9s var(--v-ease); }
.h-gal__side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.h-gal__vp { position: relative; height: calc(3 * var(--g-row, 3rem)); overflow: hidden; }
.h-gal__list { list-style: none; margin: 0; padding: 0; transition: transform .8s var(--v-ease); will-change: transform; }
.h-gal__list li { height: var(--g-row, 3rem); display: flex; align-items: center; }
.h-gal__item { display: inline-flex; align-items: center; max-width: 100%; padding: 0; background: none; border: 0; text-align: left; cursor: pointer; white-space: nowrap; font-weight: 800; letter-spacing: -.045em; line-height: 1; font-size: calc(.62 * var(--g-row, 3rem) * var(--g-fit, 1)); color: #b9b9c1; opacity: calc(1 - var(--dist, 0) * .24); transform: scale(.72); transform-origin: left center; transition: color .5s ease, opacity .5s ease, transform .7s var(--v-ease); }
.h-gal__item:hover { color: #7d7d86; }
.h-gal__item.is-on, .h-gal__item.is-on:hover { color: var(--h-ink); opacity: 1; transform: none; }
.h-gal__c { display: none; }
.h-gal__foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-top: .9rem; border-top: 1px solid rgba(11, 11, 13, .12); }
.h-gal__cap { margin: 0; color: #4a4a52; font-size: .95rem; line-height: 1.45; max-width: 46ch; }
.h-gal__cap.is-in { animation: h-cap .6s var(--v-ease) both; }
@keyframes h-cap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.h-gal__count { flex: none; color: #6b6b73; font-size: .85rem; font-variant-numeric: tabular-nums; }

/* Celular: primero los nombres (3 visibles), luego la foto y debajo su frase */
@media (max-width: 63.99rem) {
  .h-gal__side { display: contents; }
  .h-gal__vp { order: 1; }
  .h-gal__media { order: 2; }
  .h-gal__foot { order: 3; }
}

/* ---------- Variante web: pantallas dentro de marcos (navegador, tablet, celular) ---------- */
.h-gal--web .h-gal__media { container-type: inline-size; }
.h-gal--web .h-gal__slide { display: flex; align-items: center; justify-content: center; height: 100cqw; min-height: 0; background: var(--h-grey); }
.h-gal--web .h-gal__slide > img { width: 100%; height: 100%; object-fit: contain; }
.h-gal--web .h-gal__slide > img.h-gal__cover { object-fit: cover; }
.h-frame { position: relative; overflow: hidden; background: #0b0b0d; box-shadow: 0 1.2rem 2.4rem -1.4rem rgba(11, 11, 13, .45); }
.h-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transform: none !important; }
.h-frame--browser { width: 78cqw; border-radius: .7rem; background: #fff; display: flex; flex-direction: column; }
.h-frame__bar { flex: none; display: flex; align-items: center; gap: .35rem; height: 1.9rem; padding: 0 .7rem; background: #ececef; border-bottom: 1px solid rgba(11, 11, 13, .08); }
.h-frame__bar i { width: .55rem; height: .55rem; border-radius: 50%; background: #c9c9cf; }
.h-frame__bar b { margin: 0 auto; padding: .15rem .9rem; border-radius: 999px; background: #fff; color: #6b6b73; font-size: .7rem; font-weight: 500; }
.h-frame--browser img { height: auto; aspect-ratio: 550 / 536; }
.h-frame--tablet { height: 80cqw; aspect-ratio: 320 / 510; padding: .55rem; border-radius: 1.4rem; }
.h-frame--tablet img, .h-frame--phone img { border-radius: .9rem; }
.h-frame--phone { height: 82cqw; aspect-ratio: 190 / 428; padding: .45rem; border-radius: 1.9rem; }
.h-frame--phone img { border-radius: 1.5rem; }

/* ---------- Qué hace el sitio (gris): solo en proyectos web ---------- */
.h-feat { background: var(--h-grey); color: var(--h-ink); display: flex; flex-direction: column; gap: 1.6rem; padding: 3.5rem var(--v-gut); }
.h-feat__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: .7rem; }
.h-feat__item { display: flex; flex-direction: column; justify-content: flex-start; gap: .5rem; padding: 1.3rem; border-radius: var(--h-r, 1rem); background: #fff; }
.h-feat__ic { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin-bottom: .4rem; border-radius: 50%; background: rgba(115, 31, 184, .09); }
.h-feat__ic .v-ic { width: 1.5rem; height: 1.5rem; }
.h-feat__item strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -.03em; }
.h-feat__item span:last-child { color: #5d5d66; line-height: 1.5; font-size: .95rem; }
.h-page .h-next--white { background: #fff; }
.h-page .h-next--white .h-next__card { background: var(--h-grey); }
.h-page .h-next--white .h-next__img { background: #fff; }
@media (min-width: 40rem) { .h-feat__list { grid-template-columns: 1fr 1fr; } }

/* ---------- 4 · Otros proyectos (gris) ---------- */
.h-next { background: var(--h-grey); color: var(--h-ink); display: grid; gap: 1rem; padding: 3rem var(--v-gut); }
.h-next__card { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: var(--h-r, 1rem); background: #fff; color: inherit; }
.h-next__card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--v-purple); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--v-ease); }
.h-next__card:hover::before { transform: none; }
.h-next__card:hover { color: #fff; }
.h-next__img { flex: none; width: 5.5rem; aspect-ratio: 1 / 1; border-radius: calc(.7 * var(--h-r, 1rem)); overflow: hidden; background: var(--h-grey); }
.h-next__img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 1s var(--v-ease); }
.h-next__card:hover .h-next__img img { transform: scale(1.06); }
.h-next__txt { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.h-next__lab { display: inline-flex; align-items: center; gap: .4em; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.h-next__lab .n-ico { width: 1em; height: 1em; }
.h-next__back { transform: rotate(180deg); }
.h-next__name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.h-next__card--r { justify-content: space-between; }
.h-next__card--r .h-next__txt { align-items: flex-start; }
.h-next__all { justify-self: center; order: 3; }
.h-next .n-ac__btn--ghost { color: var(--h-ink); border-color: rgba(11, 11, 13, .2); }
.h-next .n-ac__btn--ghost:hover { color: #fff; }

/* =================== PC =================== */
@media (min-width: 64rem) {
  .h-page { --h-gap: calc(1.2 * var(--v-u)); }
  .h-show { height: 100svh; min-height: calc(40 * var(--v-u)); gap: calc(1.8 * var(--v-u)); padding: calc(var(--header-h) + 1.6 * var(--v-u)) var(--v-gut) calc(2 * var(--v-u)); }
  .h-top { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: calc(3 * var(--v-u)); }
  .h-top__main { gap: calc(1 * var(--v-u)); }
  .h-top__title { font-size: calc(5.2 * var(--v-u)); white-space: nowrap; }
  .h-top__actions { gap: calc(.6 * var(--v-u)); padding-bottom: calc(.3 * var(--v-u)); }
  .h-det { width: min(36rem, 42vw); border-radius: var(--h-r) 0 0 var(--h-r); }
  .h-det__in { gap: calc(1.3 * var(--v-u)); padding: calc(1.6 * var(--v-u)) calc(2.6 * var(--v-u)) calc(3 * var(--v-u)); }
  .h-det__title { font-size: calc(3.6 * var(--v-u)); }
  .h-det__lead { font-size: calc(1.6 * var(--v-u)); }
  .h-det__p { font-size: calc(1.05 * var(--v-u)); }

  .h-gal { flex: 1 1 auto; min-height: 0; container-type: size; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: calc(4 * var(--v-u)); }
  .h-gal__media { width: min(52vw, 100cqh); }
  .h-gal__side { gap: calc(1.4 * var(--v-u)); align-self: center; height: var(--g-h, auto); }
  .h-gal__vp { flex: 1 1 0; min-height: 0; height: auto; }
  .h-gal__cap { font-size: calc(1.1 * var(--v-u)); }
  .h-gal__count { font-size: calc(.95 * var(--v-u)); }

  .h-feat { min-height: 100svh; justify-content: center; gap: calc(2.6 * var(--v-u)); padding: calc(var(--header-h-compact, 4.5rem) + 3 * var(--v-u)) var(--v-gut) calc(4 * var(--v-u)); }
  .h-feat__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(1 * var(--v-u)); }
  .h-feat__item { gap: calc(.6 * var(--v-u)); padding: calc(2.2 * var(--v-u)); min-height: calc(15 * var(--v-u)); }
  .h-feat__ic { width: calc(3.6 * var(--v-u)); height: calc(3.6 * var(--v-u)); margin-bottom: calc(1.2 * var(--v-u)); }
  .h-feat__ic .v-ic { width: calc(1.8 * var(--v-u)); height: calc(1.8 * var(--v-u)); }
  .h-feat__item strong { font-size: calc(1.7 * var(--v-u)); }
  .h-feat__item span:last-child { font-size: calc(1.05 * var(--v-u)); }
  .h-frame__bar { height: calc(2 * var(--v-u)); }
  .h-frame__bar b { font-size: calc(.75 * var(--v-u)); }
  .h-next { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: calc(2 * var(--v-u)); padding: calc(4 * var(--v-u)) var(--v-gut); }
  .h-next__all { order: 0; }
  .h-next__card { gap: calc(1.6 * var(--v-u)); padding: calc(1.2 * var(--v-u)); }
  .h-next__img { width: calc(11 * var(--v-u)); }
  .h-next__name { font-size: calc(3.2 * var(--v-u)); }
  .h-next__lab { font-size: calc(.8 * var(--v-u)); }
  .h-next__card--r { justify-content: flex-end; text-align: right; }
  .h-next__card--r .h-next__txt { align-items: flex-end; }
}

/* =========================================================
   Caso de estudio web (Ecolucerna): portada con mockup y resumen ·
   reto y solución · páginas del sitio (PC + celular) · funciones ·
   testimonio. Si un proyecto no tiene una sección, se quita.
   ========================================================= */
.h-hero { display: grid; gap: 1.4rem; }
.h-hero__media { margin: 0; aspect-ratio: 1 / 1; border-radius: var(--h-r, 1rem); overflow: hidden; background: var(--h-grey); border: 1px solid rgba(11, 11, 13, .1); }
.h-hero__media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.h-hero__txt { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.h-hero__lead { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.2; }
.h-hero__p { margin: 0; color: #5d5d66; line-height: 1.55; }

.h-case { background: var(--h-grey); color: var(--h-ink); display: flex; flex-direction: column; gap: 1.6rem; padding: 3.5rem var(--v-gut); }
.h-case__grid { display: grid; gap: .8rem; }
.h-case__col { display: flex; flex-direction: column; gap: .9rem; padding: 1.5rem; border-radius: var(--h-r, 1rem); background: #fff; }
.h-case__lab { display: inline-flex; align-items: center; gap: .55em; margin: 0; color: #6b6b73; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.h-case__lab .v-ic { width: 1.8em; height: 1.8em; }
.h-case__col--sol .h-case__lab { color: var(--v-purple); }
.h-case__h { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.045em; line-height: 1.08; }
.h-case__p { margin: 0; color: #5d5d66; line-height: 1.6; }

.h-pages { background: #fff; color: var(--h-ink); display: flex; flex-direction: column; gap: 1.6rem; padding: 3.5rem var(--v-gut); }
.h-gal--pages .h-gal__media { aspect-ratio: 4 / 3; container-type: inline-size; }
.h-gal--pages .h-gal__slide { position: relative; height: 75cqw; background: var(--h-grey); }
.h-gal--pages .h-frame--browser { position: absolute; left: 4cqw; top: 8cqw; width: 76cqw; }
.h-gal--pages .h-frame--browser img { aspect-ratio: 16 / 10; height: auto; }
.h-gal--pages .h-frame--phone { position: absolute; right: 5cqw; bottom: 5cqw; height: 58cqw; aspect-ratio: 600 / 1298; padding: 1cqw; border-radius: 4.4cqw; }
.h-gal--pages .h-frame--phone img { border-radius: 3.4cqw; }

.h-feat__item strong + span { color: #5d5d66; }
.h-page .h-feat--white { background: #fff; }
.h-page .h-feat--white .h-feat__item { background: var(--h-grey); }
.h-page .h-quote--grey { background: var(--h-grey); }
.h-page .h-quote--grey .h-quote__box { background: #fff; }

.h-quote { background: #fff; color: var(--h-ink); display: flex; flex-direction: column; gap: 1.6rem; padding: 3.5rem var(--v-gut); }
.h-quote__box { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1.3rem; padding: 1.6rem; border-radius: var(--h-r, 1rem); background: var(--h-grey); }
.h-quote__stars { color: var(--v-purple); font-size: 1.1rem; letter-spacing: .2em; }
.h-quote__text { margin: 0; }
.h-quote__text p { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.25; }
.h-quote__who { display: flex; align-items: center; gap: .9rem; }
.h-quote__who > span:last-child { display: flex; flex-direction: column; gap: .15rem; }
.h-quote__who strong { font-size: 1.05rem; }
.h-quote__who span span { color: #6b6b73; font-size: .88rem; }
.h-quote__av { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: var(--v-purple); color: #fff; font-weight: 800; font-size: 1.2rem; }

@media (max-width: 63.99rem) { .h-page .v-title--ic > span:last-child { white-space: normal; } }
@media (min-width: 40rem) {
  .h-case__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 64rem) {
  .h-hero { flex: 1 1 auto; min-height: 0; container-type: size; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: calc(4 * var(--v-u)); }
  .h-hero__media { width: min(52vw, 100cqh); }
  .h-hero__txt { gap: calc(1.4 * var(--v-u)); max-width: calc(40 * var(--v-u)); }
  .h-hero__lead { font-size: calc(2.4 * var(--v-u)); }
  .h-hero__p { font-size: calc(1.1 * var(--v-u)); max-width: 48ch; }

  .h-case, .h-quote { min-height: 100svh; justify-content: center; gap: calc(2.6 * var(--v-u)); padding: calc(var(--header-h-compact, 4.5rem) + 3 * var(--v-u)) var(--v-gut) calc(4 * var(--v-u)); }
  .h-case__grid { gap: calc(1 * var(--v-u)); }
  .h-case__col { gap: calc(1.2 * var(--v-u)); padding: calc(3 * var(--v-u)); min-height: calc(30 * var(--v-u)); }
  .h-case__lab { font-size: calc(.85 * var(--v-u)); }
  .h-case__h { font-size: calc(3 * var(--v-u)); margin-top: auto; }
  .h-case__p { font-size: calc(1.15 * var(--v-u)); max-width: 52ch; }

  .h-pages { height: 100svh; min-height: calc(40 * var(--v-u)); gap: calc(1.8 * var(--v-u)); padding: calc(var(--header-h-compact, 4.5rem) + 2 * var(--v-u)) var(--v-gut) calc(2 * var(--v-u)); }
  .h-gal--pages .h-gal__media { width: min(58vw, calc(100cqh * 4 / 3)); }

  .h-feat__list--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .h-feat__list--4 .h-feat__item { min-height: calc(22 * var(--v-u)); }

  .h-quote__box { gap: calc(2 * var(--v-u)); padding: calc(4 * var(--v-u)); }
  .h-quote__stars { font-size: calc(1.4 * var(--v-u)); }
  .h-quote__text p { font-size: calc(3.2 * var(--v-u)); max-width: 34ch; }
  .h-quote__who strong { font-size: calc(1.2 * var(--v-u)); }
  .h-quote__who span span { font-size: calc(.95 * var(--v-u)); }
  .h-quote__av { width: calc(3.6 * var(--v-u)); height: calc(3.6 * var(--v-u)); font-size: calc(1.4 * var(--v-u)); }
}

/* ---------- La web en un iMac y un celular (proyectos web): la página completa baja sola ---------- */
.h-dev { display: flex; flex-direction: column; gap: 1rem; }
/* De extremo a extremo: el iMac y el celular llenan todo el ancho, con una separación pequeña */
.h-dev__stage { --gap: 2cqw; --iw: calc((100cqw - var(--gap)) / 1.258); container-type: inline-size; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--gap); padding: 0; }
.h-imac { flex: none; width: var(--iw); display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 1.4rem 1.6rem rgba(11, 11, 13, .18)); }
.h-imac__body { width: 100%; padding: calc(var(--iw) * .016); background: #0e0e10; border-radius: calc(var(--iw) * .022) calc(var(--iw) * .022) 0 0; }
.h-imac__chin { width: 100%; height: calc(var(--iw) * .07); background: #dcdce1; border-radius: 0 0 calc(var(--iw) * .022) calc(var(--iw) * .022); }
.h-imac__neck { width: 17%; height: calc(var(--iw) * .1); background: #cbcbd1; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
.h-imac__foot { width: 30%; height: calc(var(--iw) * .014); background: #c2c2c8; border-radius: calc(var(--iw) * .006) calc(var(--iw) * .006) 2px 2px; }
.h-phone { flex: none; width: calc(var(--iw) * .24); padding: calc(var(--iw) * .009); background: #0e0e10; border-radius: calc(var(--iw) * .042); box-shadow: 0 1.4rem 2rem -1rem rgba(11, 11, 13, .35); }
.h-imac__screen, .h-phone__screen { position: relative; overflow: hidden; background: #fff; }
.h-imac__screen { aspect-ratio: 16 / 10; border-radius: 2px; }
.h-phone__screen { aspect-ratio: 390 / 844; border-radius: calc(var(--iw) * .034); }
.h-dev__pg { position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block; opacity: 0; transition: opacity .7s ease; will-change: transform; }
.h-dev__pg.is-on { opacity: 1; }
.h-dev__bar { order: -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; }
.h-dev__tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.h-dev__tab { padding: .55rem 1rem; border: 1px solid rgba(11, 11, 13, .15); border-radius: 999px; background: #fff; color: var(--h-ink); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.h-dev__tab:hover { border-color: var(--v-purple); color: var(--v-purple); }
.h-dev__tab.is-on { background: var(--v-purple); border-color: var(--v-purple); color: #fff; }
.h-dev__note { margin: 0; color: #6b6b73; font-size: .88rem; }
@media (min-width: 64rem) {
  .h-dev { flex: 1 1 auto; min-height: 0; gap: calc(1 * var(--v-u)); }
  .h-show--case { height: auto; }
  .h-dev { flex: none; }
  .h-dev__set { display: contents; }
  .h-dev__tab { padding: calc(.6 * var(--v-u)) calc(1.2 * var(--v-u)); font-size: calc(.95 * var(--v-u)); }
  .h-dev__note { font-size: calc(.95 * var(--v-u)); }
}
@media (hover: hover) and (pointer: fine) { .h-imac__body, .h-phone { cursor: ns-resize; } }
@media (prefers-reduced-motion: reduce) { .h-dev__pg { transition: none; } }

/* ---------- Proyectos de marca + web: títulos cortos de cada parte y la sección "La web" (gris) ---------- */
.h-chap { display: flex; align-items: center; gap: .7rem; margin: 0; font-size: 1.7rem; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.h-chap em { font-style: normal; color: var(--v-purple); }
.h-chap .v-tbadge { flex: none; }
.h-web { background: var(--h-grey); color: var(--h-ink); display: flex; flex-direction: column; gap: 1.4rem; padding: 3.5rem var(--v-gut); }
.h-web .h-dev__tab { background: #fff; }
.h-web .h-dev__tab.is-on { background: var(--v-purple); }
@media (min-width: 64rem) {
  .h-chap { font-size: calc(2.4 * var(--v-u)); gap: calc(.9 * var(--v-u)); }
  .h-show .h-chap { margin-bottom: calc(-.6 * var(--v-u)); }
  .h-web { gap: calc(1.6 * var(--v-u)); padding: calc(var(--header-h-compact, 4.5rem) + 2 * var(--v-u)) var(--v-gut) calc(4 * var(--v-u)); }
}

/* ---------- "La marca" como el slider de proyectos: nombres grandes con líneas a la izquierda y la foto
   cuadrada a la derecha, de alto completo y pegada al borde del navegador (solo PC) ---------- */
@media (min-width: 64rem) {
  .h-show--brand { --m: calc(100svh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1fr) var(--m); grid-template-rows: auto auto minmax(0, 1fr); column-gap: calc(4 * var(--v-u)); row-gap: calc(1.3 * var(--v-u)); padding: var(--header-h) 0 0 var(--v-gut); }
  .h-show--brand .h-top { grid-column: 1; grid-row: 1; flex-direction: column; align-items: flex-start; gap: calc(1.2 * var(--v-u)); padding-top: calc(1.6 * var(--v-u)); }
  .h-show--brand .h-top__title { font-size: calc(4.6 * var(--v-u)); }
  .h-show--brand .h-chap { grid-column: 1; grid-row: 2; margin: calc(.8 * var(--v-u)) 0 0; }
  .h-gal--brand { display: contents; }
  .h-gal--brand .h-gal__media { grid-column: 2; grid-row: 1 / -1; width: var(--m); height: var(--m); border: 0; border-radius: 0; }
  .h-gal--brand .h-gal__side { grid-column: 1; grid-row: 3; align-self: stretch; height: auto; min-height: 0; gap: 0; padding-bottom: calc(1.6 * var(--v-u)); }
  .h-gal--brand .h-gal__list li { border-top: 1px solid rgba(11, 11, 13, .1); }
  .h-gal--brand .h-gal__item { transform: none; opacity: 1; color: #b4b4bd; font-size: calc(.5 * var(--g-row, 3rem) * var(--g-fit, 1)); letter-spacing: -.04em; }
  .h-gal--brand .h-gal__item::before { content: ""; flex: none; width: 0; height: .24em; margin-right: 0; border-radius: 50%; background: var(--v-purple); transition: width .5s var(--v-ease), margin .5s var(--v-ease); }
  .h-gal--brand .h-gal__item:hover { color: #7d7d86; }
  .h-gal--brand .h-gal__item.is-on, .h-gal--brand .h-gal__item.is-on:hover { color: var(--h-ink); }
  .h-gal--brand .h-gal__item.is-on::before { width: .24em; margin-right: .4em; }
  .h-gal--brand .h-gal__foot { padding-top: calc(1 * var(--v-u)); }
  /* La frase siempre reserva 2 líneas, así la lista no cambia de alto y el último nombre no se corta */
  .h-gal--brand .h-gal__cap { min-height: 2.9em; }
}

/* ---------- Fondos que pone el generador (alternan blanco y gris); las tarjetas toman el color contrario ---------- */
.h-page .h-bg-white { background: #fff; }
.h-page .h-bg-grey { background: var(--h-grey); }
.h-page .h-bg-white .h-feat__item, .h-page .h-bg-white .h-case__col, .h-page .h-bg-white .h-quote__box, .h-page .h-bg-white .h-next__card { background: var(--h-grey); }
.h-page .h-bg-grey .h-feat__item, .h-page .h-bg-grey .h-case__col, .h-page .h-bg-grey .h-quote__box, .h-page .h-bg-grey .h-next__card { background: #fff; }
.h-page .h-bg-white .h-next__img { background: #fff; }
.h-page .h-bg-grey .h-next__img { background: var(--h-grey); }

@media (prefers-reduced-motion: reduce) {
  .h-det, .h-det::backdrop { transition: none; }
  .h-gal__slide, .h-gal__slide img, .h-gal__list, .h-gal__item, .h-next__card::before { transition: none !important; }
}

/* Botones sobre fondo claro: el relleno que sube es negro y el texto queda blanco */
.h-top .n-btn::before, .h-next .n-btn::before { background: #0b0b0d; }
.h-top .n-ac__btn:hover, .h-next .n-ac__btn:hover,
.h-top .n-ac__btn:focus-visible, .h-next .n-ac__btn:focus-visible { color: #fff; border-color: #0b0b0d; }
