/* ============================================================
   QB — 3D DIAMOND SLIDER  v3.2  |  qb-slider.css
   Changes from v3.1:
   - Eyebrow (.qb-eye) now renders decorative badge lines
   - Arrow hover color transitions with JS-driven CSS var
   - Progress bar smooth reset via CSS transition
   - prefers-reduced-motion: all animations disabled cleanly
   - Alignment helpers: qb-align-left / right / center
   ============================================================ */

/* ── WRAP ───────────────────────────────────────────────── */
.qb-slider-wrap {
    position: relative;
    width: 100%;
    height: 88vh;
    min-height: 520px;
    max-height: 780px;
    overflow: hidden;
    background: #010614;
    font-family: inherit;
    cursor: none;
    /* Accent color CSS var — updated by JS on slide change */
    --qb-ac: #00D4FF;
}
.qb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.qb-nebula-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: background 1.6s ease; }

/* ── SLIDES ─────────────────────────────────────────────── */
.qb-slides  { position: absolute; inset: 0; z-index: 3; }
.qb-slide   { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; }
.qb-slide.qb-active { opacity: 1; pointer-events: auto; }

/* ── CONTENT ────────────────────────────────────────────── */
.qb-content {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 780px;
    width: 100%;
    position: relative;
    z-index: 10;
}
.qb-align-left  .qb-content { text-align: left;  margin-right: auto; }
.qb-align-right .qb-content { text-align: right; margin-left: auto; }
.qb-align-left  .qb-btns,
.qb-align-right .qb-btns    { justify-content: flex-start; }
.qb-align-right .qb-btns    { justify-content: flex-end; }
.qb-align-left  .qb-sub,
.qb-align-right .qb-sub     { margin-left: 0; margin-right: 0; }

/* ── EYEBROW — FIX: badge lines now in markup ───────────── */
.qb-eye {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-size: clamp(.62rem, 1.3vw, .82rem);
    font-weight: 700;
    letter-spacing: .32em;
    text-transform: uppercase;
    margin: 0 0 1.1rem;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .75s cubic-bezier(.16,1,.3,1), transform .75s cubic-bezier(.16,1,.3,1);
}
/* The decorative lines flanking the eyebrow text */
.qb-badge-line {
    display: block;
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: .45;
    flex-shrink: 0;
}

/* ── TITLE ──────────────────────────────────────────────── */
.qb-title {
    font-size: clamp(2rem, 6.5vw, 5.4rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.06;
    letter-spacing: -.028em;
    margin: 0 0 1.25rem;
    opacity: 0;
    transform: translateY(38px) scale(.95);
    transition: opacity .9s cubic-bezier(.16,1,.3,1) .06s, transform .9s cubic-bezier(.16,1,.3,1) .06s;
}

/* FIX: data-t now set in PHP so the blur clone has real content */
.qb-title-glow {
    position: relative;
    display: inline-block;
}
.qb-title-glow::after {
    content: attr(data-t);
    position: absolute;
    inset: 0;
    filter: blur(18px);
    opacity: .58;
    pointer-events: none;
    color: inherit;
}

/* ── SUBTITLE ───────────────────────────────────────────── */
.qb-sub {
    font-size: clamp(.88rem, 1.75vw, 1.12rem);
    color: rgba(255,255,255,.68);
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto 2.4rem;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .72s cubic-bezier(.16,1,.3,1) .16s, transform .72s cubic-bezier(.16,1,.3,1) .16s;
}
.qb-align-left  .qb-sub { margin-left: 0; }
.qb-align-right .qb-sub { margin-right: 0; }

/* ── BUTTONS ────────────────────────────────────────────── */
.qb-btns {
    display: flex;
    gap: .85rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .68s cubic-bezier(.16,1,.3,1) .28s, transform .68s cubic-bezier(.16,1,.3,1) .28s;
}
.qb-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: .86rem 2.4rem;
    border-radius: 60px;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-decoration: none;
    overflow: hidden;
    cursor: none;
    border: none;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease;
}
.qb-btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0); border-radius: inherit; transition: background .2s; }
.qb-btn:hover::after { background: rgba(255,255,255,.13); }
.qb-btn:hover  { transform: translateY(-5px) scale(1.05); }
.qb-btn:active { transform: scale(.96); }
.qb-btn-p { color: #010614; font-weight: 800; }
.qb-btn-s {
    background: rgba(255,255,255,.06) !important;
    color: #fff;
    border: 1px solid rgba(255,255,255,.28);
    backdrop-filter: blur(10px);
}
.qb-btn-s:hover { border-color: rgba(255,255,255,.65); }

/* ── ACTIVE / LEAVING STATES ────────────────────────────── */
.qb-slide.qb-active .qb-eye,
.qb-slide.qb-active .qb-title,
.qb-slide.qb-active .qb-sub,
.qb-slide.qb-active .qb-btns  { opacity: 1; transform: translateY(0) scale(1); }

.qb-slide.qb-leaving .qb-eye,
.qb-slide.qb-leaving .qb-title,
.qb-slide.qb-leaving .qb-sub,
.qb-slide.qb-leaving .qb-btns {
    opacity: 0 !important;
    transform: translateY(-22px) !important;
    transition: opacity .35s ease, transform .35s ease !important;
}

/* ── ARROWS — FIX: hover color follows --qb-ac CSS var ─── */
.qb-arrow,
.qb-prev,
.qb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(1,6,20,.55);
    backdrop-filter: blur(16px);
    color: #fff;
    cursor: none;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background .28s ease,
        border-color .28s ease,
        box-shadow .28s ease,
        transform .28s cubic-bezier(.34,1.56,.64,1);
}
.qb-arrow svg,
.qb-prev svg,
.qb-next svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.3; pointer-events: none; }

