/* ─────────────────────────────────────────────────────────────
   PROMOBRAND · identidad Refresh (Camino 2030)
   Paleta: negro #2E2D2C · gris #BDBCBC · aqua #5EBFBB · blanco #F6F6F6
   Tipografía: Gotham en las piezas; en la web, Montserrat (equivalente libre)
   y Anton para los titulares condensados, cerca del logotipo.
   ───────────────────────────────────────────────────────────── */
:root {
  --negro: #2e2d2c;
  --negro-2: #252423;
  --gris: #bdbcbc;
  --aqua: #5ebfbb;
  --blanco: #f6f6f6;
  --texto: var(--negro);
  --fondo: var(--blanco);
  --linea: color-mix(in srgb, currentColor 22%, transparent);

  --sans: "Montserrat", "Gotham", ui-sans-serif, system-ui, sans-serif;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --rail: 0px;
  --top-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 1100px) {
  :root { --rail: 56px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--top-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--negro);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--aqua); color: var(--negro); }
:focus-visible { outline: 2px dashed var(--aqua); outline-offset: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--aqua); color: var(--negro); padding: 10px 14px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: calc(var(--gutter) + var(--rail)) var(--gutter);
}
.dark { background: var(--negro); color: var(--blanco); }
.light { background: var(--blanco); color: var(--negro); }
section, .foot { padding-block: clamp(80px, 12vw, 160px); position: relative; }

