/* Custom styles and animations that are awkward to express with Tailwind utilities */

:root {
    --brand: #6129f5;
    --accent: #c6f24e;
    --ink: #07061a;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
}

::selection { background: var(--accent); color: var(--ink); }

/* ---------- Building blocks ---------- */

.bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.bg-dots {
    background-image: radial-gradient(rgba(97, 41, 245, .18) 1px, transparent 1px);
    background-size: 22px 22px;
}

.noise::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.text-gradient {
    background: linear-gradient(100deg, var(--accent) 0%, #8ef0c4 35%, #b6a3ff 70%, var(--accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 6s linear infinite;
}

@keyframes shine { to { background-position: 200% center; } }

/* Eyebrow badge above section titles */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand);
    background: #f3f0ff;
    border: 1px solid #e9e3ff;
}
.eyebrow-dark { color: var(--accent); background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.eyebrow-dot { width: .45rem; height: .45rem; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: ping-dot 2s infinite; }

@keyframes ping-dot {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70%, 100% { box-shadow: 0 0 0 .5rem transparent; }
}

/* Buttons */
.btn-primary, .btn-accent, .btn-ghost {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .9rem 1.6rem;
    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), color .3s;
}
.btn-primary { color: #fff; background: var(--brand); box-shadow: 0 14px 30px -12px rgba(97, 41, 245, .8); }
.btn-accent { color: var(--ink); background: var(--accent); box-shadow: 0 14px 30px -12px rgba(198, 242, 78, .7); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .04); backdrop-filter: blur(8px); }

/* Sliding fill on hover */
.btn-primary::before, .btn-accent::before, .btn-ghost::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    transform: translateY(101%);
    transition: transform .5s var(--ease-out);
}
.btn-primary::before { background: var(--ink); }
.btn-accent::before { background: #fff; }
.btn-ghost::before { background: #fff; }
.btn-primary:hover::before, .btn-accent:hover::before, .btn-ghost:hover::before { transform: translateY(0); }
.btn-ghost:hover { color: var(--ink); }
.btn-primary svg, .btn-accent svg, .btn-ghost svg { transition: transform .4s var(--ease-out); }
.btn-primary:hover svg, .btn-accent:hover svg, .btn-ghost:hover svg { transform: translateX(4px); }

/* Navbar */
.nav-link {
    position: relative;
    display: block;
    padding: .55rem 1rem;
    border-radius: 999px;
    font-size: .925rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .75);
    transition: color .3s, background .3s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-link.is-active { color: var(--ink); background: var(--accent); }

#navbar.is-scrolled { background: rgba(7, 6, 26, .78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .5); }
#navbar.is-scrolled .nav-inner { height: 4.25rem; }
#navbar.is-hidden { transform: translateY(-100%); }

.dropdown { opacity: 0; visibility: hidden; transform: translate(-50%, 10px); transition: all .35s var(--ease-out); }
.group:hover > .dropdown, .group:focus-within > .dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Hamburger -> X */
.burger { position: relative; width: 20px; height: 14px; }
.burger span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .4s var(--ease-out), opacity .3s, top .4s var(--ease-out); }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
.menu-open .burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

#mobileMenu { opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.menu-open #mobileMenu { opacity: 1; visibility: visible; }
.mobile-item { opacity: 0; transform: translateY(16px); transition: all .5s var(--ease-out); transition-delay: calc(var(--i) * 45ms); }
.menu-open .mobile-item { opacity: 1; transform: none; }

.footer-link { position: relative; transition: color .3s; }
.footer-link::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out); }
.footer-link:hover { color: #fff; }
.footer-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* Cursor glow */
#cursorGlow { background: radial-gradient(circle, rgba(97, 41, 245, .16), transparent 65%); }

/* Cards with a spotlight that follows the cursor */
.spotlight { position: relative; isolation: isolate; }
.spotlight::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(97, 41, 245, .12), transparent 45%);
    transition: opacity .4s;
}
.spotlight:hover::before { opacity: 1; }
.spotlight-dark::before { background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(198, 242, 78, .12), transparent 45%); }

