/* 8BallPOS marketing site — modern dark gaming SaaS theme, neon blue/cyan glow. No framework. */
:root {
    --bg: #060a14;
    --bg-alt: #0a101f;
    --surface: rgba(19, 27, 46, .72);
    --surface-solid: #131b2e;
    --surface-2: #182238;
    --border: rgba(74, 96, 138, .35);
    --text: #f2f6ff;
    --muted: #c7d4ea;
    --accent: #22d3ee;
    --accent-2: #3b82f6;
    --neon: #4ee9ff;
    --whatsapp: #22c55e;
    --radius: 16px;
    --shadow: 0 12px 44px rgba(0, 0, 0, .5);
    --glow: 0 0 26px rgba(34, 211, 238, .38);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    background-image:
        radial-gradient(1000px 600px at 80% -200px, rgba(59, 130, 246, .16), transparent 60%),
        radial-gradient(800px 500px at -100px 40%, rgba(34, 211, 238, .08), transparent 60%),
        linear-gradient(rgba(97, 139, 219, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(97, 139, 219, .045) 1px, transparent 1px);
    background-size: auto, auto, 44px 44px, 44px 44px;
    background-attachment: fixed;
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; font-weight: 800; }
h1 {
    font-size: clamp(1.7rem, 3.6vw, 2.8rem);
    background: linear-gradient(120deg, #ffffff 30%, var(--neon) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); margin-bottom: 1.2rem; position: relative; padding-bottom: .55rem; }
h2::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 12px rgba(34, 211, 238, .6);
}
.center h2::after, h2.center::after { left: 50%; transform: translateX(-50%); }
h3 { font-size: 1.1rem; }
/* Full-width fluid shell: uses the screen it is given, with a cap so text does not run to
   unreadable line lengths on ultra-wide monitors. .narrow keeps prose at a readable measure. */
.container { width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 3rem); }
.container.narrow { max-width: 900px; }
.container.prose { max-width: 78ch; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.accent { color: var(--accent); }
::selection { background: rgba(34, 211, 238, .35); }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(6, 10, 20, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(74, 96, 138, .3);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.25rem; font-weight: 800; color: var(--text); }
.brand-wordmark { height: 34px; width: auto; display: block; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .25)); }
.site-footer .brand-wordmark { height: 30px; }
.main-nav { display: flex; align-items: center; gap: 1.3rem; }
.main-nav > a, .nav-drop > a { color: var(--text); font-weight: 600; font-size: .95rem; }
.main-nav > a:hover, .nav-drop > a:hover { color: var(--neon); text-shadow: 0 0 12px rgba(78, 233, 255, .6); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); font-size: 1.3rem; padding: .2rem .6rem; border-radius: 8px; cursor: pointer; }
.nav-drop { position: relative; }
.nav-drop-menu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 260px;
    background: rgba(14, 20, 36, .96); backdrop-filter: blur(12px);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: .5rem; box-shadow: var(--shadow);
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
.nav-drop-menu a { display: block; padding: .5rem .8rem; color: var(--text); border-radius: 8px; font-size: .92rem; }
.nav-drop-menu a:hover { background: var(--surface-2); color: var(--neon); }

/* Buttons */
.btn {
    display: inline-block; padding: .6rem 1.25rem; border-radius: 11px; font-weight: 700;
    border: 1px solid transparent; cursor: pointer; font-size: .95rem;
    transition: transform .14s, box-shadow .14s, border-color .14s;
}
.btn:hover { transform: translateY(-2px); }
.btn-lg { padding: .8rem 1.7rem; font-size: 1.02rem; }
.btn-sm { padding: .35rem .8rem; font-size: .85rem; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #04121f; box-shadow: var(--glow);
}
.btn-primary:hover { box-shadow: 0 0 38px rgba(34, 211, 238, .55); }
.btn-whatsapp { background: var(--whatsapp); color: #04170b; box-shadow: 0 0 18px rgba(34, 197, 94, .35); }
.btn-ghost { background: rgba(19, 27, 46, .5); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--neon); box-shadow: 0 0 16px rgba(34, 211, 238, .25); }

