/* =====================================================
   VARIABLES & RESET
   ===================================================== */
:root {
  --blue:    #0165FF;
  --dark:    #0C1821;
  --card-bg: #0A141D;
  --card-bd: #0D1B25;
  --white:   #FFFFFF;
  --muted:   #9FA6AD;
  --f-head:  "Gentium Book Basic", serif;
  --f-body:  "Manrope", sans-serif;
  --f-ui:    "Inter", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; overflow-x: hidden; }
body  {
  background: var(--dark);
  color: var(--white);
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  overflow-x: hidden;
}
img    { max-width: 100%; display: block; }
a      { text-decoration: none; color: inherit; }
ul     { list-style: none; }
button { cursor: pointer; border: none; background: none; }


/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* Pill — shrinks to its content */
.header-pill {
  pointer-events: all;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 10px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 0.2px solid rgba(255,255,255,0.12);
  background: rgba(34,47,54,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 50px;
  max-width: calc(100vw - 20px);
}

.header-logo img {
  width: 30px; height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 1.4s ease;
}
.header-logo img:hover { transform: rotate(360deg); }

.header-nav { display: flex; align-items: center; }
.header-nav a {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
.header-nav a:hover { background: rgba(140,144,161,0.13); transform: scale(1.07); }

.header-cta {
  pointer-events: all;
  margin-left: 6px;
  padding: 7px 18px;
  border-radius: 100px;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}
.header-cta:hover { background: #1370FF; transform: scale(1.05); }


/* Mobile pill wrapper — hidden on desktop */
.mobile-pill {
  display: none;
}

#mobile-nav {
  display: none;
}
#mobile-nav.open { display: flex; }


/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: url("../images/Fondo3.png") center center / cover no-repeat;
}

/* Floating sparkle icons */
.deco {
  position: absolute;
  pointer-events: none;
  animation: float 5s ease-in-out infinite;
}
.deco-1 { width: 95px; right: 19%; bottom: 33%; animation-delay: 0.0s; }
.deco-2 { width: 74px; right: 23%; bottom: 50%; animation-delay: 0.6s; }
.deco-3 { width: 27px; right: 31%; bottom: 69%; animation-delay: 1.2s; }
.deco-4 { width: 33px; right: 70%; bottom: 57%; animation-delay: 1.8s; }
.deco-5 { width:  7px; right: 80%; bottom: 61%; animation-delay: 2.4s; }
.deco-6 { width: 46px; right: 70%; bottom: 71%; animation-delay: 3.0s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}

/* Centred content column */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 100px 24px 80px;
}

/* Avatar + status-badge image */
.hero-avatar {
  width: 202px;
  max-width: 55vw;
  transition: transform 0.3s;
}
.hero-avatar:hover { transform: scale(1.05); }

/* Heading */
.hero-title {
  font-family: var(--f-head);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
}

/* Rotating word */
.word-rotate {
  color: var(--blue);
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.word-rotate.fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

/* CTA buttons */
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-white {
  background: var(--white);
  color: var(--dark);
  padding: 11px 26px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s;
}
.btn-white:hover { transform: scale(1.05); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
  background: transparent;
  color: var(--white);
  padding: 11px 26px;
  border-radius: 100px;
  border: 0.5px solid rgba(255,255,255,0.55);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s;
}
.btn-outline:hover { transform: scale(1.05); }

/* Bio */
.hero-bio {
  color: var(--muted);
  font-size: 14px;
  max-width: 400px;
  line-height: 1.7;
}

/* Bottom fade */
.hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 260px;
  background: linear-gradient(180deg, transparent 10%, var(--dark) 55%);
  z-index: 1;
  pointer-events: none;
}


/* =====================================================
   APP LOGOS BAND — infinite marquee
   ===================================================== */
.apps-band-inner {
  margin-top: 100px;
  width: min(640px, 90vw);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 14%, black 86%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 14%, black 86%, transparent 100%);
}

.apps-track {
  display: flex;
  width: max-content;
  animation: marquee 18s linear infinite;
}
.apps-track:hover { animation-play-state: paused; }

