/* =========================================================
   Primo Paints — premium enhancement layer
   Loaded AFTER primo.css. Adds world-class polish & motion.
   ========================================================= */

/* ---------- Global refinements ---------- */
::selection { background: rgba(27, 60, 140, .18); color: var(--brand-dark); }
html { scrollbar-color: var(--brand) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--brand), var(--brand-dark)); border-radius: 20px; border: 3px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-dark); }

body {
    background:
        radial-gradient(60% 40% at 100% 0%, rgba(27, 60, 140, .05), transparent 60%),
        radial-gradient(50% 40% at 0% 4%, rgba(230, 57, 70, .045), transparent 60%),
        var(--bg);
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300;
    background: linear-gradient(90deg, var(--brand), #3b6fd4, var(--accent));
    box-shadow: 0 0 12px rgba(27, 60, 140, .55);
    transition: width .08s linear;
}

/* ---------- Header: shrink + gradient hairline ---------- */
.brand-logo { transition: height .3s var(--ease); }
.header-inner { transition: height .3s var(--ease); }
.site-header.scrolled { background: rgba(255, 255, 255, .9); }
.site-header.scrolled .header-inner { height: 66px; }
.site-header.scrolled .brand-logo { height: 42px; }
.site-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(27, 60, 140, .35), rgba(230, 57, 70, .35), transparent);
    opacity: 0; transition: opacity .3s;
}
.site-header.scrolled::after { opacity: 1; }

/* ---------- Buttons: sheen sweep ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
    content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%; z-index: -1;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .4), transparent);
    transform: skewX(-20deg); transition: left .7s var(--ease);
}
.btn:hover::after { left: 150%; }
.btn-ghost::after { background: linear-gradient(120deg, transparent, rgba(27, 60, 140, .12), transparent); }

/* ---------- Hero: animated gradient wordmark ---------- */
.hero h1 .hl {
    background: linear-gradient(115deg, var(--brand) 0%, #3b6fd4 35%, var(--accent) 70%, var(--brand) 100%);
    background-size: 260% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: primoHue 9s ease-in-out infinite;
}
.hero h1 .hl::after { background: rgba(230, 57, 70, .22); opacity: .7; }
@keyframes primoHue { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Hero background: floating, breathing color blobs + fine grid */
.hero-bg .blob { animation: primoFloat 16s ease-in-out infinite; }
.hero-bg .b2 { animation-duration: 21s; animation-direction: reverse; }
@keyframes primoFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(24px, -28px) scale(1.06); } }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(rgba(27, 60, 140, .06) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(70% 60% at 60% 30%, #000, transparent 75%);
    mask-image: radial-gradient(70% 60% at 60% 30%, #000, transparent 75%);
}

/* Hero trust row */
.hero-trust { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.hero-trust .avatars { display: flex; }
.hero-trust .avatars span {
    width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; margin-left: -10px;
    display: grid; place-items: center; color: #fff; font-family: 'Sora', sans-serif; font-weight: 700; font-size: .82rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}
.hero-trust .avatars span:first-child { margin-left: 0; }
.hero-trust .t-copy .stars { color: var(--accent); letter-spacing: 1px; font-size: .9rem; }
.hero-trust .t-copy .txt { font-size: .84rem; color: var(--ink-soft); }
.hero-trust .t-copy strong { color: var(--ink); }

/* Floating decorative color chips around the hero card */
.hero-visual::before, .hero-visual::after {
    content: ""; position: absolute; border-radius: 16px; z-index: 2;
    box-shadow: 0 12px 28px rgba(20, 30, 70, .18); animation: primoBob 6s ease-in-out infinite;
}
.hero-visual::before { width: 46px; height: 46px; background: linear-gradient(135deg, #18B0B0, #12908f); top: -18px; right: 44px; }
.hero-visual::after { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); bottom: 70px; right: -16px; animation-delay: 1.4s; }
@keyframes primoBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(6deg); } }

/* ---------- Section headings: refined display type ---------- */
.section-head h2, .split h2 { letter-spacing: -.03em; }
.section-head { position: relative; }
.section-head .eyebrow {
    background: linear-gradient(135deg, rgba(27, 60, 140, .08), rgba(230, 57, 70, .08));
    padding: 7px 14px; border-radius: 100px;
}
.section-head .eyebrow::before { display: none; }

/* ---------- Cards: gradient hover-border + cursor spotlight ---------- */
.feature-card, .value-card, .quote-card, .product-card, .contact-form, .swatch { position: relative; }
.feature-card::after, .value-card::after, .quote-card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .35s; pointer-events: none;
}
.feature-card:hover::after, .value-card:hover::after, .quote-card:hover::after { opacity: 1; }

/* Cursor spotlight (behind content via low-alpha, non-interactive) */
.feature-card, .value-card, .quote-card {
    background-image: radial-gradient(220px circle at var(--mx, 50%) var(--my, -20%), rgba(27, 60, 140, .07), transparent 65%);
    background-repeat: no-repeat;
}

.feature-card:hover, .value-card:hover, .quote-card:hover { box-shadow: 0 26px 60px rgba(20, 30, 70, .16); }

/* Feature icons: gentle pop on hover */
.feature-card .ic { transition: transform .35s var(--ease); }
.feature-card:hover .ic { transform: translateY(-3px) rotate(-4deg) scale(1.06); }

/* ---------- Products: richer top + shine ---------- */
.product-top { background-image: linear-gradient(135deg, rgba(255,255,255,.14), transparent 60%); }
.product-top::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px);
    opacity: 0; transition: opacity .4s;
}
.product-card:hover .product-top::after { opacity: 1; }
.product-top svg { transition: transform .4s var(--ease); }
.product-card:hover .product-top svg { transform: scale(1.12) rotate(4deg); }

