/* AMX Terms — matches FAQ / Delta / Staff redesign tokens */

.amx-terms-page .home-hero__lead {
    max-width: 38rem;
}

/* Main section */
.amx-terms.home-section--light {
    background: #fff;
    padding-top: 4.5rem;
    padding-bottom: 4.75rem;
}

.amx-terms__wrap {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.amx-terms__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin: 0 auto 2.75rem;
    max-width: 40rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid rgba(3, 13, 117, 0.08);
}

.amx-terms__kicker {
    display: inline-block;
    margin: 0 0 0.55rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fa0073;
}

.amx-terms__title {
    margin: 0 0 0.5rem;
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #020c41;
}

.amx-terms__desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b;
    max-width: 36rem;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
    -webkit-text-align-last: center;
}

/* Section blocks */
.amx-terms__block {
    margin-bottom: 3.25rem;
    scroll-margin-top: 6rem;
}

.amx-terms__block:last-child {
    margin-bottom: 0;
}

.amx-terms__sec-head {
    text-align: center;
    margin: 0 auto 1.65rem;
    max-width: 36rem;
}

.amx-terms__sec-head .amx-terms__kicker {
    margin-bottom: 0.45rem;
}

.amx-terms__sec-title {
    margin: 0 0 0.5rem;
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #020c41;
}

.amx-terms__sec-desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
    -webkit-text-align-last: center;
}

/* Cards */
.amx-terms__card {
    overflow: hidden;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid rgba(3, 13, 117, 0.08);
    box-shadow: 0 10px 28px rgba(2, 12, 65, 0.05);
    margin-bottom: 1.25rem;
}

.amx-terms__card:last-child {
    margin-bottom: 0;
}

.amx-terms__card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, #020c41 0%, #030d75 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    position: relative;
    text-align: center;
}

.amx-terms__card-head::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #fa0073;
}

.amx-terms__card-head i {
    color: #fa0073;
    font-size: 0.95rem;
}

.amx-terms__card-body {
    padding: 1.35rem 1.35rem 1.5rem;
}

.amx-terms__card-body p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
    -webkit-text-align-last: center;
}

.amx-terms__card-body p:last-child {
    margin-bottom: 0;
}

.amx-terms__card-body p strong {
    color: #020c41;
    font-weight: 700;
}

/* Institutional notice */
.amx-terms__notice {
    margin-top: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, rgba(250, 0, 115, 0.06), rgba(3, 13, 117, 0.06));
    border-left: 4px solid #fa0073;
}

.amx-terms__notice-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #030d75;
}

.amx-terms__notice-title i {
    color: #fa0073;
}

.amx-terms__notice p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #475569;
    text-align: justify;
    text-justify: inter-word;
    text-align-last: center;
    -webkit-text-align-last: center;
}

/* Warning / discipline list */
.amx-terms__warn-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.amx-terms__warn-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid rgba(3, 13, 117, 0.06);
    font-size: 0.92rem;
    line-height: 1.55;
    color: #334155;
}

.amx-terms__warn-list li strong {
    color: #020c41;
}

.amx-terms__warn-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #030d75;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.amx-terms__warn-note {
    margin: 0;
    padding: 0.95rem 1.1rem;
    border-radius: 0.75rem;
    background: rgba(3, 13, 117, 0.06);
    border-left: 4px solid #030d75;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #334155;
}

.amx-terms__updated {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

/* Always-expanded clauses (no accordion) */
.amx-terms .amx-terms__clause {
    border-color: rgba(3, 13, 117, 0.14);
    box-shadow: none;
}

.amx-terms .amx-terms__clause:hover {
    border-color: rgba(3, 13, 117, 0.22);
    box-shadow: 0 8px 22px rgba(2, 12, 65, 0.06);
}

.amx-terms .amx-terms__clause-title {
    margin: 0;
    cursor: default;
    pointer-events: none;
    padding-bottom: 0.35rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
}

.amx-terms .amx-terms__clause-title span {
    flex: 0 1 auto;
}

.amx-terms .amx-terms__clause-name {
    text-align: center;
}

.amx-terms .amx-terms__clause-sep {
    flex: 0 0 auto;
    color: rgba(2, 12, 65, 0.28);
    font-weight: 600;
}

.amx-terms .amx-terms__clause-id {
    flex: 0 0 auto;
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #fa0073;
    white-space: nowrap;
}

.amx-terms .amx-terms__clause .amx-faqs__panel {
    grid-template-rows: 1fr;
}

.amx-terms .amx-terms__clause .amx-faqs__panel-inner {
    padding-bottom: 1.15rem;
}

.amx-terms .amx-terms__clause--alert {
    background: #dc2626;
    border-color: #b91c1c;
    box-shadow: 0 10px 28px rgba(185, 28, 28, 0.28);
}

.amx-terms .amx-terms__clause--alert:hover {
    border-color: #991b1b;
    box-shadow: 0 12px 32px rgba(185, 28, 28, 0.34);
}

.amx-terms .amx-terms__clause--alert .amx-terms__clause-title,
.amx-terms .amx-terms__clause--alert .amx-terms__clause-name {
    color: #fff;
}

.amx-terms .amx-terms__clause--alert .amx-terms__clause-sep {
    color: rgba(255, 255, 255, 0.55);
}

.amx-terms .amx-terms__clause--alert .amx-terms__clause-id {
    color: #fff;
}

.amx-terms .amx-terms__clause--alert .amx-faqs__panel-inner p {
    color: #fff;
}

.amx-terms .amx-terms__clause--alert .amx-faqs__panel-inner strong {
    color: #fff;
}

.amx-terms .amx-faqs__wrap .amx-terms__links {
    margin-top: 0.15rem;
}

.amx-terms__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* Match header Crew Login / Join shine + lift */
.amx-terms__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    border-radius: 0.7rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    z-index: 1;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.amx-terms__link > * {
    position: relative;
    z-index: 1;
}

.amx-terms__link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
    z-index: 0;
    pointer-events: none;
}