.apps-slide {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 0 18px;
}

.apps-slide img {
  height: 22px;
  width: auto;
  object-fit: contain;
  opacity: 0.6;
  filter: grayscale(15%);
  transition: opacity 0.25s, filter 0.25s;
  flex-shrink: 0;
}
.apps-slide img:hover { opacity: 1; filter: none; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* =====================================================
   SHARED SECTION WRAPPER
   ===================================================== */
.section-wrap,
.stack-wrap,
.proposito-wrap,
.personal-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* Star-bullet label */
.label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.label-row span {
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.sub-text { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.card-sub { color: var(--muted); font-size: 14px; margin: 6px 0 24px; }

.section-tag {
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  margin-bottom: 4px;
}
.section-heading {
  font-family: var(--f-head);
  font-size: clamp(26px, 4vw, 37px);
  font-weight: 700;
  margin-bottom: 6px;
}
.section-heading strong { color: var(--blue); font-weight: 700; }


/* =====================================================
   BENTO SECTION HEADER
   ===================================================== */
.bento-section {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 0;
  overflow: visible;
}

.bento-section::after {
  content: '';
  position: absolute;
  top: 5%;
  right: -400px;
  width: 1000px;
  height: 1000px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(1,101,255,0.35) 0%, rgba(1,101,255,0.12) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

.bento-intro {
  margin-bottom: 28px;
}

.bento-intro .section-tag {
  margin-bottom: 6px;
}

.bento-intro .section-heading {
  margin-bottom: 0;
}

/* =====================================================
   BENTO GRID
   ===================================================== */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  grid-template-rows: auto auto;
  gap: 14px;
  padding-bottom: 60px;
  position: relative;
  z-index: 1;
}

.b-card {
  background: var(--card-bg);
  border: 2px solid var(--card-bd);
  border-radius: 20px;
  padding: 26px;
  overflow: hidden;
}

.b-stack     { grid-column: 1;     grid-row: 1; display: flex; flex-direction: column; align-self: start; padding-bottom: 14px; }
.b-stack .scroll-fade { margin-top: auto; }
.b-proposito { grid-column: 2;     grid-row: 1; display: flex; flex-direction: column; }
.b-map       { grid-column: 3 / 5; grid-row: 1; padding: 0; position: relative; min-height: 280px; cursor: default; }
.b-ref       { grid-column: 1;     grid-row: 2; background: var(--blue); border-color: var(--blue); padding: 20px 24px; align-self: start; }
.b-libros    { grid-column: 2 / 4; grid-row: 2; }
.b-leinn     { grid-column: 4;     grid-row: 2; display: flex; align-items: flex-start; justify-content: flex-end; }

.leinn-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 100px;
  font-family: var(--f-ui);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.b-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 20px;
  line-height: 1.6;
}

/* ── Shared infinite scroll strip ── */
.scroll-fade {
  overflow: hidden;
  margin-top: auto;
  padding: 10px 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}
.scroll-track {
  display: flex;
  width: max-content;
  animation: marquee 14s linear infinite;
}
.scroll-track.scroll-slow { animation-duration: 22s; }
.scroll-track:hover { animation-play-state: paused; }

.scroll-slide {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 9px;
}

/* Tech icon images */
.scroll-slide img {
  width: 52px; height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.scroll-slide img:hover { transform: scale(1.15) translateY(-3px); }

/* Book images override */
.books-slide img {
  width: auto;
  height: 120px;
  border-radius: 6px;
  transition: transform 0.25s;
}
.books-slide img:hover { transform: scale(1.06) translateY(-4px); }

/* Emoji scatter field (propósito) */
.emoji-field {
  margin-top: auto;
  position: relative;
  height: 76px;
  /* extend to card right edge, flush with border */
  width: calc(100% + 26px);
  margin-right: -26px;
  background: linear-gradient(to right, #2D6BE4 0%, #8EC5FF 100%);
  border-radius: 100px 0 0 100px;
  overflow: hidden;
}

.ef-img {
  position: absolute;
  width: 28px; height: 28px;
  object-fit: contain;
  border-radius: 50%;
  will-change: transform;
}

/* Map card */
.b-map { padding: 0; position: relative; min-height: 260px; overflow: hidden; }

.map-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

/* Pulsing rings */
.map-pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(1, 101, 255, 0.22);
  transform: translate(-50%, -58%) scale(1);
  animation: map-pulse-out 2.6s ease-out infinite;
  transform-origin: center center;
  z-index: 1;
  pointer-events: none;
}
.map-pulse-ring-2 {
  animation-delay: 1.3s;
}

@keyframes map-pulse-out {
  0%   { transform: translate(-50%, -58%) scale(1);   opacity: 0.5; }
  100% { transform: translate(-50%, -58%) scale(1.7); opacity: 0; }
}

.map-avatar {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -58%);
  z-index: 3;
  animation: none;
}

.map-avatar img {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.map-badge {
  position: absolute;
  bottom: 14px; left: 14px;
  z-index: 3;
  background: rgba(34,47,54,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 0.2px solid rgba(255,255,255,0.18);
  color: var(--white);
  padding: 9px 20px;
  border-radius: 100px;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

@keyframes map-float {
  0%, 100% { transform: translate(-50%, -58%) scale(1); }
  50%       { transform: translate(-50%, -65%) scale(1.04); }
}


/* Referentes blue card */
.ref-title {
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 18px;
  line-height: 1.4;
}
.ref-title strong { font-weight: 700; }

.ref-circles {
  display: flex;
  align-items: center;
}
.ref-circles img {
  width: 54px; height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--blue);
  margin-left: -14px;
  transition: transform 0.25s, z-index 0s;
  position: relative;
}
.ref-circles img:first-child { margin-left: 0; }
.ref-circles img:hover { transform: translateY(-6px) scale(1.1); z-index: 5; }

/* Popup */
#popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#popup.visible { display: flex; }

.popup-box {
  position: relative;
  background: var(--card-bg);
  border: 3px solid var(--card-bd);
  border-radius: 20px;
  padding: 24px;
  max-width: 88vw;
  max-height: 85vh;
  text-align: center;
  animation: zoomIn 0.28s ease;
}
.popup-box img {
  max-width: 100%;
  max-height: 56vh;
  border-radius: 12px;
  object-fit: contain;
  margin-bottom: 14px;
}
.popup-box p { color: var(--white); font-family: var(--f-ui); font-size: 18px; font-weight: 600; }
.popup-close {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 22px;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
  line-height: 1;
}
.popup-close:hover { color: #00bfff; }

@keyframes zoomIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}


/* =====================================================
   HOBBY MAP MINI-GAME
   ===================================================== */
/* ── Personal section teaser ── */
.game-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}

.play-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: var(--card-bg);
  border: 2px solid var(--card-bd);
  border-radius: 24px;
  padding: 36px 48px;
  margin-top: 8px;
}

.play-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.play-chip {
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 6px 16px;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: #fff;
  font-family: var(--f-ui);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  animation: playPulse 2.2s ease-in-out infinite;
}
.play-btn:hover {
  background: #1370FF;
  transform: scale(1.06);
  animation: none;
  box-shadow: 0 6px 24px rgba(1,101,255,0.45);
}
.play-btn svg { flex-shrink: 0; }

@keyframes playPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(1,101,255,0.5); }
  50%       { box-shadow: 0 0 0 12px rgba(1,101,255,0); }
}

