/*
 * Home hero (resources/views/frontend/home/hero.blade.php). Logo palette: deep navy, royal blue, gold.
 * Light is the default; html[data-theme="dark"] rules at the end switch it to the dark look.
 */

.tq-hero {
    --tq-navy: #06256f;
    --tq-blue: #0d4ecd;
    --tq-gold: #e0a514;
    --tq-gold-text: #a87300;
    --tq-text: #4a5468;
    --tq-card: rgba(255, 255, 255, .82);
    --tq-card-border: rgba(6, 37, 111, .08);
    --tq-card-shadow: 0 18px 40px rgba(6, 37, 111, .12);
    --tq-bg: #f7f9fe;

    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: calc(var(--khn-header-space, 104px) + 50px) 0 50px;
    background: var(--tq-bg);
}

/* ======================= background ======================= */
.tq-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.tq-hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    animation: tq-blob 16s ease-in-out infinite alternate;
}

.tq-hero__blob--gold {
    width: 520px;
    height: 520px;
    right: -120px;
    top: -140px;
    background: radial-gradient(circle, rgba(243, 188, 30, .55), transparent 70%);
}

.tq-hero__blob--blue {
    width: 600px;
    height: 600px;
    left: -220px;
    bottom: -260px;
    background: radial-gradient(circle, rgba(13, 78, 205, .35), transparent 70%);
    animation-delay: -8s;
}

/* faint grid that fades out towards the edges */
.tq-hero__grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(6, 37, 111, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 37, 111, .05) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}

@keyframes tq-blob {
    to {
        transform: scale(1.12);
    }
}

/* ======================= content ======================= */
.tq-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px 8px 12px;
    border-radius: 50px;
    background: var(--tq-card);
    border: 1px solid var(--tq-card-border);
    box-shadow: 0 6px 18px rgba(6, 37, 111, .06);
    color: var(--tq-navy);
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tq-hero__pulse {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
}

.tq-hero__pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #22c55e;
    animation: tq-pulse 1.8s ease-out infinite;
}

@keyframes tq-pulse {
    to {
        transform: scale(2.8);
        opacity: 0;
    }
}

