/* ===== Ticket buttons: the ticket drawing is the frame (see ctas.js) ===== */
.tk { --tk-h: 58px; position: relative; isolation: isolate; display: inline-flex; align-items: stretch; height: var(--tk-h); text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--dark); -webkit-tap-highlight-color: transparent; }
.tk .tk-svg { position: absolute; inset: 0; z-index: -1; overflow: visible; pointer-events: none; }
.tk .tk-t { display: flex; align-items: center; padding: 0 22px 0 30px; }
.tk .tk-s { display: flex; align-items: center; padding: 0 22px 0 18px; font-weight: 500; letter-spacing: .04em; font-size: 16px; }
.tk.tk-sm { --tk-h: 40px; font-size: 11px; letter-spacing: .2em; }
.tk.tk-sm .tk-t { padding: 0 14px 0 20px; } .tk.tk-sm .tk-s { padding: 0 16px 0 12px; font-size: 13px; }
.tk .tk-ripple, .tk .tk-comet, .tk .tk-stroke { fill: none; stroke: none; }
.tk .tk-perf { stroke-width: 1.4; stroke-dasharray: 2 4; stroke-linecap: round; }
.tk .tk-shine { opacity: 0; }
.tk:focus-visible { outline: none; } .tk:focus-visible .tk-svg { filter: drop-shadow(0 0 6px rgba(255,214,150,.9)); }

/* floating ticket: same drawing, slides up whenever no other ticket is on screen */
.tk.tk-float { position: fixed; right: 24px; bottom: 24px; z-index: 30; --tk-h: 56px; opacity: 0; transform: translateY(150%); pointer-events: none;
  transition: transform .55s cubic-bezier(.2,.9,.25,1.2), opacity .3s; }
.tk.tk-float.on { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 820px) { .tk.tk-float { left: 50%; right: auto; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 150%); } .tk.tk-float.on { transform: translate(-50%, 0); } }

/* ---------- A · Gold ticket with a passing shine ---------- */
[data-cta="a"] .tk .tk-perf { stroke: rgba(25,7,6,.42); }
[data-cta="a"] .tk { transition: transform .25s, filter .25s; }
[data-cta="a"] .tk:not(.tk-float).in { animation: tkRise .75s cubic-bezier(.2,.8,.2,1) both, tkGlow 6s 1.4s ease-in-out infinite; }
[data-cta="a"] .tk.tk-float.on { animation: tkGlow 6s 1s ease-in-out infinite; }
[data-cta="a"] .tk.in .tk-shine, [data-cta="a"] .tk.tk-float.on .tk-shine { animation: tkShine 6s .55s ease-in-out infinite; }
[data-cta="a"] .tk:hover { transform: translateY(-2px); filter: brightness(1.07) drop-shadow(0 6px 18px rgba(255,190,90,.45)); }
[data-cta="a"] .tk.tk-float:hover { transform: translateY(-2px); }
@media (max-width: 820px) { [data-cta="a"] .tk.tk-float.on:hover { transform: translate(-50%, -2px); } }
@keyframes tkRise { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes tkShine { 0% { opacity: 0; transform: translateX(0); } 3% { opacity: 1; } 16% { opacity: 1; transform: translateX(calc(var(--w) * 1.6)); } 17%, 100% { opacity: 0; transform: translateX(calc(var(--w) * 1.6)); } }
@keyframes tkGlow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255,196,100,0)); } 12% { filter: drop-shadow(0 0 16px rgba(255,196,100,.75)); } 30% { filter: drop-shadow(0 0 4px rgba(255,196,100,.2)); } }

