/* =========================================================
   1LG EXPERIENCE LAYER — legacy base styles consolidated for v1.0
   Configurable site-wide runtime presentation layer.
   ========================================================= */

:root {
    --twz-motion-distance: 12px;
    --twz-motion-duration: 720ms;
    --twz-motion-duration-media: 900ms;
    --twz-motion-ease: cubic-bezier(.22, .61, .36, 1);
    --twz-motion-spring: cubic-bezier(.2, .8, .2, 1);
    --twz-cyan-rgb: 36, 237, 255;
    --twz-pink-rgb: 255, 60, 132;
    --twz-ui-accent-rgb: 36, 237, 255;
    --twz-ui-accent2-rgb: 255, 60, 132;
    --twz-ui-surface-rgb: 9, 16, 18;
    --twz-ui-text-rgb: 238, 251, 252;
    --twz-ui-border-rgb: 93, 106, 112;
    --twz-ui-accent-text-rgb: 8, 33, 38;
}

/* Viewport-triggered behaviours are separated by class so each feature can be
   switched independently in WordPress. */
html.twz-motion-enabled .twz-section-heading,
html.twz-motion-enabled .twz-card-grid-item {
    opacity: 0;
    transform: translate3d(0, var(--twz-motion-distance), 0);
    transition: opacity var(--twz-motion-duration) var(--twz-motion-ease), transform var(--twz-motion-duration) var(--twz-motion-ease);
}

html.twz-motion-enabled .twz-section-heading.twz-visible,
html.twz-motion-enabled .twz-card-grid-item.twz-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

html.twz-motion-enabled .twz-media {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(.988);
    transition: opacity var(--twz-motion-duration-media) var(--twz-motion-ease), transform var(--twz-motion-duration-media) var(--twz-motion-ease);
}

html.twz-motion-enabled .twz-media.twz-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

html.twz-motion-enabled .twz-feature-item {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(.995);
    transition: opacity 820ms var(--twz-motion-ease), transform 820ms var(--twz-motion-ease);
}

html.twz-motion-enabled .twz-feature-item.twz-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

html.twz-motion-enabled .twz-delay-1 { transition-delay: 90ms; }
html.twz-motion-enabled .twz-delay-2 { transition-delay: 170ms; }
html.twz-motion-enabled .twz-delay-3 { transition-delay: 250ms; }
html.twz-motion-enabled .twz-delay-4 { transition-delay: 330ms; }
html.twz-motion-enabled .twz-delay-5 { transition-delay: 410ms; }

/* Hero content */
html.twz-motion-enabled .twz-hero-item {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition: opacity 650ms var(--twz-motion-ease), transform 650ms var(--twz-motion-ease);
}

html.twz-motion-enabled .twz-hero-item.twz-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Hero background: pseudo-layer preserves the original hero background below. */
.twz-hero-ambient {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.twz-hero-ambient::before {
    content: "";
    position: absolute;
    inset: -4%;
    z-index: 0;
    pointer-events: none;
    background-image: var(--twz-hero-bg-image);
    background-position: var(--twz-hero-bg-position, center);
    background-size: var(--twz-hero-bg-size, cover);
    background-repeat: var(--twz-hero-bg-repeat, no-repeat);
    background-color: var(--twz-hero-bg-color, transparent);
    background-blend-mode: var(--twz-hero-bg-blend, normal);
    transform-origin: 50% 50%;
    animation: twz-hero-drift 20s ease-in-out infinite alternate;
    will-change: transform;
}

.twz-hero-ambient > * { position: relative; z-index: 1; }

@keyframes twz-hero-drift {
    0%   { transform: translate3d(-.7%, -.15%, 0) scale(1.018); }
    50%  { transform: translate3d(.35%, .15%, 0) scale(1.035); }
    100% { transform: translate3d(.8%, -.1%, 0) scale(1.022); }
}

/* Rosette ambient */
.twz-ambient-rosette {
    transform-origin: 50% 50%;
    animation: twz-rosette-breathe 12s ease-in-out infinite;
    will-change: transform, filter;
}

@keyframes twz-rosette-breathe {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); filter: brightness(1) saturate(1); }
    50%      { transform: translate3d(0, -1px, 0) scale(1.008); filter: brightness(1.05) saturate(1.02); }
}

/* Independent card lift */
.twz-card-lift {
    transition: transform 320ms var(--twz-motion-spring), box-shadow 320ms ease, filter 320ms ease, border-color 320ms ease;
}

