/* =========================================================
   RotoEdge — site header, mobile menu and footer
   Headings/nav use Audiowide (the hero "VFX Studio" face)
   Desktop ≥1200px · Tablet 768–1199px · Mobile ≤767px
========================================================= */

:root {
    --rc-red: #ff1f1f;
    --rc-red-deep: #120304;
    --rc-bg: #0b0b0b;
    --rc-panel: #121212;
    --rc-page: var(--e-global-color-primary, #000);
    --rc-line: rgba(255, 255, 255, .1);
    --rc-muted: rgba(255, 255, 255, .62);
    --rc-display: "Audiowide", "Syne", sans-serif;
    --rc-hdr-h: 84px;
}

/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */

.re-hdr {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 14px clamp(16px, 3vw, 40px) 0;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1), padding .35s ease;
    pointer-events: none;
}

.re-hdr__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1400px;
    height: calc(var(--rc-hdr-h) - 14px);
    margin: 0 auto;
    padding: 0 12px 0 20px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: transparent;
    pointer-events: auto;
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, height .35s ease;
}

/* once the page scrolls the bar becomes a floating glass panel */
.re-hdr.is-scrolled { padding-top: 10px; }

.re-hdr.is-scrolled .re-hdr__bar {
    height: 62px;
    border-color: var(--rc-line);
    background: rgba(12, 12, 12, .78);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}

.re-hdr__logo {
    display: inline-flex;
    flex: none;
    align-items: center;
}

.re-hdr__logo img {
    display: block;
    width: auto;
    height: 60px;
    max-width: none;
    transition: height .35s ease;
}

.re-hdr.is-scrolled .re-hdr__logo img { height: 50px; }

.re-hdr__burger {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    width: 52px;
    height: 52px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
    transition: border-color .3s ease, background .3s ease;
}

.re-hdr__burger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: width .3s ease, background .3s ease;
}

.re-hdr__burger span:nth-child(2) { width: 14px; background: var(--rc-red); }
.re-hdr__burger span:nth-child(3) { width: 9px; }

.re-hdr__burger:hover,
.re-hdr__burger:focus-visible { border-color: var(--rc-red); background: rgba(255, 31, 31, .1); }

.re-hdr__burger:hover span { width: 20px; }

.re-hdr a:focus-visible,
.re-hdr button:focus-visible,
.re-menu a:focus-visible,
.re-menu button:focus-visible,
.re-foot a:focus-visible {
    outline: 2px solid var(--rc-red);
    outline-offset: 3px;
}

/* ---------------------------------------------------------
   Full-screen menu (all devices)
--------------------------------------------------------- */

.re-menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 14px clamp(16px, 3vw, 40px) max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(ellipse 80% 55% at 100% 0%, rgba(255, 31, 31, .22), rgba(255, 31, 31, 0) 70%),
        radial-gradient(ellipse 70% 50% at 0% 100%, rgba(255, 31, 31, .12), rgba(255, 31, 31, 0) 70%),
        var(--rc-bg);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
}

.re-menu[hidden] { display: none; }

.re-menu.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .35s ease;
}

/* faint compositing grid */
.re-menu::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.re-menu__top {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 12px 0 20px;
}

.re-menu__close {
    position: relative;
    flex: none;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
    transition: border-color .3s ease, background .3s ease, transform .4s ease;
}

.re-menu__close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

.re-menu__close span + span { transform: translate(-50%, -50%) rotate(-45deg); background: var(--rc-red); }

.re-menu__close:hover,
.re-menu__close:focus-visible { border-color: var(--rc-red); background: rgba(255, 31, 31, .12); transform: rotate(90deg); }

.re-menu__nav {
    flex: 1;
    display: flex;
    align-items: center;
    padding: clamp(16px, 4vh, 40px) 20px;
}

.re-menu__nav ol {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.re-menu__nav li {
    border-bottom: 1px solid var(--rc-line);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}

.re-menu.is-open .re-menu__nav li { opacity: 1; transform: none; }

.re-menu.is-open .re-menu__nav li:nth-child(1) { transition-delay: .06s; }
.re-menu.is-open .re-menu__nav li:nth-child(2) { transition-delay: .1s; }
.re-menu.is-open .re-menu__nav li:nth-child(3) { transition-delay: .14s; }
.re-menu.is-open .re-menu__nav li:nth-child(4) { transition-delay: .18s; }
.re-menu.is-open .re-menu__nav li:nth-child(5) { transition-delay: .22s; }
.re-menu.is-open .re-menu__nav li:nth-child(6) { transition-delay: .26s; }
.re-menu.is-open .re-menu__nav li:nth-child(7) { transition-delay: .3s; }
.re-menu.is-open .re-menu__nav li:nth-child(8) { transition-delay: .34s; }

.re-menu__nav a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: clamp(10px, 1.8vh, 16px) 0;
    font-family: var(--rc-display);
    font-size: clamp(24px, 6.4vw, 44px);
    line-height: 1.1;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    transition: color .25s ease, padding-left .3s ease;
}

