/* Header / account -------------------------------------------------- */
.header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.85rem;
}
.account-info { display: flex; align-items: center; gap: 0.65rem; font-size: 0.85rem; color: var(--muted); }
.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--teal-deep, #076E71);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--canvas); }

/* Hero: two real columns on desktop --------------------------------- */
:root {
  --teal-deep: #076E71;
  --blue-soft: #E8F2FF;
  --gold: #FFC53D;
  --mirror-radius: 1.5rem;
}
.hero {
  position: relative;
  padding-block: 2.5rem 4rem;
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(11,174,178,0.14), transparent 70%),
    radial-gradient(40% 40% at 0% 100%, rgba(8,126,240,0.08), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: start; }

.greeting { font-size: 1.05rem; font-weight: 600; color: var(--teal-deep); margin: 0 0 0.5rem; }
.hero-story h1 { font-size: clamp(2.1rem, 3.4vw, 2.9rem); font-weight: 800; letter-spacing: -0.01em; max-width: 18ch; }
.hero-story p.lead { color: var(--muted); font-size: 1.05rem; max-width: 32rem; margin-top: 0.75rem; }

.trail { display: flex; flex-direction: column; margin-top: 2.5rem; }
.trail-step { display: flex; gap: 1rem; position: relative; padding-bottom: 2rem; }
.trail-step:last-child { padding-bottom: 0; }
.trail-marker {
  flex: 0 0 auto;
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-weight: 700; font-size: 0.85rem;
  z-index: 1;
}
.trail-step.active .trail-marker { border-color: var(--teal); color: var(--teal-deep); background: #E4F8F8; }
.trail-step.done .trail-marker { border-color: var(--teal); background: var(--teal); color: #fff; }
.trail-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.9rem; top: 1.9rem; bottom: -0.2rem;
  width: 2px;
  background: var(--line);
}
.trail-step.done:not(:last-child)::before { background: var(--teal); }
.trail-label strong { display: block; font-size: 1rem; }
.trail-label span { color: var(--muted); font-size: 0.9rem; }

.hero-action { display: flex; justify-content: center; }

/* Checkout card: the one bold element -------------------------------- */
.checkout-card-wrap { position: relative; width: 100%; max-width: 25rem; }
.elo-peek {
  position: absolute;
  top: -3.2rem;
  right: -1.2rem;
  width: 6.5rem;
  height: auto;
  z-index: 3;
  filter: drop-shadow(0 14px 22px rgba(11,174,178,0.35));
  animation: planos-bob 5s ease-in-out infinite;
}
@keyframes planos-bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(1deg); } }

.mirror-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.86));
  border-radius: var(--mirror-radius);
  box-shadow: var(--shadow);
  padding: 1.85rem;
  isolation: isolate;
}
.mirror-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), var(--teal) 45%, var(--blue) 75%, rgba(255,255,255,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}
.mirror-card::after {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%; height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), transparent);
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
  pointer-events: none;
  z-index: -1;
}

.segmented {
  display: inline-flex;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.25rem;
}
.segmented button {
  border: none;
  background: transparent;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}
.segmented button:disabled { opacity: 0.4; cursor: not-allowed; }
.segmented button.is-active { background: var(--ink); color: #fff; }

.plan-price-row { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 1.25rem; }
.plan-price { font-size: 2.3rem; font-weight: 800; color: var(--blue-deep); }
.plan-period { color: var(--muted); font-size: 0.95rem; }
.plan-note { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.hand-note {
  font-family: Caveat, cursive;
  font-size: 1.4rem;
  color: var(--teal-deep);
  margin-top: 0.5rem;
  display: inline-block;
  transform: rotate(-2deg);
}

.method-tabs { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.method-tab {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}
.method-tab:disabled,
.method-tab.is-disabled { opacity: 0.4; cursor: not-allowed; }
.method-tab.is-active { border-color: var(--teal); background: #E4F8F8; color: var(--teal-deep); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.9rem;
  border: none;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--teal) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(8,126,240,0.28);
}
.cta:disabled { opacity: 0.6; cursor: wait; }

.spinner {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: planos-spin 0.7s linear infinite;
}
@keyframes planos-spin { to { transform: rotate(360deg); } }

.checkout-error,
.checkout-error-box {
  color: #b3261e;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Toast notifications ---------------------------------------------------- */
.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 26rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(16,33,62,0.16);
  font-size: 0.9rem;
  color: var(--ink);
  animation: planos-toast-in 0.2s ease-out;
}
.toast-leaving { animation: planos-toast-out 0.2s ease-in forwards; }
.toast-success { border-color: var(--teal); background: #E4F8F8; color: var(--teal-deep); }
.toast-error { border-color: #b3261e; background: #FBEAE9; color: #7a1a15; }
.toast-info { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-deep); }
.toast-message { flex: 1; }
.toast-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  padding: 0 0.15rem;
}
.toast-close:hover { opacity: 1; }
@keyframes planos-toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes planos-toast-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-8px); opacity: 0; } }

/* Login form ------------------------------------------------------------ */
.checkout-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.checkout-login-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.checkout-login-form input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-size: 1rem;
}