.tq-hero__title {
    margin: 22px 0 20px;
    color: var(--tq-navy);
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.tq-hero__highlight {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    color: transparent;
    background: linear-gradient(100deg, #c98f0a 0%, #e0a514 35%, #f5c842 55%, #a87300 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.tq-hero__swoosh {
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 14px;
    overflow: visible;
}

.tq-hero__swoosh path {
    fill: none;
    stroke: var(--tq-gold);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
}

.tq-hero.is-ready .tq-hero__swoosh path {
    animation: tq-draw 1s .9s cubic-bezier(.65, 0, .35, 1) forwards;
}

@keyframes tq-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.tq-hero__text {
    max-width: 540px;
    margin: 0 0 32px;
    color: var(--tq-text);
    font-size: 18px;
    line-height: 1.7;
}

.tq-hero__btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.tq-hero__btn {
    height: 56px;
    padding: 0 28px;
    font-size: 16px;
}

.tq-hero__btn i {
    transition: transform .25s ease;
}

.tq-hero__btn:hover i {
    transform: translateX(4px);
}

.tq-hero__btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--tq-navy);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.tq-hero__play {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--tq-card);
    border: 1px solid var(--tq-card-border);
    box-shadow: var(--tq-card-shadow);
    color: var(--tq-blue);
    font-size: 18px;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.tq-hero__btn-ghost:hover {
    color: var(--tq-blue);
}

.tq-hero__btn-ghost:hover .tq-hero__play {
    transform: scale(1.08);
    background: var(--tq-blue);
    color: #fff;
}

.tq-hero__trust {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
}

.tq-hero__avatars {
    display: flex;
}

.tq-hero__avatars span {
    width: 42px;
    height: 42px;
    margin-left: -12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 3px solid var(--tq-bg);
    color: #fff;
    font-size: 15px;
}

.tq-hero__avatars span:first-child {
    margin-left: 0;
}

.tq-hero__avatars span:nth-child(1) { background: #0d4ecd; }
.tq-hero__avatars span:nth-child(2) { background: #e0a514; }
.tq-hero__avatars span:nth-child(3) { background: #06256f; }
.tq-hero__avatars span:nth-child(4) { background: #116bdd; }

.tq-hero__trust-text strong {
    display: block;
    color: var(--tq-navy);
    font-size: 16px;
}

.tq-hero__trust-text small {
    color: var(--tq-text);
    font-size: 13.5px;
}

/* ======================= visual ======================= */
.tq-hero__visual {
    position: relative;
    max-width: 580px;
    margin: 0 auto;
}

/* the student stands on a royal-blue disc; her laptop breaks out past its edge */
.tq-hero__girl {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 24px 30px rgba(6, 37, 111, .22));
    /* the photo is cut flat at the hips: fade that edge out instead of showing a hard line */
    -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 86%, transparent 100%);
}

.tq-hero__disc {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 56%;
    width: 80%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 32% 26%, #3b8cff 0%, #0d4ecd 42%, #06256f 100%);
    box-shadow: 0 30px 70px rgba(6, 37, 111, .35), inset 0 0 0 12px rgba(255, 255, 255, .07);
}

/* thin gold outline just outside the disc */
.tq-hero__disc::after {
    content: "";
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    border: 2px solid rgba(224, 165, 20, .55);
}

.tq-hero__ring {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 56%;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1.5px dashed rgba(13, 78, 205, .22);
    transform: translate(-50%, -50%);
    animation: tq-spin 60s linear infinite;
}

.tq-hero__ring--1 {
    width: 104%;
}

.tq-hero__ring--2 {
    width: 94%;
    border-color: rgba(224, 165, 20, .35);
    animation-direction: reverse;
    animation-duration: 45s;
}

/* a small dot riding on each ring */
.tq-hero__ring::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tq-blue);
    box-shadow: 0 0 0 5px rgba(13, 78, 205, .15);
}

.tq-hero__ring--2::after {
    left: auto;
    right: -6px;
    background: var(--tq-gold);
    box-shadow: 0 0 0 5px rgba(224, 165, 20, .2);
}

@keyframes tq-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* floating glass cards */
.tq-float {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 12px;
    border-radius: 18px;
    background: var(--tq-card);
    border: 1px solid var(--tq-card-border);
    box-shadow: var(--tq-card-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    white-space: nowrap;
}

.tq-float strong {
    display: block;
    color: var(--tq-navy);
    font-size: 15.5px;
    line-height: 1.25;
}

.tq-float small {
    display: block;
    color: var(--tq-text);
    font-size: 12.5px;
}

.tq-float__price {
    color: var(--tq-gold-text) !important;
    font-size: 20px !important;
}

.tq-float__icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 17px;
}

.tq-float__icon--blue { background: linear-gradient(135deg, #116bdd, #06256f); }
.tq-float__icon--gold { background: linear-gradient(135deg, #f5d65f, #e0a514 55%, #d5902a); }
.tq-float__icon--green { background: linear-gradient(135deg, #22c55e, #15803d); }
.tq-float__icon--live { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.tq-float--tl { left: -10px; top: 8%; }
.tq-float--tr { right: -10px; top: 18%; }
.tq-float--bl { left: 0; bottom: 14%; }
.tq-float--br { right: 0; bottom: 4%; }

/* ======================= stats bar ======================= */
.tq-hero__stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 50px;
    padding: 14px;
    border-radius: 24px;
    background: var(--tq-card);
    border: 1px solid var(--tq-card-border);
    box-shadow: var(--tq-card-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.tq-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 16px;
    transition: background .25s ease;
}

.tq-stat:hover {
    background: rgba(13, 78, 205, .05);
}

.tq-stat+.tq-stat {
    border-left: 1px solid var(--tq-card-border);
}

.tq-stat__icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(224, 165, 20, .14);
    color: var(--tq-gold-text);
    font-size: 21px;
}

.tq-stat:nth-child(even) .tq-stat__icon {
    background: rgba(13, 78, 205, .1);
    color: var(--tq-blue);
}

.tq-stat strong {
    display: block;
    color: var(--tq-navy);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.tq-stat small {
    color: var(--tq-text);
    font-size: 14px;
}

/* ======================= entrance animation ======================= */
.tq-anim {
    opacity: 0;
    transition: opacity .8s ease;
    transition-delay: var(--d, 0s);
}

.tq-hero.is-ready .tq-anim {
    opacity: 1;
}

/* safety net: if the script never runs, show everything after a moment anyway */
.tq-hero:not(.is-ready) .tq-anim {
    animation: tq-show 0s 1.5s forwards;
}

@keyframes tq-show {
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {

    .tq-anim,
    .tq-hero__blob,
    .tq-hero__ring,
    .tq-float,
    .tq-hero__pulse::after {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none;
    }

    .tq-hero__ring {
        transform: translate(-50%, -50%);
    }

    .tq-hero__swoosh path {
        stroke-dashoffset: 0;
    }
}

/* ======================= responsive ======================= */
@media (max-width: 1199px) {
    .tq-float--tl { left: 0; }
    .tq-float--tr { right: 0; }
}

@media (max-width: 991px) {
    .tq-hero {
        text-align: center;
    }

    .tq-hero__text {
        margin-left: auto;
        margin-right: auto;
    }

    .tq-hero__btns,
    .tq-hero__trust {
        justify-content: center;
    }

    .tq-hero__trust-text {
        text-align: left;
    }

    .tq-hero__visual {
        text-align: left;
    }
}

@media (max-width: 767px) {
    .tq-hero {
        padding-top: calc(var(--khn-header-space, 86px) + 50px);
    }

    .tq-hero__text {
        font-size: 16px;
    }

    .tq-hero__highlight {
        white-space: normal;
    }

    .tq-hero__btns {
        flex-direction: column;
    }

    .tq-hero__btn {
        width: 100%;
    }

    .tq-hero__visual {
        padding: 10px 0 70px;
    }

    /* on phones, two compact cards under the illustration instead of four around it */
    .tq-float {
        padding: 8px 12px 8px 8px;
        border-radius: 14px;
        gap: 8px;
    }

    .tq-float__icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
        border-radius: 10px;
    }

    .tq-float strong { font-size: 13.5px; }
    .tq-float small { font-size: 11px; }
    .tq-float__price { font-size: 16px !important; }

    .tq-float--tr,
    .tq-float--br {
        display: none;
    }

    .tq-float--tl { left: 0; top: auto; bottom: 8px; }
    .tq-float--bl { left: auto; right: 0; bottom: 8px; }

    .tq-hero__stats {
        grid-template-columns: 1fr 1fr;
        margin-top: 30px;
        padding: 8px;
        text-align: left;
    }

    .tq-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .tq-stat+.tq-stat {
        border-left: 0;
    }

    .tq-stat__icon {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .tq-stat strong {
        font-size: 22px;
    }

    .tq-stat small {
        font-size: 12.5px;
    }
}

/* ======================= dark mode ======================= */
html[data-theme="dark"] .tq-hero {
    --tq-navy: #ffffff;
    --tq-blue: #4d8fff;
    --tq-gold-text: #f3bc1e;
    --tq-text: #c9d1db;
    --tq-card: rgba(255, 255, 255, .06);
    --tq-card-border: rgba(255, 255, 255, .1);
    --tq-card-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --tq-bg: #000000;
}

html[data-theme="dark"] .tq-hero__blob--gold {
    opacity: .35;
}

html[data-theme="dark"] .tq-hero__blob--blue {
    opacity: .7;
}

html[data-theme="dark"] .tq-hero__grid {
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
}

html[data-theme="dark"] .tq-hero__highlight {
    background: linear-gradient(100deg, #f5d65f 0%, #f3bc1e 45%, #fff1b0 65%, #e0a514 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="dark"] .tq-hero__disc {
    box-shadow: 0 30px 80px rgba(13, 78, 205, .35), inset 0 0 0 12px rgba(255, 255, 255, .06);
}

html[data-theme="dark"] .tq-hero__ring--1 {
    border-color: rgba(77, 143, 255, .3);
}

html[data-theme="dark"] .tq-hero__girl {
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .6));
}

html[data-theme="dark"] .tq-stat:hover {
    background: rgba(255, 255, 255, .04);
}