/* ── Fullscreen overlay ── */
.game-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #050D14;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.game-overlay.open {
  display: flex;
  animation: overlayIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes overlayIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.game-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%; height: 100%;
  padding: 14px 16px;
  box-sizing: border-box;
}

/* Top bar */
.game-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(calc((100vh - 160px) * 5 / 3), calc(100vw - 32px));
  flex-shrink: 0;
}
.gbar-title {
  font-family: var(--f-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  flex: 1;
  letter-spacing: 0.3px;
}
.gbar-hint {
  font-family: var(--f-ui);
  font-size: 12px;
  color: var(--muted);
}
.gbar-hint kbd {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: var(--f-ui);
}
.gbar-close {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s, transform 0.15s;
}
.gbar-close:hover { background: rgba(255,60,60,0.25); transform: scale(1.1); }

/* ── Map container ── */
.game-map {
  position: relative;
  width: min(calc((100vh - 160px) * 5 / 3), calc(100vw - 32px));
  aspect-ratio: 5 / 3;
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
  outline: none;
  flex-shrink: 0;
  cursor: none;
}
.game-map:focus-visible { border-color: rgba(1,101,255,0.4); }

/* World container — scaled + translated by JS camera */
.world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}

/* Canvas fills world */
#mapBg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
  border-radius: 12px;
}