/* Hero */
.hero { padding: 4.4rem 0 3.2rem; position: relative; overflow: hidden; }
.hero.compact { padding: 3rem 0 2rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.lead { color: #eaf1ff; font-size: 1.14rem; line-height: 1.6; margin: 1rem 0 1.4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.cta-row.center { justify-content: center; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.badges span {
    font-size: .8rem; font-weight: 600; color: var(--neon);
    border: 1px solid rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .08);
    padding: .28rem .7rem; border-radius: 999px;
    box-shadow: inset 0 0 12px rgba(34, 211, 238, .08);
}
.hero-shot img, .shot {
    border-radius: var(--radius); border: 1px solid rgba(34, 211, 238, .25);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, .08), 0 18px 60px rgba(0, 0, 0, .55), 0 0 50px rgba(34, 211, 238, .12);
}

/* Sections */
.section { padding: 3.4rem 0; }
.section.alt { background: rgba(10, 16, 31, .6); border-top: 1px solid rgba(74, 96, 138, .18); border-bottom: 1px solid rgba(74, 96, 138, .18); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.card {
    background: var(--surface); backdrop-filter: blur(8px);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.1rem 1.2rem; font-size: .95rem;
    transition: border-color .18s, transform .15s, box-shadow .18s;
}
.card:hover { border-color: rgba(34, 211, 238, .45); box-shadow: 0 0 22px rgba(34, 211, 238, .1); }
.card.pain { border-left: 3px solid #fb7185; }
.card.feature h3 { margin: .5rem 0 .35rem; }
.feature-icon { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(34, 211, 238, .5)); }
.link-card { display: block; color: var(--text); font-weight: 700; }
.link-card:hover { transform: translateY(-3px); color: var(--neon); }
.card.quote blockquote { font-size: 1.02rem; font-weight: 600; margin-bottom: .6rem; }
.panel {
    background: var(--surface); backdrop-filter: blur(8px);
    border: 1px solid rgba(34, 211, 238, .25); border-radius: var(--radius);
    padding: 1.6rem; box-shadow: var(--shadow);
}
.big-number {
    font-size: 2.6rem; font-weight: 800;
    background: linear-gradient(120deg, var(--accent-2), var(--neon));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ticks { list-style: none; margin: 1rem 0; }
.ticks li { padding-left: 1.7rem; position: relative; margin-bottom: .55rem; }
.ticks li::before { content: "✔"; position: absolute; left: 0; color: var(--neon); font-weight: 800; text-shadow: 0 0 10px rgba(78, 233, 255, .7); }
.steps { margin-left: 1.2rem; }
.steps li { margin-bottom: .45rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.center-chips { justify-content: center; margin-bottom: 1rem; }
.chips span, .chip-link {
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    padding: .45rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 600;
}
.chip-link:hover { border-color: var(--accent); color: var(--neon); box-shadow: 0 0 14px rgba(34, 211, 238, .2); }
.plan { text-align: center; padding: 1.8rem 1.4rem; }
.plan.featured { border-color: rgba(34, 211, 238, .6); box-shadow: var(--glow); position: relative; }
.plan-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #04121f; font-size: .75rem; font-weight: 800; padding: .15rem .8rem; border-radius: 999px; }
.plan .ticks { text-align: left; }
.diagram-wrap { background: #ffffff; border: 1px solid rgba(34, 211, 238, .3); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.terminal-shot { max-width: 420px; width: 100%; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .5)); }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: .6rem; background: var(--surface); backdrop-filter: blur(8px); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: .85rem 1.1rem; }
.faq-item[open] { border-color: rgba(34, 211, 238, .4); }
.faq-item[open] summary { color: var(--neon); }
.faq-item p { padding: 0 1.1rem .9rem; color: var(--muted); }

/* CTA band */
.cta-band {
    padding: 3.6rem 0; position: relative;
    background:
        radial-gradient(600px 260px at 50% 0%, rgba(34, 211, 238, .16), transparent 70%),
        linear-gradient(135deg, rgba(59, 130, 246, .16), rgba(34, 211, 238, .08));
    border-top: 1px solid rgba(34, 211, 238, .25);
}
.cta-band-inner { text-align: center; }
.cta-band p { color: var(--muted); margin-bottom: 1.2rem; }
.cta-band .cta-row { justify-content: center; }

/* Forms */
.lead-form { background: var(--surface); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; margin-top: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.1rem; margin-bottom: 1rem; }
.lead-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.lead-form label.full-width { grid-column: 1 / -1; margin-bottom: 1rem; }
.lead-form input, .lead-form select, .lead-form textarea {
    background: rgba(6, 10, 20, .7); color: var(--text); border: 1px solid var(--border); border-radius: 9px;
    padding: .6rem .8rem; font-size: .95rem; font-family: inherit;
}
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15);
}
.check-row { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 1rem; }
.check { flex-direction: row !important; align-items: center; gap: .5rem !important; }
.form-error { color: #fda4af; background: rgba(225, 29, 72, .12); border: 1px solid rgba(225, 29, 72, .4); border-radius: 10px; padding: .7rem 1rem; margin: .8rem 0; }
.success-box { background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .45); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; box-shadow: 0 0 22px rgba(34, 197, 94, .12); }

/* Sticky CTA */
.sticky-cta { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .55rem; z-index: 60; }
.sticky-cta .btn { box-shadow: var(--shadow); }

/* Footer */
.site-footer { border-top: 1px solid rgba(74, 96, 138, .3); background: rgba(6, 10, 20, .8); padding: 2.6rem 0 1rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 1.6rem; }
.footer-grid h4, .footer-grid .footer-heading { margin-bottom: .7rem; font-size: .95rem; font-weight: 700; color: var(--text); }
.footer-grid a { display: block; color: var(--muted); font-size: .9rem; margin-bottom: .45rem; }
.footer-grid a:hover { color: var(--neon); }
.footer-bottom { border-top: 1px solid rgba(74, 96, 138, .25); padding-top: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .85rem; }

/* Blog */
.blog-card { display: block; margin-bottom: 1rem; color: var(--text); }
.blog-card h2 { font-size: 1.2rem; margin-bottom: .4rem; padding-bottom: 0; }
.blog-card h2::after { display: none; }
.article p { margin-bottom: 1rem; color: #d7e1f5; }

/* Admin */
.filter-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 1.4rem; }
.filter-row input, .filter-row select { background: var(--surface-solid); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .7rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--surface-solid); }
.admin-table th, .admin-table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid rgba(74, 96, 138, .25); white-space: nowrap; }
.admin-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.status { padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); }
.status-New { color: var(--neon); }
.status-Contacted { color: #fbbf24; }
.status-DemoScheduled { color: #a78bfa; }
.status-ProposalSent { color: #60a5fa; }
.status-Won { color: #34d399; }
.status-Lost { color: #f87171; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.6rem; margin: 1.4rem 0; }
.detail-grid > div { background: var(--surface-solid); border: 1px solid var(--border); border-radius: 10px; padding: .7rem 1rem; }
.detail-grid .muted { display: block; font-size: .75rem; text-transform: uppercase; }
.detail-grid .full { grid-column: 1 / -1; }

/* RTL readiness */
[dir="rtl"] .ticks li { padding-left: 0; padding-right: 1.7rem; }
[dir="rtl"] .ticks li::before { left: auto; right: 0; }
[dir="rtl"] .card.pain { border-left: none; border-right: 3px solid #fb7185; }
[dir="rtl"] .sticky-cta { right: auto; left: 1rem; }
[dir="rtl"] h2::after { left: auto; right: 0; }

/* Responsive */
@media (max-width: 960px) {
    .hero-grid, .split { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4, .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .main-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(10, 16, 31, .98); border-bottom: 1px solid var(--border); padding: .6rem 1rem;
    }
    .main-nav.open { display: flex; }
    .main-nav > a, .nav-drop > a { padding: .6rem 0; }
    .nav-drop-menu { position: static; display: block; box-shadow: none; border: none; padding-left: 1rem; background: transparent; }
    .nav-toggle { display: block; }
    .sticky-cta { flex-direction: row; left: 1rem; right: 1rem; }
    .sticky-cta .btn { flex: 1; text-align: center; font-size: .85rem; padding: .65rem .5rem; }
}


/* ===== Motion & gamification layer ===== */

/* Scroll reveal (JS adds .reveal / .in-view) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); transition-delay: calc(var(--stagger, 0) * 70ms); }
.reveal.in-view { opacity: 1; transform: none; }

/* Hero decorations */
.hero { isolation: isolate; }
#heroParticles { position: absolute; inset: 0; z-index: -1; opacity: .55; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; animation: orbFloat 14s ease-in-out infinite alternate; }
.orb-1 { width: 380px; height: 380px; background: rgba(59, 130, 246, .28); top: -120px; right: -60px; }
.orb-2 { width: 300px; height: 300px; background: rgba(34, 211, 238, .2); bottom: -100px; left: -80px; animation-delay: -7s; }
@keyframes orbFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.12); } }

.floating-ball { position: absolute; width: 74px; height: 74px; right: 6%; top: 12%; z-index: -1; opacity: .8; animation: ballFloat 7s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(34, 211, 238, .5)); }
@keyframes ballFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-26px) rotate(14deg); } }

