:root {
  --gold: #b4975d;
  --gold-dark: #947541;
  --gold-light: #dec994;
  --cream: #fffdf9;
  --cream-alt: #fbf9f5;
  --white: #ffffff;
  --text-dark: #2a2a2a;
  --text-muted: #6b6660;

  --font-display: "Cormorant Garamond", serif;
  --font-body: "Poppins", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 300;
}

.top-bar {
  background: var(--gold);
  color: var(--white);
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.6rem 1rem;
}

.site-header {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
}

.eyebrow {
  color: var(--gold-dark);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0 0 0.6rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0;
  color: var(--text-dark);
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.1rem auto 0;
  max-width: 220px;
  color: var(--gold);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.divider span {
  font-size: 0.9rem;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  width: 100%;
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(180, 151, 93, 0.25);
  border-radius: 18px;
  padding: 2.75rem 2rem;
  box-shadow: 0 10px 40px rgba(148, 117, 65, 0.08);
}

.card.hidden { display: none; }

.card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin: 0.25rem 0 1rem;
  color: var(--text-dark);
  letter-spacing: 0.02em;
}

.card .topic {
  font-size: 1.05rem;
  color: var(--gold-dark);
  margin: 0 0 1.5rem;
}

.card .muted {
  color: var(--text-muted);
  margin: 0;
}

.card.live {
  border-color: var(--gold);
  box-shadow: 0 10px 40px rgba(180, 151, 93, 0.22);
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e2483f;
  margin: 0 auto 1rem;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(226, 72, 63, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(226, 72, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 72, 63, 0); }
}

.btn-join {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--white);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.5rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(148, 117, 65, 0.35);
}

.btn-join:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.error {
  color: #b23a2f;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.error.hidden { display: none; }

/* ---------- cuenta regresiva ---------- */

.countdown {
  text-align: center;
  padding: 0 1.5rem 1.75rem;
}

.countdown.hidden { display: none; }

.cd-units {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
}

.cd-unit span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.1;
  color: var(--gold-dark);
  font-variant-numeric: tabular-nums;
}

.cd-unit small {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.cd-sep {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--gold);
  opacity: 0.45;
  line-height: 1.3;
}

.cd-topic {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---------- calendario del mes ---------- */

.calendar {
  width: 100%;
  text-align: center;
  margin-top: 3rem;
}

.calendar.hidden { display: none; }

.calendar h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0.25rem 0 1.75rem;
  color: var(--text-dark);
  text-transform: capitalize;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
  margin-bottom: 2rem;
}

.cal-dow {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--text-dark);
  border-radius: 50%;
  position: relative;
}

.cal-day.empty { visibility: hidden; }

.cal-day.has-class {
  background: rgba(180, 151, 93, 0.1);
  font-weight: 500;
}

.cal-day.today {
  border: 1.5px solid var(--gold);
  font-weight: 600;
}

.cal-day .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.cal-day.done { color: #b3aea6; }
.cal-day.done .dot { background: #cfc9c0; }

.cal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.cal-item {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.85rem 0.25rem;
  border-top: 1px solid rgba(180, 151, 93, 0.18);
}

.cal-item:last-child { border-bottom: 1px solid rgba(180, 151, 93, 0.18); }

.cal-date {
  flex: 0 0 2.6rem;
  text-align: center;
  line-height: 1.15;
}

.cal-date b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold-dark);
}

.cal-date small {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cal-info { flex: 1; min-width: 0; }

.cal-topic {
  display: block;
  font-size: 0.92rem;
  color: var(--text-dark);
  line-height: 1.35;
}

.cal-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cal-badge {
  flex: 0 0 auto;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.cal-badge.done {
  color: #9a948b;
  background: rgba(0, 0, 0, 0.04);
}

.cal-badge.now {
  color: var(--white);
  background: #e2483f;
}

.cal-item.done .cal-date b,
.cal-item.done .cal-topic { color: #b3aea6; }

.cal-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  font-style: italic;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}