/* CRT scanlines overlay */
.game-map::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.07) 3px,
    rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
  z-index: 50;
  border-radius: 12px;
}

/* ── Zone overlays (invisible hit areas over canvas buildings) ── */
.zone {
  position: absolute;
  border-radius: 10px;
  border: 2px solid transparent;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 6%;
  gap: 4px;
  pointer-events: none;
  z-index: 5;
  transition: box-shadow 0.35s;
}

.zone-icon {
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.8));
  opacity: 0;
  transform: scale(0.7) translateY(4px);
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.zone-label {
  font-family: var(--f-ui);
  font-size: clamp(7px, 0.9vw, 10px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.3s;
}

.zone.active .zone-icon  { opacity: 1; transform: scale(1) translateY(0); }
.zone.active .zone-label { opacity: 1; }

/* Zone positions */
.zone-montaña { left: 35%; top: 5%;  width: 30%; height: 38%; }
.zone-basket  { left: 4%;  top: 52%; width: 26%; height: 42%; }
.zone-tech    { left: 70%; top: 52%; width: 26%; height: 42%; }

/* Active zone glow */
.zone-montaña.active { box-shadow: inset 0 0 60px rgba(82,200,122,0.12), 0 0 60px rgba(82,200,122,0.15); }
.zone-basket.active  { box-shadow: inset 0 0 60px rgba(255,120,30,0.12),  0 0 60px rgba(255,120,30,0.18); }
.zone-tech.active    { box-shadow: inset 0 0 60px rgba(1,101,255,0.15),   0 0 60px rgba(1,101,255,0.22); }

/* ── Pixel-art character ── */
.char {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  z-index: 10;
  will-change: left, top;
  transform: translate(-50%, -100%);
}

.char-tag {
  font-family: var(--f-ui);
  font-size: 9px;
  font-weight: 800;
  background: rgba(1,101,255,0.95);
  color: #fff;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 10px rgba(1,101,255,0.5);
  transform: scale(var(--tag-scale, 0.6));
  transform-origin: center bottom;
}

#charCanvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.char-shadow {
  width: 22px; height: 5px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.6) 0%, transparent 70%);
  border-radius: 50%;
  margin-top: -2px;
}

/* Idle bob */
.char:not(.walking) #charCanvas {
  animation: charBob 1.6s ease-in-out infinite;
}
@keyframes charBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

/* ── Pokémon-style dialogue box ── */
.zone-card {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  background: #0C1020;
  border-top: 4px solid rgba(255,255,255,0.82);
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.08),
    0 -3px 0 #000,
    inset 0 0 0 2px rgba(255,255,255,0.06);
  padding: 6px 20px 14px;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.18s, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.zone-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.zone-card[data-zone="zone-montaña"] { border-top-color: rgba(82,200,122,0.9); }
.zone-card[data-zone="zone-basket"]  { border-top-color: rgba(255,140,50,0.9); }
.zone-card[data-zone="zone-tech"]    { border-top-color: rgba(1,130,255,0.9);  }

.zcard-badge {
  display: inline-block;
  margin-bottom: 4px;
  background: transparent;
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.4;
}
.zone-card[data-zone="zone-montaña"] .zcard-badge { color: rgba(82,200,122,0.95); }
.zone-card[data-zone="zone-basket"]  .zcard-badge { color: rgba(255,150,60,0.95); }
.zone-card[data-zone="zone-tech"]    .zcard-badge { color: rgba(60,150,255,0.95); }

