/* ═══════════════════════════════════
   PROSTABLES GLOBAL DESIGN SYSTEM
   Variables, Reset, Typo, Buttons, Performance
═══════════════════════════════════ */

:root {
    --color-primary: #0E0338;
    --color-secondary: #9a7d5c;
    --color-bg: #F9F7F2;
    --color-white: #FFFFFF;
    --color-text-1: #0E0338;
    --color-text-2: rgba(14, 3, 56, 0.75);
    --color-border: rgba(14, 3, 56, 0.12);
    --color-glow: rgba(154, 125, 92, 0.5);

    --color-navy: #0E0338;
    --color-gold: #9a7d5c;
    --color-lime: #D4F467;

    /* ProTrot Colors */
    --color-protrot-primary: #19826c;
    --color-protrot-secondary: #24bb9b;

    /* Accent system */
    --color-accent: var(--color-secondary);
    --color-accent-glow: var(--color-glow);

    --font-display: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --transition-vibrant: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    --btn-shadow: 0 10px 20px rgba(14, 3, 56, 0.1);
    --btn-shadow-hover: 0 15px 30px rgba(14, 3, 56, 0.2);
}

/* ═══ GLOBAL MODES ═══ */
.mode-protrot {
    --color-accent: var(--color-protrot-secondary);
    --color-accent-glow: rgba(36, 187, 155, 0.4);
}

.mode-protrot .btn-download,
.mode-protrot .btn-demo-hero,
.mode-protrot .btn-pill,
.mode-protrot .btn-nl-submit {
    background: var(--color-protrot-primary) !important;
    border-color: var(--color-protrot-primary) !important;
    color: white !important;
}

.mode-protrot .btn-download:hover,
.mode-protrot .btn-demo-hero:hover,
.mode-protrot .btn-pill:hover {
    background: var(--color-protrot-secondary) !important;
    border-color: var(--color-protrot-secondary) !important;
}

/* ═══ RESET & TYPO ═══ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

html {
    /* scroll-behavior: smooth removed — handled by JS lerp engine for premium feel */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-1);
    background-color: var(--color-bg);
    overflow-x: hidden;
    line-height: 1.6;
    margin: 0;
    -webkit-overflow-scrolling: touch;
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--font-display);
    font-weight: 700;
}

/* ═══ PERFORMANCE BLOCKS ═══ */
section,
.hero-scrolly-block,
.pwa-section,
.trust-section,
.pricing-section,
.testimonials-section,
.premium-footer {
    content-visibility: auto;
    contain-intrinsic-size: 100vh;
}

/* Promote sticky viewports to their own GPU compositing layer for jank-free rendering */
.sticky-viewport {
    will-change: contents;
    contain: layout style;
    transform: translateZ(0);
}

.v-reveal,
.tableau-screen,
.iphone-frame,
.vibrant-blob,
.switch-pill,
.footer-contact-card,
.adv-card,
.pwa-list-card {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* ═══ CUSTOM CURSOR ═══ */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    border: none !important;
    pointer-events: none;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease-out, background 0.3s, border-radius 0.3s;
    will-change: transform;
    opacity: 1;
    color: var(--color-accent);
}

.cursor svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
    transition: transform 0.2s ease;
    transform: scaleX(-1);
}

.cursor::after {
    display: none !important;
}

.cursor.active {
    background: var(--color-accent-glow);
    border-radius: 50%;
}

.cursor.active svg {
    transform: scaleX(-1) scale(1.3);
}

@media (hover: none) {
    .cursor {
        display: none;
    }

    * {
        cursor: auto !important;
    }
}

/* ═══ SHARED BUTTONS ═══ */
.btn-pill,
.btn-download,
.btn-demo,
.btn-action,
.btn-nl-submit,
.btn-primary,
.btn-secondary,
.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.btn-primary,
.btn-pill,
.btn-download,
.btn-nl-submit {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: var(--btn-shadow);
}

.btn-primary:hover,
.btn-pill:hover,
.btn-download:hover,
.btn-nl-submit:hover {
    transform: translateY(-5px) scale(1.02);
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-primary);
    box-shadow: 0 20px 40px var(--color-glow);
}

.btn-secondary,
.btn-demo {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover,
.btn-demo:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-5px);
    box-shadow: var(--btn-shadow-hover);
}

.btn-social {
    width: 44px;
    height: 44px;
    padding: 0 !important;
    font-size: 20px !important;
    background: var(--color-white);
    color: var(--color-primary);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-social:hover {
    transform: translateY(-3px);
    background: var(--color-secondary);
    color: var(--color-primary);
}

/* ═══ SHARED FIELDS (Natural Language) ═══ */
.nl-input,
.nl-select,
.nl-editable {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--color-secondary) !important;
    font-family: var(--font-display) !important;
    font-size: 16px !important;
    padding: 0 4px !important;
    font-style: italic !important;
    transition: all 0.3s !important;
    outline: none !important;
    margin: 0 !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    white-space: nowrap;
}

.nl-input::placeholder {
    color: rgba(0, 0, 0, 0.2) !important;
    font-weight: 300 !important;
}

.nl-editable:empty:before {
    content: attr(data-placeholder);
    color: rgba(0, 0, 0, 0.2);
    font-style: normal;
    font-weight: 300;
    pointer-events: none;
}

.nl-input:focus,
.nl-editable:focus {
    border-bottom-color: var(--color-accent) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

.nl-editable:focus:before {
    content: '' !important;
}

/* ═══ UTILS ═══ */
.v-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-vibrant);
}

.v-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.acc-neutral {
    color: var(--color-gold) !important;
}

/* Grain Effect */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

.liquid-filter-svg {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ═══ SKELETON LOADING ═══ */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: rgba(14, 3, 56, 0.08) !important;
    color: transparent !important;
    border-color: transparent !important;
    user-select: none;
    pointer-events: none;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.5),
            transparent);
    animation: skeleton-shimmer 1.5s infinite;
    z-index: 10;
}

@keyframes skeleton-shimmer {
    100% {
        left: 200%;
    }
}

.skeleton * {
    visibility: hidden !important;
}

.skeleton-text {
    border-radius: 8px;
    display: inline-block;
    min-height: 1em;
}

/* ═══ MIN-HEIGHT FOR PAGES (Avoid footer jumping on empty/short pages) ═══ */
main,
#main,
#content,
.site-main,
.main-content,
#primary,
.entry-content {
    min-height: 73vh;
}