/* ============================================================
   Clavado — MUN PrepaTec landing (builds on styles.css)
   Adds: countdown bar, "por estudiantes" tagline, access card,
   and a mock Stripe-style checkout modal.
   ============================================================ */

/* ---------- Sticky header wrapper (countdown bar + nav) ---------- */
.mun-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.mun-header .nav { position: static; }

/* ---------- Countdown bar ---------- */
.countbar {
  background: var(--accent);
  color: #fff;
  transition: background-color 0.5s var(--ease-out);
}
.countbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.55rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  text-align: center;
  font-size: clamp(0.8rem, 0.75rem + 0.3vw, 0.95rem);
  font-weight: 600;
}
.countbar__label { opacity: 0.92; }
.countbar__time {
  display: inline-flex;
  gap: 0.4rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.countbar__time span {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 0.12rem 0.45rem;
  min-width: 2.4em;
  text-align: center;
}
.countbar__time span small {
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.62em;
  opacity: 0.85;
  margin-left: 0.1em;
}

/* ---------- "Por estudiantes para estudiantes" tagline ---------- */
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-tint);
  border: 1px solid color-mix(in oklch, var(--accent) 22%, var(--line));
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
.tagline::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: background-color 0.5s var(--ease-out);
}

/* ---------- Access / pricing ---------- */
.access__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-lg);
}
.price-card__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent-tint);
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-md);
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
.price-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}
.price-card__amount {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.price-card__per { color: var(--ink-faint); font-weight: 600; }
.price-card__was {
  color: var(--ink-faint);
  text-decoration: line-through;
  font-weight: 600;
}
.price-card__list {
  list-style: none;
  margin: var(--space-md) 0 var(--space-lg);
  padding: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.price-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.price-card__list li::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: var(--accent-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-color 0.5s var(--ease-out);
}
.price-card .btn--pill { width: 100%; padding: 0.85rem 1.25rem; font-size: 1.02rem; }
.price-card__fine {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- Mock Stripe checkout modal ---------- */
.checkout {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  background: oklch(24% 0.03 265 / 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}
.checkout[data-open="true"] { opacity: 1; visibility: visible; }

.checkout__panel {
  width: min(420px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: #fff;
  color: #1a1a2e;
  border-radius: 18px;
  box-shadow: 0 40px 80px -20px oklch(24% 0.05 265 / 0.5);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s var(--ease-out);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
}
.checkout[data-open="true"] .checkout__panel { transform: none; }

.checkout__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem 0.4rem;
}
.checkout__merchant {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #1a1a2e;
}
.checkout__merchant .brand__mark { color: var(--accent); }
.checkout__close {
  border: none;
  background: #f1f1f4;
  color: #4a4a5a;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color 0.2s;
}
.checkout__close:hover { background: #e4e4ea; }

.checkout__summary {
  padding: 0.4rem 1.3rem 1rem;
  border-bottom: 1px solid #ececf1;
}
.checkout__product { font-size: 0.9rem; color: #6b6b7b; }
.checkout__amount {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: #1a1a2e;
}
.checkout__amount span { font-size: 0.95rem; font-weight: 600; color: #6b6b7b; }

.checkout__notice {
  margin: 1rem 1.3rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fff6e5;
  border: 1px solid #ffe0a6;
  color: #7a5200;
  font-size: 0.88rem;
  line-height: 1.45;
  display: flex;
  gap: 0.6rem;
}
.checkout__notice strong { color: #5c3d00; }
.checkout__notice::before { content: "!"; font-weight: 800; color: #b97900; }

/* Informational (presale) variant */
.checkout__notice--info {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}
.checkout__notice--info strong { color: #312e81; }
.checkout__notice--info::before { content: "i"; color: #4f46e5; font-style: italic; }

.checkout__hint {
  padding: 0 1.3rem;
  font-size: 0.8rem;
  color: #6b6b7b;
  line-height: 1.45;
  margin-bottom: 0.9rem;
}

.checkout__go {
  margin: 0 1.3rem 0.6rem;
  width: calc(100% - 2.6rem);
  padding: 0.9rem;
  border-radius: 10px;
  font-size: 1rem;
}
.checkout__go[disabled] { opacity: 0.65; cursor: progress; }

.checkout__error {
  margin: 0 1.3rem 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.82rem;
  line-height: 1.4;
}
.checkout__error[hidden] { display: none; }

.checkout__powered {
  padding: 0 1.3rem 1.2rem;
  text-align: center;
  font-size: 0.72rem;
  color: #9a9aa8;
}
.checkout__powered b { color: #635bff; font-weight: 800; letter-spacing: -0.02em; }

/* ---------- Post-payment toast ---------- */
.paid-toast {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 4vw, 2rem);
  transform: translateX(-50%) translateY(0);
  z-index: 110;
  max-width: min(560px, calc(100vw - 2rem));
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
  line-height: 1.45;
  animation: toast-in 0.4s var(--ease-out);
}
.paid-toast::before {
  content: "✓";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
}
.paid-toast button {
  flex: none;
  margin-left: 0.4rem;
  background: transparent;
  border: none;
  color: var(--bg);
  opacity: 0.7;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .access__inner { grid-template-columns: 1fr; }

  /* Header text above the phone mockup on this page (main page keeps phone first) */
  .hero__copy { order: 1; }
  .hero__phone { order: 2; }
}