.zcard-text {
  font-family: var(--f-ui);
  font-size: 13px;
  color: #e8eaf0;
  line-height: 1.7;
  min-height: 2.2em;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.zcard-arrow {
  font-size: 9px;
  color: rgba(255,255,255,0.55);
  animation: dlog-blink 0.9s step-end infinite;
  flex-shrink: 0;
  margin-bottom: 2px;
}
@keyframes dlog-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── D-pad ── */
.dpad {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}
.dpad-mid {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dpad-center {
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}
.dpad-btn {
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: var(--white);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.1s, transform 0.08s;
}
.dpad-btn:active {
  background: var(--blue);
  transform: scale(0.9);
}


/* =====================================================
   ROADMAP — Projects Timeline
   ===================================================== */
.roadmap-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  text-align: center;
  position: relative;
}

.roadmap-section .section-heading,
.roadmap-section .section-heading strong {
  color: var(--white);
}

.roadmap-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.roadmap-subtitle {
  max-width: 440px;
  margin: 0 auto 64px;
}

/* ── Timeline container ── */
.timeline {
  position: relative;
  text-align: left;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(1,101,255,0.2) 3%,
    rgba(1,101,255,0.45) 50%,
    rgba(1,101,255,0.2) 97%,
    transparent 100%
  );
  pointer-events: none;
}

/* ── Timeline item: 3-column grid ── */
.tl-item {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  margin-bottom: 44px;
  align-items: start;
}

.tl-spine  { grid-column: 2; grid-row: 1; }
.tl-left  .tl-card { grid-column: 1; grid-row: 1; padding-right: 24px; }
.tl-right .tl-card { grid-column: 3; grid-row: 1; padding-left: 24px; }

/* ── Spine ── */
.tl-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 22px;
  gap: 6px;
  position: relative;
  z-index: 2;
}

/* ── Dot ── */
.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dark);
  border: 2.5px solid var(--proj-color, var(--blue));
  box-shadow: 0 0 0 4px rgba(0,0,0,0.5), 0 0 14px var(--proj-color, var(--blue));
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tl-item:hover .tl-dot { transform: scale(1.5); }

.tl-dot-live {
  background: var(--proj-color, var(--blue));
  animation: liveDotPulse 2.2s ease-in-out infinite;
}

@keyframes liveDotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(0,0,0,0.5), 0 0 14px var(--proj-color, var(--blue)); }
  50%       { box-shadow: 0 0 0 8px rgba(1,101,255,0.12), 0 0 32px var(--proj-color, var(--blue)); }
}

/* ── Year label ── */
.tl-year {
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  white-space: nowrap;
  text-align: center;
}

/* ── Card ── */
.tl-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-bd);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  opacity: 0;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s ease;
}

.tl-left  .tl-card { transform: translateX(-48px); }
.tl-right .tl-card { transform: translateX(48px); }

.tl-card.tl-visible { opacity: 1; transform: translateX(0); }

.tl-card.tl-visible:hover {
  border-color: var(--proj-color, var(--blue));
  box-shadow: 0 0 0 1px var(--proj-color, var(--blue)), 0 14px 40px rgba(0,0,0,0.35);
  transform: translateY(-5px);
}

.tl-card-current {
  border-color: var(--proj-color, var(--blue));
  box-shadow: 0 0 32px rgba(1,101,255,0.1);
}

/* ── Logo placeholder ── */

/* ── Card body ── */
.tl-body { flex: 1; min-width: 0; }

.tl-cat {
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--proj-color, var(--blue));
  display: block;
  margin-bottom: 5px;
}

.tl-title {
  font-family: var(--f-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 14px;
}

.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.tl-chip {
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 3px 10px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.tl-card.tl-visible:hover .tl-chip {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}

/* ── "En marcha" live badge ── */
.tl-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  background: #16A34A;
  border-radius: 100px;
  padding: 2px 9px 2px 6px;
  vertical-align: middle;
  line-height: 1.4;
}

.tl-live-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: liveDotBlink 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes liveDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}


