body { overflow-x: hidden; line-height: 1.7; }

::-webkit-scrollbar { width: 6px; }

::-webkit-scrollbar-thumb { background: var(--burgundy); border-radius: 3px; }

/* ===== HERO / HEADER ===== */
.terms-header {
    min-height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 2rem 3rem;
    overflow: hidden;
}

.terms-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.terms-header-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(ellipse at 40% 30%, rgba(123, 45, 53, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 70%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
}

.terms-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
}

.terms-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.terms-title .gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.terms-last-updated {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--cream);
    opacity: 0.55;
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
}

/* ===== LAYOUT ===== */
.terms-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    position: relative;
}

/* ===== SIDEBAR TOC ===== */
.toc {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
}

.toc::-webkit-scrollbar { width: 3px; }
.toc::-webkit-scrollbar-thumb { background: var(--burgundy); border-radius: 3px; }

.toc-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
}

.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.toc-item {
    display: block;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--cream);
    opacity: 0.55;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s;
    border-left: 2px solid transparent;
}

.toc-link:hover {
    opacity: 0.8;
    background: rgba(123, 45, 53, 0.1);
}

.toc-link.active {
    opacity: 1;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.05);
    border-left-color: var(--gold);
}

.toc-number {
    font-family: var(--font-num); font-variant-numeric: tabular-nums;
    font-size: 0.7rem;
    font-weight: 500;
    min-width: 20px;
}

.toc-text {
    line-height: 1.4;
}

/* ===== CONTENT ===== */
.terms-content {
    min-width: 0;
}

.terms-section {
    margin-bottom: 1.5rem;
    scroll-margin-top: 100px;
}

.terms-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(42, 16, 21, 0.4);
    border: 1px solid rgba(123, 45, 53, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.terms-section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.terms-section-header:hover {
    border-color: rgba(123, 45, 53, 0.35);
    background: rgba(42, 16, 21, 0.6);
}

.terms-section-header.active {
    border-color: rgba(201, 168, 76, 0.25);
    background: rgba(42, 16, 21, 0.7);
    border-radius: 14px 14px 0 0;
}

.terms-section-header.active::before {
    opacity: 1;
}

.section-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
    opacity: 0.3;
    line-height: 1;
    min-width: 40px;
    transition: opacity 0.3s;
}

.terms-section-header:hover .section-number {
    opacity: 0.5;
}

.terms-section-header.active .section-number {
    opacity: 0.8;
}

.section-header-text {
    flex: 1;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    transition: color 0.3s;
}

.terms-section-header:hover .section-title {
    color: var(--gold-pale);
}

.section-brief {
    font-size: 0.82rem;
    color: var(--cream);
    opacity: 0.55;
    font-weight: 300;
}

.section-toggle {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(123, 45, 53, 0.2);
    background: transparent;
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.section-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-section-header.active .section-toggle {
    background: rgba(201, 168, 76, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.terms-section-header.active .section-toggle svg {
    transform: rotate(180deg);
}

/* ===== EXPANDABLE CONTENT ===== */
.terms-section-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.terms-section-body.open {
    max-height: 2000px;
}

.terms-section-inner {
    padding: 1.5rem 1.5rem 1.5rem;
    background: rgba(42, 16, 21, 0.3);
    border: 1px solid rgba(123, 45, 53, 0.15);
    border-top: none;
    border-radius: 0 0 14px 14px;
}

.terms-section-inner p {
    font-size: 0.92rem;
    color: var(--cream);
    opacity: 0.7;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.terms-section-inner p:last-child {
    margin-bottom: 0;
}

.terms-section-inner ul {
    list-style: none;
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.terms-section-inner ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--cream);
    opacity: 0.65;
    line-height: 1.6;
}

.terms-section-inner ul li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 0.55rem;
    opacity: 0.6;
}

.terms-highlight {
    background: rgba(201, 168, 76, 0.06);
    border-left: 3px solid var(--gold);
    padding: 1rem 1.25rem;
    border-radius: 0 10px 10px 0;
    margin: 1rem 0;
}

.terms-highlight p {
    opacity: 0.8 !important;
    font-size: 0.88rem !important;
    margin-bottom: 0 !important;
}

.terms-highlight .highlight-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* ===== CONTACT BAR ===== */
.terms-contact {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

.terms-contact-inner {
    background: linear-gradient(135deg, rgba(42, 16, 21, 0.8), rgba(61, 15, 20, 0.6));
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.terms-contact-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.terms-contact-text h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.terms-contact-text p {
    font-size: 0.9rem;
    color: var(--cream);
    opacity: 0.55;
}

.terms-contact-text a,
.terms-section-inner a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.terms-contact-text a:hover,
.terms-section-inner a:hover {
    opacity: 0.8;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .terms-body {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .toc {
        position: relative;
        top: 0;
        max-height: none;
        padding-right: 0;
        margin-bottom: 2rem;
        padding: 1.5rem;
        background: rgba(42, 16, 21, 0.4);
        border: 1px solid rgba(123, 45, 53, 0.2);
        border-radius: 14px;
    }

    .toc-list {
        flex-wrap: wrap;
        gap: 0.2rem;
    }

    .toc-link {
        padding: 0.4rem 0.6rem;
    }

    .terms-contact-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .terms-header {
        min-height: 45vh;
        padding: 7rem 1.5rem 3rem;
    }

    .terms-body {
        padding: 0 1rem 4rem;
    }

    .terms-section-header {
        padding: 1.2rem;
    }

    .section-number {
        font-size: 1.4rem;
        min-width: 30px;
    }

    .section-title {
        font-size: 1rem;
    }

    .toc-list {
        flex-direction: column;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.terms-section {
    animation: fadeInUp 0.5s ease-out both;
}

.terms-section:nth-child(1) { animation-delay: 0.05s; }
.terms-section:nth-child(2) { animation-delay: 0.1s; }
.terms-section:nth-child(3) { animation-delay: 0.15s; }
.terms-section:nth-child(4) { animation-delay: 0.2s; }
.terms-section:nth-child(5) { animation-delay: 0.25s; }
.terms-section:nth-child(6) { animation-delay: 0.3s; }
.terms-section:nth-child(7) { animation-delay: 0.35s; }
.terms-section:nth-child(8) { animation-delay: 0.4s; }
.terms-section:nth-child(9) { animation-delay: 0.45s; }
.terms-section:nth-child(10) { animation-delay: 0.5s; }
.terms-section:nth-child(11) { animation-delay: 0.55s; }
.terms-section:nth-child(12) { animation-delay: 0.6s; }
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}