.re-menu__nav em {
    flex: none;
    width: 26px;
    font-family: var(--rc-display);
    font-size: 12px;
    font-style: normal;
    letter-spacing: .08em;
    color: var(--rc-red);
}

.re-menu__nav a:hover,
.re-menu__nav a:focus-visible { padding-left: 8px; color: var(--rc-red); }

.re-menu__nav a[aria-current="page"] { color: var(--rc-red); }

.re-menu__top,
.re-menu__body {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.re-menu__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.re-menu__foot {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 0 20px;
}

.re-menu__pitch { display: none; }

.re-menu__contact a {
    display: block;
    margin-top: 6px;
    font-size: 16px;
    color: #fff;
    text-decoration: none;
}

.re-menu__contact a:hover { color: var(--rc-red); }

/* wide screens: big nav on the left, studio info panel on the right */
@media (min-width: 1024px) {
    .re-menu__body {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
        align-items: center;
        gap: clamp(40px, 6vw, 110px);
    }

    .re-menu__nav a { font-size: clamp(34px, 3.6vw, 56px); padding: clamp(8px, 1.4vh, 14px) 0; }

    .re-menu__foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
        padding: 36px;
        border: 1px solid var(--rc-line);
        border-radius: 24px;
        background: rgba(255, 255, 255, .03);
        opacity: 0;
        transform: translateX(24px);
        transition: opacity .5s ease .2s, transform .5s cubic-bezier(.2, .8, .2, 1) .2s;
    }

    .re-menu.is-open .re-menu__foot { opacity: 1; transform: none; }

    .re-menu__pitch {
        display: block;
        margin: 0;
        font-family: var(--rc-display);
        font-size: clamp(22px, 1.9vw, 30px);
        line-height: 1.25;
        text-transform: uppercase;
        color: #fff;
    }

    .re-menu__pitch span { display: block; color: var(--rc-red); }

    .re-menu__contact a { font-size: 18px; }
}
.re-menu__label {
    display: block;
    font-family: var(--rc-display);
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--rc-red);
}

html.re-menu-open,
html.re-menu-open body { overflow: hidden; }

/* ---------------------------------------------------------
   Social icons (menu + footer)
--------------------------------------------------------- */

.re-social {
    display: flex;
    gap: 10px;
}

.re-social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    color: #fff;
    transition: background .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
}

.re-social svg { width: 17px; height: 17px; fill: currentColor; }

.re-social a:hover,
.re-social a:focus-visible {
    border-color: var(--rc-red);
    background: var(--rc-red);
    color: #fff;
    transform: translateY(-3px);
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */

.re-foot {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 5vw, 72px) 0 0;
    /* starts on the sections' black so it flows straight on from the page, glow builds toward the bottom */
    background:
        radial-gradient(ellipse 70% 38% at 50% 100%, rgba(255, 31, 31, .16), rgba(255, 31, 31, 0) 72%),
        linear-gradient(180deg, var(--rc-page) 0%, var(--rc-page) 22%, #0a0a0a 100%);
    color: #fff;
}

.re-foot__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* call-to-action band */
.re-foot__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    padding: clamp(26px, 3.4vw, 44px) clamp(22px, 3.6vw, 52px);
    border: 1px solid rgba(255, 31, 31, .28);
    border-radius: 24px;
    background:
        radial-gradient(ellipse 70% 120% at 0% 50%, rgba(255, 31, 31, .2), rgba(255, 31, 31, 0) 65%),
        linear-gradient(90deg, var(--rc-red-deep), #0c0c0c 70%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}

.re-foot__eyebrow {
    display: block;
    margin-bottom: 10px;
    font-family: var(--rc-display);
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--rc-muted);
}

.re-foot__cta-title {
    margin: 0;
    font-family: var(--rc-display);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 56px);
    line-height: 1.05;
    text-transform: uppercase;
    color: #fff;
}