/* ---------- Swatches: glossy chip + copy hint ---------- */
.swatch .chip { position: relative; }
.swatch .chip::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,.35), transparent 45%);
}

/* ---------- Marquee: fade edges ---------- */
.marquee {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

/* ---------- CTA band: subtle sheen sweep ---------- */
.cta-band { box-shadow: 0 40px 90px rgba(27, 60, 140, .28); }

/* ---------- Stats: gradient numerals ---------- */
.stats-strip .num, .hero-stats .num {
    background: linear-gradient(120deg, var(--brand), var(--accent));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Footer: watermark + gradient top edge ---------- */
.site-footer { position: relative; overflow: hidden; }
.site-footer::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand));
}
.site-footer::after {
    content: "PRIMO"; position: absolute; bottom: -2.5rem; left: 50%; transform: translateX(-50%);
    font-family: 'Sora', sans-serif; font-weight: 800; font-size: clamp(6rem, 20vw, 15rem);
    letter-spacing: .04em; color: rgba(255, 255, 255, .035); pointer-events: none; white-space: nowrap; z-index: 0;
}
.site-footer .container { position: relative; z-index: 1; }

/* ---------- Reveal: refined stagger handled by JS; add slight scale ---------- */
.reveal { transform: translateY(28px) scale(.99); }
.reveal.in { transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero h1 .hl { animation: none; }
    .hero-bg .blob, .hero-visual::before, .hero-visual::after { animation: none; }
    .btn::after { display: none; }
    .reveal { transition: none; }
}

/* =========================================================
   Hero — interactive color card (redesigned, no overlap)
   ========================================================= */
.color-card { padding: 16px; }

.cc-swatch {
    position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
    background: linear-gradient(155deg, color-mix(in srgb, var(--c), #fff 14%), color-mix(in srgb, var(--c), #000 26%));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .30);
    transition: background .55s var(--ease);
}
.cc-swatch::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(130% 90% at 18% 6%, rgba(255, 255, 255, .38), transparent 46%),
        radial-gradient(90% 70% at 90% 100%, rgba(0, 0, 0, .22), transparent 55%);
}

.cc-logo {
    position: absolute; top: 16px; left: 16px; width: 52px; height: 52px; border-radius: 14px;
    background: rgba(255, 255, 255, .96); display: grid; place-items: center; padding: 7px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .22); z-index: 3;
}
.cc-logo img { width: 100%; height: 100%; object-fit: contain; }

.cc-badge {
    position: absolute; top: 20px; right: 16px; z-index: 3;
    background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
    font-family: 'Sora', sans-serif; font-weight: 600; font-size: .64rem; letter-spacing: .1em;
    text-transform: uppercase; padding: 7px 13px; border-radius: 100px;
}

/* Big translucent color name watermark */
.cc-watermark {
    position: absolute; left: 18px; right: 18px; top: 46%; z-index: 1;
    font-family: 'Sora', sans-serif; font-weight: 800; font-size: 2rem; line-height: 1.05;
    color: rgba(255, 255, 255, .16); letter-spacing: -.01em; pointer-events: none;
    text-transform: none;
}

