/* =========================================================
   Homepage (Jus.vn) — tối giản
   Màu giữ nguyên theo hệ thống biến trong variables.css
   ========================================================= */

.hp-main {
    position: relative;
    padding: 104px 24px 0;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 50% 12%, rgba(245, 158, 11, 0.055), transparent 34%),
        var(--J-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

.hp-title {
    max-width: 960px;
    margin: 0 auto 22px;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(48px, 5.5vw, 70px);
    font-weight: 700;
    color: var(--J-white);
    letter-spacing: -0.04em;
    line-height: 1.05
}

.hp-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 16px;
    color: var(--J-gray-4);
    margin: 0 0 48px;
    line-height: 1.5
}

.hp-flow .hp-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--J-accent);
    font-weight: 700;
    margin: 0 2px
}

.hp-visual {
    max-width: 960px;
    margin: 0 auto 96px
}

.hp-visual video {
    width: 100%;
    display: block;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 30px 70px -24px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(245, 158, 11, 0.025)
}

.hp-video-mobile {
    display: none !important;
}

/* --- Section conditional (chọn A hiện A, chọn B hiện B) --- */

.hp-conditional {
    padding: 104px 24px 112px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 36%),
        var(--J-bg-subtle, #16202e);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

.hp-section-title {
    max-width: none;
    margin: 0 auto 52px;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(32px, 3.8vw, 46px);
    font-weight: 700;
    white-space: nowrap;
    color: var(--J-white);
    letter-spacing: -0.03em;
    line-height: 1.1
}

.hp-flow .hp-arrow svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.hp-section-sub {
    font-size: 16px;
    line-height: 1.6;
    color: var(--J-gray-4);
    max-width: 560px;
    margin: 0 auto 40px
}

.hp-cond-demo {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    max-width: 860px;
    margin: 0 auto;
    text-align: left;
    align-items: start
}

.hp-cond-panel {
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.12)
}

.hp-cond-group + .hp-cond-group {
    margin-top: 20px
}

.hp-cond-q {
    font-size: 13px;
    font-weight: 600;
    color: var(--J-gray-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px
}

.hp-cond-select {
    width: 100%;
    height: 40px;
    font-size: 14px;
    color: var(--J-white);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0 12px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%2394a3b8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease
}

.hp-cond-select:focus {
    border-color: var(--J-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.11)
}

.hp-cond-select option {
    color: #0f172a;
    background: #ffffff
}

.hp-cond-select option:disabled,
.hp-cond-select option[hidden] {
    background: transparent
}

.hp-cond-select:invalid,
.hp-cond-select option:disabled:checked {
    color: var(--J-gray-4)
}

.hp-cond-input {
    width: 100%;
    height: 40px;
    font-size: 14px;
    color: var(--J-white);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0 12px;
    outline: none;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease
}

.hp-cond-input::placeholder {
    color: var(--J-gray-4)
}

.hp-cond-input:focus {
    border-color: var(--J-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.11)
}

.hp-cond-input[type="date"] {
    color-scheme: dark
}

.hp-cond-preview {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.14)
}

.hp-cond-preview-label {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px
}

.hp-cond-clause {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 8px
}

.hp-cond-clause-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px
}

.hp-cond-text {
    margin: 0 0 8px
}

.hp-cond-text:last-child {
    margin-bottom: 0
}

.hp-cond-list {
    display: flex;
    gap: 8px;
    padding-left: 24px
}

.hp-cond-list-a {
    flex: 0 0 auto
}

.hp-cond-preview .jv-var {
    display: inline;
    color: #b45309;
    font-weight: 600
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .hp-main {
        padding: 62px 18px 0
    }

    .hp-title {
        padding-top: 24px;
        font-size: clamp(44px, 12vw, 56px)
    }

    .hp-flow {
        flex-direction: column;
        gap: 4px;
        font-size: 15px;
        margin-bottom: 36px
    }

    .hp-flow .hp-arrow {
        margin: 0;
        transform: rotate(90deg)
    }

    .hp-conditional {
        padding: 72px 18px 76px
    }

    .hp-section-title {
        margin-bottom: 38px;
        font-size: clamp(32px, 9vw, 40px);
        white-space: normal
    }

    .hp-cond-demo {
        grid-template-columns: 1fr;
        gap: 14px
    }

    .hp-cond-panel,
    .hp-cond-preview {
        padding: 18px;
        border-radius: 12px
    }

    .hp-cond-clause {
        font-size: 13px;
        padding: 10px 12px
    }

    .hp-cond-list {
        padding-left: 20px
    }

    .hp-visual video {
        border-radius: 12px
    }

    .hp-visual {
        margin-bottom: 68px
    }

    .hp-video-desktop {
        display: none !important;
    }
    
    .hp-video-mobile {
        display: block !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-main *,
    .hp-conditional * {
        transition-duration: 0.01ms !important;
    }
}