.re-foot__cta-title span { color: var(--rc-red); }

.re-foot__cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.re-foot__btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 54px;
    padding: 0 28px;
    border-radius: 40px;
    background: var(--rc-red);
    font-family: var(--rc-display);
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(255, 31, 31, .35);
    transition: background .3s ease, color .3s ease;
}

.re-foot__btn svg { width: 12px; height: 12px; transition: transform .3s ease; }

.re-foot__btn:hover,
.re-foot__btn:focus-visible { background: #fff; color: #111; }

.re-foot__btn:hover svg { transform: translateX(4px); }

.re-foot__mail {
    font-size: 16px;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 31, 31, .7);
    text-underline-offset: 6px;
}

.re-foot__mail:hover { color: var(--rc-red); }

/* link columns */
.re-foot__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr);
    gap: 40px clamp(24px, 4vw, 64px);
    padding: clamp(40px, 5vw, 64px) 0 clamp(20px, 3vw, 36px);
}

.re-foot__logo img {
    display: block;
    width: auto;
    height: 88px;
    max-width: none;
}

.re-foot__brand p {
    max-width: 360px;
    margin: 18px 0 22px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--rc-muted);
}

.re-foot__col h3 {
    margin: 0 0 18px;
    font-family: var(--rc-display);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #fff;
}

.re-foot__col h3::after {
    content: "";
    display: block;
    width: 26px;
    height: 2px;
    margin-top: 12px;
    background: var(--rc-red);
}

.re-foot__col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.re-foot__col li + li { margin-top: 11px; }

.re-foot__col a {
    position: relative;
    display: inline-block;
    font-size: 15px;
    line-height: 1.4;
    color: var(--rc-muted);
    text-decoration: none;
    transition: color .25s ease, transform .25s ease;
}

.re-foot__col a:hover,
.re-foot__col a:focus-visible { color: #fff; transform: translateX(4px); }

.re-foot__col a[aria-current="page"] { color: var(--rc-red); }

.re-foot__contact li {
    font-size: 15px;
    line-height: 1.5;
    color: #fff;
}

.re-foot__contact li + li { margin-top: 16px; }

.re-foot__contact span {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--rc-red);
}

.re-foot__contact a { color: #fff; }

.re-foot__contact a:hover { color: var(--rc-red); transform: none; }

/* oversized outline wordmark */
.re-foot__word {
    font-family: var(--rc-display);
    font-size: clamp(40px, 12.2vw, 186px);
    line-height: .9;
    letter-spacing: .02em;
    text-align: center;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, rgba(255, 31, 31, .22), rgba(255, 31, 31, 0) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    user-select: none;
}

.re-foot__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding: 22px 0 16px;
    border-top: 1px solid var(--rc-line);
}

.re-foot__bar p,
.re-foot__sub p {
    margin: 0;
    font-size: 13px;
    color: var(--rc-muted);
}

/* second row: brand line + site credit */
.re-foot__sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding: 0 0 max(22px, env(safe-area-inset-bottom));
}

.re-foot__copy a,
.re-foot__credit a {
    color: #fff;
    text-decoration: none;
    transition: color .25s ease;
}

.re-foot__copy a:hover,
.re-foot__credit a:hover,
.re-foot__copy a:focus-visible,
.re-foot__credit a:focus-visible { color: var(--rc-red); }

/* Privacy Policy · Terms & Conditions (footer only) */
.re-foot__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
}

.re-foot__legal a {
    font-size: 13px;
    color: var(--rc-muted);
    text-decoration: none;
    transition: color .25s ease;
}

