/* ============================================================
   Reality — portfolio. Estetica urbana limpia.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:         #ede2c5;
  --bg-deep:    #d9cca8;
  --ink:        #161310;
  --ink-soft:   #5a4e3a;
  --paper:      #f4eddc;
  --accent:     #c2371a;
  --accent-2:   #d9b04a;
  --line:       #161310;

  --font-display: 'Anton', 'Helvetica Neue', Arial Black, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

canvas#scene {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  display: block; z-index: 1;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  display: grid; place-items: center;
  transition: opacity .6s ease;
}
#loader.gone { opacity: 0; pointer-events: none; }
.loader-inner { width: min(420px, 80vw); text-align: center; }
.loader-name {
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 112px);
  letter-spacing: .12em;
  line-height: 1;
  text-transform: uppercase;
}
.loader-bar {
  margin: 28px 0 12px;
  height: 2px;
  background: rgba(22,19,16,.15);
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%; width: 0%;
  background: var(--ink);
  transition: width .25s ease;
}
.loader-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--ink-soft);
}

/* ---------- Topbar ---------- */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }

.brand {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .15em;
  text-transform: uppercase;
  line-height: 1;
}
.brand::after {
  content: "";
  display: block;
  height: 4px;
  width: 32%;
  background: var(--accent);
  margin-top: 5px;
}

.nav { display: flex; gap: 26px; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--accent); border-color: var(--accent); }

.hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-soft);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hint kbd {
  display: inline-block;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
}

/* ---------- Floating prompts ---------- */
.prompt[hidden] { display: none !important; }
#prompts { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.prompt {
  position: absolute;
  transform: translate(-50%, -120%);
  pointer-events: auto;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(22,19,16,.35);
  animation: bob 1.6s ease-in-out infinite;
  border-radius: 2px;
}
.prompt::before {
  content: "";
  position: absolute;
  bottom: -5px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--ink);
}
.prompt:hover { background: var(--accent); }
.prompt:hover::before { background: var(--accent); }

.prompt-icon {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  border: 1px solid var(--bg);
  border-radius: 50%;
  font-size: 10px;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, -120%); }
  50%      { transform: translate(-50%, -135%); }
}

/* ---------- Overlay lateral ---------- */
#overlay[hidden] { display: none !important; }
#overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw);
  z-index: 50;
  background: var(--paper);
  border-left: 1px solid var(--ink);
  box-shadow: -20px 0 60px rgba(20, 16, 10, 0.25);
  display: flex;
  flex-direction: column;
  animation: slideIn .35s cubic-bezier(.2,.7,.2,1);
  font-family: var(--font-body);
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

#overlay-inner {
  flex: 1;
  overflow-y: auto;
  padding: 60px 36px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.overlay-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none; border: none;
  font-size: 30px; line-height: 1;
  color: var(--ink); cursor: pointer;
  padding: 4px 10px;
  z-index: 2;
}
.overlay-close:hover { color: var(--accent); }

.overlay-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
}
.overlay-cover canvas { width: 100%; height: 100%; display: block; }

.overlay-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
}
.overlay-eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--accent);
}

.overlay-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  line-height: 0.95;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
}

.overlay-meta {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 38ch;
}

.overlay-hint {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(22,19,16,.15);
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--ink-soft);
}
.overlay-hint kbd {
  display: inline-block;
  background: var(--ink); color: var(--bg);
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  margin: 0 2px;
  border-radius: 2px;
}

/* ---------- Lista de fechas ---------- */
.shows-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}
.show-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(22,19,16,.12);
}
.show-row > div { display: flex; flex-direction: column; }
.show-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.show-city-name {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.show-venue {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
}
.show-buy {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--ink);
  padding: 10px 14px;
  white-space: nowrap;
  transition: background .15s;
  border-radius: 2px;
}
.show-buy:hover { background: var(--accent); }

/* ---------- Ayuda visual de teclado ---------- */
#keyhelp {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  align-items: flex-end;
  gap: 36px;
  pointer-events: none;
  user-select: none;
}
.keyhelp-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.keyhelp-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}
.key {
  background: rgba(244, 237, 220, 0.92);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-bottom-width: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  text-transform: uppercase;
  transition: background .08s, transform .08s, border-bottom-width .08s, color .08s;
}
.key.key-space {
  width: 152px;
  height: 30px;
  font-size: 9px;
  letter-spacing: .25em;
}
.key.is-pressed {
  background: var(--ink);
  color: var(--bg);
  border-bottom-width: 1px;
  transform: translateY(2px);
}
.keyhelp-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  #keyhelp { display: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  #topbar { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .hint { display: none; }
  #overlay { width: 100vw; }
}

/* ---------- Botones externos del panel musica ---------- */
.ext-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.ext-btn {
  flex: 1;
  min-width: 130px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, color .15s;
  border-radius: 2px;
}
.ext-btn:hover { background: var(--ink); color: var(--bg); }
.ext-btn .ext-ico {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 9px;
}