/* Independent card image motion */
.twz-image-card { overflow: hidden; }
.twz-card-image {
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: 50% 50%;
    transition: transform 850ms var(--twz-motion-spring), filter 650ms ease;
    will-change: transform, filter;
}

/* Buttons */
.twz-motion-button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    backface-visibility: hidden;
    transition: color .18s ease-in-out, background-color .18s ease-in-out, border-color .18s ease-in-out, box-shadow 320ms ease, transform 260ms var(--twz-motion-spring), filter 260ms ease;
}

.twz-motion-button::before {
    content: "";
    position: absolute;
    top: -80%; bottom: -80%; left: -45%; width: 30%; z-index: 2;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-180%, 0, 0) rotate(14deg);
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.06) 20%, rgba(255,255,255,.48) 50%, rgba(255,255,255,.08) 80%, rgba(255,255,255,0) 100%);
    transition: transform 700ms var(--twz-motion-ease), opacity 180ms ease;
}

.twz-motion-button:focus-visible { outline: 2px solid rgba(var(--twz-cyan-rgb), .75); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
    .twz-card-lift:hover {
        transform: translate3d(0, -4px, 0);
        filter: brightness(1.018);
        box-shadow: 0 18px 46px rgba(0, 0, 0, .16), 0 0 0 1px rgba(var(--twz-cyan-rgb), .08);
    }

    .twz-image-card:hover .twz-card-image {
        transform: translate3d(0, -2px, 0) scale(1.055);
        filter: brightness(1.035) saturate(1.055) contrast(1.015);
    }

    .twz-motion-button:hover {
        transform: translate3d(0, -2px, 0) scale(1.012);
        filter: brightness(1.04) saturate(1.03);
        box-shadow: 0 9px 24px rgba(var(--twz-cyan-rgb), .18), 0 4px 14px rgba(var(--twz-pink-rgb), .08), 0 0 0 1px rgba(255, 255, 255, .08) inset;
    }

    .twz-motion-button:hover::before { opacity: 1; transform: translate3d(620%, 0, 0) rotate(14deg); }
    .twz-motion-button:active { transform: translate3d(0, 0, 0) scale(.995); transition-duration: 90ms; }
}



/* Twizu logo letter-border tracer. No rectangle or enclosing border is
   created. The runtime SVG is attached to the viewport rather than to theme
   header/footer containers, so theme-specific overflow and positioning cannot
   suppress it. JavaScript keeps it aligned to each detected wordmark. */
.twz-logo-letter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147482000;
    pointer-events: none;
    overflow: visible;
    line-height: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.twz-logo-letter-overlay svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.twz-logo-letter-runner {
    fill: none;
    stroke: rgb(var(--twz-ui-accent-rgb));
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 8 92;
    stroke-dashoffset: 0;
    opacity: .95;
    filter:
        drop-shadow(0 0 1.5px rgba(var(--twz-cyan-rgb), .95))
        drop-shadow(0 0 4px rgba(var(--twz-pink-rgb), .32));
    animation: twz-logo-letter-trace 4.8s linear infinite;
}

.twz-logo-letter-runner:nth-of-type(2) { animation-delay: -.72s; }
.twz-logo-letter-runner:nth-of-type(3) { animation-delay: -1.44s; }
.twz-logo-letter-runner:nth-of-type(4) { animation-delay: -2.16s; }
.twz-logo-letter-runner:nth-of-type(5) { animation-delay: -2.88s; }

@keyframes twz-logo-letter-trace {
    to { stroke-dashoffset: -100; }
}

@media (prefers-reduced-motion: reduce) {
    html.twz-motion-enabled .twz-section-heading,
    html.twz-motion-enabled .twz-media,
    html.twz-motion-enabled .twz-card-grid-item,
    html.twz-motion-enabled .twz-feature-item,
    html.twz-motion-enabled .twz-hero-item,
    .twz-card-lift,
    .twz-card-image,
    .twz-motion-button,
    .twz-ambient-rosette,
    .twz-logo-letter-runner,
    .twz-hero-ambient::before {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        animation: none !important;
        transition: none !important;
    }
    .twz-motion-button::before,
    .twz-logo-letter-overlay { display: none !important; }
}


/* =========================================================
   SEMANTIC / INNER-PAGE MOTION v0.5.0
   ========================================================= */