/* Logo (Refresh.ai) como máscara: toma el color del texto */
.logo {
  display: block;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
.logo-h { --src: url(../img/logo-h.svg); aspect-ratio: 624.38 / 102.09; }
.logo-stack { --src: url(../img/logo-stack.svg); aspect-ratio: 309.4 / 218.4; }

/* ───────── Trazos a mano (aqua) ───────── */
/* Los trazos viven en <symbol>: el dibujado se hereda desde el <svg> (los selectores no entran al <use>). */
.trazo {
  fill: none; stroke: var(--aqua); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; overflow: visible;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.drawn .trazo, .trazo.drawn { transition: stroke-dashoffset 1s var(--ease); stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .trazo { stroke-dashoffset: 0 !important; transition: none !important; }
}

/* ───────── Cabecera ───────── */
.top {
  position: fixed; inset: 0 0 auto; z-index: 40;
  height: var(--top-h);
  color: var(--blanco);
  background: color-mix(in srgb, var(--negro) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px dashed color-mix(in srgb, var(--aqua) 45%, transparent);
}
.top-in {
  height: 100%;
  max-width: 1440px; margin-inline: auto;
  padding-inline: calc(var(--gutter) + var(--rail)) var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: block; width: 158px; color: var(--blanco); }
.nav { margin-left: auto; display: flex; gap: clamp(18px, 2.4vw, 36px); }
.nav a {
  text-decoration: none; text-transform: uppercase;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  position: relative; padding-block: 6px;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--aqua); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }
.ig { display: grid; place-items: center; width: 36px; height: 36px; color: currentColor; }
.ig svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ig .dot { fill: currentColor; stroke: none; }
.ig:hover { color: var(--aqua); }

.menu-btn { display: none; }
.menu[hidden] { display: none; }

@media (max-width: 860px) {
  .nav, .top .ig { display: none; }
  .brand { width: 140px; }
  .menu-btn {
    display: grid; align-content: center; gap: 7px;
    margin-left: auto; width: 44px; height: 44px; padding: 0 8px;
    background: none; border: 0; cursor: pointer; color: var(--blanco);
  }
  .menu-btn span { display: block; height: 2px; background: currentColor; transition: transform 0.3s var(--ease); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .menu {
    position: fixed; inset: var(--top-h) 0 0; z-index: 39;
    background: var(--negro); color: var(--blanco);
    padding: 32px var(--gutter);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow-y: auto;
  }
  .menu nav { display: grid; }
  .menu nav a {
    font-family: var(--display); text-transform: uppercase; text-decoration: none;
    font-size: clamp(44px, 14vw, 72px); line-height: 1.08;
    border-bottom: 1px dashed color-mix(in srgb, var(--aqua) 40%, transparent);
    padding-block: 6px;
  }
  .menu nav a:active { color: var(--aqua); }
  .menu-mail { color: var(--aqua); font-weight: 600; padding-top: 28px; }
}

/* ───────── Banda vertical (como en el KV) ───────── */
.rail { display: none; }
@media (min-width: 1100px) {
  .rail {
    position: fixed; z-index: 30; left: 0; top: var(--top-h); bottom: 0; width: var(--rail);
    display: flex; flex-direction: column; justify-content: space-around; align-items: center;
    color: #fff; mix-blend-mode: difference; pointer-events: none;
  }
  .rail span {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-family: var(--display); font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  }
  .rail sup { font-family: var(--sans); font-size: 8px; }
}

/* ───────── Títulos ───────── */
.title {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(54px, 10vw, 150px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin-bottom: clamp(36px, 6vw, 72px);
}
.title i { font-style: normal; color: var(--aqua); }
.mark { position: relative; display: inline-block; }
.mark .trazo.subrayado { position: absolute; left: -2%; width: 104%; bottom: -0.16em; height: 0.2em; }

/* ───────── Inicio ───────── */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--top-h) + clamp(40px, 7vw, 90px));
  padding-bottom: clamp(60px, 9vw, 110px);
  display: flex; align-items: center;
  background:
    radial-gradient(120% 80% at 85% 10%, color-mix(in srgb, var(--aqua) 10%, transparent), transparent 60%),
    var(--negro);
}
.hero-in { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 5vw, 80px); align-items: end; }
.hero-words {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(60px, 11.5vw, 188px); line-height: 0.95;
  display: grid; justify-items: start;
}
.hero-words .w { position: relative; color: color-mix(in srgb, var(--blanco) 30%, transparent); transition: color 0.5s var(--ease); }
.hero-words .w.on { color: var(--blanco); }
.hero-words .w .trazo { position: absolute; left: -8%; top: -14%; width: 116%; height: 128%; stroke-width: 3; }
.hero-side { display: grid; gap: clamp(28px, 4vw, 48px); justify-items: end; color: var(--blanco); }
.hero-side .logo-stack { width: clamp(150px, 19vw, 290px); }
.badge {
  display: grid; justify-items: center; line-height: 1;
  padding: 16px 22px 14px;
  border: 1px dashed var(--aqua);
  font-family: var(--display); text-transform: uppercase;
}
.badge b { font-weight: 400; font-size: clamp(54px, 6vw, 84px); color: var(--aqua); }
.badge span { font-size: 18px; letter-spacing: 0.3em; margin-right: -0.3em; padding-top: 4px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; width: 54px; height: 54px; transform: translateX(-50%);
}
.scroll-cue .trazo { width: 100%; height: 100%; transform: rotate(18deg); stroke-width: 3; }
@media (max-width: 860px) {
  .hero { min-height: 92svh; }
  .hero-words { font-size: clamp(60px, 17.5vw, 120px); }
  .hero-in { grid-template-columns: 1fr; }
  .hero-side { grid-auto-flow: column; justify-content: space-between; align-items: end; justify-items: start; }
  .hero-side .logo-stack { width: 132px; }
  .badge { padding: 10px 14px 9px; }
  .badge span { font-size: 14px; }
  .scroll-cue { display: none; }
}