/* ---------- B · Lit outline: a light runs around the ticket ---------- */
[data-cta="b"] .tk { color: var(--cream); }
[data-cta="b"] .tk .tk-fill { fill: rgba(25,7,6,.62); transition: fill .3s; }
[data-cta="b"] .tk .tk-stroke { fill: none; stroke: #F0C27A; stroke-width: 1.5; }
[data-cta="b"] .tk .tk-s { color: #F0C27A; }
[data-cta="b"] .tk .tk-perf { stroke: rgba(240,194,122,.75); }
[data-cta="b"] .tk .tk-comet { stroke: #FFF4DA; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 46 var(--len); stroke-dashoffset: 46; opacity: 0; filter: drop-shadow(0 0 4px #FFD58E) drop-shadow(0 0 10px rgba(255,200,110,.8)); }
[data-cta="b"] .tk.in .tk-stroke, [data-cta="b"] .tk.tk-float.on .tk-stroke { stroke-dasharray: var(--len); animation: tkDraw 1.2s cubic-bezier(.5,0,.2,1) both; }
[data-cta="b"] .tk.in .tk-comet, [data-cta="b"] .tk.tk-float.on .tk-comet { animation: tkRun 4.5s 1.1s linear infinite; }
[data-cta="b"] .tk:not(.tk-float) { opacity: 0; } [data-cta="b"] .tk.in { opacity: 1; transition: opacity .5s; }
[data-cta="b"] .tk:hover { color: var(--dark); } [data-cta="b"] .tk:hover .tk-fill { fill: #F0C27A; } [data-cta="b"] .tk:hover .tk-s { color: var(--dark); } [data-cta="b"] .tk:hover .tk-perf { stroke: rgba(25,7,6,.45); }
@keyframes tkDraw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes tkRun { 0% { opacity: 0; stroke-dashoffset: 46; } 4% { opacity: 1; } 36% { opacity: 1; } 40% { opacity: 0; stroke-dashoffset: calc(46 - var(--len)); } 100% { opacity: 0; stroke-dashoffset: calc(46 - var(--len)); } }

/* ---------- C · Gold ticket with a heartbeat ripple ---------- */
[data-cta="c"] .tk .tk-perf { stroke: rgba(25,7,6,.42); }
[data-cta="c"] .tk .tk-ripple { stroke: #F0C27A; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; opacity: 0; }
[data-cta="c"] .tk:not(.tk-float).in { animation: tkHand .9s cubic-bezier(.2,.9,.25,1.25) both, tkBeat 3.4s 1.2s ease-in-out infinite; }
[data-cta="c"] .tk.tk-float.on .tk-svg { animation: tkBeat 3.4s .8s ease-in-out infinite; }
[data-cta="c"] .tk.in .tk-ripple, [data-cta="c"] .tk.tk-float.on .tk-ripple { animation: tkRipple 3.4s 1.2s ease-out infinite; }
[data-cta="c"] .tk { transition: filter .25s; }
[data-cta="c"] .tk:hover { filter: brightness(1.07) drop-shadow(0 0 14px rgba(255,190,90,.55)); }
@keyframes tkHand { from { opacity: 0; transform: translateY(20px) rotate(-7deg); } 60% { opacity: 1; transform: translateY(-2px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
@keyframes tkBeat { 0%, 100% { transform: none; } 6% { transform: scale(1.045); } 12% { transform: none; } 18% { transform: scale(1.025); } 24% { transform: none; } }
@keyframes tkRipple { 0% { opacity: 0; transform: scale(1); } 5% { opacity: .9; } 45% { opacity: 0; transform: scale(1.22, 1.6); } 100% { opacity: 0; transform: scale(1.22, 1.6); } }

@media (prefers-reduced-motion: reduce) {
  .tk, .tk *, .tk .tk-svg * { animation: none !important; }
  [data-cta="b"] .tk:not(.tk-float) { opacity: 1; }
  .tk.tk-float { transition: opacity .2s; }
}

/* ---------- D · Draws itself, then fills with gold; a real light sweep with a small pulse ---------- */
.tk .tk-sweep { display: none; }
.tk .tk-lite, .tk .tk-edge { opacity: 0; }
[data-cta="d"] .tk { scale: var(--tk-s, 1); }
[data-cta="d"] .tk .tk-sweep { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background:
    linear-gradient(105deg, rgba(255,250,235,0) calc(var(--x, -40%) - 4%), rgba(255,252,244,.78) var(--x, -40%), rgba(255,250,235,0) calc(var(--x, -40%) + 4%)),
    linear-gradient(105deg, rgba(255,226,170,0) calc(var(--x, -40%) - 24%), rgba(255,230,180,.32) var(--x, -40%), rgba(255,226,170,0) calc(var(--x, -40%) + 24%)); }
[data-cta="d"] .tk .tk-perf { stroke: rgba(25,7,6,.42); }
[data-cta="d"] .tk .tk-stroke { stroke: #E7B266; stroke-width: 1.4; }
[data-cta="d"] .tk .tk-edge { stroke-width: 1.6; }
[data-cta="d"] .tk .tk-t, [data-cta="d"] .tk .tk-s { position: relative; z-index: 1; }
/* entrance: the outline draws itself, then the gold flows in and the words appear */
[data-cta="d"] .tk:not(.tk-float) .tk-fill, [data-cta="d"] .tk:not(.tk-float) .tk-perf { opacity: 0; }
[data-cta="d"] .tk:not(.tk-float) .tk-t, [data-cta="d"] .tk:not(.tk-float) .tk-s { opacity: 0; }
[data-cta="d"] .tk:not(.tk-float) .tk-stroke { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
[data-cta="d"] .tk.in .tk-stroke, [data-cta="d"] .tk.tk-float.on .tk-stroke { animation: tkDraw 1s cubic-bezier(.5,0,.2,1) both; }
[data-cta="d"] .tk.in .tk-fill, [data-cta="d"] .tk.in .tk-perf { animation: tkFillIn .55s .85s ease-out both; }
[data-cta="d"] .tk.in .tk-t, [data-cta="d"] .tk.in .tk-s { animation: tkFillIn .45s 1.05s ease-out both; }
/* hover (from C): the ticket brightens and glows; the words turn a warm deep brown */
[data-cta="d"] .tk { transition: filter .25s, color .25s; }
[data-cta="d"] .tk:hover, [data-cta="d"] .tk:focus-visible { filter: brightness(1.07) drop-shadow(0 0 14px rgba(255,190,90,.55)); color: #6A2A0C; }
@keyframes tkFillIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { [data-cta="d"] .tk .tk-fill, [data-cta="d"] .tk .tk-perf, [data-cta="d"] .tk .tk-t, [data-cta="d"] .tk .tk-s { opacity: 1 !important; } [data-cta="d"] .tk .tk-stroke { stroke-dashoffset: 0 !important; } }
