/* =========================================================
   CouponsArena – Terms & Conditions page (terms.css)
   ========================================================= */
:root {
    --brand-primary: #7e22ce;
    --brand-primary-dark: #4c1d95;
    --brand-primary-light: #a855f7;
    --brand-accent: #ec4899;
    --brand-deep-purple: #3b0764;

    --bg-body: #f9fafb;
    --bg-surface: #ffffff;
    --bg-dark: #0a0a0a;
    --bg-dark-accent: #1a0b2e;

    --text-main: #111827;
    --text-body: #4b5563;
    --text-muted: #9ca3af;
    --text-light: #ffffff;
    --text-light-muted: #d1d5db;

    --border-light: #e5e7eb;
    --border-dark: #2d2d2d;

    --gradient-brand: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
    --gradient-dark-bg: linear-gradient(180deg, #0a0a0a 0%, #3b0764 100%);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-brand: 0 4px 14px 0 rgba(126, 34, 206, 0.3);

    --radius: 20px;
    --radius-sm: 12px;
}

html { scroll-behavior: smooth; }
.terms-page { background: var(--bg-body); color: var(--text-body); }

/* ---------- Hero ---------- */
.terms-hero {
    position: relative; overflow: hidden;
    padding: 3.5rem 0 7rem;
    text-align: center; color: #fff;
    background:
        radial-gradient(60% 80% at 85% 0%, rgba(236,72,153,.28) 0%, transparent 60%),
        radial-gradient(50% 70% at 10% 100%, rgba(168,85,247,.35) 0%, transparent 60%),
        var(--gradient-dark-bg);
}
.terms-hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}
.terms-hero .container { position: relative; z-index: 2; }

.terms-breadcrumb { display: flex; justify-content: center; margin-bottom: 1.6rem; }
.terms-breadcrumb .breadcrumb {
    display: inline-flex; margin: 0; padding: .5rem 1.2rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px; backdrop-filter: blur(10px); font-size: .88rem;
}
.terms-breadcrumb .breadcrumb-item a { color: var(--text-light-muted); text-decoration: none; font-weight: 600; }
.terms-breadcrumb .breadcrumb-item a:hover { color: #fff; }
.terms-breadcrumb .breadcrumb-item.active { color: #fff; font-weight: 600; }
.terms-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.45); }

.terms-hero .hero-icon {
    width: 68px; height: 68px; margin: 0 auto 1.2rem;
    display: grid; place-items: center; font-size: 1.6rem; color: #fff;
    background: var(--gradient-brand); border-radius: 20px;
    box-shadow: var(--shadow-brand), 0 0 40px rgba(236,72,153,.35);
}
.terms-hero h1 {
    max-width: 820px; margin: 0 auto;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: #fff;
}

/* ---------- Intro (welcome) ---------- */
.terms-intro { position: relative; z-index: 3; margin-top: -4.2rem; }
.intro-card {
    position: relative; overflow: hidden;
    padding: 2.2rem 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 28px;
    box-shadow: var(--shadow-lg), 0 30px 60px rgba(59, 7, 100, .15);
}
.intro-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--gradient-brand); }
.intro-card h2 { margin: 0 0 .8rem; color: var(--text-main); font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
.intro-card p { margin: 0; font-size: 1.05rem; line-height: 1.85; }

/* ---------- Body ---------- */
.terms-body { padding: 4rem 0 5rem; }

.toc {
    position: sticky; top: 110px;
    padding: 1.4rem 1.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 140px); overflow-y: auto;
}
.toc-title {
    display: flex; align-items: center; gap: .6rem;
    margin: 0 0 .8rem; padding: 0 .5rem;
    color: var(--text-main); font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.toc-title i { color: var(--brand-primary); }
.toc a {
    display: flex; align-items: center; gap: .65rem;
    padding: .5rem .6rem; border-radius: 10px;
    color: var(--text-body); font-size: .86rem; font-weight: 500; line-height: 1.35; text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
.toc a .n {
    flex: 0 0 24px; height: 24px; display: grid; place-items: center;
    font-size: .7rem; font-weight: 700; color: var(--brand-primary);
    background: rgba(126,34,206,.09); border-radius: 8px; transition: all .2s ease;
}
.toc a:hover { background: rgba(126,34,206,.06); color: var(--brand-primary); }
.toc a:hover .n { background: var(--gradient-brand); color: #fff; }

.policy-card {
    position: relative; display: flex; gap: 1.2rem;
    margin-bottom: 1.2rem; padding: 1.5rem 1.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 110px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.policy-card:hover { transform: translateY(-3px); border-color: var(--brand-primary-light); box-shadow: var(--shadow-md), var(--shadow-brand); }
.policy-card:target { border-color: var(--brand-primary-light); box-shadow: 0 0 0 4px rgba(168,85,247,.18); }

.policy-icon {
    flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center;
    color: #fff; font-size: 1.15rem;
    background: var(--gradient-brand); border-radius: 16px; box-shadow: var(--shadow-brand);
}
.policy-content { min-width: 0; }
.policy-content h2 {
    display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
    margin: .1rem 0 .5rem; color: var(--text-main); font-size: 1.15rem; font-weight: 700;
}
.policy-content h2 .num { color: var(--brand-accent); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.policy-content p { margin: 0; color: var(--text-body); line-height: 1.8; font-size: .97rem; overflow-wrap: anywhere; }

.contact-chip {
    display: inline-flex; align-items: center; gap: .6rem;
    margin-top: 1rem; padding: .6rem 1.1rem;
    color: var(--brand-primary-dark); font-weight: 600; font-size: .92rem;
    background: rgba(126,34,206,.07);
    border: 1px solid rgba(126,34,206,.18);
    border-radius: 999px; overflow-wrap: anywhere;
}
.contact-chip i { color: var(--brand-primary); }
.contact-chip a { color: inherit; text-decoration: none; }
.contact-chip a:hover { text-decoration: underline; }

.to-top {
    display: inline-flex; align-items: center; gap: .6rem; margin-top: .6rem;
    padding: .6rem 1.3rem; color: var(--brand-primary); font-weight: 600; font-size: .88rem; text-decoration: none;
    border: 1.5px solid var(--brand-primary); border-radius: 999px; transition: all .2s ease;
}
.to-top:hover { color: #fff; background: var(--brand-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) { .toc { display: none; } }
@media (max-width: 575px) {
    .terms-hero { padding: 2.5rem 0 6rem; }
    .terms-intro { margin-top: -3.8rem; }
    .intro-card { padding: 1.6rem 1.3rem; border-radius: 22px; }
    .policy-card { flex-direction: column; gap: .9rem; padding: 1.3rem; }
}

/* ---------- Motion ---------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.intro-card, .policy-card { animation: fadeInUp .55s ease both; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }