/* ============================================================================
   Trang MXV — Sở Giao dịch Hàng hóa Việt Nam
   ========================================================================= */

.section {
    padding: 96px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 40px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand);
}

.section-kicker::before,
.section-kicker::after {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--border-strong);
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.section-lead {
    max-width: 74ch;
    margin: 0 auto;
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
}

.section-lead+.section-lead {
    margin-top: 28px;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* --- Hien thi tung buoc khi cuon (step-by-step reveal) --- */
.stagger-step {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.stagger.in .stagger-step {
    opacity: 1;
    transform: none;
}

.stagger.in .stagger-step:nth-child(1) {
    transition-delay: 0.05s;
}

.stagger.in .stagger-step:nth-child(2) {
    transition-delay: 0.18s;
}

.stagger.in .stagger-step:nth-child(3) {
    transition-delay: 0.31s;
}

.stagger.in .stagger-step:nth-child(4) {
    transition-delay: 0.44s;
}

.stagger.in .stagger-step:nth-child(5) {
    transition-delay: 0.57s;
}

.stagger.in .stagger-step:nth-child(6) {
    transition-delay: 0.7s;
}

.stagger.in .stagger-step:nth-child(7) {
    transition-delay: 0.83s;
}

.stagger.in .stagger-step:nth-child(8) {
    transition-delay: 0.96s;
}

/* ============================================================================
   HERO MXV
   ========================================================================= */
.mxv-hero {
    position: relative;
    padding: 72px 0 80px;
    overflow: hidden;
}

.mxv-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(640px 440px at 80% 20%, var(--brand-soft), transparent 62%),
        radial-gradient(520px 380px at 8% 90%, rgba(252, 213, 53, 0.05), transparent 60%);
}

.mxv-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 40px;
    align-items: center;
}

.mxv-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--brand);
}

.mxv-eyebrow::before {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
}

.mxv-title {
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--text-primary) 30%, var(--brand));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.mxv-sub {
    margin-top: 18px;
    font-size: clamp(17px, 2.2vw, 24px);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.mxv-intro {
    margin-top: 18px;
    max-width: 54ch;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.mxv-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.mxv-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.mxv-chip:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.mxv-chip-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--brand);
}

.mxv-chip-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    white-space: nowrap;
}

.mxv-hero-action {
    margin-top: 28px;
}

.mxv-btn-register {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 24px;
    background: var(--brand);
    color: var(--brand-text);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(252, 213, 53, 0.25);
    transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.mxv-btn-register:hover {
    background: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 213, 53, 0.38);
    color: var(--brand-text);
}

.mxv-btn-register svg {
    transition: transform 0.2s var(--ease);
}

.mxv-btn-register:hover svg {
    transform: translateX(4px);
}

/* Hieu ung vao trang cho hero */
.mxv-eyebrow,
.mxv-title,
.mxv-sub,
.mxv-intro,
.mxv-hero-chips,
.mxv-hero-action {
    opacity: 0;
    animation: mxv-rise 0.85s var(--ease) forwards;
}

.mxv-eyebrow {
    animation-delay: 0.05s;
}

.mxv-title {
    animation-delay: 0.15s;
}

.mxv-sub {
    animation-delay: 0.3s;
}

.mxv-intro {
    animation-delay: 0.45s;
}

.mxv-hero-chips {
    animation-delay: 0.6s;
}

.mxv-hero-action {
    animation-delay: 0.72s;
}

@keyframes mxv-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* --- Visual hero: anh Ket noi toan cau MXV --- */
.mxv-visual {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
}

.mxv-visual-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    animation: mxv-rise 0.85s var(--ease) 0.3s forwards;
    opacity: 0;
}

/* ============================================================================
   MXV LÀ GÌ?
   ========================================================================= */
.mxv-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 56px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.mxv-about-card {
    padding: 28px 26px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.mxv-about-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
}

.mxv-about-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--brand);
}