html.twz-motion-enabled .twz-subheading,
html.twz-motion-enabled .twz-quote,
html.twz-motion-enabled .twz-table,
html.twz-motion-enabled .twz-form,
html.twz-motion-enabled .twz-disclosure,
html.twz-motion-enabled .twz-figure,
html.twz-motion-enabled .twz-callout,
html.twz-motion-enabled .twz-breadcrumb-motion,
html.twz-motion-enabled .twz-code-block {
    opacity: 0;
    transform: translate3d(0, 9px, 0);
    transition: opacity 720ms var(--twz-motion-ease), transform 720ms var(--twz-motion-ease), box-shadow 320ms ease, border-color 320ms ease;
}

html.twz-motion-enabled .twz-subheading.twz-visible,
html.twz-motion-enabled .twz-quote.twz-visible,
html.twz-motion-enabled .twz-table.twz-visible,
html.twz-motion-enabled .twz-form.twz-visible,
html.twz-motion-enabled .twz-disclosure.twz-visible,
html.twz-motion-enabled .twz-figure.twz-visible,
html.twz-motion-enabled .twz-callout.twz-visible,
html.twz-motion-enabled .twz-breadcrumb-motion.twz-visible,
html.twz-motion-enabled .twz-code-block.twz-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

html.twz-motion-enabled .twz-list-item,
html.twz-motion-enabled .twz-table-row {
    opacity: 0;
    transform: translate3d(0, 7px, 0);
    transition: opacity 560ms var(--twz-motion-ease), transform 560ms var(--twz-motion-ease), background-color 220ms ease;
}
html.twz-motion-enabled .twz-list-item.twz-visible,
html.twz-motion-enabled .twz-table-row.twz-visible {
    opacity: 1;
    transform: none;
}

.twz-quote,
.twz-callout {
    position: relative;
}
.twz-quote::before,
.twz-callout::before {
    content: "";
    position: absolute;
    inset: 12% auto 12% 0;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(var(--twz-cyan-rgb), .85), rgba(var(--twz-pink-rgb), .55));
    transform: scaleY(.2);
    transform-origin: 50% 0;
    opacity: 0;
    transition: transform 700ms var(--twz-motion-ease) 120ms, opacity 420ms ease 120ms;
}
.twz-quote.twz-visible::before,
.twz-callout.twz-visible::before {
    transform: scaleY(1);
    opacity: .85;
}

.twz-form-control {
    transition: border-color 220ms ease, box-shadow 260ms ease, background-color 220ms ease, transform 220ms var(--twz-motion-spring);
}
.twz-form-control:focus,
.twz-form-control:focus-visible {
    border-color: rgba(var(--twz-cyan-rgb), .7) !important;
    box-shadow: 0 0 0 3px rgba(var(--twz-cyan-rgb), .11), 0 7px 20px rgba(var(--twz-cyan-rgb), .06) !important;
}

.twz-disclosure summary,
.twz-disclosure .accordion-button {
    transition: color 220ms ease, background-color 220ms ease, box-shadow 260ms ease, transform 220ms var(--twz-motion-spring);
}
.twz-disclosure[open] summary,
.twz-disclosure .accordion-button:not(.collapsed) {
    color: inherit;
    box-shadow: inset 2px 0 0 rgba(var(--twz-cyan-rgb), .6);
}
.twz-disclosure[open] > *:not(summary),
.twz-disclosure .accordion-collapse.show {
    animation: twz-disclosure-content 360ms var(--twz-motion-ease) both;
}
@keyframes twz-disclosure-content {
    from { opacity: 0; transform: translate3d(0, -4px, 0); }
    to { opacity: 1; transform: none; }
}

.twz-figure figcaption {
    opacity: .82;
    transform: translate3d(0, 3px, 0);
    transition: opacity 520ms ease 160ms, transform 520ms var(--twz-motion-ease) 160ms;
}
.twz-figure.twz-visible figcaption { opacity: 1; transform: none; }

.twz-breadcrumb-motion a,
.twz-pagination-motion a,
.twz-tabs-motion .nav-link,
.twz-tabs-motion [role="tab"] {
    transition: color 220ms ease, background-color 220ms ease, box-shadow 240ms ease, transform 220ms var(--twz-motion-spring);
}
.twz-tabs-motion .nav-link,
.twz-tabs-motion [role="tab"] { position: relative; }
.twz-tabs-motion .nav-link::after,
.twz-tabs-motion [role="tab"]::after {
    content: "";
    position: absolute;
    left: 18%; right: 18%; bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgb(var(--twz-cyan-rgb)), rgb(var(--twz-pink-rgb)));
    transform: scaleX(0);
    opacity: 0;
    transition: transform 260ms var(--twz-motion-ease), opacity 220ms ease;
}
.twz-tabs-motion .nav-link.active::after,
.twz-tabs-motion [role="tab"][aria-selected="true"]::after { transform: scaleX(1); opacity: .9; }