/* Rotating module chip above H1 */
.rotate-chip { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; color: var(--neon); border: 1px solid rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .07); padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem; }
.rotate-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); animation: pulseDot 1.6s ease-in-out infinite; }
#rotateWord { display: inline-block; min-width: 9ch; transition: opacity .25s, transform .25s; }
#rotateWord.swap { opacity: 0; transform: translateY(8px); }
@keyframes pulseDot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .6; } }

/* H1 shimmer */
h1 { background-size: 200% auto; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }

/* Button shine sweep */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -80%; } 100% { left: 130%; } }

/* Stats strip */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.2rem; }
.stat { text-align: center; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); backdrop-filter: blur(8px); }
.stat b { display: block; font-size: 1.9rem; font-weight: 800; background: linear-gradient(120deg, var(--accent-2), var(--neon)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* Keyword ticker */
.ticker { overflow: hidden; border-block: 1px solid rgba(74, 96, 138, .25); padding: .8rem 0; background: rgba(10, 16, 31, .5); }
.ticker-track { display: flex; gap: 2.6rem; width: max-content; animation: tickerScroll 36s linear infinite; }
.ticker-track span { white-space: nowrap; color: var(--muted); font-weight: 700; font-size: .92rem; }
.ticker-track span::before { content: "\25c6"; color: var(--accent); margin-right: 2.6rem; font-size: .7rem; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll { to { transform: translateX(-50%); } }

/* AI chat mockup */
.ai-chat { background: rgba(6, 10, 20, .85); border: 1px solid rgba(34, 211, 238, .3); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow), 0 0 40px rgba(34, 211, 238, .1); max-width: 460px; }
.ai-chat .chat-title { display: flex; align-items: center; gap: .5rem; font-weight: 800; margin-bottom: 1rem; color: var(--neon); }
.ai-chat .chat-title .dot { width: 9px; height: 9px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; animation: pulseDot 1.8s infinite; }
.bubble { max-width: 85%; padding: .6rem .9rem; border-radius: 14px; font-size: .9rem; margin-bottom: .6rem; opacity: 0; transform: translateY(10px); animation: bubbleIn .5s forwards; animation-play-state: paused; }
.bubble.user { background: var(--surface-2); border: 1px solid var(--border); margin-left: auto; border-bottom-right-radius: 4px; animation-delay: .3s; }
.bubble.ai { background: linear-gradient(135deg, rgba(59, 130, 246, .25), rgba(34, 211, 238, .18)); border: 1px solid rgba(34, 211, 238, .35); border-bottom-left-radius: 4px; }
.bubble.ai.b1 { animation-delay: 1.1s; }
.bubble.user.b2 { animation-delay: 2.1s; }
.bubble.ai.b3 { animation-delay: 3s; }
.ai-chat.play .bubble { animation-play-state: running; }
@keyframes bubbleIn { to { opacity: 1; transform: none; } }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--neon); animation: typingDot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Featured plan: rotating neon border */
.plan.featured { overflow: visible; }
.plan.featured::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--spin, 0deg), transparent 0 60%, var(--accent) 75%, var(--accent-2) 85%, transparent 95%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spinBorder 5s linear infinite; z-index: 0; pointer-events: none; }
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spinBorder { to { --spin: 360deg; } }