.amx-terms__link:hover::before {
    transform: translateX(100%);
}

.amx-terms__link:hover {
    transform: translateY(-2px);
}

.amx-terms__link--blue {
    background: #030d75;
    color: #fff;
    box-shadow: 0 4px 14px rgba(3, 13, 117, 0.25);
}

.amx-terms__link--blue:hover {
    background: #020c41;
    color: #fff;
    box-shadow: 0 12px 24px rgba(3, 13, 117, 0.3);
}

.amx-terms__link--pink {
    background: #fa0073;
    color: #fff;
    box-shadow: 0 4px 14px rgba(250, 0, 115, 0.3);
}

.amx-terms__link--pink:hover {
    background: #e00068;
    color: #fff;
    box-shadow: 0 12px 24px rgba(250, 0, 115, 0.3);
}

/* Soft navy wash — not a white button */
.amx-terms__link--contact {
    background: rgba(3, 13, 117, 0.08);
    color: #030d75;
    border: 1.5px solid rgba(3, 13, 117, 0.18);
    box-shadow: none;
}

.amx-terms__link--contact:hover {
    background: #030d75;
    border-color: #030d75;
    color: #fff;
    box-shadow: 0 12px 24px rgba(3, 13, 117, 0.28);
}

.amx-terms__card--alert .amx-terms__card-head {
    background: linear-gradient(135deg, #4a0528 0%, #7a1040 55%, #fa0073 100%);
}

@media (max-width: 640px) {
    .amx-terms__card-body {
        padding: 1.15rem 1.1rem 1.25rem;
    }

    .amx-terms__card-head {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* ── Sticky vertical section rail ── */
.amx-terms-rail {
    position: fixed;
    top: 50%;
    left: max(0.85rem, calc((100vw - 52rem) / 2 - 7.5rem));
    transform: translateY(-50%) translateX(-1rem) scale(0.96);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.85rem 0.65rem 0.85rem 0.9rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    filter: blur(4px);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.amx-terms-rail.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0) scale(1);
    filter: blur(0);
}

/* Spine: center of first dot → center of last dot; centered on dots */
.amx-terms-rail__spine {
    position: absolute;
    left: calc(0.9rem + 0.35rem - 1px);
    top: calc(0.85rem + 1.075rem);
    bottom: calc(0.85rem + 1.075rem);
    width: 2px;
    border-radius: 999px;
    background: rgba(3, 13, 117, 0.12);
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.amx-terms-rail__progress {
    display: block;
    width: 100%;
    height: 0%;
    border-radius: inherit;
    background: linear-gradient(180deg, #fa0073 0%, #030d75 100%);
    transition: height 0.2s ease-out;
}

.amx-terms-rail__link {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.15rem;
    padding: 0.2rem 0.55rem 0.2rem 0;
    text-decoration: none;
    color: #64748b;
    opacity: 0;
    transform: translateX(-0.4rem);
    transition:
        opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.25s ease;
}

.amx-terms-rail.is-visible .amx-terms-rail__link {
    opacity: 1;
    transform: translateX(0);
}

.amx-terms-rail.is-visible .amx-terms-rail__link:nth-child(2) { transition-delay: 0.04s; }
.amx-terms-rail.is-visible .amx-terms-rail__link:nth-child(3) { transition-delay: 0.08s; }
.amx-terms-rail.is-visible .amx-terms-rail__link:nth-child(4) { transition-delay: 0.12s; }
.amx-terms-rail.is-visible .amx-terms-rail__link:nth-child(5) { transition-delay: 0.16s; }
.amx-terms-rail.is-visible .amx-terms-rail__link:nth-child(6) { transition-delay: 0.2s; }
.amx-terms-rail.is-visible .amx-terms-rail__link:nth-child(7) { transition-delay: 0.24s; }
.amx-terms-rail.is-visible .amx-terms-rail__link:nth-child(8) { transition-delay: 0.28s; }

.amx-terms-rail:not(.is-visible) .amx-terms-rail__link {
    transition-delay: 0s;
}

.amx-terms-rail.is-visible .amx-terms-rail__link:hover,
.amx-terms-rail.is-visible .amx-terms-rail__link:focus-visible,
.amx-terms-rail.is-visible .amx-terms-rail__link.is-active {
    color: #020c41;
    outline: none;
}

.amx-terms-rail__dot {
    position: relative;
    z-index: 2;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    flex-shrink: 0;
    background: #fff;
    border: 2px solid rgba(3, 13, 117, 0.28);
    box-shadow: 0 0 0 3px #fff;
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.amx-terms-rail__link:hover .amx-terms-rail__dot,
.amx-terms-rail__link:focus-visible .amx-terms-rail__dot {
    border-color: #fa0073;
    transform: scale(1.15);
}

.amx-terms-rail__link.is-active .amx-terms-rail__dot {
    background: #fa0073;
    border-color: #fa0073;
    transform: scale(1.25);
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px rgba(250, 0, 115, 0.18);
}

.amx-terms-rail__label {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-0.35rem);
    transition:
        opacity 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.25s ease;
    pointer-events: none;
}

.amx-terms-rail:hover .amx-terms-rail__label,
.amx-terms-rail:focus-within .amx-terms-rail__label,
.amx-terms-rail__link.is-active .amx-terms-rail__label {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.amx-terms-rail__link.is-active .amx-terms-rail__label {
    color: #fa0073;
}

/* Compact rail when viewport is tight */
@media (max-width: 1180px) {
    .amx-terms-rail {
        left: 0.65rem;
        padding: 0.7rem 0.45rem 0.7rem 0.55rem;
    }

    .amx-terms-rail__spine {
        left: calc(0.55rem + 0.35rem - 1px);
        top: calc(0.7rem + 1.075rem);
        bottom: calc(0.7rem + 1.075rem);
    }

    .amx-terms-rail__label {
        position: absolute;
        left: calc(100% + 0.35rem);
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(3, 13, 117, 0.08);
        box-shadow: 0 8px 22px rgba(2, 12, 65, 0.08);
        border-radius: 0.55rem;
        padding: 0.35rem 0.55rem;
        opacity: 0;
        transform: translateX(-0.2rem);
    }

    .amx-terms-rail__link:hover .amx-terms-rail__label,
    .amx-terms-rail__link:focus-visible .amx-terms-rail__label,
    .amx-terms-rail__link.is-active .amx-terms-rail__label {
        opacity: 1;
        transform: translateX(0);
    }

    .amx-terms-rail:hover .amx-terms-rail__label {
        opacity: 0;
        transform: translateX(-0.2rem);
    }

    .amx-terms-rail:hover .amx-terms-rail__link:hover .amx-terms-rail__label,
    .amx-terms-rail:hover .amx-terms-rail__link.is-active .amx-terms-rail__label {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 720px) {
    .amx-terms-rail {
        left: 50%;
        right: auto;
        top: auto;
        bottom: 1.35rem;
        transform: translateX(-50%) translateY(0.65rem) scale(0.96);
        flex-direction: row;
        align-items: center;
        gap: 0.15rem;
        padding: 0.55rem 0.85rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.55);
        border: 1px solid rgba(255, 255, 255, 0.55);
        box-shadow:
            0 8px 32px rgba(2, 12, 65, 0.16),
            0 0 0 1px rgba(3, 13, 117, 0.04),
            0 0 24px rgba(255, 255, 255, 0.35);
        backdrop-filter: blur(18px) saturate(1.35);
        -webkit-backdrop-filter: blur(18px) saturate(1.35);
        filter: none;
    }

    .amx-terms-rail.is-visible {
        transform: translateX(-50%) translateY(0) scale(1);
        filter: none;
    }

    .amx-terms-rail__spine {
        display: none;
    }

    .amx-terms-rail__link {
        min-height: 0;
        padding: 0.35rem;
        transform: translateY(0.25rem);
    }

    .amx-terms-rail.is-visible .amx-terms-rail__link {
        opacity: 0.45;
        transform: translateY(0);
    }

    .amx-terms-rail__label {
        display: none;
    }

    .amx-terms-rail__dot {
        width: 0.55rem;
        height: 0.55rem;
        box-shadow: none;
    }

    .amx-terms-rail__link.is-active .amx-terms-rail__dot {
        box-shadow: 0 0 0 4px rgba(250, 0, 115, 0.16);
    }
}