html.twz-motion-enabled .twz-progress-motion {
    opacity: 0;
    transform: translate3d(0, 5px, 0);
    transition: opacity 600ms ease, transform 600ms var(--twz-motion-ease);
}
html.twz-motion-enabled .twz-progress-motion.twz-visible { opacity: 1; transform: none; }
.twz-progress-bar-motion {
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 1100ms cubic-bezier(.18,.76,.26,1);
}
.twz-progress-bar-motion.twz-visible { transform: scaleX(1); }

.twz-inline-link {
    position: relative;
    text-decoration-thickness: .07em;
    text-underline-offset: .16em;
    background-image: linear-gradient(90deg, rgba(var(--twz-cyan-rgb), .85), rgba(var(--twz-pink-rgb), .72));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size 300ms var(--twz-motion-ease), color 220ms ease;
}

.twz-separator {
    transform-origin: 0 50%;
}
html.twz-motion-enabled .twz-separator {
    opacity: .2;
    transform: scaleX(.08);
    transition: transform 850ms var(--twz-motion-ease), opacity 650ms ease;
}
html.twz-motion-enabled .twz-separator.twz-visible { opacity: 1; transform: scaleX(1); }

@media (hover: hover) and (pointer: fine) {
    .twz-table-row:hover { background-color: rgba(var(--twz-cyan-rgb), .035); }
    .twz-breadcrumb-motion a:hover,
    .twz-pagination-motion a:hover { transform: translate3d(0, -1px, 0); }
    .twz-tabs-motion .nav-link:hover,
    .twz-tabs-motion [role="tab"]:hover { transform: translate3d(0, -1px, 0); }
    .twz-tabs-motion .nav-link:hover::after,
    .twz-tabs-motion [role="tab"]:hover::after { transform: scaleX(.7); opacity: .65; }
    .twz-inline-link:hover { background-size: 100% 1px; }
    .twz-code-block:hover { border-color: rgba(var(--twz-cyan-rgb), .24) !important; box-shadow: 0 10px 30px rgba(var(--twz-cyan-rgb), .055); }
}

@media (prefers-reduced-motion: reduce) {
    .twz-subheading, .twz-list-item, .twz-quote, .twz-table, .twz-table-row,
    .twz-form, .twz-form-control, .twz-disclosure, .twz-figure, .twz-callout,
    .twz-breadcrumb-motion, .twz-pagination-motion, .twz-tabs-motion,
    .twz-progress-motion, .twz-progress-bar-motion, .twz-inline-link,
    .twz-code-block, .twz-separator {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================================
   SITE EXPERIENCE ENHANCEMENTS v0.7.0
   ========================================================= */

/* Fixed / smart header */
.twz-experience-header {
    transition: transform 360ms var(--twz-motion-ease),
                padding 300ms var(--twz-motion-ease),
                min-height 300ms var(--twz-motion-ease),
                box-shadow 300ms ease,
                background-color 300ms ease,
                backdrop-filter 300ms ease;
    will-change: transform;
}

.twz-fixed-header {
    position: fixed !important;
    top: var(--twz-adminbar-height, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9990 !important;
}

html.twz-header-needs-offset body {
    padding-top: var(--twz-header-height, 0px) !important;
}

.twz-experience-header.twz-header-scrolled {
    box-shadow: 0 8px 30px rgba(0, 0, 0, .13);
    backdrop-filter: blur(14px) saturate(1.08);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.twz-smart-header.twz-header-hidden {
    transform: translate3d(0, calc(-100% - var(--twz-adminbar-height, 0px) - 4px), 0);
}

/* Page depth progress */
.twz-scroll-progress {
    position: fixed;
    z-index: 2147482500;
    top: var(--twz-adminbar-height, 0px);
    left: 0;
    right: 0;
    height: 2px;
    pointer-events: none;
    overflow: hidden;
    background: rgba(255, 255, 255, .035);
}
.twz-scroll-progress > span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(var(--twz-scroll-progress, 0));
    transform-origin: 0 50%;
    background: linear-gradient(90deg,
        rgba(var(--twz-ui-accent-rgb), .94),
        rgba(var(--twz-ui-accent2-rgb), .86));
    box-shadow: 0 0 8px rgba(var(--twz-ui-accent-rgb), .34);
    transition: transform 80ms linear;
}

/* Back to top with circular progress ring */
.twz-scroll-top {
    --twz-top-progress: 0;
    position: fixed !important;
    z-index: 2147482400 !important;
    right: clamp(16px, 2vw, 28px) !important;
    left: auto !important;
    top: auto !important;
    bottom: clamp(18px, 2.4vw, 30px) !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    background: rgba(var(--twz-ui-surface-rgb), .92) !important;
    color: rgb(var(--twz-ui-text-rgb)) !important;
    text-decoration: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.2), inset 0 0 0 1px rgba(var(--twz-ui-border-rgb), .38) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate3d(0, 12px, 0) scale(.92) !important;
    transition: opacity 260ms ease, visibility 260ms ease, transform 300ms var(--twz-motion-spring), box-shadow 260ms ease !important;
    cursor: pointer !important;
    overflow: visible !important;
    line-height: 1 !important;
    font-size: 0 !important;
}
.twz-scroll-top.twz-scroll-top-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}
.twz-scroll-top-suppressed {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.twz-scroll-top-adopted::before,
.twz-scroll-top-adopted::after {
    content: none !important;
    display: none !important;
}
.twz-scroll-top-original-content {
    display: none !important;
    visibility: hidden !important;
}
.twz-scroll-top-ring {
    position: absolute !important;
    inset: 2px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: rotate(-90deg) !important;
    pointer-events: none !important;
}
.twz-scroll-top circle {
    fill: none;
    stroke-width: 1.6;
}
.twz-scroll-top-track { stroke: rgba(var(--twz-ui-border-rgb), .48); }
.twz-scroll-top-progress {
    stroke: rgb(var(--twz-ui-accent-rgb));
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--twz-top-progress));
    filter: drop-shadow(0 0 3px rgba(var(--twz-ui-accent-rgb), .5));
    transition: stroke-dashoffset 80ms linear;
}
.twz-scroll-top-icon {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: rgb(var(--twz-ui-text-rgb)) !important;
    font-size: 19px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transform: translateY(-1px) !important;
    pointer-events: none !important;
}
.twz-scroll-top:focus-visible {
    outline: 2px solid rgba(var(--twz-ui-accent-rgb), .8);
    outline-offset: 3px;
}