/* Animated gradient border */
.gradient-border { position: relative; }
.gradient-border::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: inherit;
    background: conic-gradient(from var(--angle), transparent 60%, var(--accent), #b6a3ff, transparent 90%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin-angle 4s linear infinite;
    pointer-events: none;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-angle { to { --angle: 360deg; } }

/* 3D tilt */
.tilt { transform-style: preserve-3d; transition: transform .5s var(--ease-out); will-change: transform; }
.tilt-inner { transform: translateZ(40px); }

/* Credit card shine */
.card-shine { position: relative; overflow: hidden; }
.card-shine::after {
    content: "";
    position: absolute;
    inset: -50%;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .35) 50%, transparent 60%);
    transform: translateX(-60%);
    animation: card-shine 5s ease-in-out infinite;
}
@keyframes card-shine { 0%, 60% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }

/* ---------- Keyframe utilities ---------- */

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: float 8s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

.animate-blob { animation: blob 12s ease-in-out infinite; }
@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 20px) scale(.92); }
}

.animate-spin-slow { animation: spin 30s linear infinite; }
.animate-spin-reverse { animation: spin 40s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.marquee { display: flex; width: max-content; animation: marquee 35s linear infinite; }
.marquee-reverse { animation-direction: reverse; }
.marquee-wrap:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.mask-fade-x { mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }

/* Orbiting icons around hero */
.orbit { position: absolute; inset: 0; border-radius: 999px; border: 1px dashed rgba(255, 255, 255, .12); }

/* Word rotator in hero heading */
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; }
.rotator > span { grid-area: 1 / 1; transform: translateY(110%); opacity: 0; transition: transform .7s var(--ease-out), opacity .7s; }
.rotator > span.is-active { transform: none; opacity: 1; }
.rotator > span.is-leaving { transform: translateY(-110%); opacity: 0; }

/* Split text: each word slides up */
.split-word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; }
.split-word > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--w) * 70ms + 200ms); }
.is-loaded .split-word > span { transform: none; }

/* Hero entrance for elements outside the split heading */
.hero-in { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0ms); }
.is-loaded .hero-in { opacity: 1; transform: none; }

/* Live notification pop */
.notify { animation: notify 7s var(--ease-out) infinite; }
@keyframes notify {
    0% { opacity: 0; transform: translateY(20px) scale(.9); }
    8%, 85% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translateY(-10px) scale(.95); }
}

/* Chart bars grow, line draws */
.bar { transform-origin: bottom; transform: scaleY(0); transition: transform 1.2s var(--ease-out); transition-delay: calc(var(--i) * 80ms); }
.in-view .bar { transform: scaleY(1); }
.draw-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; transition: stroke-dashoffset 2.4s var(--ease-out); }
.in-view .draw-path { stroke-dashoffset: 0; }

/* Steps connector line */
.step-line { transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease-out) .3s; }
.in-view .step-line { transform: scaleX(1); }

/* ---------- Scroll reveal ---------- */

[data-reveal] { opacity: 0; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out); transition-delay: var(--delay, 0ms); }
[data-reveal=""], [data-reveal="up"] { transform: translateY(40px); }
[data-reveal="left"] { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal="zoom"] { transform: scale(.9); }
[data-reveal="blur"] { filter: blur(12px); transform: translateY(20px); }
[data-reveal].is-visible { opacity: 1; transform: none; filter: none; }

/* FAQ accordion */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] .faq-icon { transform: rotate(135deg); background: var(--brand); color: #fff; }
.faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.faq-item.is-open .faq-body { grid-template-rows: 1fr; }
.faq-body > div { overflow: hidden; }

/* Testimonial slider */
.slider-track { display: flex; transition: transform .8s var(--ease-out); }
.slider-dot { width: .6rem; height: .6rem; border-radius: 999px; background: #d5cbff; transition: all .4s var(--ease-out); }
.slider-dot.is-active { width: 2rem; background: var(--brand); }

/* Pricing toggle */
#billingToggle[aria-checked="true"] { background: var(--brand); }
#billingToggle[aria-checked="true"] span { transform: translateX(1.75rem); }
.price-swap { display: inline-block; transition: transform .4s var(--ease-out), opacity .3s; }
.price-swap.is-swapping { transform: translateY(-12px); opacity: 0; }

/* Preloader */
#preloader { transition: opacity .6s, visibility .6s; }
.is-loaded #preloader { opacity: 0; visibility: hidden; }

/* Form inputs */
.field {
    width: 100%;
    padding: .95rem 1.15rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    transition: border-color .3s, box-shadow .3s;
}
.field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(97, 41, 245, .12); }
.field-dark { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); color: #fff; }
.field-dark::placeholder { color: rgba(255, 255, 255, .4); }
.field-dark:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(198, 242, 78, .12); }

