/* RositoV2 motion: opening curtain, page-to-page transitions, scroll reveals and hover effects.
   Everything that moves by itself sits inside "prefers-reduced-motion: no-preference",
   so visitors who ask their device for less motion get a still site. Scroll reveals are driven by motion.js. */

:root {
    --rb-gold: #c29d5f; --rb-gold-hi: #f3dfb4; --rb-gold-lo: #8c6a2f;
    --rb-ease: cubic-bezier(.2, .7, .2, 1); --rb-spring: cubic-bezier(.34, 1.56, .64, 1);
    --rb-wait: 0s;                       /* extra wait while the opening curtain is up */
}
html.rb-intro { --rb-wait: 1.25s; }

/* ---------- always on: gentle hover feedback (transitions only) ---------- */

/* menu: a gold line grows under each link */
#header .navbar-default .navbar-nav > li > a::after {
    content: ''; position: absolute; left: 11px; right: 11px; bottom: 9px; height: 2px;
    background: linear-gradient(90deg, var(--rb-gold-lo), var(--rb-gold-hi), var(--rb-gold-lo));
    transform: scaleX(0); transform-origin: 50% 50%; transition: transform .35s var(--rb-ease);
}
#header .navbar-default .navbar-nav > li > a:hover::after,
#header .navbar-default .navbar-nav > li.current-menu-item > a::after { transform: scaleX(1); }
#header .dropdown-menu > li > a { transition: padding-left .2s var(--rb-ease), color .2s, background-color .2s; }
#header .dropdown-menu > li > a:hover { color: var(--rb-gold-hi); padding-left: 16px; }
#header-wrapper { transition: background-color .35s ease; }

/* gold buttons: lift, glow and a light sweep */
.btn.gold { transition: transform .25s var(--rb-ease), box-shadow .25s, background-color .25s; }
.btn.gold::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; z-index: 1; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent); transform: skewX(-20deg);
}
.btn.gold:not(.feedback-form-btn):not(.rb-hero-cta):hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(194, 157, 95, .9); }
.rb-hero-cta:hover { transform: translateX(-50%) translateY(-3px); box-shadow: 0 14px 30px -10px rgba(252, 218, 154, .9); }
.btn.gold:hover::after { animation: rb-shine .8s ease; }

/* product cards: lift, tilt towards the mouse (motion.js), photo zoom, gold line */
.menu-package .menu-sample.style-2 {
    position: relative; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
    transition: transform .35s var(--rb-ease), box-shadow .35s var(--rb-ease);
}
.menu-package .menu-sample.style-2:hover { --ty: -8px; z-index: 2; box-shadow: 0 26px 44px -22px rgba(0, 0, 0, .45), 0 0 0 1px rgba(194, 157, 95, .45); }
.menu-package .menu-sample.style-2::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: none;
    background: linear-gradient(90deg, var(--rb-gold-lo), var(--rb-gold-hi), var(--rb-gold-lo));
    transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--rb-ease);
}
.menu-package .menu-sample.style-2:hover::after { transform: scaleX(1); }
.product-list .menu-image { overflow: hidden; }
.product-list .menu-image img { transition: transform .7s var(--rb-ease); }
.product-list:hover .menu-image img { transform: scale(1.08); }
a.more-details .fa { transition: transform .25s var(--rb-ease); }
a.more-details:hover .fa.fa-angle-double-right { transform: translateX(6px); }
a.more-details:hover .fa.fa-angle-double-left { transform: translateX(-6px); }