/* Configurable phone action bar. Each runtime action is derived from the
   administrator-selected source without moving or rewriting page HTML. */
.twz-mobile-action-bar {
    position: fixed;
    z-index: 2147482300;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    min-height: 54px;
    display: none;
    align-items: stretch;
    gap: 8px;
    padding: 7px;
    border: 1px solid rgba(var(--twz-ui-border-rgb), .42);
    border-radius: 18px;
    background: rgba(var(--twz-ui-surface-rgb), .92);
    backdrop-filter: blur(18px) saturate(1.12);
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    box-shadow: 0 12px 34px rgba(0,0,0,.28), 0 0 0 1px rgba(var(--twz-ui-accent-rgb), .04) inset;
}
.twz-mobile-action-bar > a,
.twz-mobile-action-bar > button {
    min-width: 0;
    min-height: 42px;
    border: 0;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 220ms var(--twz-motion-spring), filter 220ms ease, box-shadow 220ms ease;
}
.twz-mobile-action-secondary {
    flex: 1 1 auto;
    color: rgb(var(--twz-ui-text-rgb));
    background: rgba(var(--twz-ui-text-rgb), .07);
    box-shadow: inset 0 0 0 1px rgba(var(--twz-ui-border-rgb), .36);
}
.twz-mobile-action-primary {
    flex: 1 1 auto;
    color: rgb(var(--twz-ui-accent-text-rgb));
    background: linear-gradient(100deg,
        rgb(var(--twz-ui-accent-rgb)),
        rgba(var(--twz-ui-accent2-rgb), .82));
    box-shadow: 0 6px 18px rgba(var(--twz-ui-accent-rgb), .18);
}
.twz-mobile-action-icon { font-size: 1.05em; line-height: 1; }

/* Smooth anchors are primarily JS-driven so fixed-header offset can be
   respected, but this also improves native programmatic anchor movement. */
html.twz-smooth-scroll { scroll-behavior: smooth; }

/* Optional expressive card pointer spotlight. */
.twz-card-spotlight {
    position: relative;
    isolation: isolate;
}
.twz-card-spotlight-layer {
    position: absolute;
    z-index: 0;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(240px circle at var(--twz-spot-x, 50%) var(--twz-spot-y, 50%),
            rgba(var(--twz-cyan-rgb), .10),
            rgba(var(--twz-pink-rgb), .035) 34%,
            transparent 68%);
    transition: opacity 280ms ease;
}
.twz-card-spotlight:hover .twz-card-spotlight-layer { opacity: 1; }
.twz-card-spotlight > *:not(.twz-card-spotlight-layer) { position: relative; z-index: 1; }

