/* ==========================================================================
   Avatar Creator — pricing.css
   Public pricing page. Load after brand.css.
   ========================================================================== */

.pub { position: relative; overflow-x: hidden; isolation: isolate; }
.pub::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -260px;
  left: 50%;
  width: 1100px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(249, 195, 205, .55), transparent);
  pointer-events: none;
}

.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; }

/* ---------- Header ---------- */
.pub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: 76px;
}
.pub-nav__links { display: flex; align-items: center; gap: var(--s-2); }
.pub-nav__links .btn--ghost { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: var(--s-16) 0 var(--s-12); }
.hero .eyebrow { display: inline-block; margin-bottom: var(--s-4); }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.75rem); max-width: 16ch; margin: 0 auto; }
.hero .lede { max-width: 56ch; margin: var(--s-6) auto 0; }
.hero__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-8); }
.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-2);
}
.hero__chip svg { width: 16px; height: 16px; color: var(--rouge-500); }

/* ---------- Plans ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 880px;
  margin-inline: auto;
  gap: var(--s-5);
  align-items: stretch;
  padding-bottom: var(--s-16);
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-8);
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.plan__name { margin: 0; font-family: var(--font-display); font-size: 1.75rem; font-weight: 650; letter-spacing: -0.025em; }
.plan__for { margin: var(--s-1) 0 0; color: var(--ink-2); font-size: var(--text-sm); }

.plan__price { display: flex; align-items: baseline; gap: 6px; margin: var(--s-6) 0 var(--s-1); }
.plan__amount {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 3.5rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}
.plan__amount sup { font-size: .45em; vertical-align: top; position: relative; top: .35em; margin-right: 2px; font-weight: 500; }
.plan__per { color: var(--ink-3); font-size: var(--text-sm); font-weight: 500; }
.plan__note { margin: 0 0 var(--s-6); color: var(--ink-3); font-size: var(--text-xs); }

.plan .btn { margin-bottom: var(--s-6); }

.plan__label {
  margin: 0 0 var(--s-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.plan__list li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: .9375rem; line-height: 1.45; }
.plan__list li strong { font-weight: 600; }
.plan__list svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--rouge-500); }

.plan__then {
  margin-top: auto;
  padding-top: var(--s-6);
}
.plan__then-box {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--cream);
  border: 1px dashed var(--line-strong);
  font-size: var(--text-sm);
  color: var(--ink-2);
  line-height: 1.45;
}
.plan__then-box svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--rouge-500); }
.plan__then-box b { color: var(--ink); }

/* Recommended */
.plan--featured {
  color: #fff;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(242, 149, 167, .55), transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(214, 58, 94, .45), transparent 60%),
    linear-gradient(165deg, #7A3459, #4A2040 75%);
  border-color: transparent;
  box-shadow: 0 30px 70px -28px rgba(110, 26, 49, .65);
  transform: translateY(-12px);
}
.plan--featured .plan__for,
.plan--featured .plan__per,
.plan--featured .plan__note,
.plan--featured .plan__label { color: rgba(255, 255, 255, .72); }
.plan--featured .plan__list svg { color: var(--rouge-200); }
.plan--featured .plan__then-box { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .82); }
.plan--featured .plan__then-box svg { color: var(--rouge-200); }
.plan--featured .plan__then-box b { color: #fff; }
.plan--featured .btn--primary { background: #fff; color: var(--rouge-600); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .4); }
.plan--featured .btn--primary:hover { background: var(--rouge-50); color: var(--rouge-700); }

.plan__ribbon {
  position: absolute;
  top: var(--s-6);
  right: var(--s-6);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .02em;
}
.plan__ribbon svg { width: 13px; height: 13px; color: var(--rouge-200); }

/* Teams */
.plan--team .plan__ribbon { background: #FBF3EA; border-color: var(--champagne); color: #8A5A2B; }
.plan--team .plan__ribbon svg { color: #B98345; }

/* ---------- Section heads ---------- */
.section { padding: var(--s-16) 0; border-top: 1px solid var(--line); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto var(--s-10); }
.section__head .eyebrow { display: inline-block; margin-bottom: var(--s-3); }
.section__head .lede { margin-top: var(--s-4); font-size: var(--text-md); }

/* ---------- How tokens work ---------- */
.tokens {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: var(--s-10);
  align-items: center;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); counter-reset: step; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: var(--s-4); align-items: start; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--rouge-50);
  border: 1px solid var(--rouge-100);
  color: var(--rouge-600);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
}
.steps h3 { margin: 4px 0 4px; font-size: var(--text-lg); font-weight: 600; }
.steps p { margin: 0; color: var(--ink-2); }

.receipt {
  position: relative;
  padding: var(--s-8);
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-variant-numeric: tabular-nums;
}
.receipt__tag { font-size: var(--text-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.receipt__title { margin: var(--s-2) 0 var(--s-6); font-family: var(--font-display); font-size: 1.5rem; font-weight: 650; }
.receipt__row { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.receipt__row b { color: var(--ink); font-weight: 600; }
.receipt__row--fee b { color: var(--success); }
.receipt__row--total { border-bottom: 0; padding-top: var(--s-4); font-weight: 600; color: var(--ink); font-size: var(--text-lg); }
.receipt__foot { margin: var(--s-4) 0 0; font-size: var(--text-xs); color: var(--ink-3); }
.receipt__stamp {
  position: absolute;
  top: var(--s-6);
  right: var(--s-6);
  padding: 6px 12px;
  border: 1.5px solid var(--rouge-400);
  border-radius: var(--r-sm);
  color: var(--rouge-500);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  transform: rotate(6deg);
}

/* ---------- Compare ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-sm); }
.compare { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .9375rem; }
.compare th, .compare td { padding: var(--s-4) var(--s-5); text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
.compare thead th { font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; background: var(--cream); }
.compare thead th small { display: block; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.compare tbody th { font-weight: 500; color: var(--ink-2); width: 34%; }
.compare td { font-weight: 600; }
.compare .is-featured { background: var(--rouge-50); }
.compare thead .is-featured { background: var(--rouge-100); }
.compare .yes { display: inline-flex; color: var(--rouge-500); }
.compare .yes svg { width: 20px; height: 20px; }
.compare .muted-cell { color: var(--ink-3); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: var(--s-3); }
.faq details {
  border-radius: var(--r-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast);
}
.faq details[open] { border-color: var(--rouge-200); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--rouge-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B8274B' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 12px no-repeat;
  transition: transform var(--t-med) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 var(--s-6) var(--s-5); color: var(--ink-2); }

/* ---------- Closing CTA ---------- */
.cta {
  margin: var(--s-16) 0;
  padding: var(--s-16) var(--s-8);
  border-radius: var(--r-xl);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(60% 80% at 15% 20%, rgba(255, 199, 176, .35), transparent 60%),
    radial-gradient(60% 80% at 85% 80%, rgba(232, 102, 127, .5), transparent 60%),
    linear-gradient(160deg, #7A3459, #4A2040 70%);
  box-shadow: var(--shadow-lg);
}
.cta .display { color: #fff; }
.cta .display em { color: var(--rouge-200); }
.cta p { margin: var(--s-4) auto var(--s-8); max-width: 48ch; color: rgba(255, 255, 255, .8); }
.cta .btn--primary { background: #fff; color: var(--rouge-600); }
.cta .btn--primary:hover { background: var(--rouge-50); color: var(--rouge-700); }

.pub-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-8) 0 var(--s-10);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--ink-3);
}
.pub-foot nav { display: flex; gap: var(--s-5); }
.pub-foot a { color: var(--ink-3); }
.pub-foot a:hover { color: var(--rouge-600); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
  .plan--featured { transform: none; order: -1; }
  .tokens { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .hero { padding: var(--s-10) 0 var(--s-8); }
  .plan { padding: var(--s-6); }
  .pub-nav__links .btn--ghost { display: none; }
  .cta { padding: var(--s-10) var(--s-5); }
}