/* category / product side menu */
.sidbar-menu li a { position: relative; transition: padding-left .25s var(--rb-ease), color .2s, background-color .2s; }
.sidbar-menu li:not(.active) a::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rb-gold);
    transform: scaleY(0); transition: transform .25s var(--rb-ease);
}
.sidbar-menu li:not(.active) a:hover { padding-left: 23px; background: #faf6ee; }
.sidbar-menu li:not(.active) a:hover::before { transform: scaleY(1); }

/* gallery, videos, manuals */
#manuals .item-rows li .thumbnail { transition: transform .3s var(--rb-ease), box-shadow .3s, border-color .3s; }
#manuals .item-rows li a:hover .thumbnail { transform: translateY(-7px) rotate(-1.5deg); box-shadow: 0 16px 26px -14px rgba(0, 0, 0, .45); border-color: var(--rb-gold); }
#manuals .item-rows li .title { transition: color .2s; }
#manuals .item-rows li a:hover .title { color: var(--rb-gold-lo); }
.product-detail img { transition: transform .5s var(--rb-ease), box-shadow .5s; }
.product-detail a:hover img { transform: translateY(-4px) scale(1.03); box-shadow: 0 16px 28px -16px rgba(0, 0, 0, .45); } /* old layout; the product card (site.css) moves the whole spec-sheet card instead */

/* forms */
.custom-inp, .custom-inp-txt, .wpcf7 input, .wpcf7 textarea, .rb-register-form .form-control { transition: border-color .25s, box-shadow .25s, background-color .25s; }
.custom-inp:focus, .custom-inp-txt:focus, .wpcf7 input:focus, .wpcf7 textarea:focus, .rb-register-form .form-control:focus {
    border-color: var(--rb-gold); box-shadow: 0 0 0 3px rgba(194, 157, 95, .28); outline: 0;
}

/* footer */
#footer-wrapper .social-links li a { transition: transform .4s var(--rb-spring), background-color .25s; }
#footer-wrapper .social-links li a:hover { transform: translateY(-5px) rotate(8deg); background-color: var(--rb-gold); }
#copyright-container .breadcrumb a { transition: color .2s; }
.scroll-up { transition: transform .35s var(--rb-ease), opacity .25s, background-color .25s; }
.scroll-up:hover { opacity: 1; background-color: var(--rb-gold-lo); }

/* scroll progress line (added by motion.js) */
.rb-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 3000; pointer-events: none;
    background: linear-gradient(90deg, var(--rb-gold-lo), var(--rb-gold), var(--rb-gold-hi));
    transform: scaleX(0); transform-origin: 0 50%;
}

/* pop-ups (inquiry forms, gallery photos) fade and grow in */
.rb-mfp.mfp-bg { opacity: 0; transition: opacity .3s ease; }
.rb-mfp.mfp-bg.mfp-ready { opacity: .92; }
.rb-mfp.mfp-bg.mfp-removing { opacity: 0; }
.rb-mfp.mfp-wrap .mfp-content { opacity: 0; transform: translateY(18px) scale(.94); transition: opacity .3s ease, transform .35s var(--rb-ease); }
.rb-mfp.mfp-wrap.mfp-ready .mfp-content { opacity: 1; transform: none; }
.rb-mfp.mfp-wrap.mfp-removing .mfp-content { opacity: 0; transform: scale(.94); }

@media print { .rb-reveal { opacity: 1 !important; animation: none !important; } }

