/* 10. Price: the one dark room. License card, count-up, sparks and swipe to buy, ported from the Macify site. */
.price-sec { background: var(--night); color: var(--night-ink); overflow: clip; }
.price-sec::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 30% 55%, rgba(255, 122, 89, .14), transparent 70%); }
.price-title { color: var(--night-ink); max-width: 13em; }
.price-sec .display em { color: var(--coral); }
.price-stage { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }

.license-wrap { position: relative; perspective: 1200px; display: grid; place-items: center; padding: 20px 0 48px; cursor: pointer; }
.license {
  position: relative; width: min(100%, 470px); aspect-ratio: 1.586; transform-style: preserve-3d;
  transform: rotateX(var(--lrx, 0deg)) rotateY(calc(var(--lry, 0deg) + var(--flip, 0deg)));
  transition: transform .7s var(--ease); animation: float 6s ease-in-out infinite;
}
.license.flipped { --flip: 180deg; transition: transform 1.2s var(--spring); }
@keyframes float { 50% { translate: 0 -12px; } }
.license-face {
  position: absolute; inset: 0; border-radius: clamp(16px, 2vw, 24px); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; justify-content: space-between; text-align: left; color: var(--ink);
  background: radial-gradient(130% 100% at 0% 0%, #fffdf8 0%, #f4f1ea 55%, #e6e0d3 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(23, 23, 28, .06), 0 50px 90px -30px rgba(0, 0, 0, .8), 0 18px 30px -18px rgba(0, 0, 0, .6);
}
.license-back { transform: rotateY(180deg); justify-content: space-between; padding-top: calc(12% + 16px); }
.lic-top, .lic-bottom { display: flex; justify-content: space-between; align-items: center; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(23, 23, 28, .5); }
.lic-top .mark { width: 34px; height: 34px; border-radius: 9px; }
.lic-mid { position: absolute; right: -8%; top: 14%; width: 56%; aspect-ratio: 1; pointer-events: none; }
.lic-arc { position: absolute; inset: 0; border-radius: 50%; border: clamp(8px, 1.2vw, 12px) solid var(--coral); clip-path: polygon(0 45%, 100% 50%, 100% 100%, 0 100%); opacity: .9; }
.lic-name { font: 400 clamp(44px, 6vw, 72px)/.9 var(--serif); letter-spacing: -0.03em; position: relative; }
.lic-name small { display: block; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(23, 23, 28, .5); margin-top: 12px; }
.lic-bottom b { font: 300 34px/1 var(--sans); color: var(--ink); letter-spacing: 0; text-transform: none; }
.lic-stripe { position: absolute; left: 0; right: 0; top: 8%; height: 11%; background: var(--ink); overflow: hidden; }
.lic-stripe::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .16) 50%, transparent 60%); translate: -100% 0; animation: chipShine 5s var(--ease) 2s infinite; }
@keyframes chipShine { 40%, 100% { translate: 120% 0; } }
.lic-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lic-key { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 24px rgba(255, 122, 89, .35); }
.lic-sign { flex: 1; min-width: 0; font: italic 400 20px/1.15 var(--serif); color: var(--ink); }
.lic-sign small { display: block; font: normal 500 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(23, 23, 28, .45); margin-bottom: 3px; }
.lic-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin: 0; }
.lic-info dt { font: 500 9px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(23, 23, 28, .45); }
.lic-info dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.lic-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at var(--sx, 30%) var(--sy, 20%), rgba(255, 255, 255, .9), transparent 45%),
    linear-gradient(115deg, transparent 28%, rgba(255, 170, 140, .35) 42%, rgba(255, 230, 200, .3) 52%, rgba(200, 220, 255, .25) 60%, transparent 72%);
  background-size: 100% 100%, 260% 260%;
  background-position: 0 0, var(--hx, 50%) var(--hy, 50%);
}
.license-shadow { position: absolute; bottom: 14px; left: 18%; right: 18%; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .6); filter: blur(16px); animation: shadowFloat 6s ease-in-out infinite; }
@keyframes shadowFloat { 50% { scale: .86; opacity: .6; } }
.license-hint { position: absolute; bottom: 0; font: 11px var(--mono); color: var(--night-muted); letter-spacing: .04em; }