.re-foot__legal a:hover,
.re-foot__legal a:focus-visible,
.re-foot__legal a[aria-current] { color: #fff; }

@media (max-width: 767px) {
    .re-foot__sub { flex-direction: column; align-items: flex-start; }
}

.re-foot__tag {
    font-family: var(--rc-display);
    letter-spacing: .12em;
    text-transform: uppercase;
}

.re-foot__tag span { color: var(--rc-red); }

/* language selector (footer bar + menu): plain crawlable links */
.re-lang {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.re-lang a {
    padding: 6px 12px;
    border: 1px solid var(--rc-line);
    border-radius: 30px;
    font-size: 12.5px;
    line-height: 1.2;
    color: var(--rc-muted);
    text-decoration: none;
    transition: color .25s ease, border-color .25s ease, background .25s ease;
}

.re-lang a:hover,
.re-lang a:focus-visible { border-color: var(--rc-red); color: #fff; }

.re-lang a[aria-current] { border-color: rgba(255, 31, 31, .55); background: rgba(255, 31, 31, .1); color: #fff; }

/* ---------------------------------------------------------
   Tablet / small laptop: nav moves into the menu
--------------------------------------------------------- */
@media (max-width: 1199px) {
    .re-foot__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .re-foot__brand {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 18px 32px;
    }

    .re-foot__brand p { flex: 1 1 320px; margin: 0; }
}

/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */
@media (max-width: 767px) {
    :root { --rc-hdr-h: 72px; }

    .re-hdr { padding: 10px 12px 0; }
    .re-hdr.is-scrolled { padding-top: 8px; }

    .re-hdr__bar { padding: 0 8px 0 14px; border-radius: 16px; }
    .re-hdr.is-scrolled .re-hdr__bar { height: 58px; }

    .re-hdr__logo img { height: 52px; }
    .re-hdr.is-scrolled .re-hdr__logo img { height: 46px; }

    .re-hdr__burger { width: 46px; height: 46px; padding: 0 12px; }
    .re-menu__close { width: 46px; height: 46px; }

    .re-menu { padding: 10px 12px max(22px, env(safe-area-inset-bottom)); }
    .re-menu__top { height: 62px; padding: 0 8px 0 14px; }
    .re-menu__nav { padding: 12px 14px; }
    .re-menu__foot { padding: 0 14px; }

    .re-foot__inner { padding: 0 18px; }

    .re-foot__cta { border-radius: 20px; }
    .re-foot__cta-actions { width: 100%; }
    .re-foot__btn { flex: 1 1 auto; justify-content: center; }

    .re-foot__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 20px;
    }

    .re-foot__brand { display: block; }
    .re-foot__brand p { margin: 16px 0 20px; }
    .re-foot__logo img { height: 76px; }

    .re-foot__contact { grid-column: 1 / -1; }

    .re-foot__bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .re-foot__tag { font-size: 11px; line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
    .re-hdr,
    .re-hdr__bar,
    .re-menu,
    .re-menu__nav li { transition: none; }
}

/* =========================================================
   Motion — one calm, site-wide language (js/re-chrome.js tags the elements)
   · content rises 28px and fades in as it scrolls into view, siblings staggered 90ms
   · photos / video frames settle from a slight zoom
   · page heroes play the same rise in sequence on load
   Uses the individual translate / scale properties, so hover effects that use
   transform (card lifts, button nudges) keep working on the same elements.
   Only active when the script has added html.re-motion (never for reduced motion),
   so without JavaScript everything is simply visible.
========================================================= */

:root {
    --rv-ease: cubic-bezier(.16, 1, .3, 1);
    --rv-dur: .9s;
    --rv-step: 90ms;
}

.re-motion .re-reveal {
    opacity: 0;
    translate: 0 28px;
    transition:
        opacity var(--rv-dur) var(--rv-ease) calc(var(--rv-i, 0) * var(--rv-step)),
        translate var(--rv-dur) var(--rv-ease) calc(var(--rv-i, 0) * var(--rv-step)),
        scale calc(var(--rv-dur) * 1.3) var(--rv-ease) calc(var(--rv-i, 0) * var(--rv-step));
}

.re-motion .re-reveal--media {
    translate: 0 18px;
    scale: .965;
}

.re-motion .re-reveal--fade { translate: none; }

.re-motion .re-reveal--hero { translate: 0 36px; }

.re-motion .re-reveal.is-shown {
    opacity: 1;
    translate: none;
    scale: none;
}

/* the picture inside a frame eases out of a gentle zoom as the frame arrives */
.re-motion .re-reveal--media > img,
.re-motion .re-reveal--media .re-card__media,
.re-motion .re-reveal--media .re-about__photo {
    scale: 1.06;
    transition: scale 1.6s var(--rv-ease) calc(var(--rv-i, 0) * var(--rv-step));
}

.re-motion .re-reveal--media.is-shown > img,
.re-motion .re-reveal--media.is-shown .re-card__media,
.re-motion .re-reveal--media.is-shown .re-about__photo { scale: none; }

/* cursor dot (js/re-site.js): fades in with the mouse, shrinks away over links and buttons */
#magic-cursor { transition: opacity .3s ease; }

#ball { transition: scale .3s var(--rv-ease), opacity .3s ease; will-change: transform; }

#ball.re-ball--hidden { scale: 0; opacity: 0; }

/* page-to-page: a short crossfade; the fixed header stays put */
@view-transition { navigation: auto; }

.re-hdr { view-transition-name: re-hdr; }

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .38s;
    animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

/* =========================================================
   Floating actions: "Request a Quote" side tab, WhatsApp, chat assistant (js/re-chat.js)
   A short shake every few seconds draws the eye; it stops once the chat has been opened,
   and never runs for visitors who prefer reduced motion.
========================================================= */

/* button stack, bottom right */
.re-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 991;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.re-fab__btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, background .3s ease;
}

.re-fab__btn svg { width: 26px; height: 26px; }

.re-fab__btn--wa {
    width: 50px;
    height: 50px;
    background: #25d366;
    color: #fff;
    box-shadow: 0 10px 26px rgba(37, 211, 102, .35);
}

.re-fab__btn--wa svg { width: 24px; height: 24px; fill: currentColor; }

.re-fab__btn--chat {
    background: var(--rc-red);
    color: #fff;
    box-shadow: 0 12px 32px rgba(255, 31, 31, .45);
    animation: re-fab-nudge 6s ease-in-out 2s infinite;
}

/* soft pulse ring behind the chat button */
.re-fab__btn--chat::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 31, 31, .6);
    animation: re-fab-ring 3s ease-out infinite;
    pointer-events: none;
}

.re-fab__btn--chat svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.re-fab__btn--chat .re-fab__dot { fill: currentColor; stroke: none; }
.re-fab__close { display: none; }
.re-fab__btn--chat[aria-expanded="true"] .re-fab__open { display: none; }
.re-fab__btn--chat[aria-expanded="true"] .re-fab__close { display: block; }
.re-fab__btn--chat[aria-expanded="true"] { animation: none; background: #fff; color: #111; }
.re-fab__btn--chat[aria-expanded="true"]::before { display: none; }

.re-fab__btn:hover,
.re-fab__btn:focus-visible { transform: translateY(-3px) scale(1.05); }

.re-fab__btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* once the chat has been opened, stop nudging */
.re-chat-seen .re-fab__btn--chat,
.re-chat-seen .re-fab__btn--chat::before { animation: none; }

@keyframes re-fab-nudge {
    0%, 82%, 100% { rotate: 0deg; }
    85% { rotate: -14deg; }
    88% { rotate: 12deg; }
    91% { rotate: -9deg; }
    94% { rotate: 6deg; }
    97% { rotate: -2deg; }
}

@keyframes re-fab-ring {
    0% { transform: scale(1); opacity: .8; }
    100% { transform: scale(1.55); opacity: 0; }
}

/* the theme's back-to-top button moves up to sit above the stack */
.back-to-top-wrapper { right: 26px !important; }
.back-to-top-wrapper.back-to-top-btn-show { bottom: 166px !important; }

/* hidden while the full-screen menu is open */
html.re-menu-open .re-fab,
html.re-menu-open .re-chat { display: none; }

/* home page teaser bubble */
.re-chat-teaser {
    position: fixed;
    right: 92px;
    bottom: 34px;
    z-index: 991;
    max-width: 230px;
    padding: 12px 34px 12px 14px;
    border: 1px solid rgba(255, 31, 31, .35);
    border-radius: 16px 16px 4px 16px;
    background: #141414;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    font-size: 13.5px;
    line-height: 1.45;
    color: #fff;
    cursor: pointer;
    animation: re-teaser-in .5s cubic-bezier(.2, .8, .2, 1) both;
}

.re-chat-teaser b { display: block; margin-bottom: 2px; color: var(--rc-red); font-weight: 600; }

.re-chat-teaser button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    color: var(--rc-muted);
    cursor: pointer;
}

.re-chat-teaser button:hover { color: #fff; }

@keyframes re-teaser-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ---------- chat panel ---------- */
.re-chat {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 992;
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 140px));
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 40% at 100% 0%, rgba(255, 31, 31, .16), rgba(255, 31, 31, 0) 70%),
        #0d0d0d;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
    color: #fff;
    opacity: 0;
    transform: translateY(14px) scale(.98);
    transform-origin: bottom right;
    visibility: hidden;
    transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .35s;
}