/* ---------- things that move by themselves ---------- */
@media (prefers-reduced-motion: no-preference) {

    /* page-to-page: the old page fades away, the new one rises in; the header stays put */
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation: rb-vt-out .2s ease both; }
    ::view-transition-new(root) { animation: rb-vt-in .45s cubic-bezier(.2, .7, .2, 1) both; }
    #header-wrapper { view-transition-name: rb-header; }
    html.rb-novt .rb-page { animation: rb-fade .45s ease both; }

    /* opening curtain, once per visit (class set by boot.js) */
    html.rb-intro body::before {
        content: ''; position: fixed; inset: 0; z-index: 100000; pointer-events: none;
        background: radial-gradient(circle at 50% 45%, #2b2219 0, #0d0b09 62%);
        animation: rb-curtain 1.85s var(--rb-ease) both;
    }
    html.rb-intro body::after {
        content: ''; position: fixed; left: 50%; top: 45%; width: 132px; height: 132px; margin: -66px 0 0 -66px; z-index: 100001;
        pointer-events: none; border-radius: 50%; background: #fff var(--rb-logo, url('/img/logo/rb-logo.png')) center / cover no-repeat; /* --rb-logo: the small copy, set in App.razor */
        box-shadow: 0 0 0 3px var(--rb-gold), 0 0 0 13px rgba(194, 157, 95, .16), 0 0 70px rgba(194, 157, 95, .6);
        animation: rb-intro-logo 1.85s var(--rb-ease) both;
    }
    html.rb-intro .logo a { animation: rb-pop .7s var(--rb-spring) var(--rb-wait) both; }
    /* backwards, not both: a fill that stays after the end keeps a transform on each item, which made the Product
       item the box its mega menu is sized to, so on the first visit the menu showed only its first 117 px */
    html.rb-intro #header .pi-nav > li, html.rb-intro .rb-mobile-toggle { animation: rb-down .5s var(--rb-ease) backwards; animation-delay: calc(var(--rb-wait) + .1s); }
    html.rb-intro #header .pi-nav > li:nth-child(2) { animation-delay: calc(var(--rb-wait) + .16s); }
    html.rb-intro #header .pi-nav > li:nth-child(3) { animation-delay: calc(var(--rb-wait) + .22s); }
    html.rb-intro #header .pi-nav > li:nth-child(4) { animation-delay: calc(var(--rb-wait) + .28s); }
    html.rb-intro #header .pi-nav > li:nth-child(5) { animation-delay: calc(var(--rb-wait) + .34s); }
    html.rb-intro #header .pi-nav > li:nth-child(6) { animation-delay: calc(var(--rb-wait) + .40s); }
    html.rb-intro #header .pi-nav > li:nth-child(7) { animation-delay: calc(var(--rb-wait) + .46s); }
    html.rb-intro #header .pi-nav > li:nth-child(8) { animation-delay: calc(var(--rb-wait) + .52s); }

    /* logo: a light travels round the gold ring */
    .logo a::after, .rb-footer-logo::after {
        content: ''; position: absolute; inset: -3px; border-radius: 50%; pointer-events: none;
        background: conic-gradient(from 0deg, transparent 0 60%, rgba(255, 246, 220, .95) 78%, transparent 94%);
        -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
        mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
        animation: rb-spin 5s linear infinite;
    }
    .logo a:hover::after, .rb-footer-logo:hover::after { animation-duration: 1.4s; }
    .logo .rb-logo, .rb-footer-logo img { transition: width .2s, height .2s, transform .5s var(--rb-spring); }
    .logo a:hover .rb-logo, .rb-footer-logo:hover img { transform: scale(1.06) rotate(-4deg); }

    /* menu drop-downs slide up as they fade in (the theme fades them) */
    #header .navbar-nav > li > .dropdown-menu { animation: rb-drop .32s var(--rb-ease) both; }

    /* landing video */
    .rb-hero-video { animation: rb-fade 1.4s ease var(--rb-wait) both; }
    .rb-hero-copy h1 { animation: rb-up .9s var(--rb-ease) calc(var(--rb-wait) + .25s) both; }
    .rb-hero-cta { animation: rb-cta-in .8s var(--rb-ease) calc(var(--rb-wait) + .5s) both; }
    .rb-hero-cta::after { animation: rb-shine-loop 4s ease-in-out calc(var(--rb-wait) + 1.6s) infinite; }
    .rb-hero-sound { animation: rb-fade .6s ease calc(var(--rb-wait) + .8s) both; }
    .rb-hero-sound[aria-pressed="false"]::after {
        content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .8);
        animation: rb-ring 2.4s ease-out calc(var(--rb-wait) + 1.4s) infinite; pointer-events: none;
    }

    /* Contact Us side tab: a light sweep now and then */
    .feedback-form-btn::after { animation: rb-shine-loop 6s ease-in-out 2.5s infinite; }

    /* gallery: photos of the album just picked rise in one after another (site.js adds .rb-gal-in) */
    .rb-gal-item.rb-gal-in { animation: rb-gal-in .55s var(--rb-ease) calc(var(--rb-i, 0) * 45ms) both; }

    /* scroll reveals: motion.js adds .rb-reveal, then .rb-in when the element scrolls into view */
    .rb-reveal { opacity: 0; }
    .rb-reveal.rb-in { animation: rb-up .75s var(--rb-ease) var(--rb-d, 0ms) both; }
    .rb-reveal.rb-in[data-rb="left"] { animation-name: rb-from-left; }
    .rb-reveal.rb-in[data-rb="right"] { animation-name: rb-from-right; }
    .rb-reveal.rb-in[data-rb="zoom"] { animation-name: rb-zoom; }
    .rb-reveal.rb-in[data-rb="fade"] { animation-name: rb-fade; }
    /* heading rules draw outwards as the heading arrives */
    .rb-reveal .divider .hr-simple { transform: scaleX(0); }
    .rb-reveal.rb-in .divider .hr-simple { animation: rb-line .45s var(--rb-ease) calc(var(--rb-d, 0ms) + .2s) both; }
    .rb-reveal .divider .hr-simple.left { transform-origin: 100% 50%; }
    .rb-reveal .divider .hr-simple.right { transform-origin: 0 50%; }
    .rb-reveal .divider .hr-icon { opacity: 0; }
    .rb-reveal.rb-in .divider .hr-icon { animation: rb-fade .3s ease calc(var(--rb-d, 0ms) + .15s) both; }

    /* product registration (interactive page): each step slides in */
    .rb-register-form fieldset { animation: rb-up .5s var(--rb-ease) both; }
    .rb-steps li.now .rb-step-dot { animation: rb-pop .45s var(--rb-spring) both; }
    .rb-register-done .fa { animation: rb-pop .6s var(--rb-spring) both; }

    /* notices after sending a form */
    .rb-notice { animation: rb-down .5s var(--rb-ease) both; }
}

