:root {
  --bg: #0d0b14;
  --gold: #e0bb3c;
  --gold-border: rgba(201, 162, 39, 0.22);
  --panel: rgba(18, 15, 26, 0.52);
  --text: #f7f0e0;
  --text-soft: #e4dac2;
  --text-dim: #cbbfa4;
  --text-mono: #cfc4ac;
  --silver: #5b7fc7;
  --ivi: #c46a9a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.bg-art {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    url("assets/bg-tibia.jpg") center / cover no-repeat,
    radial-gradient(ellipse at 50% 0%, #241d3a 0%, #14101f 45%, #0d0b14 100%);
}

.bg-fade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(13, 11, 20, 0.12) 0%,
    rgba(13, 11, 20, 0.46) 46%,
    rgba(13, 11, 20, 0.9) 100%
  );
}

.page {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 40px) clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.6vw, 28px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.brand-name {
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 1px 4px rgba(13, 11, 20, 1), 0 2px 16px rgba(13, 11, 20, 0.9);
}

.month-pill {
  font-size: clamp(10px, 1.4vw, 11.5px);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(18, 15, 26, 0.55);
  border: 1px solid var(--gold-border);
  padding: 7px 13px;
  border-radius: 999px;
}

.hero-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: start;
}

.hero-card {
  border-radius: clamp(20px, 2.4vw, 28px);
  padding: clamp(22px, 3vw, 34px);
  background: var(--silver);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-card.persona-ivi {
  background: var(--ivi);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 7px 14px 7px 12px;
  font-size: clamp(10px, 1.5vw, 11.5px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55), 0 0 0 0 rgba(255, 255, 255, 0.3);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(255, 255, 255, 0), 0 0 0 13px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dot {
    animation: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28);
  }
}

.hero-name {
  font-size: clamp(46px, 9vw, 86px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin-top: clamp(14px, 2vw, 22px);
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(18px, 2.4vw, 26px);
  padding-top: clamp(14px, 2vw, 18px);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-size: clamp(12.5px, 1.6vw, 15px);
}

.hero-footer #hoy-fecha {
  text-transform: capitalize;
  opacity: 0.9;
}

.tomorrow-pill {
  font-size: clamp(12px, 1.5vw, 13.5px);
  font-weight: 500;
  background: rgba(0, 0, 0, 0.24);
  padding: 7px 13px;
  border-radius: 999px;
}

.upcoming-card {
  border-radius: clamp(18px, 2.2vw, 24px);
  padding: clamp(18px, 2.6vw, 26px);
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold-border);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 20px);
}

.section-label {
  font-size: clamp(10px, 1.5vw, 11.5px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-shadow: 0 1px 6px rgba(13, 11, 20, 0.95);
}

.upcoming-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.upcoming-bar {
  width: 3px;
  align-self: stretch;
  min-height: 32px;
  border-radius: 2px;
}

.bar-silver {
  background: var(--silver);
}

.bar-ivi {
  background: var(--ivi);
}

.upcoming-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upcoming-name {
  font-size: clamp(13.5px, 1.8vw, 16px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

#nombre-a {
  color: var(--silver);
}

#nombre-b {
  color: var(--ivi);
}

.upcoming-dates {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(11.5px, 1.5vw, 13px);
  color: var(--text-mono);
}

.weeks-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.week-block {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}

.week-grid {
  display: flex;
  gap: clamp(4px, 0.8vw, 8px);
}

.day-cell {
  flex: 1;
  min-width: 0;
  border-radius: clamp(12px, 1.6vw, 18px);
  padding: clamp(10px, 1.4vw, 14px) 2px clamp(9px, 1.2vw, 13px);
  text-align: center;
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold-border);
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.day-cell.persona-silver .day-dot {
  background: var(--silver);
}

.day-cell.persona-ivi .day-dot {
  background: var(--ivi);
}

.day-cell.dia-hoy {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.day-cell.dia-hoy.persona-silver {
  background: var(--silver);
}

.day-cell.dia-hoy.persona-ivi {
  background: var(--ivi);
}

.day-cell.dia-hoy .day-dot {
  background: rgba(255, 255, 255, 0.9);
}

.day-cell:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.day-cell:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}

.day-cell.dia-seleccionada {
  box-shadow: 0 0 0 2px var(--gold) inset;
}

.day-dow {
  font-size: clamp(9px, 1.2vw, 10.5px);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.62;
}

.day-num {
  font-size: clamp(16px, 2.4vw, 21px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.disclaimer {
  margin-top: clamp(6px, 1.5vw, 16px);
  padding-top: clamp(14px, 2vw, 18px);
  border-top: 1px solid rgba(201, 162, 39, 0.16);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(9.5px, 1.2vw, 11px);
  line-height: 1.75;
  color: #9a9080;
  max-width: 62ch;
}

.disclaimer a {
  color: var(--gold);
  text-decoration: none;
}

.disclaimer a:hover {
  color: #f4d976;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.noscript-msg {
  position: relative;
  z-index: 2;
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--gold);
}