.re-chat.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }

.re-chat__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.re-chat__avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 31, 31, .5);
    border-radius: 50%;
    background: #1a1a1a;
}

.re-chat__avatar img { width: 26px; height: auto; }

.re-chat__title { margin: 0; font-family: var(--rc-display); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }

.re-chat__status { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 12px; color: var(--rc-muted); }
.re-chat__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #25d366; }

.re-chat__x {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
}

.re-chat__x:hover { border-color: var(--rc-red); }

.re-chat__log {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.re-msg {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    animation: re-msg-in .3s ease both;
}

.re-msg p { margin: 0; }
.re-msg p + p { margin-top: 6px; }
.re-msg ul { margin: 6px 0 0; padding-left: 18px; }
.re-msg a { color: #fff; text-decoration: underline; text-decoration-color: var(--rc-red); text-underline-offset: 3px; }

.re-msg--bot { align-self: flex-start; border-bottom-left-radius: 4px; background: #1b1b1b; border: 1px solid rgba(255, 255, 255, .07); }
.re-msg--me { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--rc-red); }

.re-msg--typing { display: flex; gap: 4px; padding: 13px 14px; }
.re-msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--rc-muted); animation: re-typing 1s ease-in-out infinite; }
.re-msg--typing i:nth-child(2) { animation-delay: .15s; }
.re-msg--typing i:nth-child(3) { animation-delay: .3s; }