/* ---------- keyframes ---------- */
@keyframes rb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rb-up { from { opacity: 0; transform: translate3d(0, 34px, 0); } to { opacity: 1; transform: none; } }
@keyframes rb-down { from { opacity: 0; transform: translate3d(0, -18px, 0); } to { opacity: 1; transform: none; } }
@keyframes rb-from-left { from { opacity: 0; transform: translate3d(-40px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes rb-from-right { from { opacity: 0; transform: translate3d(40px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes rb-gal-in { from { opacity: 0; transform: translate3d(0, 22px, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rb-zoom { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes rb-pop { from { opacity: 0; transform: scale(.5) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes rb-drop { from { transform: translate3d(0, 12px, 0); } to { transform: none; } }
@keyframes rb-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rb-spin { to { transform: rotate(360deg); } }
@keyframes rb-shine { from { transform: translateX(0) skewX(-20deg); } to { transform: translateX(460%) skewX(-20deg); } }
@keyframes rb-shine-loop { 0% { transform: translateX(0) skewX(-20deg); } 22%, 100% { transform: translateX(460%) skewX(-20deg); } }
@keyframes rb-ring { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes rb-cta-in { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes rb-vt-out { to { opacity: 0; transform: translate3d(0, -14px, 0); } }
@keyframes rb-vt-in { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
@keyframes rb-curtain { 0%, 64% { transform: none; } 100% { transform: translate3d(0, -101%, 0); visibility: hidden; } }
@keyframes rb-intro-logo {
    0% { opacity: 0; transform: scale(.35) rotate(-30deg); }
    26% { opacity: 1; transform: scale(1.08) rotate(0); }
    36%, 62% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: translate3d(0, -55vh, 0) scale(.45); visibility: hidden; }
}

/* ---------- Product menu and search box ---------- */
@keyframes rb-mega-in { from { opacity: 0; transform: translate3d(0, -10px, 0); } to { opacity: 1; transform: none; } }
@keyframes rb-rise { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
    .rb-has-mega.rb-open .rb-mega-inner { animation: rb-mega-in .3s var(--rb-ease) both; }
    .rb-mega-panel.on .rb-mega-head { animation: rb-fade .3s ease both; }
    .rb-mega-panel.on .rb-mega-products li { animation: rb-rise .35s var(--rb-ease) both; }
    .rb-mega-panel.on .rb-mega-products li:nth-child(2) { animation-delay: 25ms; }
    .rb-mega-panel.on .rb-mega-products li:nth-child(3) { animation-delay: 50ms; }
    .rb-mega-panel.on .rb-mega-products li:nth-child(n+4) { animation-delay: 80ms; }
    .rb-mega-panel.on .rb-mega-products li:nth-child(n+7) { animation-delay: 110ms; }
    .rb-mega-panel.on .rb-mega-products li:nth-child(n+10) { animation-delay: 140ms; }
    .rb-mega-panel.on .rb-mega-products li:nth-child(n+13) { animation-delay: 170ms; }
    .rb-search-results:not([hidden]) { animation: rb-mega-in .25s var(--rb-ease) both; }
    html.rb-intro .rb-search { animation: rb-down .5s var(--rb-ease) calc(var(--rb-wait) + .6s) both; }
}

/* ---------- contact panel: the heading and fields follow the panel in, one after another ---------- */
@media (prefers-reduced-motion: no-preference) {
    .rb-drawer-open .rb-drawer-head > *, .rb-drawer-open .rb-drawer-product, .rb-drawer-open .rb-drawer .form-group,
    .rb-drawer-open .rb-drawer form > button, .rb-drawer-open .rb-drawer-note { animation: rb-drawer-in .55s var(--rb-ease) both; }
    .rb-drawer-open .rb-drawer-head > * { animation-delay: .12s; }
    .rb-drawer-open .rb-drawer-product { animation-delay: .16s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(2) { animation-delay: .18s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(3) { animation-delay: .22s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(4) { animation-delay: .26s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(5) { animation-delay: .30s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(6) { animation-delay: .34s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(7) { animation-delay: .38s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(8) { animation-delay: .42s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(9) { animation-delay: .46s; }
    .rb-drawer-open .rb-drawer .form-group:nth-of-type(10) { animation-delay: .50s; }
    .rb-drawer-open .rb-drawer form > button { animation-delay: .56s; }
    .rb-drawer-open .rb-drawer-note { animation-delay: .62s; }
}
@keyframes rb-drawer-in { from { opacity: 0; transform: translate3d(26px, 0, 0); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .rb-drawer, .rb-drawer-shade, a.feedback-form-btn.btn { transition-duration: .01s; }
}