/* Pix payment ------------------------------------------------------------ */
.pix-layout { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }
.qr-ring-wrap { position: relative; width: 152px; height: 152px; flex: 0 0 auto; }
.qr-ring-wrap svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.qr-ring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.qr-ring-progress { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.qr-image-box { position: absolute; inset: 13px; background: #fff; border-radius: 0.6rem; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.qr-image-box img { width: 100%; height: 100%; object-fit: contain; }
.pix-copy-paste { width: 100%; font-family: ui-monospace, monospace; font-size: 0.72rem; padding: 0.6rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--canvas); resize: none; }
.copy-btn {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.55rem;
  border: 1px solid var(--teal);
  background: #fff;
  color: var(--teal-deep);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 0.6rem;
  cursor: pointer;
}
.copy-btn:hover { background: #E4F8F8; }
.countdown-label { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.countdown-label strong { color: var(--ink); }
.pix-status { color: var(--muted); margin-top: 0.75rem; }
.recurrence-fallback-toggle { margin-top: 0.75rem; width: 100%; text-align: center; }
.recurrence-fallback { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
/* The one card that matters: mascot/instruction + the single combined code,
   with enough visual weight (teal border, soft gradient, shadow) that it
   never reads as "step 1 of 3" next to the plain, collapsed fallback below. */
.recurrence-primary {
  margin-top: 1.25rem;
  padding: 1.1rem 1.1rem 1.25rem;
  border: 1.5px solid var(--teal);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #E4F8F8 0%, #ffffff 70%);
  box-shadow: 0 14px 30px rgba(11,174,178,0.16);
}
.recurrence-primary .pix-layout { margin-top: 1.1rem; }
.recurrence-recipient {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(7,110,113,0.25);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}
.recurrence-primary-lead { display: flex; align-items: center; gap: 0.85rem; }
.recurrence-primary-lead img { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; }
.recurrence-hero-copy { display: flex; flex-direction: column; gap: 0.15rem; }
.recurrence-hero-copy strong { font-size: 0.95rem; color: var(--ink); }
.recurrence-hero-copy span { font-size: 0.82rem; color: var(--muted); }

/* Card form ------------------------------------------------------------ */
.card-form { display: grid; gap: 0.85rem; margin-top: 1rem; }
.card-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.card-form input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  font-size: 0.95rem;
}
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.card-row label { min-width: 0; }
.installments-head { display: flex; justify-content: space-between; align-items: baseline; }
.installments-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.4rem; }
.installments-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  background: #fff;
}
.chip.is-active { border-color: var(--blue); color: var(--blue-deep); background: var(--blue-soft); font-weight: 600; }
.chip .tag,
.installments-head .tag {
  font-size: 0.7rem;
  color: var(--teal-deep);
  background: #E4F8F8;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.recurring-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.25rem;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.recurring-row input { margin-top: 0.2rem; }
.recurring-row .tag {
  font-size: 0.7rem;
  color: var(--teal-deep);
  background: #E4F8F8;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  margin-left: 0.35rem;
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .hero-action { justify-content: flex-end; }
  .checkout-card-wrap { max-width: 27rem; }
}
@media (prefers-reduced-motion: reduce) {
  .elo-peek { animation: none; }
}

/* Success screen: full-viewport celebration after a confirmed payment --- */
.success-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 48%, var(--teal) 100%);
  animation: success-screen-in 0.35s ease-out;
}
.success-content {
  position: relative;
  z-index: 2;
  width: min(100%, 26rem);
  margin-top: -1.1rem;
  text-align: center;
}
.success-logo {
  display: block;
  height: 3.5rem;
  width: auto;
  margin: 0 auto 1rem;
  /* No badge behind it -- the source PNG is navy/teal and unreadable
     straight on this gradient (tried it, and a neon-glow halo too), so
     it's forced to a flat white silhouette instead. */
  filter: brightness(0) invert(1);
  opacity: 0.96;
}
.success-mascot {
  width: 8.5rem;
  height: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 18px 30px rgba(4,20,50,0.35));
  animation:
    success-mascot-in 0.5s 0.1s cubic-bezier(0.34,1.56,0.64,1) both,
    success-mascot-bob 2.6s 0.6s ease-in-out infinite;
}
.success-kicker {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.3rem;
}
.success-content h1 {
  font-family: Sora, Inter, sans-serif;
  margin: 0 0 0.9rem;
}
.success-title-lead {
  display: block;
  font-size: clamp(1.2rem, 3.6vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}
.success-highlight {
  display: block;
  font-size: clamp(2.1rem, 6.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 0.15rem;
  background: linear-gradient(135deg, #FFE9B3 0%, var(--gold) 55%, #FF9C2E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 16px rgba(255,197,61,0.5);
}
.success-content p.success-lead {
  color: rgba(255,255,255,0.9);
  font-size: 0.98rem;
  max-width: 24rem;
  margin: 0 auto 1rem;
}
.success-note {
  font-family: Caveat, cursive;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  transform: rotate(-2deg);
  margin: 0 0 1.6rem;
}
.success-finish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.75rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE9B3 0%, var(--gold) 55%, #FFB020 100%);
  color: #5A3200;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.65) inset,
    0 -4px 0 rgba(0,0,0,0.16) inset,
    0 8px 0 #C97A00,
    0 16px 26px rgba(0,0,0,0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.success-finish:hover { filter: brightness(1.04); }
.success-finish:active {
  transform: translateY(6px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.65) inset,
    0 -2px 0 rgba(0,0,0,0.16) inset,
    0 2px 0 #C97A00,
    0 6px 14px rgba(0,0,0,0.3);
}

/* Confetti: a short, decorative burst -- never blocks clicks, never shown
   for prefers-reduced-motion (the JS side skips building it entirely). */
.confetti-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.confetti-piece {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  opacity: 0.9;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  from { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  to { transform: translateY(112vh) rotate(560deg); opacity: 0.85; }
}

@keyframes success-screen-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes success-mascot-in {
  from { opacity: 0; transform: translateY(14px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes success-mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .success-screen, .success-mascot, .confetti-piece { animation: none; }
}
