/* assets/css/hero.css — Living hero section (2026 redesign)
   Self-contained. Reuses .tq-badge / .tq-service-pill / .tq-btn-* from home.css.
   Motion is spring-driven + pointer-reactive (see hero.js), and everything
   degrades to a calm static layout under prefers-reduced-motion. */

.tqh {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 8rem 1.5rem 4.5rem;
    overflow: hidden;
    isolation: isolate;
}

/* ── Living background: slow aurora + soft grid ──────────────── */
.tqh-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.tqh-aurora {
    position: absolute; border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    will-change: transform;
}
.tqh-aurora.a1 { top: -14%; right: -6%;  width: clamp(340px,44vw,620px); height: clamp(340px,44vw,620px);
    background: radial-gradient(circle at 30% 30%, rgba(77,97,244,.28), transparent 62%);
    animation: tqh-drift1 26s ease-in-out infinite; }
.tqh-aurora.a2 { bottom: -18%; left: -8%;  width: clamp(300px,38vw,540px); height: clamp(300px,38vw,540px);
    background: radial-gradient(circle at 60% 40%, rgba(215,254,124,.4), transparent 60%);
    animation: tqh-drift2 32s ease-in-out infinite; }
.tqh-aurora.a3 { top: 26%; left: 34%; width: clamp(240px,30vw,420px); height: clamp(240px,30vw,420px);
    background: radial-gradient(circle at 50% 50%, rgba(203,137,255,.20), transparent 64%);
    animation: tqh-drift3 38s ease-in-out infinite; }
@keyframes tqh-drift1 { 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(-4%,4%,0) scale(1.08)} }
@keyframes tqh-drift2 { 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(5%,-3%,0) scale(1.12)} }
@keyframes tqh-drift3 { 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(3%,5%,0) scale(1.06)} }