/* =====================================================
   FOOTER
   ===================================================== */
footer {
  border-top: 1px solid var(--card-bd);
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--f-ui);
}
footer a { color: var(--blue); }
footer a:hover { text-decoration: underline; }


/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 767px) {
  .header-pill { display: none; }

  /* Mobile pill */
  .mobile-pill {
    display: block;
    position: fixed;
    top: 10px;
    left: 12px;
    right: 12px;
    z-index: 101;
    border-radius: 100px;
    border: 0.2px solid rgba(255,255,255,0.12);
    background: rgba(34,47,54,0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: all;
  }
  .mobile-pill.open {
    border-radius: 22px;
    overflow: hidden;
  }

  .mobile-pill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    min-height: 50px;
  }

  .mobile-pill-nav {
    display: none;
    flex-direction: column;
    padding: 4px 10px 14px;
    gap: 4px;
  }
  .mobile-pill-nav.open {
    display: flex;
  }
  .mobile-pill-nav a {
    padding: 10px 16px;
    border-radius: 100px;
    font-size: 15px;
    color: var(--white);
    white-space: nowrap;
    transition: background 0.2s;
  }
  .mobile-pill-nav a:hover,
  .mobile-pill-nav a:active { background: rgba(140,144,161,0.13); }

  .mobile-cta {
    margin-top: 6px;
    display: block;
    text-align: center;
    background: var(--blue) !important;
    color: var(--white) !important;
    border-radius: 100px;
  }
  .mobile-cta:hover { background: #1370FF !important; }
  .deco        { display: block; }
  .deco-1 { width: 60px; right: 4%;  bottom: 45%; }
  .deco-2 { width: 46px; right: 6%;  bottom: 52%; }
  .deco-3 { width: 18px; right: 14%; bottom: 74%; }
  .deco-4 { width: 22px; left: 4%;   bottom: 52%; right: auto; }
  .deco-5 { width:  6px; left: 10%;  bottom: 62%; right: auto; }
  .deco-6 { width: 30px; left: 5%;   bottom: 68%; right: auto; }
  .hero-avatar { width: 160px; }
  .dpad      { display: flex; }
  .gbar-hint { display: none; }
  .game-map  { width: calc(100vw - 32px); }
  .game-bar  { width: calc(100vw - 32px); }

  .bento-section { padding: 40px 16px 0; overflow: hidden; }
  .bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
  }
  .b-stack, .b-proposito, .b-map,
  .b-libros, .b-ref, .b-leinn {
    grid-column: 1;
    grid-row: auto;
  }
  .b-map { min-height: 220px; }
  .b-leinn { justify-content: center; }

  .books-row img { height: 120px; }
  .ref-circles img { width: 44px; height: 44px; margin-left: -10px; }

  /* Roadmap mobile: line on the left, all cards on the right */
  .roadmap-section { padding: 40px 16px 60px; }
  .roadmap-subtitle { margin-bottom: 40px; }

  .timeline::before {
    left: 20px;
    transform: none;
  }

  .tl-item {
    grid-template-columns: 44px 1fr;
    margin-bottom: 28px;
  }

  .tl-spine          { grid-column: 1; grid-row: 1; padding-top: 18px; width: 44px; }
  .tl-left  .tl-card,
  .tl-right .tl-card {
    grid-column: 2; grid-row: 1;
    padding-left: 14px;
    padding-right: 0;
    transform: translateX(30px);
  }
  .tl-card.tl-visible { transform: translateX(0); }

  .tl-title     { font-size: 15px; }
  .tl-year      { font-size: 9px; letter-spacing: 0.5px; }
  .tl-card      { padding: 14px; gap: 12px; }
  .tl-desc      { font-size: 12px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .b-stack     { grid-column: 1; grid-row: 1; }
  .b-proposito { grid-column: 2; grid-row: 1; }
  .b-map       { grid-column: 1 / 3; grid-row: 2; min-height: 260px; }
  .b-ref    { grid-column: 1; grid-row: 3; }
  .b-libros { grid-column: 2; grid-row: 3; }
}