@media (hover: hover) and (pointer: fine) {
    .twz-scroll-top:hover {
        transform: translate3d(0, -3px, 0) scale(1.025) !important;
        box-shadow: 0 14px 34px rgba(0,0,0,.26), 0 0 24px rgba(var(--twz-ui-accent-rgb), .18), inset 0 0 0 1px rgba(var(--twz-ui-accent-rgb), .18);
    }
}

@media (max-width: 767.98px) {
    .twz-mobile-action-bar { display: flex; }
    html.twz-mobile-action-enabled body { padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
    html.twz-mobile-action-enabled .twz-scroll-top { bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 782px) {
    body.admin-bar { --twz-adminbar-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
    .twz-experience-header,
    .twz-scroll-progress > span,
    .twz-scroll-top,
    .twz-scroll-top-progress,
    .twz-mobile-action-bar > a,
    .twz-mobile-action-bar > button,
    .twz-card-spotlight-layer {
        transition: none !important;
        animation: none !important;
    }
    html.twz-smooth-scroll { scroll-behavior: auto; }
    .twz-smart-header.twz-header-hidden { transform: none !important; }
}

body.admin-bar { --twz-adminbar-height: 32px; }
@media (max-width: 782px) {
    body.admin-bar { --twz-adminbar-height: 46px; }
}

/* =========================================================
   1LG EXPERIENCE LAYER v1.0 CONSOLIDATION OVERRIDES
   ========================================================= */
:root {
    --twz-z-header: 9000;
    --twz-z-progress: 9010;
    --twz-z-mobile: 9020;
    --twz-z-top: 9030;
    --twz-z-logo: 9040;
    --twz-z-diagnostics: 9050;
    --twz-ambient-iterations: 2;
    --twz-mobile-surface-rgb: var(--twz-ui-surface-rgb);
    --twz-mobile-text-rgb: var(--twz-ui-text-rgb);
    --twz-mobile-primary-rgb: var(--twz-ui-accent-rgb);
    --twz-mobile-border-rgb: var(--twz-ui-border-rgb);
    --twz-top-surface-rgb: var(--twz-ui-surface-rgb);
    --twz-top-icon-rgb: var(--twz-ui-text-rgb);
    --twz-top-progress-rgb: var(--twz-ui-accent-rgb);
    --twz-top-border-rgb: var(--twz-ui-border-rgb);
    --twz-progress-rgb: var(--twz-ui-accent-rgb);
    --twz-logo-trace-rgb: var(--twz-ui-accent-rgb);
    --twz-logo-glow-rgb: var(--twz-ui-accent2-rgb);
    --twz-mobile-blur: 14px;
    --twz-mobile-radius: 18px;
    --twz-top-size: 48px;
    --twz-progress-thickness: 2px;
    --twz-header-surface-rgb: var(--twz-ui-surface-rgb);
    --twz-header-scrolled-opacity: .94;
    --twz-header-blur: 12px;
    --twz-logo-trace-speed: 4.8s;
    --twz-logo-trace-stroke: 1.7;
    --twz-logo-trace-dash: 8;
    --twz-body-padding-top-base: 0px;
    --twz-body-padding-bottom-base: 0px;
}

/* Motion presets: understandable global character/speed controls. */
html.twz-motion-subtle {
    --twz-motion-distance: 7px;
    --twz-motion-duration: 680ms;
    --twz-motion-duration-media: 820ms;
    --twz-card-lift-distance: -2px;
    --twz-card-image-scale: 1.035;
}
html.twz-motion-balanced {
    --twz-motion-distance: 12px;
    --twz-motion-duration: 720ms;
    --twz-motion-duration-media: 900ms;
    --twz-card-lift-distance: -4px;
    --twz-card-image-scale: 1.055;
}
html.twz-motion-expressive {
    --twz-motion-distance: 18px;
    --twz-motion-duration: 780ms;
    --twz-motion-duration-media: 980ms;
    --twz-card-lift-distance: -6px;
    --twz-card-image-scale: 1.075;
}
html.twz-speed-relaxed { --twz-speed-factor: 1.22; }
html.twz-speed-normal { --twz-speed-factor: 1; }
html.twz-speed-quick { --twz-speed-factor: .78; }

/* Stop keeping large card-image layers promoted when they are idle. */
.twz-card-image { will-change: auto; }
@media (hover: hover) and (pointer: fine) {
    .twz-image-card:hover .twz-card-image { will-change: transform, filter; }
    .twz-card-lift:hover { transform: translate3d(0, var(--twz-card-lift-distance, -4px), 0); }
    .twz-image-card:hover .twz-card-image { transform: translate3d(0, -2px, 0) scale(var(--twz-card-image-scale, 1.055)); }
}

/* Ambient effects normally run a bounded number of cycles, then settle. */
.twz-hero-ambient::before,
.twz-ambient-rosette,
.twz-logo-letter-runner {
    animation-iteration-count: var(--twz-ambient-iterations, 2) !important;
}
.twz-logo-letter-runner {
    stroke: rgb(var(--twz-logo-trace-rgb));
    stroke-width: var(--twz-logo-trace-stroke);
    stroke-dasharray: var(--twz-logo-trace-dash) calc(100 - var(--twz-logo-trace-dash));
    filter: drop-shadow(0 0 1.5px rgba(var(--twz-logo-trace-rgb), .95)) drop-shadow(0 0 4px rgba(var(--twz-logo-glow-rgb), .34));
    animation-duration: var(--twz-logo-trace-speed) !important;
}
.twz-logo-letter-overlay { z-index: var(--twz-z-logo); will-change: auto; }

/* Custom rule generic reveal. */
html.twz-motion-enabled .twz-custom-reveal {
    opacity: 0;
    transform: translate3d(0, var(--twz-motion-distance), 0);
    transition: opacity var(--twz-motion-duration) var(--twz-motion-ease), transform var(--twz-motion-duration) var(--twz-motion-ease);
}
html.twz-motion-enabled .twz-custom-reveal.twz-visible { opacity: 1; transform: none; }

/* Safer header behaviour. Sticky is preferred; fixed mode preserves pre-existing body padding. */
.twz-sticky-header {
    position: sticky !important;
    top: var(--twz-adminbar-height, 0px) !important;
    z-index: var(--twz-z-header) !important;
}
.twz-fixed-header { z-index: var(--twz-z-header) !important; }
html.twz-header-needs-offset body {
    padding-top: calc(var(--twz-body-padding-top-base, 0px) + var(--twz-header-height, 0px)) !important;
}
.twz-experience-header.twz-header-scrolled {
    background-color: rgba(var(--twz-header-surface-rgb), var(--twz-header-scrolled-opacity)) !important;
    backdrop-filter: blur(var(--twz-header-blur)) saturate(1.08);
    -webkit-backdrop-filter: blur(var(--twz-header-blur)) saturate(1.08);
}
html.twz-header-no-shadow .twz-experience-header.twz-header-scrolled { box-shadow: none !important; }
.twz-smart-header:focus-within,
.twz-smart-header:hover { transform: none !important; }

/* Controlled floating UI layers and configurable component styling. */
.twz-scroll-progress {
    z-index: var(--twz-z-progress);
    height: var(--twz-progress-thickness);
}
.twz-scroll-progress > span {
    background: linear-gradient(90deg, rgb(var(--twz-progress-rgb)), rgba(var(--twz-ui-accent2-rgb), .86));
}
html.twz-progress-bottom .twz-scroll-progress { top: auto; bottom: 0; }
html.twz-progress-bottom.twz-mobile-action-visible .twz-scroll-progress { bottom: calc(78px + env(safe-area-inset-bottom)); }

.twz-scroll-top {
    z-index: var(--twz-z-top) !important;
    width: var(--twz-top-size) !important;
    min-width: var(--twz-top-size) !important;
    max-width: var(--twz-top-size) !important;
    height: var(--twz-top-size) !important;
    min-height: var(--twz-top-size) !important;
    max-height: var(--twz-top-size) !important;
    background: rgba(var(--twz-top-surface-rgb), .94) !important;
    color: rgb(var(--twz-top-icon-rgb)) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.2), inset 0 0 0 1px rgba(var(--twz-top-border-rgb), .42) !important;
}
.twz-scroll-top-ring { width: calc(var(--twz-top-size) - 4px) !important; height: calc(var(--twz-top-size) - 4px) !important; }
.twz-scroll-top-track { stroke: rgba(var(--twz-top-border-rgb), .48); }
.twz-scroll-top-progress { stroke: rgb(var(--twz-top-progress-rgb)); }
.twz-scroll-top-icon { color: rgb(var(--twz-top-icon-rgb)) !important; }
html.twz-top-left .twz-scroll-top { left: clamp(16px, 2vw, 28px) !important; right: auto !important; }
html.twz-top-no-ring .twz-scroll-top-ring { display: none !important; }

.twz-mobile-action-bar {
    z-index: var(--twz-z-mobile);
    display: flex;
    border-color: rgba(var(--twz-mobile-border-rgb), .46);
    border-radius: var(--twz-mobile-radius);
    background: rgba(var(--twz-mobile-surface-rgb), .94);
    backdrop-filter: blur(var(--twz-mobile-blur)) saturate(1.12);
    -webkit-backdrop-filter: blur(var(--twz-mobile-blur)) saturate(1.12);
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, 14px, 0) scale(.985);
    pointer-events: none;
    transition: opacity 240ms ease, visibility 240ms ease, transform 280ms var(--twz-motion-spring);
}
.twz-mobile-action-bar.twz-mobile-action-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}
.twz-mobile-action-secondary {
    color: rgb(var(--twz-mobile-text-rgb));
    background: rgba(var(--twz-mobile-text-rgb), .07);
    box-shadow: inset 0 0 0 1px rgba(var(--twz-mobile-border-rgb), .38);
}
.twz-mobile-action-primary {
    color: rgb(var(--twz-ui-accent-text-rgb));
    background: linear-gradient(100deg, rgb(var(--twz-mobile-primary-rgb)), rgba(var(--twz-ui-accent2-rgb), .82));
}
.twz-mobile-action-icon { width: 1.05em; height: 1.05em; display: inline-grid; place-items: center; }
.twz-mobile-action-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.twz-mobile-action-visible body {
    padding-bottom: calc(var(--twz-body-padding-bottom-base, 0px) + 78px + env(safe-area-inset-bottom)) !important;
}
html.twz-mobile-action-visible .twz-scroll-top { bottom: calc(88px + env(safe-area-inset-bottom)) !important; }