.mxv-about-card h3 {
    margin: 14px 0 10px;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.mxv-about-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================================================
   THỊ TRƯỜNG HÀNG HÓA PHÁI SINH
   ========================================================================= */
.section-deriv {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.deriv-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 48px;
    color: var(--text-disabled);
}

.deriv-step {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 24px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--bg-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    animation: deriv-cycle 5s linear infinite;
}

.deriv-flow .deriv-step:nth-of-type(1) {
    animation-delay: 0s;
}

.deriv-flow .deriv-step:nth-of-type(2) {
    animation-delay: -4s;
}

.deriv-flow .deriv-step:nth-of-type(3) {
    animation-delay: -3s;
}

.deriv-flow .deriv-step:nth-of-type(4) {
    animation-delay: -2s;
}

.deriv-flow .deriv-step:nth-of-type(5) {
    animation-delay: -1s;
}

@keyframes deriv-cycle {

    0%,
    16% {
        border-color: var(--brand);
        background: var(--brand-soft);
        color: var(--brand);
    }

    24%,
    100% {
        border-color: var(--border-strong);
        background: var(--bg-body);
        color: var(--text-primary);
    }
}

/* ============================================================================
   CÁC SẢN PHẨM GIAO DỊCH
   ========================================================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 56px;
}

.product-card {
    position: relative;
    padding: 30px 26px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.product-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.product-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    background: var(--brand-soft);
    color: var(--brand);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
}

.product-head h3 {
    font-size: 19px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.product-tags li {
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.product-card p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* ============================================================================
   ĐIỂM NỔI BẬT CỦA THỊ TRƯỜNG HÀNG HÓA
   ========================================================================= */
.section-highlights {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.highlight-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 56px;
}

.highlight-item {
    position: relative;
    padding: 26px 20px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
    opacity: 0;
}

.highlight-item:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
}

.highlight-list.in .highlight-item {
    opacity: 1;
    animation: highlight-in 0.55s var(--ease) backwards;
}

.highlight-list.in .highlight-item:nth-child(1) {
    animation-delay: 0.05s;
}

.highlight-list.in .highlight-item:nth-child(2) {
    animation-delay: 0.2s;
}

.highlight-list.in .highlight-item:nth-child(3) {
    animation-delay: 0.35s;
}

.highlight-list.in .highlight-item:nth-child(4) {
    animation-delay: 0.5s;
}

.highlight-list.in .highlight-item:nth-child(5) {
    animation-delay: 0.65s;
}

@keyframes highlight-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.highlight-num {
    display: block;
    font-family: var(--font-mono);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.2px var(--brand);
    margin-bottom: 16px;
}

.highlight-item p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================================================
   KIẾN THỨC & QUẢN TRỊ RỦI RO
   ========================================================================= */
.risk-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 8px 0 48px;
    color: var(--text-disabled);
}

.risk-step {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 22px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    color: var(--text-primary);
    animation: risk-cycle 4s linear infinite;
}

.risk-steps .risk-step:nth-of-type(1) {
    animation-delay: 0s;
}

.risk-steps .risk-step:nth-of-type(2) {
    animation-delay: -3s;
}

.risk-steps .risk-step:nth-of-type(3) {
    animation-delay: -2s;
}

.risk-steps .risk-step:nth-of-type(4) {
    animation-delay: -1s;
}

@keyframes risk-cycle {

    0%,
    21% {
        border-color: var(--brand);
        background: var(--brand-soft);
        color: var(--brand);
    }

    29%,
    100% {
        border-color: var(--border-strong);
        background: var(--bg-surface);
        color: var(--text-primary);
    }
}

.risk-step-num {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
}

.risk-step-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: inherit;
}

.risk-closing {
    margin-top: 48px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: clamp(16px, 2.2vw, 24px);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}

/* ============================================================================
   CTA CUỐI
   ========================================================================= */
.section-cta {
    padding-top: 40px;
}

.cta-box {
    position: relative;
    padding: 72px 32px;
    text-align: center;
    background:
        radial-gradient(560px 320px at 50% 0%, var(--brand-soft), transparent 70%),
        var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cta-box h2 {
    max-width: 22ch;
    margin: 0 auto 18px;
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.cta-box p {
    max-width: 58ch;
    margin: 0 auto 32px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .section {
        padding: 72px 0;
    }

    .mxv-hero {
        padding: 48px 0 60px;
    }

    .mxv-hero-inner {
        grid-template-columns: 2fr;
        gap: 40px;
    }

    .mxv-visual {
        max-width: 480px;
    }

    .mxv-about-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }

    .highlight-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .risk-steps {
        flex-direction: column;
    }

    .risk-steps>svg,
    .risk-steps.stagger.in>svg {
        transform: rotate(90deg);
    }

    .cta-box {
        padding: 52px 24px;
    }
}

@media (max-width: 520px) {
    .highlight-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cta-actions .btn {
        width: 100%;
    }

    .deriv-flow {
        flex-direction: column;
    }

    .deriv-flow>svg,
    .deriv-flow.stagger.in>svg {
        transform: rotate(90deg);
    }

    .mxv-hero-chips {
        gap: 8px;
    }

    .mxv-chip {
        padding: 8px 14px;
        gap: 10px;
    }

    .mxv-chip-icon {
        width: 20px;
        height: 20px;
    }

    .mxv-chip-text {
        font-size: 12.5px;
    }

    .mxv-btn-register {
        width: 100%;
        justify-content: center;
    }
}