.tqh-grid {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(35,35,35,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(35,35,35,.035) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 42%, #000 40%, transparent 78%);
            mask-image: radial-gradient(ellipse 90% 70% at 50% 42%, #000 40%, transparent 78%);
}

/* ── Layout ──────────────────────────────────────────────────── */
.tqh-wrap {
    max-width: 80rem; margin: 0 auto; width: 100%;
    display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
}
@media (min-width: 1024px) { .tqh-wrap { grid-template-columns: 1.02fr 0.98fr; gap: 4rem; } }

.tqh-content > * { opacity: 0; transform: translateY(18px); }
.tqh-content.tqh-in > * { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.tqh-content.tqh-in > *:nth-child(1){ transition-delay:.02s } .tqh-content.tqh-in > *:nth-child(2){ transition-delay:.08s }
.tqh-content.tqh-in > *:nth-child(3){ transition-delay:.14s } .tqh-content.tqh-in > *:nth-child(4){ transition-delay:.20s }
.tqh-content.tqh-in > *:nth-child(5){ transition-delay:.26s } .tqh-content.tqh-in > *:nth-child(6){ transition-delay:.32s }

/* ── Headline + rotating keyword ─────────────────────────────── */
.tqh-title {
    font-size: clamp(2.55rem, 5.4vw, 4.35rem);
    font-weight: 900; line-height: 1.045; letter-spacing: -0.03em;
    color: #232323; margin: 1.35rem 0 1.3rem;
}
.tqh-rot {
    display: inline-flex; align-items: center; vertical-align: baseline;
    height: 1.05em; overflow: hidden; position: relative;
    border-radius: .22em;
    background: #d7fe7c;
    padding: 0 .2em;
    transform: rotate(-1.4deg);
    transition: width .5s cubic-bezier(.2,.9,.2,1);
    will-change: width;
}
.tqh-rot-word {
    display: inline-block; white-space: nowrap; color: #232323;
    will-change: transform, opacity;
}
.tqh-rot-word.out { animation: tqh-word-out .42s cubic-bezier(.5,0,.75,0) forwards; }
.tqh-rot-word.in  { animation: tqh-word-in  .52s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes tqh-word-out { to { transform: translateY(-105%); opacity: 0; } }
@keyframes tqh-word-in  { from { transform: translateY(105%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
/* measuring ghost — off-screen, used to size the pill smoothly */
.tqh-rot-ghost { position: absolute; visibility: hidden; white-space: nowrap; pointer-events: none; left: -9999px; }

.tqh-sub {
    font-size: clamp(0.95rem, 1.35vw, 1.075rem);
    color: rgba(35,35,35,.56); line-height: 1.7; max-width: 33rem; margin-bottom: 1.6rem;
}

.tqh-services { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }

.tqh-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.5rem; }
/* press feedback (apple: respond on press, instant) */
.tqh-actions .tq-btn-primary, .tqh-actions .tq-btn-outline { will-change: transform; }
.tqh-actions .tq-btn-primary:active, .tqh-actions .tq-btn-outline:active { transform: scale(.965); }

/* ── Stats (count-up) ────────────────────────────────────────── */
.tqh-stats { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.tqh-stat strong { display: block; font-size: clamp(1.55rem,2.5vw,1.95rem); font-weight: 900; color: #232323; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tqh-stat span { display: block; font-size: .68rem; font-weight: 700; color: rgba(35,35,35,.4); text-transform: uppercase; letter-spacing: .09em; margin-top: .28rem; }
.tqh-stat-div { width: 1px; height: 2.3rem; background: rgba(35,35,35,.1); }

/* ═══════════════════════════════════════════════════════════════
   RIGHT — pointer-reactive parallax scene
   ═══════════════════════════════════════════════════════════════ */
.tqh-visual { position: relative; perspective: 1400px; }
.tqh-scene {
    position: relative;
    transform-style: preserve-3d;
    /* JS drives --rx/--ry (tilt) and --px/--py (shift) with a spring */
    transform:
        rotateX(calc(var(--ry, 0) * -1deg)) rotateY(calc(var(--rx, 0) * 1deg))
        translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0);
    will-change: transform;
}
.tqh-layer { position: absolute; }

/* Main glass dashboard card */
.tqh-card {
    position: relative;
    transform: translateZ(40px);
    border-radius: 22px;
    background: rgba(255,255,255,.72);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
            backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 34px 70px -28px rgba(35,45,90,.45), 0 2px 6px rgba(35,35,35,.05), inset 0 1px 0 rgba(255,255,255,.9);
    padding: 1.15rem 1.25rem 1.3rem;
    overflow: hidden;
}
.tqh-card::after { /* moving sheen */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.5) 48%, transparent 58%);
    transform: translateX(-40%); opacity: .0;
    animation: tqh-sheen 7s ease-in-out 1.2s infinite;
}
@keyframes tqh-sheen { 0%,72%{ transform: translateX(-60%); opacity:0 } 80%{opacity:.7} 100%{ transform: translateX(60%); opacity:0 } }

.tqh-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.tqh-card-id { display: flex; align-items: center; gap: .55rem; }
.tqh-card-ava { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,#4d61f4,#7c8cff); box-shadow: 0 4px 12px rgba(77,97,244,.4); }
.tqh-card-id b { font-size: .82rem; color: #232323; font-weight: 800; }
.tqh-card-id small { display:block; font-size: .64rem; color: rgba(35,35,35,.45); font-weight:700; letter-spacing:.04em; }
.tqh-live { display: inline-flex; align-items: center; gap: .35rem; font-size: .62rem; font-weight: 800; color: #16a34a; text-transform: uppercase; letter-spacing: .06em; background: rgba(22,163,74,.1); padding: .2rem .5rem; border-radius: 999px; }
.tqh-live i { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: tqh-live 1.8s ease-out infinite; }
@keyframes tqh-live { 0%{ box-shadow:0 0 0 0 rgba(22,163,74,.5) } 70%,100%{ box-shadow:0 0 0 7px rgba(22,163,74,0) } }

.tqh-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: .55rem; margin-bottom: 1rem; }
.tqh-metric { background: rgba(246,247,251,.7); border: 1px solid rgba(35,35,35,.05); border-radius: 13px; padding: .6rem .65rem; }
.tqh-metric span { font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: rgba(35,35,35,.42); }
.tqh-metric b { display:block; margin-top:.2rem; font-size: 1.05rem; font-weight: 900; color: #232323; letter-spacing:-.02em; font-variant-numeric: tabular-nums; }
.tqh-metric em { font-style: normal; font-size: .62rem; font-weight: 800; color: #16a34a; }
.tqh-metric.blue  b { color:#4d61f4 } .tqh-metric.pink em { color:#e4405f }

/* Animated chart */
.tqh-chart { display: flex; align-items: flex-end; gap: .42rem; height: 92px; padding: 0 .1rem .1rem; }
.tqh-bar { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, rgba(77,97,244,.35), rgba(77,97,244,.14)); height: 0; transform-origin: bottom; animation: tqh-grow .9s cubic-bezier(.2,.9,.2,1) forwards; }
.tqh-bar.hot { background: linear-gradient(180deg,#4d61f4,#7c8cff); box-shadow: 0 4px 14px rgba(77,97,244,.35); }
.tqh-bar.lime.hot { background: linear-gradient(180deg,#b6e94a,#d7fe7c); box-shadow: 0 4px 14px rgba(160,200,60,.3); }
@keyframes tqh-grow { to { height: var(--h); } }

/* Floating glass chips (higher parallax depth) */
.tqh-chip {
    position: absolute;
    display: flex; align-items: center; gap: .6rem;
    background: rgba(255,255,255,.82);
    -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 15px; padding: .65rem .8rem;
    box-shadow: 0 20px 40px -18px rgba(35,45,90,.4), inset 0 1px 0 rgba(255,255,255,.9);
}
.tqh-chip-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tqh-chip-ic svg { width: 17px; height: 17px; }
.tqh-chip b { font-size: .82rem; font-weight: 800; color: #232323; line-height: 1.1; }
.tqh-chip small { display: block; font-size: .64rem; color: rgba(35,35,35,.5); font-weight: 600; margin-top: 1px; }
.tqh-chip.c1 { top: -6%; right: -4%; transform: translateZ(85px); animation: tqh-floatA 6s ease-in-out infinite; }
.tqh-chip.c2 { bottom: 2%; left: -7%; transform: translateZ(110px); animation: tqh-floatB 7.5s ease-in-out infinite; }
.tqh-chip.c3 { bottom: 32%; right: -9%; transform: translateZ(70px); animation: tqh-floatA 8s ease-in-out .6s infinite; }
@keyframes tqh-floatA { 0%,100%{ margin-top:0 } 50%{ margin-top:-10px } }
@keyframes tqh-floatB { 0%,100%{ margin-top:0 } 50%{ margin-top:10px } }

/* entrance for the scene */
.tqh-visual { opacity: 0; transform: translateY(26px) scale(.97); }
.tqh-visual.tqh-in { opacity: 1; transform: none; transition: opacity .8s cubic-bezier(.2,.7,.2,1) .15s, transform .8s cubic-bezier(.2,.7,.2,1) .15s; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .tqh-visual { max-width: 460px; margin: 0 auto; }
    .tqh-chip.c3 { display: none; }
}
@media (max-width: 600px) {
    .tqh { padding: 6.5rem 1.25rem 3.5rem; }
    .tqh-chip { display: none; }
    .tqh-card { transform: none; }
}

/* ── Reduced motion / transparency ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .tqh-aurora, .tqh-card::after, .tqh-live i, .tqh-chip, .tqh-bar { animation: none !important; }
    .tqh-bar { height: var(--h); }
    .tqh-content > *, .tqh-visual { opacity: 1 !important; transform: none !important; transition: none !important; }
    .tqh-rot-word.out, .tqh-rot-word.in { animation: none !important; }
    .tqh-scene { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
    .tqh-card, .tqh-chip { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
