/* ─── Root Variables ───────────────────────────────────────────────────────── */
:root {
    --primary-color:    #000000;
    --secondary-color:  #ffffff;
    --accent-color:     #3b82f6;
    --accent-dark:      #1d4ed8;
    --accent-soft:      rgba(59,130,246,0.10);
    --text-primary:     #000000;
    --text-secondary:   #505050;
    --text-muted:       #888888;
    --bg-primary:       #ffffff;
    --bg-secondary:     #f5f5f5;
    --bg-tertiary:      #efefef;
    --border-color:     #e5e5e5;
    --border-strong:    #cccccc;
    --code-bg:          #f0f0f0;

    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    --reading-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --transition:   all 0.3s var(--reading-ease);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
    --shadow-md:  0 6px 24px rgba(0,0,0,0.09);
    --shadow-lg:  0 16px 48px rgba(0,0,0,0.12);
}

body.dark-mode {
    --primary-color:    #ffffff;
    --secondary-color:  #000000;
    --accent-color:     #60a5fa;
    --bg-primary:       #0a0a0a;
    --bg-secondary:     #111111;
    --bg-tertiary:      #1a1a1a;
    --text-primary:     #f0f0f0;
    --text-secondary:   #999999;
    --text-muted:       #555555;
    --border-color:     #222222;
    --border-strong:    #333333;
    --code-bg:          #161616;
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:  0 6px 24px rgba(0,0,0,0.6);
    --shadow-lg:  0 16px 48px rgba(0,0,0,0.8);
}

/* ─── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ─── Floating Theme Toggle ─────────────────────────────────────────────────── */
.floating-theme-toggle {
    position: fixed;
    top: 1.5rem; right: 1.5rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.floating-theme-toggle:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

/* ─── Back button ─────────────────────────────────────────────────────────── */
.back-btn {
    position: fixed;
    top: 1.5rem; left: 1.5rem;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em;
    text-decoration: none;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.back-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    transform: translateX(-2px);
}
.back-btn svg { width: 14px; height: 14px; }

/* ─── Page Header ────────────────────────────────────────────────────────────── */
.page-header {
    padding: 8rem 2rem 5rem;
    max-width: 860px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border-color);
}

.page-header .label {
    display: inline-block;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--accent-color);
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700; letter-spacing: -0.04em; line-height: 1.05;
    margin-bottom: 1rem;
    opacity: 0; animation: fadeUp 0.7s var(--reading-ease) 0.1s forwards;
}

.page-header .subtitle {
    font-size: 1.1rem; line-height: 1.75; color: var(--text-secondary);
    max-width: 560px;
    opacity: 0; animation: fadeUp 0.7s var(--reading-ease) 0.22s forwards;
}

/* ─── Main Content ───────────────────────────────────────────────────────────── */
.content-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 4rem 2rem 8rem;
}

/* ─── Sections ───────────────────────────────────────────────────────────────── */
.doc-section {
    margin-bottom: 4rem;
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.7s var(--reading-ease), transform 0.7s var(--reading-ease);
}
.doc-section.in-view { opacity: 1; transform: translateY(0); }

.doc-section h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700; letter-spacing: -0.03em; line-height: 1.2;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.doc-section h3 {
    font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em;
    margin-bottom: 0.75rem; margin-top: 2rem; color: var(--text-primary);
}

.doc-section p {
    color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem;
}

.doc-section a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.doc-section a:hover { border-bottom-color: var(--accent-color); }

/* ─── Step Cards ─────────────────────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }

.step-card {
    display: flex; align-items: flex-start; gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.step-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
    transform: translateX(3px);
}

.step-num {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent-color); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
    margin-top: 1px;
}

.step-card p { margin: 0; color: var(--text-secondary); }
.step-card strong { color: var(--text-primary); }

/* ─── Info Cards ─────────────────────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }

.info-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}
.info-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.info-card .card-icon {
    font-size: 1.5rem; margin-bottom: 0.75rem; display: block;
}
.info-card h3 { font-size: 0.95rem; margin-bottom: 0.5rem; margin-top: 0; }
.info-card p { font-size: 0.88rem; margin: 0; }

/* ─── Highlight Box ──────────────────────────────────────────────────────────── */
.highlight-box {
    background: var(--accent-soft);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}
.highlight-box p { color: var(--text-secondary); margin: 0; font-size: 0.95rem; }
.highlight-box strong { color: var(--accent-color); }

/* ─── Warning Box ────────────────────────────────────────────────────────────── */
.note-box {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}
.note-box p { margin: 0; font-size: 0.9rem; }

/* ─── Code Blocks ────────────────────────────────────────────────────────────── */
pre, code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 1.25rem 0;
    line-height: 1.65;
}

code {
    background: var(--code-bg);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
}

pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius-md); border: 1px solid var(--border-color); }

table {
    width: 100%; border-collapse: collapse;
    font-size: 0.92rem;
}

thead { background: var(--bg-secondary); }
th {
    padding: 0.85rem 1.25rem; text-align: left;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}
td {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-secondary); }
td strong, td a { color: var(--text-primary); }
td a { color: var(--accent-color); text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ─── Contact Cards ──────────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }

.contact-card {
    display: flex; flex-direction: column;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}
.contact-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-soft);
    transform: translateY(-3px);
}
.contact-card .platform-icon { font-size: 1.6rem; margin-bottom: 0.75rem; }
.contact-card .platform-name { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
.contact-card .handle { font-size: 0.95rem; font-weight: 500; color: var(--accent-color); }

/* ─── Pricing ────────────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }

.pricing-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.pricing-card:hover { border-color: var(--accent-color); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pricing-card.featured {
    border-color: var(--accent-color);
    background: var(--accent-soft);
}
.pricing-card .featured-badge {
    position: absolute; top: 0; right: 0;
    background: var(--accent-color); color: #fff;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 0.3rem 0.8rem;
    border-radius: 0 var(--radius-lg) 0 var(--radius-md);
}
.pricing-card .plan-name { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
.pricing-card .price { font-size: 3rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--text-primary); }
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-card .period { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; margin-bottom: 1.5rem; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
    background: var(--bg-secondary); border-top: 1px solid var(--border-color);
    padding: 2.5rem 2rem; text-align: center;
}
.footer p { font-size: 0.85rem; color: var(--text-muted); margin: 0.3rem 0; }
.footer a { color: var(--accent-color); text-decoration: none; }

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .page-header { padding: 7rem 1.25rem 3rem; }
    .content-wrap { padding: 2.5rem 1.25rem 5rem; }
    .back-btn { font-size: 0; padding: 0.5rem; }
    .back-btn span { display: none; }
    .card-grid, .contact-grid, .pricing-grid { grid-template-columns: 1fr; }
}