.price-card { position: relative; background: var(--card); color: var(--ink); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); }
.price-card.celebrate { animation: celebrate .9s var(--spring); }
@keyframes celebrate { 30% { transform: scale(1.02); } }
.price-head { display: flex; align-items: flex-end; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.price-head h3 { font: 400 34px/1 var(--serif); letter-spacing: -0.02em; }
.price-head p { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.price { margin-left: auto; text-align: right; display: grid; justify-items: end; }
.price-num { font: 300 80px/.85 var(--serif); letter-spacing: -0.04em; font-variant-numeric: lining-nums tabular-nums; }
.price small { font: 400 12px var(--mono); color: var(--ink-3); margin-top: 8px; }
.price-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.price-tags span { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.price-tags s { color: var(--ink-3); }
.checks { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: center; opacity: 0; transform: translateX(-10px); transition: opacity .6s var(--ease), transform .7s var(--spring); transition-delay: calc(.35s + var(--i, 0) * 90ms); }
.checks li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; scale: 0; transition: scale .5s var(--spring); transition-delay: calc(.45s + var(--i, 0) * 90ms);
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.price-card.in .checks li { opacity: 1; transform: none; }
.price-card.in .checks li::before { scale: 1; }
.sparks { position: absolute; left: -60px; top: -60px; width: calc(100% + 120px); height: calc(100% + 120px); pointer-events: none; z-index: 3; }
.price-card .fine a { color: var(--ink-2); text-decoration-color: var(--coral); text-underline-offset: 3px; }

/* Swipe to buy */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.swipe {
  --x: 0px; --p: 0; --lean: 0px; --thumb: 56px;
  position: relative; height: 64px; border-radius: 999px; overflow: hidden; isolation: isolate; margin-bottom: 16px;
  background: radial-gradient(120% 140% at 0% 50%, #2a2a31, #111114 60%);
  color: #fff; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6), 0 14px 30px -16px rgba(0, 0, 0, .6);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y; cursor: grab; -webkit-tap-highlight-color: transparent;
  transition: background .5s var(--ease), box-shadow .5s var(--ease), transform .2s var(--ease);
}
.swipe::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 2; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 62%, rgba(255, 160, 130, .95) 75%, transparent 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rim 4.5s linear infinite;
}
@keyframes rim { to { --a: 360deg; } }
@media (hover: hover) and (pointer: fine) { .swipe:hover { transform: translateY(-1px); } }
.swipe.dragging { cursor: grabbing; transform: none; }
.swipe.armed { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6), 0 0 0 4px rgba(255, 122, 89, .22), 0 18px 40px -16px rgba(255, 122, 89, .6); }
.swipe-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--x) + var(--thumb) + 8px); border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 122, 89, .04), rgba(255, 122, 89, calc(.12 + var(--p) * .45)));
  box-shadow: 14px 0 34px -8px rgba(255, 122, 89, calc(var(--p) * .6));
}
.swipe-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding-left: var(--thumb); font-size: 17px; letter-spacing: -0.01em; pointer-events: none;
  opacity: calc(1 - var(--p) * 1.4);
  -webkit-mask-image: linear-gradient(90deg, transparent calc(var(--x) + 70px), #000 calc(var(--x) + 150px)); mask-image: linear-gradient(90deg, transparent calc(var(--x) + 70px), #000 calc(var(--x) + 150px)); }
.shine { background: linear-gradient(90deg, rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .4) 38%, #fff 50%, rgba(255, 255, 255, .4) 62%, rgba(255, 255, 255, .4) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.6s linear infinite; }
@keyframes shine { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.chev { display: inline-flex; font: 18px/1 var(--mono); }
.chev i { font-style: normal; opacity: .2; animation: chev 1.6s ease-in-out infinite; }
.chev i:nth-child(2) { animation-delay: .15s; } .chev i:nth-child(3) { animation-delay: .3s; }
@keyframes chev { 30% { opacity: 1; translate: 3px 0; } 60% { opacity: .2; translate: 0 0; } }
.swipe-goal { position: absolute; right: 8px; top: 8px; bottom: 8px; display: grid; place-items: center; padding: 0 14px; border-radius: 999px; font: 500 14px var(--mono); color: rgba(255, 255, 255, calc(.3 + var(--p) * .7)); border: 1px dashed rgba(255, 255, 255, calc(.15 + var(--p) * .45)); transform: scale(calc(1 + var(--p) * .06)); transition: background .3s, color .3s; pointer-events: none; }
.swipe.armed .swipe-goal { background: var(--coral); border-color: var(--coral); color: #fff; }
.swipe-thumb {
  position: absolute; z-index: 3; left: 4px; top: 4px; width: var(--thumb); height: var(--thumb); border-radius: 999px; overflow: hidden;
  background: linear-gradient(180deg, #fff, #ece8de); color: var(--ink); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45), 0 0 calc(var(--p) * 40px) rgba(255, 122, 89, calc(var(--p) * .8)), inset 0 -2px 0 rgba(0, 0, 0, .08);
  transform: translateX(calc(var(--x) + var(--lean))) scale(var(--ts, 1));
}
.swipe:not(.dragging) .swipe-thumb, .swipe:not(.dragging) .swipe-fill { transition: transform .7s var(--spring), width .7s var(--spring), box-shadow .4s var(--ease); }
.swipe.dragging .swipe-thumb { --ts: 1.06; transition: transform .08s linear; }
.swipe-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; animation: halo 2.4s ease-out infinite; pointer-events: none; }
.swipe.dragging .swipe-thumb::after, .swipe.done .swipe-thumb::after { animation: none; }
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); } }
.swipe-arrow { position: absolute; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: translateX(calc(var(--p) * 4px)); transition: opacity .3s var(--ease), transform .4s var(--spring); }
.swipe:not(.dragging):not(.done) .swipe-thumb { animation: nudge 3.4s var(--ease) 1.4s infinite; }
@media (hover: hover) and (pointer: fine) { .swipe:hover:not(.dragging):not(.done) .swipe-thumb { animation: none; } }
@keyframes nudge { 0%, 70%, 100% { translate: 0; } 78% { translate: 12px; } 86% { translate: 0; } 92% { translate: 5px; } }
.swipe-ok { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 16px; font-weight: 500; opacity: 0; transform: scale(.85); transition: opacity .3s var(--ease), transform .5s var(--spring); }
.swipe-check { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; background: var(--coral); border-radius: 50%; padding: 3px; }
.swipe-check path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .5s var(--ease) .35s; }
.spin { width: 14px; height: 14px; border: 2px solid rgba(0, 0, 0, .15); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.swipe.done { cursor: default; background: #000; }
.swipe.done .swipe-thumb { width: calc(100% - 8px); transform: translateX(0); transition: width .75s var(--spring), transform .75s var(--spring), box-shadow .5s; box-shadow: 0 0 40px rgba(255, 122, 89, .45); }
.swipe.done .swipe-arrow { opacity: 0; transform: translateX(16px) scale(.5); }
.swipe.done .swipe-ok { opacity: 1; transform: none; transition-delay: .25s; }
.swipe.done .swipe-check path { stroke-dashoffset: 0; }
.swipe.done .swipe-label, .swipe.done .swipe-goal { opacity: 0; }
.swipe:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }

/* After checkout */
.paid { margin-top: clamp(32px, 4vw, 48px); padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: var(--night-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); display: grid; gap: 14px; justify-items: center; text-align: center; animation: rise .6s var(--ease); }
.paid h3 { font: 400 clamp(34px, 4vw, 52px)/1 var(--serif); letter-spacing: -0.02em; }
.paid p { color: var(--night-muted); max-width: 40em; text-wrap: balance; }
.paid code { background: rgba(255, 255, 255, .08); color: var(--night-ink); }
.paid.failed h3 { color: var(--coral); }

@media (max-width: 980px) {
  .price-stage { grid-template-columns: 1fr; justify-items: center; }
  .license-wrap { width: 100%; max-width: 470px; }
  .price-card { width: 100%; max-width: 520px; }
}
@media (max-width: 734px) {
  .license-back .lic-bottom { display: none; }
  .lic-sign { font-size: 16px; }
  .lic-info dd { font-size: 12px; }
  .swipe { height: 60px; --thumb: 52px; }
  .swipe-label { font-size: 14px; padding: 0 64px 0 58px; gap: 4px; white-space: nowrap; }
  .chev { font-size: 15px; }
  .swipe-goal { padding: 0 10px; font-size: 13px; }
  .price-num { font-size: 64px; }
}
.paid-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill-coral { background: var(--coral); color: #fff; box-shadow: 0 12px 30px -12px rgba(255, 122, 89, .7); }
@media (hover: hover) and (pointer: fine) { .pill-coral:hover { background: #ff6a45; } }

/* Setup steps: download, paste one line to the agent, ask for a logo. */
.setup { list-style: none; counter-reset: s; padding: 0; margin: 4px 0 6px; display: grid; gap: 12px; text-align: left; max-width: 560px; width: 100%; }
.setup li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 15px; color: var(--night-muted); }
.setup li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 500 12px var(--mono); background: var(--coral); color: #fff; }
.setup b { color: var(--night-ink); font-weight: 600; }
.setup q { font-style: italic; }
.setup-prompt { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; padding: 10px 10px 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.setup-prompt code { flex: 1; background: none; padding: 0; font: 400 12.5px/1.55 var(--mono); color: var(--night-ink); white-space: normal; user-select: all; }
.setup .copy { flex: none; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--night-ink); color: var(--night); font: 500 12px var(--sans); }
/* The same steps in the light FAQ */
.faq .setup { margin: 0 0 24px; }
.faq .setup li { color: var(--ink-2); }
.faq .setup b { color: var(--ink); }
.faq .setup-prompt { background: var(--card); box-shadow: inset 0 0 0 1px var(--line-strong); }
.faq .setup-prompt code { color: var(--ink); }
.faq .setup .copy { background: var(--ink); color: var(--paper); }
@media (pointer: coarse) { .setup .copy { min-height: 44px; } }

/* After checkout the panel opens as a centred dialog over the page. */
dialog.paid { margin: auto; width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 0; color: var(--night-ink); padding: clamp(28px, 4vw, 44px) clamp(20px, 4vw, 40px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 60px 120px -40px rgba(0, 0, 0, .7); }
dialog.paid:not([open]) { display: none; }
dialog.paid::backdrop { background: rgba(23, 23, 28, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.paid-close { position: absolute; top: 14px; right: 14px; min-height: 36px; padding: 0 14px; border-radius: 999px; font: 500 13px var(--sans); color: var(--night-muted); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
@media (hover: hover) and (pointer: fine) { .paid-close:hover { color: var(--night-ink); } }
@media (pointer: coarse) { .paid-close { min-height: 44px; } }
/* Dialog: roomier, a drawn cross to close, plain coral step numbers. */
dialog.paid { padding-top: clamp(48px, 6vw, 64px); padding-bottom: clamp(40px, 5vw, 56px); gap: 20px; }
.paid-close { width: 40px; min-height: 40px; padding: 0; display: grid; place-items: center; }
.paid-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (pointer: coarse) { .paid-close { width: 44px; } }
.setup li::before { background: none; color: var(--coral); font-size: 13px; width: auto; height: auto; justify-content: start; padding-top: 2px; }
.setup li { grid-template-columns: 20px 1fr; }
.paid.failed .setup { display: none; } /* no install steps when there is nothing to install */