/* Floating UI yields to open overlays instead of fighting z-index wars. */
body.modal-open .twz-scroll-top,
body.modal-open .twz-mobile-action-bar,
body.menu-open .twz-scroll-top,
body.menu-open .twz-mobile-action-bar,
.offcanvas.show ~ .twz-scroll-top,
.offcanvas.show ~ .twz-mobile-action-bar { opacity: 0 !important; pointer-events: none !important; }

/* User / browser motion pause. Content remains readable and interactions remain usable. */
html.twz-motion-user-paused *,
html.twz-document-hidden .twz-hero-ambient::before,
html.twz-document-hidden .twz-ambient-rosette,
html.twz-document-hidden .twz-logo-letter-runner {
    animation-play-state: paused !important;
}
html.twz-motion-user-paused .twz-hero-ambient::before,
html.twz-motion-user-paused .twz-ambient-rosette,
html.twz-motion-user-paused .twz-logo-letter-runner { animation: none !important; transform: none !important; filter: none !important; }
.twz-motion-pause {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 12px;
    padding: 7px 11px;
    border: 1px solid rgba(var(--twz-ui-border-rgb), .42);
    border-radius: 999px;
    background: rgba(var(--twz-ui-surface-rgb), .9);
    color: rgb(var(--twz-ui-text-rgb));
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}