/* ───────── Qué hacemos ───────── */
.lead {
  position: relative;
  max-width: 30ch;
  font-size: clamp(24px, 3.2vw, 44px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: clamp(56px, 8vw, 110px);
  padding-left: clamp(30px, 3vw, 44px);
}
.lead .trazo.comillas { position: absolute; left: 0; top: -0.1em; width: clamp(24px, 2.4vw, 34px); height: clamp(24px, 2.4vw, 34px); stroke-width: 3; }
.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px dashed var(--aqua);
}
.svc {
  padding: 28px clamp(16px, 2vw, 30px) 36px 0;
  border-right: 1px dashed color-mix(in srgb, var(--aqua) 60%, transparent);
  margin-right: clamp(16px, 2vw, 30px);
}
.svc:last-child { border-right: 0; margin-right: 0; }
.svc h3 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(34px, 3.4vw, 52px); line-height: 1; margin-bottom: 22px;
}
.svc h3 i { font-style: normal; color: var(--aqua); }
.svc .sub { font-weight: 700; margin-top: 14px; }
.svc .sub:first-of-type { margin-top: 0; }
.svc ul + .sub { margin-top: 14px; }
.svc li { font-weight: 400; color: color-mix(in srgb, var(--negro) 82%, transparent); }
.svc li::before { content: "_"; color: var(--aqua); font-weight: 700; margin-right: 2px; }
@media (max-width: 960px) {
  .services { grid-template-columns: 1fr 1fr; }
  .svc:nth-child(2) { border-right: 0; margin-right: 0; }
  .svc:nth-child(n + 3) { border-top: 1px dashed color-mix(in srgb, var(--aqua) 60%, transparent); }
}
@media (max-width: 520px) {
  .svc { padding-right: 10px; margin-right: 14px; font-size: 15px; }
  .svc:nth-child(even) { margin-right: 0; }
}

/* ───────── Portfolio ───────── */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 22px); }
.case {
  position: relative; overflow: hidden; cursor: pointer;
  aspect-ratio: 563 / 435;
  border: 0; padding: 0; color: var(--blanco); font: inherit;
  background: var(--negro-2);
  display: grid; place-items: center;
  isolation: isolate;
}
.case::before, .case::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--img) center / cover no-repeat;
  transition: opacity 0.6s var(--ease), transform 1.2s var(--ease);
}
.case::after { background-image: var(--img-b); opacity: 0; }
.case:hover::before, .case:focus-visible::before { transform: scale(1.05); }
.case:hover::after, .case:focus-visible::after { opacity: 1; transform: scale(1.05); }
.case img { width: min(46%, 230px); height: auto; filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.45)); transition: transform 0.6s var(--ease); }
.case:hover img { transform: translateY(-8px); }
.case-more {
  position: absolute; left: 18px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.plus {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px dashed var(--aqua); border-radius: 50%; color: var(--aqua);
  font-size: 22px; line-height: 1; font-weight: 300;
  transition: background 0.3s, color 0.3s;
}
.case:hover .plus { background: var(--aqua); color: var(--negro); }
@media (max-width: 640px) {
  .cases { grid-template-columns: 1fr; }
}

/* ───────── Clientes ───────── */
.clients {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px dashed var(--aqua);
  border-left: 1px dashed color-mix(in srgb, var(--aqua) 60%, transparent);
}
.clients li {
  aspect-ratio: 3 / 2; display: grid; place-items: center; padding: 14% 18%; min-width: 0;
  border-right: 1px dashed color-mix(in srgb, var(--aqua) 60%, transparent);
  border-bottom: 1px dashed color-mix(in srgb, var(--aqua) 60%, transparent);
}
.clients img { width: 100%; height: 100%; min-height: 0; object-fit: contain; filter: grayscale(1); opacity: 0.85; transition: opacity 0.3s, transform 0.4s var(--ease); }
.clients li:hover img { opacity: 1; transform: scale(1.06); }
@media (max-width: 960px) { .clients { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); } .clients li { padding: 16%; } }

/* ───────── Staff ───────── */
.staff-photo { margin: 0; border-top: 1px dashed var(--aqua); border-bottom: 1px dashed var(--aqua); padding-block: clamp(12px, 2vw, 24px); }
.staff-photo img { width: 100%; height: auto; }
.team {
  display: none;
  grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 28px;
}
.team li { display: grid; border-left: 2px solid var(--aqua); padding-left: 12px; }
.team b { font-weight: 600; }
.team span { color: var(--aqua); font-style: italic; font-weight: 300; }
@media (max-width: 760px) {
  .team { display: grid; }
}