@media (max-width: 960px) { .stat-strip { grid-template-columns: 1fr 1fr; } .floating-ball { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    h1, .btn-primary::after, .orb, .floating-ball, .ticker-track, .plan.featured::before, .rotate-chip .dot { animation: none !important; }
    #heroParticles { display: none; }
}

/* ── Master-brief additions ─────────────────────────────────────────────────────── */

/* Breadcrumbs on deep pages. */
.breadcrumbs { border-bottom: 1px solid rgba(255,255,255,.07); padding: .6rem 0; font-size: .85rem; }
.breadcrumbs a { color: var(--muted, #9fb0c9); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--muted, #9fb0c9); }

/* The automation flow shown as real text, not an image, so it is indexable. */
.flow-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.4rem 0; }
.flow-step { border: 1px solid rgba(78,233,255,.35); border-radius: 999px; padding: .45rem 1rem;
  font-weight: 700; font-size: .82rem; letter-spacing: .04em; white-space: nowrap; }
.flow-arrow { opacity: .55; font-size: 1.1rem; }

/* Honest-availability callout on pages describing project work. */
.availability-note { border: 1px solid rgba(245,158,11,.35); background: rgba(245,158,11,.07);
  border-radius: 14px; padding: 1.2rem 1.35rem; }
.availability-note h2 { margin-top: 0; font-size: 1.15rem; }
.availability-note p { margin-bottom: 0; }

/* Sector cards on the homepage. */
.sector-card { display: block; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease; }
.sector-card:hover { transform: translateY(-2px); border-color: rgba(78,233,255,.45); }
.sector-card h3 { margin: 0 0 .35rem; }
.sector-card p { margin: 0; font-size: .82rem; }

/* Long-form body copy blocks. */
.prose p { line-height: 1.75; margin-bottom: 1rem; }
.prose .ticks { margin-top: .6rem; }
.lead-sm { font-size: 1.02rem; max-width: 62ch; }
.center { text-align: center; }
.cta-row.center { justify-content: center; }
.mt-2 { margin-top: 2rem; }

/* Two-step lead form. */
.form-step { border: 0; padding: 0; margin: 0; }
.is-hidden { display: none !important; }
.step-label { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted, #9fb0c9); margin-bottom: .8rem; }
.steps { line-height: 1.8; padding-left: 1.2rem; }
.steps li { margin-bottom: .5rem; }
.alert-success { border: 1px solid rgba(34,197,94,.4); background: rgba(34,197,94,.08);
  border-radius: 14px; padding: 1.4rem; }
.alert-error { border: 1px solid rgba(244,63,94,.4); background: rgba(244,63,94,.08);
  border-radius: 14px; padding: 1rem; margin-bottom: 1rem; }
.small { font-size: .82rem; }

/* ── Full-width layout + mobile pass ──────────────────────────────────────────────────────────
   The site now uses the full viewport width. Everything below keeps that readable on phones:
   nothing may scroll horizontally, and any wide element scrolls inside its own container. */

/* `clip` rather than `hidden`: hidden turns body into a scroll container, which in several engines
   makes position:fixed resolve against the body box instead of the viewport — that is what pinned the
   AI backdrop into the top-left corner. clip stops horizontal scroll without that side effect. */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }

/* Illustrations are drawn at 960×600; let them fill their column at any width. */
.hero-shot img, .shot { width: 100%; height: auto; display: block; border-radius: 16px; }
.shot-figure { margin: 0; }
.shot-figure figcaption { margin-top: .6rem; text-align: center; }

/* Wider screens: use the extra room for more columns rather than more whitespace. */
@media (min-width: 1500px) {
    .grid-3 { grid-template-columns: repeat(4, 1fr); }
    .hero-grid { gap: 4rem; }
}

/* Tablet / small laptop — the nav has more items now, so it collapses earlier than before. */
@media (max-width: 1080px) {
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(10, 16, 31, .985); border-bottom: 1px solid var(--border);
        padding: .6rem clamp(1rem, 3vw, 3rem); max-height: 78vh; overflow-y: auto; }
    .main-nav.open { display: flex; }
    .main-nav > a, .nav-drop > a { padding: .75rem 0; }
    .nav-drop-menu { position: static; display: block; box-shadow: none; border: none;
        padding-left: 1rem; background: transparent; }
    .nav-toggle { display: block; }
    .site-header { position: relative; }
}

@media (max-width: 820px) {
    .hero h1 { font-size: clamp(1.65rem, 6vw, 2.4rem); line-height: 1.2; }
    h2 { font-size: clamp(1.3rem, 4.6vw, 1.8rem); }
    .lead { font-size: 1rem; }
    .section { padding: 2.4rem 0; }
    .hero { padding: 2.2rem 0 1.6rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
    /* Buttons go full width so they are thumb-sized rather than tiny inline links. */
    .cta-row { flex-direction: column; align-items: stretch; }
    .cta-row .btn { width: 100%; text-align: center; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .badges { gap: .4rem; }
    .badges span { font-size: .72rem; }
    /* The sticky bar sits above the fold on phones; keep content clear of it. */
    body { padding-bottom: 4.6rem; }
    .sticky-cta { left: .6rem; right: .6rem; bottom: .6rem; gap: .45rem; }
    .sticky-cta .btn { padding: .7rem .4rem; font-size: .8rem; }
    .breadcrumbs { font-size: .78rem; }
    .availability-note { padding: 1rem; }
}

/* The automation flow must stay one legible line — it scrolls rather than wrapping mid-arrow. */
.flow-row { overflow-x: auto; padding-bottom: .5rem; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.flow-row::-webkit-scrollbar { height: 6px; }
.flow-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Any table stays inside its own scroller instead of widening the page. */
.table-wrap, .lead-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { max-width: 100%; }

/* Touch targets: form controls large enough to tap, and 16px inputs so iOS does not zoom. */
@media (max-width: 820px) {
    .lead-form input, .lead-form select, .lead-form textarea { font-size: 16px; padding: .75rem .8rem; }
    .check-row { flex-direction: column; align-items: flex-start; gap: .55rem; }
    .check { padding: .35rem 0; }
}

/* ── AI backdrop ──────────────────────────────────────────────────────────────────────────────
   Fixed behind the whole page, purely decorative, never interactive. Every element is tuned low
   enough that body copy keeps its contrast — the animation must never cost readability. */
.ai-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.ai-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }

/* Slow drifting colour fields, blurred to the point of being atmosphere rather than shapes. */
.ai-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.ai-orb-1 { width: 46vw; height: 46vw; max-width: 720px; max-height: 720px;
    background: radial-gradient(circle, rgba(59,130,246,.40), transparent 70%);
    top: -14vh; right: -8vw; animation: aiDrift1 26s ease-in-out infinite alternate; }
.ai-orb-2 { width: 40vw; height: 40vw; max-width: 620px; max-height: 620px;
    background: radial-gradient(circle, rgba(34,211,238,.30), transparent 70%);
    bottom: -12vh; left: -6vw; animation: aiDrift2 32s ease-in-out infinite alternate; }
.ai-orb-3 { width: 32vw; height: 32vw; max-width: 500px; max-height: 500px;
    background: radial-gradient(circle, rgba(168,85,247,.26), transparent 70%);
    top: 38%; left: 46%; animation: aiDrift3 38s ease-in-out infinite alternate; }

/* Faint technical grid, masked so it fades out before it reaches the text column. */
.ai-grid { position: absolute; inset: 0; opacity: .3;
    background-image: linear-gradient(rgba(120,160,220,.06) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(120,160,220,.06) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 78%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 78%); }

@keyframes aiDrift1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-6vw, 7vh, 0) scale(1.12); } }
@keyframes aiDrift2 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(7vw, -6vh, 0) scale(1.1); } }
@keyframes aiDrift3 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-8vw, -5vh, 0) scale(.9); } }

