/* Lubliner: targeted fixes (impeccable audit 2026-11-23) + motion layer.
   Loaded by mu-plugins/web1-lubliner-polish.php. Not in the Customizer CSS (it escapes ">"). */

/* ---------- Fixes ---------- */

/* Elementor grid containers were set to a fixed number of rows (5 rows for 6 items in 4 columns),
   leaving 500-800px of blank space under the category tiles. Let the rows follow the content. */
.e-grid > .e-con-inner,
.e-grid.e-con-full{grid-template-rows:none !important;grid-auto-rows:auto}

/* Category pages showed the title and breadcrumbs twice: OceanWP page header + a grey Elementor box.
   Keep the theme header (same as the product-category pages), hide the duplicate box. */
body:has(.page-header .page-header-title) .elementor .e-con:has(> .e-con-inner > .elementor-widget-breadcrumbs):has(h1){display:none}

/* Body text used the global grey #7A7A7A (4.3:1 on white, below AA). Darken on light content only. */
#main .elementor-widget-text-editor{--e-global-color-text:#4d4a47}
/* Home page category boxes: grey text on dark boxes (3:1) and on light-grey boxes (3.4:1) */
body.home .elementor-element-22bf335b,
body.home .elementor-element-618cf353,
body.home .elementor-element-3501719,
body.home .elementor-element-7c2bca39{--e-global-color-text:#d8d0c4;color:#d8d0c4}
body.home .elementor-element-2d2f7628,
body.home .elementor-element-4231ef76{--e-global-color-text:#3f3c39;color:#3f3c39}
body.home .elementor-element-2d2f7628 a,
body.home .elementor-element-4231ef76 a{color:#6e5233 !important}

/* Home page on tablet/desktop had no visible H1 (the hero H1 is mobile-only, the theme title is hidden).
   Keep the theme H1 for screen readers and search engines, visually hidden, only where the mobile H1 is hidden. */
@media (min-width:768px){
  body.home .page-header{display:block !important;position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
}

/* Accessibility button sat on top of the logo once the promo banner pushed the header down */
@media (min-width:1025px){ body .edit_icon{top:250px} }

/* Brand-coloured selection and focus instead of browser defaults */
::selection{background:#e6cf98;color:#2b1f13}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #8a6440;outline-offset:2px}

/* ---------- Motion (site standard) ---------- */
:root{--lm-ease:cubic-bezier(.16,1,.3,1);--lm-soft:cubic-bezier(.25,.8,.25,1)}

html.has-motion [data-reveal]{opacity:0;transform:translate3d(0,22px,0);
  transition:opacity .9s var(--lm-ease),transform 1s var(--lm-ease);transition-delay:var(--rd,0ms)}
html.has-motion [data-reveal="fade"]{transform:none}
html.has-motion [data-reveal].is-in{opacity:1;transform:none}

/* Buttons lift slightly */
.elementor-button,.lub-promo__btn,.woocommerce a.button,.my-contact-button a.button{
  transition:background-color .3s var(--lm-soft),color .3s var(--lm-soft),transform .45s var(--lm-ease),box-shadow .45s var(--lm-ease)}
.elementor-button:hover,.woocommerce a.button:hover,.my-contact-button a.button:hover{transform:translateY(-2px);box-shadow:0 10px 22px -12px rgba(60,40,20,.55)}
.elementor-button:active,.woocommerce a.button:active{transform:translateY(0) scale(.98);transition-duration:.12s}

/* Slow zoom on category tiles, product cards and project images */
.elementor-widget-image a{display:block;overflow:hidden}
.elementor-widget-image a img,
.woocommerce ul.products li.product .woo-entry-image a img{transition:transform 1.3s var(--lm-ease)}
.elementor-widget-image a:hover img,
.woocommerce ul.products li.product:hover .woo-entry-image a img{transform:scale(1.05)}
.woocommerce ul.products li.product .woo-entry-image{overflow:hidden}

/* Text links in content: underline offset grows */
#main .elementor-widget-text-editor a{transition:color .3s var(--lm-soft),text-underline-offset .4s var(--lm-ease);text-underline-offset:3px}
#main .elementor-widget-text-editor a:hover{text-underline-offset:6px}

/* Form fields: soft focus ring */
.elementor-field-group .elementor-field{transition:box-shadow .35s var(--lm-ease),border-color .35s var(--lm-soft)}
.elementor-field-group .elementor-field:focus{box-shadow:0 0 0 3px rgba(184,160,106,.45)}

/* Lenis smooth scrolling */
html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto !important}
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.lenis.lenis-stopped{overflow:hidden}

/* Page transitions */
@view-transition{navigation:auto}
::view-transition-old(root){animation:lm-out .3s var(--lm-soft) both}
::view-transition-new(root){animation:lm-in .5s var(--lm-ease) both}
@keyframes lm-out{to{opacity:0}}
@keyframes lm-in{from{opacity:0;transform:translateY(8px)}}

@media (prefers-reduced-motion:reduce){
  html.has-motion [data-reveal]{opacity:1;transform:none;transition:none}
  .elementor-button:hover,.woocommerce a.button:hover,.elementor-widget-image a:hover img,
  .woocommerce ul.products li.product:hover .woo-entry-image a img{transform:none}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
}