/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
    [data-reveal], .hero-in, .split-word > span, .bar, .step-line { opacity: 1 !important; transform: none !important; filter: none !important; }
    .draw-path { stroke-dashoffset: 0 !important; }
}

/* Blog filter pills */
.filter-btn { padding: .65rem 1.4rem; border-radius: 999px; font-weight: 600; color: #334155; background: #fff; border: 1px solid #e2e8f0; transition: all .3s; }
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(97, 41, 245, .7); }

/* Article body typography */
.prose-body h2 { margin-top: 2.5rem; font-family: Sora, sans-serif; font-size: 1.6rem; font-weight: 700; color: #0e0c2a; }
.prose-body p { margin-top: 1.25rem; font-size: 1.075rem; line-height: 1.85; }
.prose-body ul { margin-top: 1.25rem; padding-left: 1.25rem; list-style: disc; }
.prose-body li { margin-top: .5rem; line-height: 1.75; }
.prose-body li::marker { color: var(--brand); }
.prose-body blockquote { margin-top: 2rem; padding: 1.5rem 1.75rem; border-left: 4px solid var(--accent); border-radius: 0 1rem 1rem 0; background: #f3f0ff; font-size: 1.2rem; font-weight: 600; color: #0e0c2a; }

/* UK merchant accounts landing page */
.uk-page { min-height: 100vh; color: #fff; background: #060817; }
.uk-hero { min-height: 650px; background: #080a1b; }
.uk-hero-glow { position: absolute; inset: auto 5% 0 auto; width: 32rem; height: 32rem; border-radius: 50%; background: rgba(91, 47, 186, .24); filter: blur(100px); }
.uk-hero-skyline { position: absolute; inset: 0 0 0 auto; width: 78%; height: 100%; object-fit: cover; opacity: .8; }
.uk-flag { display: block; border: 1px solid rgba(255,255,255,.25); border-radius: .65rem; background-color: #15235b; background-image: linear-gradient(31deg, transparent 42%, #fff 43%, #fff 47%, #c8102e 48%, #c8102e 52%, #fff 53%, #fff 57%, transparent 58%), linear-gradient(-31deg, transparent 42%, #fff 43%, #fff 47%, #c8102e 48%, #c8102e 52%, #fff 53%, #fff 57%, transparent 58%), linear-gradient(90deg, transparent 39%, #fff 40%, #fff 60%, transparent 61%), linear-gradient(0deg, transparent 34%, #fff 35%, #fff 65%, transparent 66%), linear-gradient(90deg, transparent 45%, #c8102e 46%, #c8102e 54%, transparent 55%), linear-gradient(0deg, transparent 42%, #c8102e 43%, #c8102e 57%, transparent 58%); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.us-flag { display: block; border: 1px solid rgba(255,255,255,.25); border-radius: .65rem; background-color: #fff; background-image: linear-gradient(#1f3a8a, #1f3a8a), repeating-linear-gradient(180deg, #c8102e 0 7.69%, #fff 7.69% 15.38%); background-size: 42% 54%, 100% 100%; background-position: 0 0, 0 0; background-repeat: no-repeat; box-shadow: 0 12px 30px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.ma-flag { display: block; border: 1px solid rgba(255,255,255,.25); border-radius: .65rem; background: #c1272d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 60'%3E%3Cpath d='M45 17 52.64 40.52 32.64 25.98H57.36L37.36 40.52Z' fill='none' stroke='%23006233' stroke-width='2.4' stroke-linejoin='miter'/%3E%3C/svg%3E") center / cover no-repeat; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.us-flag::before { content: ""; position: absolute; left: 0; top: 0; width: 42%; height: 54%; background-image: radial-gradient(circle, #fff 1.2px, transparent 1.6px); background-size: 16.6% 20%; background-position: center; }
.uk-section { background: #060817; }
.uk-section:nth-child(even) { background: #070a19; }
.uk-eyebrow { color: #9c8cff; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.uk-dashboard { background: radial-gradient(ellipse at 70% 20%, rgba(84, 55, 152, .28), transparent 55%), linear-gradient(135deg, #12152a, #080a17 75%); }
.uk-dashboard-glow { position: absolute; left: 10%; bottom: -5rem; width: 75%; height: 10rem; border-radius: 50%; background: rgba(51, 192, 154, .16); filter: blur(45px); }
.uk-panel { background: linear-gradient(135deg, rgba(15, 20, 43, .95), rgba(8, 11, 27, .96)); box-shadow: inset 0 1px rgba(255,255,255,.035); }
.uk-industry-card { min-height: 112px; }
.uk-step-line { position: absolute; top: 1.25rem; left: 3.25rem; width: calc(100% - 2rem); height: 1px; background: linear-gradient(90deg, rgba(91, 226, 190, .8), rgba(107, 86, 214, .18)); }
.uk-local-card { background: linear-gradient(110deg, #101531, #080b1b 65%); }
.uk-local-skyline { position: absolute; inset: 0 45% 0 0; opacity: .8; background: linear-gradient(180deg, transparent 20%, rgba(8,11,27,.08)), linear-gradient(90deg, transparent 6%, #202c53 6% 12%, transparent 12% 18%, #25345d 18% 27%, transparent 27% 33%, #182649 33% 42%, transparent 42% 48%, #27335a 48% 58%, transparent 58% 64%, #1a284a 64% 77%, transparent 77%), linear-gradient(0deg, #0b1124 0 18%, transparent 18%); }
.uk-local-skyline::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 35%, #101531 100%); }
.uk-city-art { background: radial-gradient(ellipse at 50% 80%, rgba(242, 151, 160, .52), transparent 36%), linear-gradient(180deg, #302a62, #a05b87 58%, #13182d 100%); position: relative; overflow: hidden; }
.uk-city-art::before { content: ""; position: absolute; inset: 18% 5% 0; background: linear-gradient(90deg, transparent 3%, #172443 3% 12%, transparent 12% 16%, #1b2a4d 16% 26%, transparent 26% 32%, #1d2d51 32% 46%, transparent 46% 52%, #182645 52% 64%, transparent 64% 70%, #1c2a4d 70% 84%, transparent 84%); clip-path: polygon(0 22%, 12% 22%, 12% 0, 17% 0, 17% 35%, 28% 35%, 28% 12%, 32% 12%, 32% 31%, 45% 31%, 45% 5%, 51% 5%, 51% 38%, 66% 38%, 66% 14%, 72% 14%, 72% 32%, 87% 32%, 87% 4%, 92% 4%, 92% 29%, 100% 29%, 100% 100%, 0 100%); }
.uk-cta { min-height: 220px; background: #3724a9; }
.uk-cta-map { position: absolute; inset: 0 24% 0 auto; width: 30%; opacity: .15; background: radial-gradient(ellipse at 50% 50%, #a8b7ff, transparent 60%); clip-path: polygon(32% 0, 56% 8%, 62% 22%, 80% 28%, 73% 42%, 84% 56%, 66% 62%, 71% 75%, 53% 80%, 48% 100%, 36% 87%, 24% 90%, 29% 72%, 12% 61%, 23% 45%, 15% 31%, 31% 25%); }

@media (max-width: 640px) {
    .uk-hero { min-height: auto; }
    .uk-hero-skyline { width: 100%; opacity: .52; }
    .uk-local-skyline { right: 0; opacity: .3; }
    .uk-city-art { min-height: 12rem; }
}

/* UK location pages (/uk/ and /uk/{city}/) */
.uk-faq summary { list-style: none; cursor: pointer; }
.uk-faq summary::-webkit-details-marker { display: none; }
.uk-faq[open] { border-color: rgba(146, 115, 255, .5); background: rgba(255, 255, 255, .05); }
.uk-faq-icon { transition: transform .2s ease; }
.uk-faq[open] .uk-faq-icon { transform: rotate(45deg); }
.uk-chip { border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: #cbd5e1; }
.uk-chip:hover { border-color: rgba(146, 115, 255, .6); color: #fff; }
.uk-chip[aria-pressed="true"] { border-color: #7349ff; background: #6129f5; color: #fff; }
.uk-map-dot { transition: transform .2s ease; transform-box: fill-box; transform-origin: center; }
a:hover > .uk-map-dot, a:focus-visible > .uk-map-dot { transform: scale(1.7); }