/* FIX: hover uses --qb-ac so it matches current slide accent */
.qb-arrow:hover,
.qb-prev:hover,
.qb-next:hover {
    transform: translateY(-50%) scale(1.18);
    border-color: color-mix(in srgb, var(--qb-ac) 70%, transparent);
    background: color-mix(in srgb, var(--qb-ac) 18%, transparent);
    box-shadow: 0 0 22px color-mix(in srgb, var(--qb-ac) 35%, transparent),
                inset 0 0 12px color-mix(in srgb, var(--qb-ac) 12%, transparent);
}

.qb-prev, .qb-arrow--prev { left: 1.8rem; }
.qb-next, .qb-arrow--next { right: 1.8rem; }

/* ── DOTS ───────────────────────────────────────────────── */
.qb-dots { position: absolute; bottom: 2.4rem; left: 50%; transform: translateX(-50%); display: flex; gap: .7rem; z-index: 20; align-items: center; }
.qb-dot  { width: 15px; height: 15px; background: none; border: none; cursor: none; padding: 3px; opacity: .28; transition: opacity .3s, transform .45s cubic-bezier(.34,1.56,.64,1); }
.qb-dot svg { width: 100%; height: 100%; fill: #fff; transition: fill .35s ease; }
.qb-dot.qb-on { opacity: 1; transform: scale(1.6) rotate(45deg); }
/* FIX: dot fill color also uses CSS var */
.qb-dot.qb-on svg { fill: var(--qb-ac, #00D4FF); }

/* ── COUNTER ────────────────────────────────────────────── */
.qb-counter { position: absolute; right: 1.8rem; bottom: 2.4rem; z-index: 20; display: flex; align-items: baseline; gap: .28rem; font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.qb-cur     { font-size: 1.3rem; color: var(--qb-ac, #00D4FF); transition: color .5s ease, transform .3s ease; }
.qb-sep     { color: rgba(255,255,255,.18); }
.qb-tot     { color: rgba(255,255,255,.32); }

/* ── PROGRESS BAR ───────────────────────────────────────── */
.qb-prog      { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: rgba(255,255,255,.06); z-index: 20; }
.qb-prog-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--qb-ac, #00D4FF), #818CF8, #C084FC, #34D399);
    background-size: 300%;
    animation: qb-gs 3s linear infinite;
    /* FIX: smooth reset — width transition only when going backward to 0 */
    transition: width 0ms linear;
}
.qb-prog-fill.qb-resetting {
    transition: width 300ms ease !important;
}
@keyframes qb-gs { to { background-position: -300%; } }

/* ── SCROLL HINT ────────────────────────────────────────── */
.qb-scroll-hint { position: absolute; left: 1.8rem; bottom: 2.2rem; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: .4rem; opacity: .35; }
.qb-scroll-hint span { font-size: .56rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: #fff; writing-mode: vertical-rl; }
.qb-scroll-line { width: 1px; height: 36px; background: linear-gradient(to bottom, var(--qb-ac, #00D4FF), transparent); animation: qb-sp 2s ease-in-out infinite; }
@keyframes qb-sp { 0%,100% { opacity: .4; } 50% { opacity: 1; } }

/* ── ACCENT SIDE BAR ────────────────────────────────────── */
.qb-accent-bar { position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 3px; height: 0; background: linear-gradient(to bottom, transparent, var(--qb-ac, #00D4FF), transparent); z-index: 20; transition: color .8s; animation: qb-abar 7s ease-in-out infinite; }
@keyframes qb-abar { 0%,100%{height:28%} 50%{height:55%} }

/* ── CLICK RINGS ────────────────────────────────────────── */
.qb-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%,-50%) scale(0);
    animation: qb-ring .92s cubic-bezier(.12,.85,.35,1) forwards;
    z-index: 50;
}
@keyframes qb-ring {
    0%   { transform: translate(-50%,-50%) scale(0); opacity: 1;  }
    60%  { opacity: .55; }
    100% { transform: translate(-50%,-50%) scale(1); opacity: 0;  }
}

/* ── CURSOR ─────────────────────────────────────────────── */
.qb-slider-wrap, .qb-slider-wrap * { cursor: none !important; }

/* ── REDUCED MOTION — complete override ─────────────────── */
@media (prefers-reduced-motion: reduce) {
    .qb-slider-wrap,
    .qb-slider-wrap * {
        animation: none !important;
        transition: opacity .2s ease, transform .2s ease !important;
    }
    .qb-scroll-line,
    .qb-accent-bar,
    .qb-prog-fill { animation: none !important; }
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .qb-slider-wrap { height: 92vh; max-height: none; }
    .qb-prev, .qb-arrow--prev { left: .6rem; }
    .qb-next, .qb-arrow--next { right: .6rem; }
    .qb-btns { flex-direction: column; align-items: center; }
    .qb-btn  { width: 100%; max-width: 252px; justify-content: center; }
    .qb-scroll-hint { display: none; }
    .qb-counter { right: 1rem; }
    /* Restore cursor on touch devices */
    .qb-slider-wrap, .qb-slider-wrap * { cursor: auto !important; }
}

/* ============================================================
   QB v3.3 — ELEGANT AGENCY INTRO
   Philosophy: silence → single line → slow reveal.
   No explosions. No chaos. Pure restraint.
   ============================================================ */

.qb-intro {
    position: absolute;
    inset: 0;
    z-index: 100;
    pointer-events: none !important;
    overflow: hidden;
    background: #020818;
    opacity: 1;
}
.qb-intro * {
    pointer-events: none !important;
}

/* The single horizontal rule that draws itself */
.qb-intro-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(126,208,220,0.3) 20%,
        rgba(126,208,220,0.9) 50%,
        rgba(126,208,220,0.3) 80%,
        transparent 100%
    );
    animation: qb-line-draw 1.4s cubic-bezier(.77,0,.18,1) 0.5s forwards;
}
@keyframes qb-line-draw {
    from { width: 0;    opacity: 0; }
    10%  {              opacity: 1; }
    to   { width: 55%;  opacity: 1; }
}

/* Subtle glow behind the line — appears with it */
.qb-intro-line::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 160px; height: 60px;
    background: radial-gradient(ellipse,
        rgba(126,208,220,0.08) 0%,
        transparent 70%
    );
    animation: qb-line-glow 1.8s ease 0.8s forwards;
    opacity: 0;
}
@keyframes qb-line-glow {
    0%   { opacity: 0; }
    40%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Diamond mark at line centre — appears after line is drawn */
.qb-intro-mark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(45deg) scale(0);
    width: 8px; height: 8px;
    border: 1px solid rgba(126,208,220,0.85);
    opacity: 0;
    animation: qb-mark-in 0.5s cubic-bezier(.34,1.56,.64,1) 1.7s forwards;
}
@keyframes qb-mark-in {
    from { transform: translate(-50%,-50%) rotate(45deg) scale(0); opacity: 0; }
    to   { transform: translate(-50%,-50%) rotate(45deg) scale(1); opacity: 1; }
}

/* Full overlay fades out — slow, dignified */
.qb-intro.qb-intro-out {
    animation: qb-intro-fade 1.4s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes qb-intro-fade {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* ── CONTENT REVEAL — held during intro ── */
.qb-intro-running .qb-slide.qb-active .qb-eye,
.qb-intro-running .qb-slide.qb-active .qb-title,
.qb-intro-running .qb-slide.qb-active .qb-sub,
.qb-intro-running .qb-slide.qb-active .qb-btns {
    opacity: 0 !important;
    transform: translateY(22px) !important;
    transition: none !important;
}

/* Staggered fade-UP reveal — elegant, not a drop */
.qb-intro-done .qb-slide.qb-active .qb-eye {
    transition: opacity 1.1s cubic-bezier(.16,1,.3,1) .05s,
                transform 1.1s cubic-bezier(.16,1,.3,1) .05s !important;
}
.qb-intro-done .qb-slide.qb-active .qb-title {
    transition: opacity 1.3s cubic-bezier(.16,1,.3,1) .2s,
                transform 1.3s cubic-bezier(.16,1,.3,1) .2s !important;
}
.qb-intro-done .qb-slide.qb-active .qb-sub {
    transition: opacity 1.1s cubic-bezier(.16,1,.3,1) .4s,
                transform 1.1s cubic-bezier(.16,1,.3,1) .4s !important;
}
.qb-intro-done .qb-slide.qb-active .qb-btns {
    transition: opacity 1s cubic-bezier(.16,1,.3,1) .6s,
                transform 1s cubic-bezier(.16,1,.3,1) .6s !important;
}

/* UI elements — hidden during, fade in after */
.qb-intro-running .qb-scroll-hint,
.qb-intro-running .qb-dots,
.qb-intro-running .qb-counter,
.qb-intro-running .qb-prog,
.qb-intro-running .qb-prev,
.qb-intro-running .qb-next { opacity: 0 !important; transition: none !important; }

.qb-intro-done .qb-scroll-hint,
.qb-intro-done .qb-dots,
.qb-intro-done .qb-counter,
.qb-intro-done .qb-prog  { opacity: 1; transition: opacity .8s ease .9s; }
.qb-intro-done .qb-prev,
.qb-intro-done .qb-next  { opacity: 1; transition: opacity .8s ease 1.1s; }

@media (prefers-reduced-motion: reduce) {
    .qb-intro { display: none; }
}
