/* Qelvori Plus page: the "Add from Chrome" page's space and live card, turned into a
   membership card that follows the plan you pick and turns over for checkout.
   assets/plus.js sets the tilt, the plan and the price; body[data-state] says which side. */

@property --c1 { syntax: '<color>'; inherits: true; initial-value: #221a10; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #2a2114; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #1c1b19; }
@property --g1 { syntax: '<color>'; inherits: true; initial-value: #c47a45; }
@property --g2 { syntax: '<color>'; inherits: true; initial-value: #d6a84e; }

.plus-page { overflow-x: hidden; }
#stars { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.pp-aurora {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 35% at 30% 45%, rgba(196, 122, 69, 0.14), transparent 70%),
    radial-gradient(35% 40% at 72% 55%, rgba(214, 168, 78, 0.12), transparent 70%);
  animation: pp-aurora 18s ease-in-out infinite alternate;
}
@keyframes pp-aurora { to { transform: translate(3%, -2%) scale(1.06); } }
.plus-page main, .plus-page .pp-compare, .plus-page footer { position: relative; z-index: 1; }

.pp {
  min-height: 100vh; width: min(1140px, 100% - 32px); margin-inline: auto; padding: 100px 0 56px;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 56px; align-items: center;
}

/* ---------- the card ---------- */
.pp-stage { position: relative; display: grid; place-items: center; perspective: 1400px; min-height: 380px; }
.pp-card {
  --rx: 0deg; --ry: 0deg; --mx: 30%; --my: 20%;
  position: relative; width: min(460px, 100%); aspect-ratio: 1.586;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: --c1 0.8s, --c2 0.8s, --c3 0.8s, --g1 0.8s, --g2 0.8s;
  animation: pp-arrive 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pp-arrive {
  from { opacity: 0; transform: translate3d(0, 40px, -600px) rotateX(35deg) rotateY(-40deg) rotateZ(-8deg); }
}
/* Yearly: violet into ice. Monthly: ice into sky. */
.pp-card[data-plan='yearly'] { --c1: #221a10; --c2: #2a2114; --c3: #1c1b19; --g1: #c47a45; --g2: #d6a84e; }
.pp-card[data-plan='monthly'] { --c1: #1b1a18; --c2: #1e1d1a; --c3: #24221e; --g1: #d6a84e; --g2: #b8862f; }

.pp-face {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden; backface-visibility: hidden;
  padding: 7% 7.5%; display: flex; flex-direction: column; justify-content: space-between; color: var(--ice);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(70% 60% at 12% 10%, color-mix(in srgb, var(--g1) 45%, transparent), transparent 70%),
    radial-gradient(70% 60% at 92% 95%, color-mix(in srgb, var(--g2) 40%, transparent), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 11px),
    linear-gradient(135deg, var(--c1), var(--c2) 55%, var(--c3));
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px color-mix(in srgb, var(--g1) 30%, transparent), 0 0 90px -26px var(--g1);
}
.pp-holo {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.5), transparent 42%),
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.18) 48%, transparent 60%);
}
.pp-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-brand { display: inline-flex; align-items: center; gap: 10px; font: 800 clamp(18px, 2.4vw, 24px) var(--display); }
.pp-brand img { width: 30px; height: 30px; border-radius: 8px; }
.pp-badge {
  padding: 5px 14px; border-radius: 999px; font: 800 15px var(--display); letter-spacing: 0.02em; color: #0e0e0f;
  background: linear-gradient(90deg, var(--g1), var(--g2)); box-shadow: 0 0 24px -6px var(--g1);
}
.pp-price { position: relative; display: flex; align-items: baseline; gap: 10px; }
.pp-price b {
  font: 800 clamp(44px, 6.4vw, 66px)/1 var(--display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.pp-price b span { display: inline-block; animation: pp-digit 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pp-digit { from { opacity: 0; transform: translateY(12px) scale(0.8); filter: blur(5px); } }
.pp-price small { font: 600 16px var(--font); color: rgba(238, 232, 220, 0.78); }
.pp-bottom { align-items: flex-end; }
.pp-member { display: grid; line-height: 1.15; }
.pp-member small { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.pp-member b { font: 700 18px var(--display); }
.pp-perks { font: 600 13.5px var(--font); color: rgba(238, 232, 220, 0.8); text-align: right; }

/* The back: what's happening with checkout. */
.pp-back { transform: rotateY(180deg); justify-content: center; }
.pp-strip { position: absolute; left: 0; right: 0; top: 12%; height: 18%; background: #0b0b0c; }
.pp-backmsg { position: relative; display: none; justify-items: center; gap: 6px; text-align: center; margin-top: 12%; }
.pp-backmsg b { font: 800 24px var(--display); }
.pp-backmsg > span:last-child { color: var(--mist); font-size: 14px; }
.pp-backmsg svg { width: 54px; height: 54px; padding: 12px; border-radius: 50%; background: var(--mint); color: #1a1305; box-shadow: 0 0 40px -6px var(--mint); }
.pp-spin { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.18); border-top-color: var(--g1); animation: pp-spin 0.9s linear infinite; }
@keyframes pp-spin { to { transform: rotate(1turn); } }
[data-state='checkout'] .bm-open,
[data-state='waiting'] .bm-wait,
[data-state='late'] .bm-wait,
[data-state='done'] .bm-done { display: grid; }
.pp-card.flipped { animation: pp-flip 1.1s cubic-bezier(0.3, 1.3, 0.4, 1) forwards; }
@keyframes pp-flip { from { transform: rotateX(var(--rx)) rotateY(var(--ry)); } to { transform: rotateX(4deg) rotateY(180deg); } }

.pp-floor {
  position: absolute; left: 12%; right: 12%; bottom: -6%; height: 40px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--aurora) 30%, transparent), transparent);
  filter: blur(10px);
}

/* ---------- the panel ---------- */
.pp-panel {
  position: relative; padding: 32px; border-radius: 24px;
  border: 1px solid var(--line-strong);
  background: rgba(20, 20, 21, 0.62); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: pp-rise 0.9s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pp-rise { from { opacity: 0; transform: translateY(24px); } }
.pp-kicker { display: inline-block; color: #e8c7a8; font: 700 12.5px var(--font); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 10px; }
.pp-panel h1 {
  font: 800 clamp(32px, 4vw, 44px)/1.02 var(--display); letter-spacing: -0.02em; margin: 0 0 22px;
  background: linear-gradient(180deg, #ffffff 30%, #e8c7a8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pp-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; border: 1px solid var(--line); background: rgba(10, 10, 11, 0.6); }
.pp-toggle button {
  display: grid; gap: 1px; justify-items: center; padding: 10px 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--mist); font: 700 15px var(--font); transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.pp-toggle em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--mint); }
.pp-toggle button[aria-checked='true'] { background: rgba(196, 122, 69, 0.16); color: var(--ice); box-shadow: inset 0 0 0 1px rgba(196, 122, 69, 0.5), 0 0 30px -12px var(--aurora); }
.pp-toggle button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.pp-total { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 16px; }
.pp-total b { font: 800 36px/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pp-total span { color: var(--mist); font-size: 15px; }
.pp-adds { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.pp-adds li { position: relative; padding-left: 28px; color: var(--dim); font-size: 14.5px; line-height: 1.4; }
.pp-adds li::before {
  content: ''; position: absolute; left: 3px; top: 0.55em; width: 11px; height: 6px; translate: 0 -50%; rotate: -45deg;
  border-left: 2px solid var(--aurora); border-bottom: 2px solid var(--aurora);
}
.pp-adds b { display: block; color: var(--ice); font-weight: 700; font-size: 15.5px; }
.pp-go { width: 100%; height: 54px; font-size: 16.5px; }
.pp-go:not(:disabled) { animation: pp-pulse 2.2s ease-in-out infinite; }
.pp-go:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
@keyframes pp-pulse { 50% { box-shadow: 0 0 0 6px rgba(214, 168, 78, 0.16), 0 18px 50px -12px var(--signal); } }
.plus-page .note { color: var(--dim); font-size: 13.5px; margin: 14px 0 0; }
.plus-page .note a { color: var(--mist); }
.pp-box { margin-top: 18px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line-strong); background: rgba(10, 10, 11, 0.5); }
.pp-box h2 { margin: 0 0 6px; font: 800 24px/1.15 var(--display); }
.pp-box p { color: var(--mist); margin: 0; }
.key { display: flex; gap: 8px; margin: 14px 0; }
.key code { flex: 1; overflow-wrap: anywhere; padding: 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
[hidden] { display: none !important; }
.pp-trust { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--dim); font-size: 13px; }
.pp-trust li::before { content: '✓'; color: var(--mint); font-weight: 700; margin-right: 6px; }

/* ---------- free or plus ---------- */
.pp-compare { padding: 40px 0 110px; }
.pp-compare h2 { font: 800 clamp(34px, 5.2vw, 60px)/1.02 var(--display); letter-spacing: -0.025em; margin: 0; max-width: 760px; text-wrap: balance; }
.tiers {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line-strong); background: rgba(20, 20, 21, 0.74); backdrop-filter: blur(14px);
}
.tier { display: flex; flex-direction: column; padding: 36px 38px 38px; }
.tier + .tier { border-left: 1px solid var(--line-strong); }
.tier-plus {
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(196, 122, 69, 0.2), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgba(214, 168, 78, 0.1), transparent 70%);
}
.tier h3 { margin: 0; font: 700 20px var(--display); color: var(--mist); }
.tier-plus h3 { color: #e8c7a8; }
.tier .price { margin: 12px 0 0; font: 800 clamp(46px, 5vw, 62px)/1 var(--display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.tier .price small { margin-left: 10px; font: 500 16px var(--font); letter-spacing: 0; color: var(--mist); }
.price-alt { margin: 8px 0 0; color: var(--dim); font-size: 14.5px; }
.tier ul { list-style: none; display: grid; gap: 11px; margin: 28px 0 32px; padding: 0; }
.tier li { position: relative; padding-left: 28px; }
.tier li::before {
  content: ''; position: absolute; left: 3px; top: 0.62em; width: 11px; height: 6px; translate: 0 -50%; rotate: -45deg;
  border-left: 2px solid var(--signal); border-bottom: 2px solid var(--signal);
}
.tier-plus li::before { border-color: var(--aurora); }
.tier .btn { align-self: flex-start; margin-top: auto; }
.pp-fine { margin: 18px 0 0; color: var(--dim); font-size: 14px; }

@media (max-width: 900px) {
  .pp { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 84px; }
  .pp-stage { min-height: 0; padding: 12px 0 18px; }
  .pp-card { width: min(380px, 88vw); }
  .pp-panel { padding: 24px; }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier { padding: 30px 24px 32px; }
  .tier + .tier { border-left: 0; border-top: 1px solid var(--line-strong); }
}

@media (prefers-reduced-motion: reduce) {
  .pp-aurora, .pp-card, .pp-panel, .pp-price b span, .pp-go, .pp-spin { animation: none !important; }
  .pp-card.flipped { transform: rotateY(180deg); }
}