/* Admin-only front-end diagnostics overlay. */
.twz-diagnostics {
    position: fixed;
    z-index: var(--twz-z-diagnostics);
    right: 14px;
    top: calc(var(--twz-adminbar-height, 0px) + 14px);
    width: min(340px, calc(100vw - 28px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 14px;
    border: 1px solid rgba(var(--twz-ui-border-rgb), .5);
    border-radius: 14px;
    background: rgba(var(--twz-ui-surface-rgb), .97);
    color: rgb(var(--twz-ui-text-rgb));
    box-shadow: 0 16px 42px rgba(0,0,0,.28);
    font: 13px/1.4 system-ui, sans-serif;
}
.twz-diagnostics p { margin: 5px 0; }
.twz-diagnostics button { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
    .twz-mobile-action-bar,
    .twz-motion-pause,
    .twz-custom-reveal { transition: none !important; animation: none !important; }
}
@media (max-width: 1023.98px) {
    html.twz-mobile-action-enabled:not(.twz-mobile-action-visible) body {
        padding-bottom: var(--twz-body-padding-bottom-base, 0px) !important;
    }
    html.twz-mobile-action-enabled:not(.twz-mobile-action-visible) .twz-scroll-top {
        bottom: clamp(18px, 2.4vw, 30px) !important;
    }
}
.twz-experience-header { will-change: auto; }
.twz-smart-header.twz-header-hidden { will-change: transform; }