/* Bottom scrim carrying the readable name + code */
.cc-scrim {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 40px 20px 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, .42), transparent);
}
.cc-scrim .cc-name { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.15rem; color: #fff; }
.cc-scrim .cc-code { font-size: .82rem; color: rgba(255, 255, 255, .82); margin-top: 2px; }

/* White bar under the swatch: finishes + color dots */
.cc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 6px 6px; }
.cc-finish { display: flex; gap: 6px; }
.cc-finish span {
    font-family: 'Sora', sans-serif; font-weight: 600; font-size: .72rem; color: var(--ink-soft);
    padding: 6px 11px; border-radius: 100px; background: var(--bg-soft); border: 1px solid var(--line);
}
.cc-finish span:first-child { color: var(--brand); background: var(--brand-light); border-color: transparent; }

.cc-dots { display: flex; gap: 8px; }
.cc-dots button {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--c);
    cursor: pointer; padding: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .10);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cc-dots button:hover { transform: scale(1.18); }
.cc-dots button.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); transform: scale(1.18); }

/* Reposition the floating feature badges clear of the card text */
.hero-visual .hero-badge.b-a { top: 44%; bottom: auto; left: -26px; }
.hero-visual .hero-badge.b-b { top: 16%; right: -26px; }

/* Retire the loose decorative chips — the card now carries the interest */
.hero-visual::before, .hero-visual::after { display: none; }

/* ---------- Hero scroll cue ---------- */
.scroll-cue {
    position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 9px; z-index: 3;
    font-family: 'Sora', sans-serif; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--muted); transition: color .2s;
}
.scroll-cue:hover { color: var(--brand); }
.scroll-cue .mouse { width: 24px; height: 38px; border: 2px solid currentColor; border-radius: 14px; position: relative; }
.scroll-cue .mouse::before {
    content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; border-radius: 2px;
    background: var(--brand); transform: translateX(-50%); animation: scrollWheel 1.7s ease-in-out infinite;
}
@keyframes scrollWheel {
    0% { opacity: 0; transform: translate(-50%, 0); }
    30% { opacity: 1; }
    60% { opacity: 1; transform: translate(-50%, 11px); }
    100% { opacity: 0; transform: translate(-50%, 11px); }
}

/* ---------- Value section: floating stat badge ---------- */
.split .media { position: relative; }
.media-badge {
    position: absolute; bottom: 22px; left: 22px; background: #fff; border-radius: 16px;
    padding: 16px 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px;
}
.media-badge .mb-num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 2rem; color: var(--brand); line-height: 1; }
.media-badge .mb-lbl { font-size: .82rem; color: var(--ink-soft); line-height: 1.25; }

/* ---------- CTA: dual buttons ---------- */
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero h1 .hl { animation: none; }
    .hero-bg .blob, .hero-visual::before, .hero-visual::after { animation: none; }
    .btn::after { display: none; }
    .reveal { transition: none; }
    .scroll-cue .mouse::before { animation: none; }
}

/* =========================================================
   Mobile polish & responsiveness
   ========================================================= */
html { scroll-padding-top: 110px; }

/* ---------- Tablet & below ---------- */
@media (max-width: 900px) {
    .header-inner { height: 70px; }
}

