:root {
    --brand-primary: #0072CE; /* RBC Royal Blue */
    --brand-secondary: #001233; /* RBC Midnight */
    --brand-accent: #FFD200; /* RBC Gold */
    --brand-dark: #00091A;
    --brand-light: #F8FAFC;
    --brand-white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #0F172A;
    --text-muted: #475569;
    --border-subtle: rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --header-height: 80px;
    --container-width: 1200px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: #fff;
    scroll-behavior: smooth;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Premium Navbar */
.header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--brand-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -1px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--brand-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
    opacity: 0.8;
}

.nav-link:hover {
    color: var(--brand-primary);
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-lang {
    padding: 10px 24px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 114, 206, 0.3);
    text-transform: uppercase;
}

.btn-lang:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 114, 206, 0.4);
    background: var(--brand-secondary);
}

/* Page Structure */
main {
    padding-top: calc(var(--header-height) + 40px);
}

/* Premium Hero */
.hero {
    background: radial-gradient(circle at top right, var(--brand-secondary), #002B44);
    color: white;
    padding: 140px 0 100px;
    border-radius: var(--radius-lg);
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 114, 206, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: pulse 12s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 32px;
    max-width: 900px;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.4rem;
    max-width: 700px;
    opacity: 0.9;
    margin-bottom: 48px;
    line-height: 1.5;
    color: #E2E8F0;
}

/* Semantic Content Blocks */
.ai-summary-block {
    background: var(--brand-light);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 48px;
    border: 1px solid var(--border-subtle);
    position: relative;
}

.ai-summary-block h2 {
    font-size: 1.25rem;
    color: var(--brand-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-summary-block ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.ai-summary-block li {
    padding-left: 24px;
    position: relative;
    color: var(--text-muted);
}

.ai-summary-block li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--brand-primary);
    font-weight: 700;
}

.faq-card {
    background: #fff;
    border: 1px solid var(--border-subtle);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    transition: var(--transition);
    cursor: default;
}

.faq-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.faq-card strong {
    color: var(--brand-secondary);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 8px;
}

/* Modern Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 40px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #FAFBFC;
    color: var(--brand-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
}

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

/* Sidebar & Sticky TOC */
.sticky-toc {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    max-height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
}

.sticky-toc h3 {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: var(--brand-secondary);
}

.sticky-toc ul {
    list-style: none;
    padding: 0;
}

.sticky-toc li {
    margin-bottom: 8px;
}

.sticky-toc a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition);
    display: block;
    padding: 4px 0;
}

.sticky-toc a:hover, .sticky-toc a.active {
    color: var(--brand-primary);
    padding-left: 8px;
    border-left: 2px solid var(--brand-primary);
}

/* Footer */
.footer {
    background: var(--brand-dark);
    color: #9AA0A6;
    padding: 100px 0 60px;
    margin-top: 120px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
}

.footer h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 24px;
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 14px;
}

.footer a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

/* Grid Layout for Index */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.card {
    background: var(--brand-white);
    border: 1px solid var(--border-subtle);
    padding: 40px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-color: var(--brand-primary);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--brand-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--brand-primary);
    font-size: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--brand-secondary);
}

.card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.card a {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: var(--brand-primary);
    font-weight: 600;
}

/* Tone Helpers */
.brand-span {
    color: var(--brand-primary);
    font-weight: 600;
}

.expand-section {
    padding: 48px;
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    margin: 64px 0;
}

h1, h2, h3 {
    color: var(--brand-secondary);
    letter-spacing: -0.5px;
}

p {
    margin-bottom: 20px;
    color: #3C4043;
}

/* --- Rich Index Sections --- */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin: 60px 0;
}

.industry-card {
    padding: 40px;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    background: white;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.industry-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--brand-accent);
}

.stat-item h4 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 4px;
    color: white;
}

.stat-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.api-integrations {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    opacity: 0.5;
    filter: grayscale(1);
    margin-top: 40px;
}
