/* ============ Helpers de color ============ */
.text-blue { color: var(--blue); }
.text-ink  { color: var(--ink); }
.text-cream { color: var(--cream); }

/* ============ Botones ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}

.btn--dark {
  padding: 9px 20px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--cream);
  background: var(--ink);
}
.btn--dark:hover {
  background: var(--blue);
  color: var(--cream);
}

.btn--cream {
  padding: 15px 28px;
  font-size: .95rem;
  color: var(--ink);
  background: var(--cream);
}
.btn--cream:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn--ghost-cream {
  padding: 13px 26px;
  font-size: .95rem;
  color: var(--cream);
  border: 2px solid var(--cream);
}
.btn--ghost-cream:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

/* ============ Enlaces con roll (nav) ============ */
.roll {
  display: inline-block;
  overflow: hidden;
  height: 1.4em;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}
.roll__inner {
  display: block;
  transition: transform .4s var(--ease-roll);
}
.roll__inner > span {
  display: block;
}
.roll__inner > span:last-child {
  color: var(--blue);
}
.roll:hover .roll__inner {
  transform: translateY(-50%);
}

/* ============ Selector de idioma ============ */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  padding: 6px 12px;
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .76rem;
  letter-spacing: .04em;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.lang__sep { opacity: .3; }
.lang [data-lang-en] { opacity: .4; }

/* ============ Burger + menú móvil ============ */
.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease-out);
}
.burger[data-open="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.burger[data-open="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

@media (max-width: 992px) {
  .burger { display: inline-flex; }
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: clamp(24px, 8vw, 60px);
  background: var(--ink);
  color: var(--cream);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s;
}
.menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
}
.menu__link {
  padding: 4px 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 6.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  word-break: break-word;
}
.menu__link--accent { color: var(--blue); }

/* ============ Estado / indicador de scroll ============ */
.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(.85rem, 1.3vw, 1rem);
  letter-spacing: -.01em;
}

.scroll-ind {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-ind__bar {
  display: inline-block;
  width: 2px;
  height: 24px;
  background: var(--ink);
}

/* ============ Marquee ============ */
.marquee {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ink);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.marquee__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  padding: 12px 0;
}
.marquee__track--main {
  animation: marquee 26s linear infinite;
}
.marquee__track--sub {
  animation: marquee-rev 30s linear infinite;
  border-top: 1px solid rgba(241, 237, 228, .16);
}
.marquee__row {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-right: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--cream);
}
.marquee__row--sub {
  gap: 26px;
  padding-right: 26px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(.85rem, 1.6vw, 1.1rem);
  letter-spacing: .16em;
  color: var(--text-faint);
}
.marquee__stroke {
  color: transparent;
  -webkit-text-stroke: 1px var(--cream);
}

/* ============ Caja de estadísticas (manifiesto) ============ */
.stats {
  flex: 1 1 280px;
  display: grid;
  overflow: hidden;
  background: var(--cream-panel);
  border: 2px solid var(--ink);
  border-radius: 14px;
}
.stats__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 2px solid var(--ink);
}
.stats__row:last-child { border-bottom: none; }
.stats__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
}
.stats__label {
  font-size: .82rem;
  text-align: right;
  color: var(--text-muted);
}

.btn--blue {
  padding: 13px 24px;
  font-size: .9rem;
  color: var(--cream);
  background: var(--blue);
}
.btn--blue:hover {
  background: var(--ink);
  color: var(--cream);
}

/* ============ Tarjetas de proyecto ============ */
.card {
  flex: 1 1 300px;
  max-width: 520px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border: 2px solid var(--ink);
  border-radius: 18px;
  text-decoration: none;
  transition: box-shadow .35s;
}
.card--cream {
  background: var(--cream-panel);
  color: var(--ink);
}
.card--cream:hover { box-shadow: 8px 10px 0 var(--blue); }
.card--ink {
  background: var(--ink);
  color: var(--cream);
}
.card--ink:hover { box-shadow: 8px 10px 0 var(--blue); }
.card--blue {
  background: var(--blue);
  color: var(--cream);
}
.card--blue:hover { box-shadow: 8px 10px 0 var(--ink); }

.card__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: auto;
}
.card__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
}
.card__arrow {
  display: inline-block;
  font-size: 1.4rem;
  transition: transform .35s var(--ease-out);
}
.card:hover .card__arrow {
  transform: translate(4px, -4px);
}
.card__title {
  margin: 34px 0 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.card__desc {
  margin: 0 0 18px;
  line-height: 1.65;
  font-size: .95rem;
}
.card--cream .card__desc { color: var(--text-soft); }
.card--ink .card__desc { color: var(--on-dark); }
.card--blue .card__desc { color: var(--on-blue); }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card__tech {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.card--cream .card__tech { color: var(--text-muted); }
.card--ink .card__tech { color: var(--text-faint); }
.card--blue .card__tech { color: var(--on-blue-soft); }
.card__cta {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Badge de estado (En vivo / Próximamente) */
.card__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .7;
}
.card__cd {
  font-variant-numeric: tabular-nums;
}
.card--soon .card__num { opacity: .5; }

/* ============ Modal de proyecto ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
.modal[data-open="true"] {
  opacity: 1;
  visibility: visible;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, .55);
  backdrop-filter: blur(4px);
}
.modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: clamp(26px, 4vw, 40px);
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow: 10px 12px 0 var(--blue);
  transform: translateY(16px);
  transition: transform .35s var(--ease-out);
}
.modal[data-open="true"] .modal__panel {
  transform: translateY(0);
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
}
.modal__eyebrow {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
}
.modal__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.modal__desc {
  margin: 0;
  line-height: 1.7;
  font-size: 1rem;
  color: var(--text-soft);
}
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.modal__link { display: none; }
.modal__soon {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .02em;
  color: var(--text-muted);
}

/* ============ Mosaicos de stack ============ */
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(14px, 2vw, 22px) 10px;
  background: var(--cream-panel);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.tile:hover {
  transform: translateY(-5px);
  box-shadow: 5px 6px 0 var(--blue);
  border-color: var(--blue);
}
.tile img,
.tile svg {
  width: clamp(34px, 5vw, 44px);
  height: clamp(34px, 5vw, 44px);
  object-fit: contain;
}
.tile span {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-soft);
}

/* ============ Roll en contacto (sobre azul) ============ */
.roll--contact {
  color: var(--cream);
}
.roll--contact .roll__inner > span:last-child {
  color: var(--ink);
}

/* ============ Botón volver arriba ============ */
.totop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--cream);
  background: transparent;
  border: 2px solid rgba(241, 237, 228, .4);
  border-radius: 50%;
  cursor: pointer;
  transition: background .3s, border-color .3s, color .3s;
}
.totop:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--cream);
}
.totop span { display: block; }

.btn--ghost-ink {
  padding: 9px 20px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
}
.btn--ghost-ink:hover {
  background: var(--ink);
  color: var(--cream);
}

/* ============ Banner de consentimiento ============ */
.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 220;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--cream-panel);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 8px 0 var(--blue);
  transform: translateY(140%);
  opacity: 0;
  visibility: hidden;
  transition: transform .45s var(--ease-out), opacity .45s ease, visibility .45s;
}
.consent[data-open="true"] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.consent__text {
  flex: 1 1 auto;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--text-soft);
}
.consent__actions {
  flex: none;
  display: flex;
  gap: 10px;
}

@media (max-width: 560px) {
  .consent {
    flex-direction: column;
    align-items: stretch;
  }
  .consent__actions {
    justify-content: flex-end;
  }
}

/* ============ Cursor personalizado ============ */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
}