@keyframes re-msg-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes re-typing { 50% { opacity: .3; transform: translateY(-3px); } }

.re-chat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }

.re-chat__chips button,
.re-chat__chips a {
    padding: 7px 12px;
    border: 1px solid rgba(255, 31, 31, .45);
    border-radius: 30px;
    background: rgba(255, 31, 31, .08);
    font: inherit;
    font-size: 12.5px;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease;
}

.re-chat__chips button:hover,
.re-chat__chips a:hover { border-color: var(--rc-red); background: rgba(255, 31, 31, .22); }

.re-chat__form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.re-chat__form input {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 24px;
    background: rgba(255, 255, 255, .04);
    font: inherit;
    font-size: 14px;
    color: #fff;
}

.re-chat__form input:focus { outline: none; border-color: var(--rc-red); }

.re-chat__form button {
    flex: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--rc-red);
    color: #fff;
    cursor: pointer;
}

.re-chat__form button svg { width: 16px; height: 16px; }

/* ---------- phones ---------- */
@media (max-width: 767px) {
    .re-fab { right: 14px; bottom: 14px; gap: 10px; }
    .re-fab__btn { width: 52px; height: 52px; }
    .re-fab__btn--wa { width: 46px; height: 46px; }
    .back-to-top-wrapper { right: 18px !important; }
    .back-to-top-wrapper.back-to-top-btn-show { bottom: 140px !important; }

    .re-chat { right: 10px; left: 10px; bottom: 80px; width: auto; height: min(70vh, calc(100vh - 110px)); border-radius: 18px; }
    .re-chat-teaser { right: 78px; bottom: 22px; max-width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
    .re-fab__btn--chat,
    .re-fab__btn--chat::before,
    .re-chat-teaser,
    .re-msg { animation: none; }
    .re-chat { transition: none; }
}

/* chat: the theme styles every <p>; keep the panel's own rhythm */
.re-chat p { margin: 0; }
.re-chat__head > div { min-width: 0; }
.re-chat__title { line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-chat__status { line-height: 1.3; }
.re-msg p { line-height: 1.55; }

@media (max-width: 767px) {
    /* taller panel between the header and the buttons */
    .re-chat { top: 78px; bottom: 80px; height: auto; }
    /* options become one swipeable row so the conversation keeps its room */
    .re-chat__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
    .re-chat__chips::-webkit-scrollbar { display: none; }
    .re-chat__chips button, .re-chat__chips a { flex: none; white-space: nowrap; }
    /* 16px stops iOS zooming into the field */
    .re-chat__form input { font-size: 16px; }
    .re-chat__head { padding: 12px 14px; }
}

.re-msg, .re-msg p, .re-msg li { color: #fff; }


/* ---------------------------------------------------------
   Analytics consent (js/re-track.js; shown only once a GA4 ID is configured)
--------------------------------------------------------- */
.re-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 20px;
    border: 1px solid var(--rc-line);
    border-radius: 18px;
    background: #141414;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .8);
}
.re-consent p { flex: 1 1 320px; margin: 0; }
.re-consent a { color: #fff; }
.re-consent__actions { display: flex; gap: 10px; }
.re-consent button {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--rc-line);
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}
.re-consent button.is-primary { border-color: var(--rc-red); background: var(--rc-red); }
.re-consent button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
