/**
 * Agen Savia - Public & Legal Pages Centralized Stylesheet
 * Optimized for Mobile-First (HP) experience with Rich Dark Emerald & Amber Theme
 */

:root {
    /* Color Palette */
    --color-bg-primary: #030712;
    --color-bg-gradient: linear-gradient(145deg, #030712 0%, #061510 50%, #04100c 100%);
    --color-forest-950: #0a1d14;
    --color-forest-900: #112a1d;
    --color-forest-800: #1b4332;
    --color-forest-700: #2d6a4f;
    --color-forest-600: #40916c;
    --color-forest-500: #52b788;
    --color-forest-400: #74c69d;
    --color-forest-300: #95d5b2;
    
    --color-amber-600: #d97706;
    --color-amber-500: #f59e0b;
    --color-amber-400: #fbbf24;
    --color-amber-300: #fcd34d;

    --color-text-title: #ffffff;
    --color-text-body: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-text-dim: #64748b;

    /* Glassmorphism */
    --glass-bg: rgba(10, 24, 18, 0.72);
    --glass-bg-subtle: rgba(15, 33, 25, 0.55);
    --glass-bg-hover: rgba(20, 45, 34, 0.85);
    --glass-border: rgba(82, 183, 136, 0.18);
    --glass-border-hover: rgba(82, 183, 136, 0.4);
    --glass-border-amber: rgba(245, 158, 11, 0.25);
    --glass-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.45);
    --glass-shadow-glow: 0 0 30px rgba(82, 183, 136, 0.12);

    /* Spacing & Radii */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
    -webkit-tap-highlight-color: transparent;
    font-size: 16px;
}

body.sp-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg-gradient);
    background-attachment: fixed;
    color: var(--color-text-body);
    min-height: 100vh;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Helpers */
.sp-font-heading {
    font-family: 'Outfit', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* Radial Glow Backgrounds */
.sp-glow-emerald {
    background-image: radial-gradient(circle at 10% 10%, rgba(82, 183, 136, 0.16) 0%, transparent 55%),
                      radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
}

.sp-glow-amber {
    background-image: radial-gradient(circle at 90% 15%, rgba(245, 158, 11, 0.18) 0%, transparent 55%),
                      radial-gradient(circle at 10% 85%, rgba(82, 183, 136, 0.12) 0%, transparent 50%);
}

/* Navbar - Mobile Optimized */
.sp-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-nav-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .sp-nav-inner {
        padding: 1rem 1.5rem;
    }
}

.sp-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.sp-brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #10b981 0%, #f59e0b 50%, #1b4332 100%);
    font-weight: 800;
    font-size: 1.125rem;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: transform 0.2s ease;
}

@media (min-width: 640px) {
    .sp-brand-logo {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
        border-radius: var(--radius-md);
    }
}

.sp-brand:active .sp-brand-logo {
    transform: scale(0.95);
}

.sp-brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .sp-brand-title {
        font-size: 1.1rem;
    }
}

.sp-brand-subtitle {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-forest-400);
}

/* Horizontal Nav Menu (Mobile-Friendly Pill Bar) */
.sp-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.sp-nav-menu::-webkit-scrollbar {
    display: none;
}

@media (min-width: 640px) {
    .sp-nav-menu {
        gap: 0.75rem;
        overflow-x: visible;
    }
}

.sp-nav-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 36px;
}

@media (min-width: 640px) {
    .sp-nav-link {
        font-size: 0.875rem;
        padding: 0.45rem 0.85rem;
    }
}

.sp-nav-link:hover,
.sp-nav-link:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.sp-nav-link.active {
    color: var(--color-forest-300);
    background: rgba(82, 183, 136, 0.12);
    border: 1px solid rgba(82, 183, 136, 0.25);
}

.sp-nav-btn-highlight {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-amber-300);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 36px;
}

@media (min-width: 640px) {
    .sp-nav-btn-highlight {
        font-size: 0.85rem;
        padding: 0.45rem 1rem;
    }
}

.sp-nav-btn-highlight:hover,
.sp-nav-btn-highlight:active {
    background: rgba(245, 158, 11, 0.22);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

/* Hero Section */
.sp-hero {
    padding: 2.25rem 1rem 2.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .sp-hero {
        padding: 4rem 1.5rem 3.5rem;
    }
}

@media (min-width: 1024px) {
    .sp-hero {
        padding: 5rem 1.5rem 4.5rem;
    }
}

.sp-hero-container {
    max-width: 72rem;
    margin: 0 auto;
}

.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

@media (min-width: 640px) {
    .sp-badge {
        font-size: 0.85rem;
        padding: 0.35rem 0.9rem;
        gap: 0.5rem;
    }
}

.sp-badge-amber {
    background: rgba(245, 158, 11, 0.12);
    color: var(--color-amber-300);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.sp-badge-emerald {
    background: rgba(82, 183, 136, 0.12);
    color: var(--color-forest-300);
    border: 1px solid rgba(82, 183, 136, 0.3);
}

.sp-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    max-width: 48rem;
}

@media (min-width: 640px) {
    .sp-hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-top: 1.25rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 1024px) {
    .sp-hero-title {
        font-size: 2.75rem;
    }
}

.sp-hero-desc {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
    max-width: 44rem;
}

@media (min-width: 640px) {
    .sp-hero-desc {
        font-size: 1.05rem;
        line-height: 1.7;
    }
}

/* Glass Card & Surfaces */
.sp-glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 640px) {
    .sp-glass-card {
        border-radius: var(--radius-xl);
        padding: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .sp-glass-card {
        padding: 2rem;
    }
}

.sp-glass-card-interactive:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--glass-shadow), var(--glass-shadow-glow);
    transform: translateY(-2px);
}