/* ---------- Phones ---------- */
@media (max-width: 720px) {
    .container { padding: 0 18px; }
    .section { padding: 56px 0; }
    .section-head { margin-bottom: 40px; }
    .section-head h2 { font-size: clamp(1.7rem, 6.5vw, 2.2rem); }
    .section-head p { font-size: .98rem; }

    /* Decorations off */
    .hero-visual::before, .hero-visual::after { display: none; }
    .scroll-cue { display: none; }
    .site-footer::after { font-size: 5rem; bottom: -1.5rem; }

    /* --- Header --- */
    .header-inner { height: 62px; }
    .brand-logo { height: 40px; }
    .brand-text { font-size: 1.14rem; }
    .site-header.scrolled .header-inner { height: 58px; }
    .site-header.scrolled .brand-logo { height: 38px; }

    /* Mobile menu: drop directly beneath the header (fixes topbar offset bug) */
    .main-nav {
        position: absolute; top: 100%; bottom: auto; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 4px;
        background: #fff; padding: 14px 18px 20px;
        box-shadow: var(--shadow); border-top: 1px solid var(--line);
        transform: translateY(-10px); opacity: 0; visibility: hidden;
        transition: transform .3s var(--ease), opacity .3s, visibility .3s; z-index: 99;
    }
    .main-nav.open { transform: none; opacity: 1; visibility: visible; }
    .main-nav a { padding: 13px 15px; border-radius: 12px; font-size: 1rem; }
    .main-nav a.active { background: var(--brand-light); }
    .main-nav .nav-cta { margin: 8px 0 0; text-align: center; }

    /* --- Hero --- */
    .hero { padding: 32px 0 56px; }
    .hero-inner { gap: 34px; }
    .hero h1 { font-size: clamp(2.05rem, 8.4vw, 2.9rem); }
    .hero p.lead { font-size: 1.02rem; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn { flex: 1 1 46%; justify-content: center; }
    .hero-trust { margin-top: 20px; }
    .hero-stats { gap: 22px 26px; }
    .hero-stats .num { font-size: 1.55rem; }
    .hero-visual { max-width: 400px; margin: 0 auto; }

    /* Color card: let the bottom bar wrap cleanly */
    .cc-bar { flex-wrap: wrap; gap: 12px; }
    .cc-dots { order: 1; width: 100%; justify-content: space-between; }
    .cc-finish { order: 2; }

    /* --- Marquee --- */
    .marquee { padding: 15px 0; }
    .marquee-track { gap: 40px; }
    .marquee-track span { font-size: .92rem; gap: 40px; }

    /* --- Cards --- */
    .feature-card, .value-card, .quote-card { padding: 26px 22px; }
    .value-card { gap: 14px; }

    /* --- Split / value --- */
    .split { gap: 30px; }
    .split .media { aspect-ratio: 16 / 10; }
    .media-badge { bottom: 16px; left: 16px; padding: 13px 16px; }
    .media-badge .mb-num { font-size: 1.7rem; }

    /* --- CTA --- */
    .cta-band { padding: 40px 22px; }
    .cta-actions { flex-direction: column; }
    .cta-actions .btn { width: 100%; justify-content: center; }

    /* --- Contact --- */
    .page-hero { padding: 38px 0; }
    .page-hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .contact-info h2 { font-size: 1.6rem !important; }
    .contact-form { padding: 24px 20px; }
    .map-embed { height: 260px; margin-top: 32px; }

    /* --- Footer --- */
    .footer-grid { gap: 30px; }

    /* WhatsApp float: smaller, tucked in */
    .whatsapp-float { width: 52px; height: 52px; bottom: 18px; right: 16px; }
    .whatsapp-float svg { width: 24px; height: 24px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 430px) {
    .topbar-msg { font-size: .72rem; }
    .hero { padding: 24px 0 48px; }
    .hero h1 { font-size: clamp(1.8rem, 9vw, 2.4rem); }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-stats { gap: 16px 24px; }
    .hero-stats > div { flex: 0 0 auto; }
    .cc-finish span { padding: 5px 9px; font-size: .68rem; }
    .cc-name, .cc-scrim .cc-name { font-size: 1.05rem; }
    .swatch-wrap { grid-template-columns: repeat(2, 1fr); }
    .quote-card, .feature-card, .value-card { padding: 22px 18px; }
    .cta-band h2 { font-size: 1.6rem; }
}

/* =========================================================
   Testimonials carousel
   ========================================================= */
.tst-carousel { position: relative; }
.tst-viewport { overflow: hidden; cursor: grab; }
.tst-viewport:active { cursor: grabbing; }
.tst-track { display: flex; gap: 26px; transition: transform .55s var(--ease); touch-action: pan-y; will-change: transform; }
.tst-slide { flex: 0 0 auto; width: calc((100% - 52px) / 3); }
.tst-slide .quote-card { height: 100%; display: flex; flex-direction: column; margin: 0; }
.tst-slide .quote-card p { flex: 1 1 auto; }
.tst-slide .product-card { height: 100%; }
/* neutralise reveal offset inside the track */
.tst-slide .reveal { opacity: 1; transform: none; }

.tst-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 36px; }
.tst-arrow {
    width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
    color: var(--brand); display: grid; place-items: center; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: background .25s var(--ease), color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.tst-arrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-brand); }
.tst-arrow:active { transform: translateY(0) scale(.94); }
.tst-arrow svg { width: 20px; height: 20px; }

.tst-dots { display: flex; align-items: center; gap: 8px; }
.tst-dots button {
    width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
    background: var(--line); transition: width .3s var(--ease), background .3s, border-radius .3s;
}
.tst-dots button.active { width: 28px; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--accent)); }

@media (max-width: 960px) {
    .tst-slide { width: calc((100% - 26px) / 2); }
}
@media (max-width: 600px) {
    .tst-track { gap: 16px; }
    .tst-slide { width: 100%; }
    .tst-nav { gap: 14px; margin-top: 28px; }
    .tst-arrow { width: 44px; height: 44px; }
}