/* Sections sit on translucent panels; with a live backdrop they need a touch more body behind text. */
/* Plain translucency, deliberately NOT backdrop-filter: blurring a full-width section is a
   large-area filter that repaints on every scroll frame, which is the classic cause of scroll jank.
   The small card blurs elsewhere are cheap by comparison because their areas are small. */
.ai-bg ~ * .section.alt { background: rgba(10, 16, 31, .62); }

@media (prefers-reduced-motion: reduce) {
    .ai-orb { animation: none; }
}
@media (max-width: 820px) {
    /* Blur is the expensive part on mobile GPUs — fewer, smaller fields. */
    .ai-orb-3 { display: none; }
    .ai-orb { filter: blur(60px); opacity: .45; }
    .ai-bg canvas { opacity: .6; }
}

/* ── Hero copy legibility over the animated backdrop ──────────────────────────────────────────
   The supporting lines under an H1 carry the actual pitch, so they are lifted well clear of the
   secondary-text grey used further down the page. */
.hero .lead { color: #f1f6ff; font-weight: 500; }
.hero .muted { color: #d5e0f4; }
.hero p { text-shadow: 0 1px 14px rgba(6, 10, 20, .55); }

/* Feature and problem card copy also sits over the mesh — keep it readable, not washed out. */
.card .muted, .lead-sm { color: #cbd8ee; }

/* ── Rolling 8-ball cursor ────────────────────────────────────────────────────────────────────
   The system cursor is left exactly as it is — normal arrow, hand over links, I-beam in text fields.
   The 8-ball is purely decorative: it trails the real pointer and rolls, and never replaces it. */

.ball-cursor {
    position: fixed; top: 0; left: 0; width: 15px; height: 15px;
    z-index: 9998; pointer-events: none; opacity: 0;
    transition: opacity .18s ease;
    will-change: transform;
}
.ball-cursor.is-visible { opacity: 1; }
.ball-cursor img {
    width: 100%; height: 100%; display: block;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .45));
    will-change: transform;
}
/* Grow over anything clickable, squash on press. */
.ball-cursor { transition: opacity .18s ease, width .16s ease, height .16s ease; }
.ball-cursor.is-active { width: 20px; height: 20px; }
.ball-cursor.is-down { width: 12px; height: 12px; }

/* Over a text field the ball would fight the caret, so it fades back and lets the I-beam lead. */
.ball-cursor.is-active img { filter: drop-shadow(0 0 14px rgba(34, 211, 238, .55)); }

/* Hidden only where there is genuinely no pointer to follow — touch screens. Narrow desktop windows
   keep it, because resizing a browser does not take the mouse away. */
@media (pointer: coarse) {
    .ball-cursor { display: none; }
}


}

