/* ============================================================
   SmartSubs Pro — Terms and Privacy Styles
   Matches the new warm off-white design system.
   ============================================================ */

html {
    scroll-behavior: smooth;
}

/* ─── Global & Base overrides ─── */
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink-2);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
}

strong {
    color: var(--ink);
    font-weight: 700;
}

/* ─── Navigation (Matching landing page) ─── */
body > nav {
    position: fixed;
    width: 100%;
    z-index: 50;
    top: 0;
    background: rgba(17, 17, 19, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav-in {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 78rem;
    margin: 0 auto;
    padding: 0 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 19px;
    color: var(--ink);
    text-decoration: none;
}

.brand img {
    height: 34px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-back {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-3);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-back:hover {
    color: var(--brand-orange);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .3s cubic-bezier(.16,1,.3,1);
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-orange);
    color: #fff;
    box-shadow: 0 6px 20px -6px rgba(249,115,22,.6);
}

.btn-primary:hover {
    background: var(--brand-orange-600);
    transform: translateY(-2px);
}

.btn-sm {
    height: 38px;
    padding: 0 18px;
    font-size: 13px;
}

/* ─── Layout ─── */
.wrap {
    max-width: 78rem;
    margin: 0 auto;
    padding: 0 2rem;
}

.terms-wrap {
    max-width: 78rem;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.terms-grid {
    display: flex;
    gap: 4rem;
}

.terms-sidebar {
    width: 18rem;
    flex-shrink: 0;
    position: sticky;
    top: 6.5rem;
    align-self: flex-start;
}

.terms-main {
    flex: 1;
    min-width: 0;
}

@media (max-width: 1200px) {
    .terms-sidebar {
        display: none;
    }
    .terms-wrap {
        padding: 3rem 1.5rem;
    }
    .terms-grid {
        gap: 0;
    }
}

.terms-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.terms-hero {
    padding-top: 8rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper-sunken);
}

.terms-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.terms-hero p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink-3);
    max-width: 44rem;
    margin: 1.2rem 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.terms-last-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--tint-purple-soft);
    border: 1px solid var(--border-purple);
    color: var(--brand-purple-400);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
}

/* ─── TOC Sidebar ─── */
.toc-sidebar {
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 10px 30px -15px rgba(20,19,15,0.05);
    scrollbar-width: thin;
    scrollbar-color: rgba(109,38,217,0.2) transparent;
}

.toc-sidebar h3 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 1rem;
}

.toc-link {
    display: block;
    font-size: 0.8rem;
    color: var(--ink-3);
    padding: 0.35rem 0.6rem;
    border-radius: 0.4rem;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
    border-left: 2px solid transparent;
}

.toc-link:hover,
.toc-link.active {
    color: var(--brand-orange);
    background: var(--tint-orange-soft);
    border-left-color: var(--brand-orange);
}

/* ─── Section Headers ─── */
.terms-section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--line);
}

.terms-section:last-child {
    border-bottom: none;
}

.section-number {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-orange);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 1.2rem;
    scroll-margin-top: 6.5rem;
}

.terms-section p,
.terms-section li {
    font-size: 0.93rem;
    color: var(--ink-2);
    line-height: 1.8;
}

.terms-section p+p {
    margin-top: 0.9rem;
}

.terms-section ul {
    list-style: none;
    padding: 0;
    margin: 0.8rem 0;
}

.terms-section ul li {
    padding: 0.3rem 0 0.3rem 1.5rem;
    position: relative;
}

.terms-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--brand-orange);
    font-size: 0.75rem;
    top: 0.45rem;
}

.terms-section ol {
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}

.terms-section ol li {
    padding: 0.25rem 0;
}

/* ─── Info Boxes ─── */
.info-box {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin: 1.2rem 0;
    font-size: 0.88rem;
    line-height: 1.7;
    border: 1px solid transparent;
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.25);
    color: #b45309;
}

.info-box.important {
    background: var(--tint-orange-soft);
    border-color: var(--border-orange);
    color: var(--brand-orange-600);
}

.info-box.tip {
    background: var(--tint-purple-soft);
    border-color: var(--border-purple);
    color: var(--brand-purple);
}

.info-box strong {
    font-weight: 700;
}

/* ─── Definition Table ─── */
.def-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid var(--line);
    background: var(--paper-2);
    border-radius: 12px;
    overflow: hidden;
}

.def-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper-sunken);
}

.def-table td {
    font-size: 0.88rem;
    color: var(--ink-2);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

.def-table td:first-child {
    color: var(--ink);
    font-weight: 600;
    white-space: nowrap;
    width: 30%;
    border-right: 1px solid var(--line-soft);
}

.def-table tr:last-child td {
    border-bottom: none;
}

/* ─── Highlight Text ─── */
.highlight {
    color: var(--brand-orange-600);
    font-weight: 600;
}

.highlight-purple {
    color: var(--brand-purple);
    font-weight: 600;
}

/* ─── Contact Card ─── */
.contact-card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 10px 25px -15px rgba(20,19,15,0.05);
}

.contact-card a {
    color: var(--brand-orange-600);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* ─── Sub-headings ─── */
.sub-heading {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 700;
    margin: 1.2rem 0 0.5rem;
}

/* ─── Footer Layout (Matching Landing page style exactly) ─── */
footer {
    border-top: 1px solid var(--line);
    padding: 44px 0;
    background: var(--paper);
}

.foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-3);
    max-width: 78rem;
    margin: 0 auto;
    padding: 0 2rem;
}

.foot a {
    color: var(--ink-2);
    text-decoration: underline;
    transition: color 0.2s;
}

.foot a:hover {
    color: var(--brand-orange);
}

/* ─── Custom shadow for buy button ─── */
.shadow-btn-glow {
    box-shadow: 0 6px 20px -6px rgba(249,115,22,.6);
}

/* ─── Print ─── */
@media print {
    nav,
    footer,
    .toc-sidebar {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