/* ───────── Partners ───────── */
.partners { padding-block: clamp(70px, 9vw, 120px); }
.partner-list { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(36px, 7vw, 110px); }
.partner-list img { height: clamp(46px, 5.5vw, 74px); width: auto; filter: grayscale(1); opacity: 0.85; transition: opacity 0.3s; }
.partner-list a:hover img { opacity: 1; }

/* ───────── Contacto / pie ───────── */
.foot { padding-bottom: 36px; }
.mail-row { display: flex; align-items: flex-end; gap: clamp(10px, 2vw, 26px); flex-wrap: wrap; }
.mail-row .trazo { width: clamp(64px, 8vw, 120px); height: clamp(60px, 7.5vw, 112px); flex: none; }
.mail {
  font-family: var(--display); text-decoration: none;
  font-size: clamp(30px, 6.6vw, 104px); line-height: 1; letter-spacing: 0.005em;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--aqua), var(--aqua)) left bottom / 0 3px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
  padding-bottom: 6px;
}
.mail:hover { color: var(--aqua); background-size: 100% 3px; }
.foot-bottom {
  margin-top: clamp(70px, 10vw, 140px);
  padding-top: 26px; border-top: 1px dashed var(--aqua);
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
}
.foot-bottom .logo-h { width: clamp(150px, 16vw, 220px); }
.claim {
  justify-self: center;
  font-family: var(--display); text-transform: uppercase; text-align: center;
  font-size: 20px; line-height: 0.98; color: var(--gris);
  border: 1px dashed color-mix(in srgb, var(--aqua) 70%, transparent);
  padding: 8px 12px;
}
.legal { margin-top: 18px; font-size: 13px; color: var(--gris); }
@media (max-width: 640px) {
  .foot-bottom { grid-template-columns: 1fr auto; }
  .claim { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
}

/* ───────── Galería ───────── */
.gallery {
  width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: color-mix(in srgb, var(--negro) 97%, black); color: var(--blanco);
}
.gallery::backdrop { background: rgba(0, 0, 0, 0.6); }
.gallery[open] { display: grid; grid-template-rows: auto 1fr; }
.g-head {
  display: flex; align-items: center; gap: 18px;
  padding: 16px var(--gutter); border-bottom: 1px dashed color-mix(in srgb, var(--aqua) 50%, transparent);
}
.g-title { font-family: var(--display); font-size: 26px; text-transform: uppercase; }
.g-count { color: var(--gris); font-size: 14px; font-variant-numeric: tabular-nums; }
.g-close {
  margin-left: auto; width: 44px; height: 44px; font-size: 30px; line-height: 1;
  background: none; color: var(--blanco); border: 1px dashed var(--aqua); border-radius: 50%; cursor: pointer;
}
.g-close:hover { background: var(--aqua); color: var(--negro); }
.g-stage { position: relative; min-height: 0; display: grid; }
.g-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  min-height: 0;
}
.g-track::-webkit-scrollbar { display: none; }
.g-track figure {
  flex: 0 0 100%; margin: 0; scroll-snap-align: center;
  display: grid; place-items: center; padding: clamp(12px, 3vw, 40px);
  min-height: 0;
}
.g-track img { max-width: 100%; max-height: 100%; object-fit: contain; }
.g-prev, .g-next {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 52px; height: 52px; border-radius: 50%;
  background: color-mix(in srgb, var(--negro) 70%, transparent); color: var(--blanco);
  border: 1px dashed var(--aqua); font-size: 32px; line-height: 1; cursor: pointer;
}
.g-prev { left: 14px; }
.g-next { right: 14px; }
.g-prev:hover, .g-next:hover { background: var(--aqua); color: var(--negro); }
.g-prev:disabled, .g-next:disabled { opacity: 0.25; cursor: default; background: transparent; color: var(--blanco); }
@media (max-width: 700px) { .g-prev, .g-next { display: none; } }

/* ───────── Aparición al hacer scroll ───────── */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
}