/* ── Language switch + Arabic RTL ─────────────────────────────────────────────────────────────── */
.lang-switch {
    font-weight: 700; font-size: .9rem; color: var(--text);
    border: 1px solid var(--border); border-radius: 999px;
    padding: .3rem .85rem; white-space: nowrap;
}
.lang-switch:hover { color: var(--neon); border-color: var(--neon); }

/* The header-bar copy is hidden while the full nav is on show, and takes over once the nav collapses at
   1080px — so the switch is always one tap away and never appears twice. margin-inline-start keeps it
   beside the menu button in both directions, since Arabic pages render RTL. */
.lang-switch-mobile { display: none; }
@media (max-width: 1080px) {
    .lang-switch-mobile { display: inline-block; margin-inline-start: auto; }
    .main-nav .lang-switch { display: none; }
}

/* Arabic sets its own font stack — the Latin display face has no Arabic glyphs, so without this the
   browser falls back silently and the page loses its typographic voice. */
[lang="ar"] body,
[dir="rtl"] body {
    font-family: "Segoe UI", "Noto Sans Arabic", "Dubai", "Tahoma", "Arial", sans-serif;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
[dir="rtl"] .hero-grid { direction: rtl; }
[dir="rtl"] .flow-row { flex-direction: row; }
[dir="rtl"] .breadcrumbs a { margin-left: .25rem; }
[dir="rtl"] .steps { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] ul, [dir="rtl"] ol { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] .availability-note { border-left: 0; border-right: 3px solid var(--bp-hold, #f59e0b); }
[dir="rtl"] .note { border-left: 0; border-right: 3px solid var(--accent); }
[dir="rtl"] .lead-form label { text-align: right; }
/* Digits stay left-to-right inside Arabic text so phone numbers and prices read correctly. */
[dir="rtl"] .path, [dir="rtl"] code, [dir="rtl"] .kw { direction: ltr; unicode-bidi: embed; display: inline-block; }
