/* =========================================
   1. Design Tokens & Reset
   ========================================= */
:root {
    /* Colors */
    --c-dark: #251943;
    --c-paper: #DBD4ED;
    --c-text-paper: #191523;
    --c-brand: #5214EB;
    --c-accent: #ED6E89;
    
    /* Spacing & Layout */
    --section-y: clamp(2.5rem, 5vw, 4rem);
    --gap: clamp(0.75rem, 1.5vw, 1.25rem);
    --content-max: 1120px;
    
    /* Shapes */
    --radius-card: 0;
    --radius-btn: 0;
    
    /* Shadows */
    --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
    color: var(--c-text-paper);
    background-color: var(--c-paper);
    -webkit-font-smoothing: antialiased;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* =========================================
   2. Typography & Utility Classes
   ========================================= */
.container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.bg-dark {
    background-color: var(--c-dark);
    color: var(--c-paper);
}

.text-on-dark {
    color: var(--c-paper);
}

.text-on-dark .hl {
    color: var(--c-accent);
}

.text-on-dark a:not(.btn) {
    color: var(--c-accent);
}

.text-on-dark .badge {
    color: var(--c-accent);
}

.bg-paper {
    background-color: var(--c-paper);
    color: var(--c-text-paper);
}

.text-on-paper {
    color: var(--c-text-paper);
}

.text-on-paper .hl {
    color: var(--c-brand);
}

.text-on-paper a:not(.btn) {
    color: var(--c-brand);
}

.text-on-paper .badge {
    color: var(--c-brand);
}

.badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: var(--gap);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: var(--gap);
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--gap);
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    max-width: 38em;
}

.hl {
    color: var(--c-brand);
}

.text-on-dark .hl {
    color: var(--c-accent);
}

/* =========================================
   3. Components
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 24px;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--c-accent);
    color: var(--c-dark);
    border: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--c-text-paper);
    border: 1px solid var(--c-text-paper);
}

.text-on-dark .btn-secondary {
    color: var(--c-paper);
    border-color: var(--c-paper);
}

.card {
    background-color: var(--c-paper);
    color: var(--c-text-paper);
    border: 1px solid rgba(25, 21, 35, 0.1);
    box-shadow: var(--card-shadow);
    padding: var(--gap);
    border-radius: var(--radius-card);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.text-on-dark .card {
    background-color: var(--c-paper);
    color: var(--c-text-paper);
}

.grid {
    display: grid;
    gap: var(--gap);
}

.grid-cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    border: 1px solid currentColor;
    border-radius: var(--radius-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-paper th, .bg-paper td {
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

th {
    font-weight: 700;
    background-color: rgba(25, 21, 35, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

/* Details / FAQ */
details {
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
    padding: var(--gap) 0;
}

.text-on-dark details {
    border-bottom: 1px solid rgba(219, 212, 237, 0.2);
}

summary {
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1;
}

details[open] summary::after {
    content: '−';
}

details p {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--c-paper);
    border-bottom: 1px solid rgba(25, 21, 35, 0.1);
    padding: 16px 0;
}

.text-on-dark .site-header {
    background-color: var(--c-dark);
    border-bottom: 1px solid rgba(219, 212, 237, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo img {
    height: 32px;
    width: auto;
}

.nav-link {
    margin-left: var(--gap);
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-link[aria-current="page"] {
    color: var(--c-brand);
}

.text-on-dark .nav-link[aria-current="page"] {
    color: var(--c-accent);
}

/* Footer */
.site-footer {
    padding: var(--section-y) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--section-y);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--gap);
}

.footer-col h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-col ul li {
    margin-bottom: 0.25rem;
}

/* =========================================
   4. SVG Animations
   ========================================= */
svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.orbit-ring {
    fill: none;
    stroke-width: 2;
    transform-origin: center;
    transform-box: fill-box;
}

.ring-1 {
    animation: breathe 6s infinite alternate ease-in-out;
    stroke-dasharray: 4 8;
}

.ring-2 {
    animation: breathe 8s infinite alternate-reverse ease-in-out;
    stroke-dasharray: 8 12;
}

.ring-3 {
    animation: pulse-opacity 5s infinite alternate ease-in-out;
}

.bubble-float {
    animation: float 4s infinite alternate ease-in-out;
}

.pulse-dot {
    animation: pulse-scale 2s infinite ease-in-out;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes breathe {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.05); opacity: 1; }
}

@keyframes pulse-opacity {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
