/* /v2/templates Carrd-style picker — PR 118.
   Loaded alongside landing_v2.css so colour tokens stay in sync. */

.picker-wrapper {
  max-width: 1240px;
  margin: 48px auto 96px;
  padding: 0 24px;
  text-align: center;
  color: #fff;
}

/* PR 119 Fix #1 — paid customer banner shown after Stripe success. */
.paid-banner {
  display: inline-block;
  margin: 0 auto 24px;
  padding: 10px 20px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18),
                              rgba(192, 38, 211, 0.18));
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.paid-banner strong {
  color: var(--gold, #fbbf24);
  font-weight: 700;
  text-transform: capitalize;
}

.picker-eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent, #c026d3);
  font-weight: 600;
  margin-bottom: 14px;
}

.picker-wrapper h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 auto 14px;
  font-weight: 700;
  max-width: 720px;
  line-height: 1.2;
}

.picker-lede {
  color: var(--text-muted, rgba(255, 255, 255, 0.78));
  margin-bottom: 36px;
  font-size: 16px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Category tabs */

.category-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  padding: 6px;
  background: rgba(10, 5, 24, 0.4);
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-tab {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  padding: 9px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 150ms, color 150ms;
}

.cat-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }

.cat-tab.is-active {
  background: linear-gradient(135deg, #6d28d9, #c026d3);
  color: #fff;
  box-shadow: 0 4px 18px rgba(192, 38, 211, 0.35);
}

/* ── Template grid */

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 36px;
  text-align: left;
}

@media (max-width: 1100px) {
  .template-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .template-grid { grid-template-columns: 1fr; gap: 20px; }
}

.template-card {
  background: rgba(15, 10, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 200ms ease,
              border-color 200ms ease,
              box-shadow 200ms ease;
}

.template-card.is-hidden { display: none; }

.template-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 38, 211, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35),
              0 0 0 4px rgba(192, 38, 211, 0.12);
}

/* Thumbnail = iframe scaled-down so the full template renders at
   desktop width but visually fits the card. */
.template-thumb {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #0a0518;
}

.template-thumb iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 250%;
  height: 250%;
  border: 0;
  transform: scale(0.4);
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  /* Subtle gradient + click-blocker so the iframe stays visual. */
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
}

.template-meta {
  padding: 18px 20px 20px;
}

.template-meta h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}

.template-meta .persona {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.4;
  margin: 0 0 14px;
}

.btn-choose {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 10px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 150ms, border-color 150ms, transform 150ms;
}

.btn-choose:hover {
  background: linear-gradient(135deg, #6d28d9, #c026d3);
  border-color: transparent;
  transform: translateY(-1px);
}

.picker-foot-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Email modal */

.pvl-modal[hidden] { display: none; }

.pvl-modal {
  position: fixed;
  inset: 0;
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, -apple-system, sans-serif;
}

.pvl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 5, 24, 0.78);
  backdrop-filter: blur(6px);
}

.pvl-modal-card {
  position: relative;
  background: #fff;
  color: #1a0f2e;
  border-radius: 18px;
  padding: 36px 36px 28px;
  width: 460px;
  max-width: 92vw;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: left;
}

.pvl-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #6b5e7e;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pvl-modal-close:hover { background: #f3eef7; color: #1a0f2e; }

.pvl-modal-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
}

.pvl-modal-lede {
  font-size: 14px;
  color: #5c4a73;
  line-height: 1.55;
  margin: 0 0 22px;
}

.pvl-modal-lede strong { color: var(--accent, #c026d3); }

.pvl-modal-card form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pvl-modal-card label {
  font-size: 12px;
  font-weight: 600;
  color: #4b3e60;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pvl-modal-card input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(109, 40, 217, 0.22);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 120ms;
}

.pvl-modal-card input[type="email"]:focus {
  outline: none;
  border-color: #c026d3;
  box-shadow: 0 0 0 3px rgba(192, 38, 211, 0.12);
}

.pvl-modal-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: -2px;
}

.pvl-modal-card .btn-primary {
  margin-top: 8px;
  background: linear-gradient(135deg, #6d28d9, #c026d3, #fb7185);
  color: #fff;
  border: 0;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 120ms, box-shadow 120ms;
}

.pvl-modal-card .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(192, 38, 211, 0.28);
}

.pvl-modal-card .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pvl-modal-fineprint {
  margin: 12px 0 0;
  font-size: 11px;
  color: #806890;
  text-align: center;
}

/* PR opaque-slug — catch-all encart at the bottom of the picker. */
.pvl-pro-catchall {
  margin: 56px auto 0;
  max-width: 880px;
  padding: 36px 32px;
  background: linear-gradient(135deg, #f5f3ff 0%, #fdf2f8 100%);
  border: 1px solid #ede9fe;
  border-radius: 18px;
  text-align: center;
}

.pvl-pro-catchall h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #1f1235;
  line-height: 1.35;
}

.pvl-pro-catchall p {
  margin: 0 0 12px;
  font-size: 14px;
  color: #4b3a63;
  line-height: 1.55;
}

.pvl-pro-catchall-list {
  font-style: italic;
  color: #6d28d9 !important;
}

.pvl-pro-catchall-cta {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #6d28d9, #c026d3);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform 120ms, box-shadow 120ms;
}

.pvl-pro-catchall-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(192, 38, 211, 0.28);
}

@media (max-width: 600px) {
  .pvl-pro-catchall {
    padding: 28px 20px;
    margin-top: 40px;
  }
  .pvl-pro-catchall h3 { font-size: 17px; }
}

/* ── Surprenez-moi card (PR auto-template-picker) — first tile in the
   grid, routes to /wizard?auto=1 to skip template selection. */

.tpl-card-surprise {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, #6d28d9 0%, #c026d3 50%, #fb7185 100%);
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 30px -10px rgba(109, 40, 217, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tpl-card-surprise:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -12px rgba(109, 40, 217, 0.55);
}
.tpl-card-surprise-bg {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><polygon points='30,5 55,30 30,55 5,30' fill='none' stroke='%23ffffff' stroke-opacity='0.10' stroke-width='1'/></svg>");
  background-size: 60px 60px;
  opacity: 0.6;
  pointer-events: none;
}
.tpl-card-surprise-content {
  position: relative; z-index: 1;
  text-align: center;
  padding: 28px 24px;
  color: white;
  max-width: 320px;
}
.tpl-card-surprise-icon {
  font-size: 36px;
  margin-bottom: 14px;
  animation: surprise-sparkle 2.4s ease-in-out infinite;
}
@keyframes surprise-sparkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.85; }
}
.tpl-card-surprise-title {
  font-size: 26px; font-weight: 800; letter-spacing: -0.6px;
  margin: 0 0 10px;
  line-height: 1.1;
}
.tpl-card-surprise-sub {
  font-size: 13.5px; line-height: 1.5;
  color: rgba(255,255,255,0.92);
  margin: 0 0 18px;
  font-weight: 400;
}
.tpl-card-surprise-cta {
  display: inline-block;
  padding: 9px 18px;
  background: #fbbf24; color: #1a1a2e;
  border-radius: 6px;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.2px;
}

/* Reduce-motion: don't animate the sparkle. */
@media (prefers-reduced-motion: reduce) {
  .tpl-card-surprise-icon { animation: none; }
}