.sp-surface-dark {
    background: rgba(13, 28, 21, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem;
}

@media (min-width: 640px) {
    .sp-surface-dark {
        padding: 1.25rem;
    }
}

/* Touch-Optimized Interactive Action Cards */
.sp-touch-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    background: rgba(11, 26, 20, 0.75);
    border: 1px solid rgba(82, 183, 136, 0.18);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-select: none;
    user-select: none;
    min-height: 60px;
}

.sp-touch-card:hover {
    border-color: var(--color-forest-500);
    background: rgba(18, 42, 32, 0.85);
    transform: translateY(-1px);
}

.sp-touch-card:active {
    transform: scale(0.98);
}

.sp-touch-icon {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
}

.sp-icon-emerald {
    background: rgba(82, 183, 136, 0.15);
    color: var(--color-forest-300);
    border: 1px solid rgba(82, 183, 136, 0.25);
}

.sp-icon-amber {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-amber-300);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.sp-touch-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
}

.sp-touch-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    word-break: break-word;
}

@media (min-width: 640px) {
    .sp-touch-value {
        font-size: 1.05rem;
    }
}

/* Modern Pill Button & Action CTAs */
.sp-btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 44px;
    touch-action: manipulation;
}

.sp-btn-pill:active {
    transform: scale(0.97);
}

.sp-btn-gradient {
    background: linear-gradient(135deg, #10b981 0%, #d97706 50%, #1b4332 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sp-btn-gradient:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.sp-btn-outline-emerald {
    background: rgba(82, 183, 136, 0.1);
    color: var(--color-forest-300);
    border: 1px solid rgba(82, 183, 136, 0.3);
}

.sp-btn-outline-emerald:hover,
.sp-btn-outline-emerald:active {
    background: rgba(82, 183, 136, 0.2);
    color: #ffffff;
}

.sp-btn-outline-amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-amber-300);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.sp-btn-outline-amber:hover,
.sp-btn-outline-amber:active {
    background: rgba(245, 158, 11, 0.2);
    color: #ffffff;
}

/* FAQ Accordion Item - Fast & Mobile Touch Ready */
.sp-faq-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 26, 20, 0.6);
    padding: 1rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

@media (min-width: 640px) {
    .sp-faq-card {
        padding: 1.15rem 1.25rem;
    }
}

.sp-faq-card:hover {
    border-color: rgba(82, 183, 136, 0.3);
    background: rgba(14, 34, 26, 0.8);
}

.sp-faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sp-faq-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    margin: 0;
}

@media (min-width: 640px) {
    .sp-faq-title {
        font-size: 1rem;
    }
}

.sp-faq-icon {
    font-size: 0.875rem;
    color: var(--color-forest-400);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sp-faq-card.active .sp-faq-icon {
    transform: rotate(45deg);
    color: var(--color-amber-400);
}

.sp-faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-faq-card.active .sp-faq-body {
    max-height: 480px;
}

.sp-faq-text {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

@media (min-width: 640px) {
    .sp-faq-text {
        font-size: 0.925rem;
    }
}

/* Horizontal Scrollable Table of Contents for Mobile (Terms Page) */
.sp-toc-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 1.5rem;
}

.sp-toc-scroll::-webkit-scrollbar {
    display: none;
}

.sp-toc-chip {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    background: rgba(15, 33, 25, 0.7);
    border: 1px solid rgba(82, 183, 136, 0.2);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sp-toc-chip:hover,
.sp-toc-chip.active {
    background: rgba(82, 183, 136, 0.2);
    border-color: var(--color-forest-400);
    color: #ffffff;
}

/* Desktop Sidebar TOC Nav */
.sp-side-nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.sp-side-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
}

.sp-side-nav-link.active {
    color: var(--color-forest-300);
    background: rgba(82, 183, 136, 0.12);
    border-left: 2px solid var(--color-forest-400);
    font-weight: 600;
}

/* Layout Utilities */
.sp-main-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

@media (min-width: 640px) {
    .sp-main-container {
        padding: 2.5rem 1.5rem 4rem;
    }
}

@media (min-width: 1024px) {
    .sp-main-container {
        padding: 3.5rem 1.5rem 5rem;
    }
}

/* Content Headings & Lists */
.sp-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .sp-section-title {
        font-size: 1.35rem;
    }
}

.sp-list {
    margin-top: 0.75rem;
    padding-left: 1.25rem;
    space-y: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}

@media (min-width: 640px) {
    .sp-list {
        font-size: 0.925rem;
    }
}

.sp-list li {
    margin-bottom: 0.4rem;
}

/* Footer (Mobile-First) */
.sp-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 7, 18, 0.95);
    padding: 1.75rem 1rem;
    color: var(--color-text-dim);
}

@media (min-width: 640px) {
    .sp-footer {
        padding: 2.25rem 1.5rem;
    }
}

.sp-footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    text-align: center;
}

@media (min-width: 768px) {
    .sp-footer-inner {
        flex-direction: row;
        text-align: left;
    }
}

.sp-footer-copy {
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

.sp-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.875rem 1.25rem;
    font-size: 0.8rem;
}

.sp-footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.25rem 0;
    touch-action: manipulation;
}

.sp-footer-link:hover,
.sp-footer-link:active {
    color: #ffffff;
}


