/* ==========================================================================
   Design System & Tokens
   ========================================================================== */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Slate / Neutral Palette */
    --bg-base: #0b0f17;
    --bg-surface: #111726;
    --bg-surface-elevated: #182238;
    --bg-surface-subtle: #1e293b;
    --bg-interactive: #243049;
    --bg-interactive-hover: #2e3d5c;

    --border-subtle: #1e293b;
    --border-regular: #2a374f;
    --border-active: #3b4d6e;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0b0f17;

    /* Functional Accents */
    --accent-primary: #38bdf8;
    --accent-primary-hover: #0ea5e9;
    --accent-bg: rgba(56, 189, 248, 0.12);
    
    --success-primary: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);

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

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.45);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   CSS Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.top-nav {
    border-bottom: 1px solid var(--border-subtle);
    background-color: rgba(11, 15, 23, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 40;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--accent-bg);
    color: var(--accent-primary);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.brand-title {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding-top: 48px;
    padding-bottom: 32px;
}

.hero-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-regular);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success-primary);
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--success-primary);
}

.release-date {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.hero-heading {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.hero-lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Action Panel & Buttons */
.action-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--text-inverse);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-primary-hover);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.badge-size {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.775rem;
    font-weight: 700;
}

.btn-secondary {
    background-color: var(--bg-interactive);
    color: var(--text-primary);
    border-color: var(--border-regular);
}

.btn-secondary:hover {
    background-color: var(--bg-interactive-hover);
    border-color: var(--border-active);
}

/* Meta Bar */
.meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.meta-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.code-font {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    color: var(--accent-primary);
}

/* ==========================================================================
   Section Containers & Titles
   ========================================================================== */
.section-container {
    padding-top: 24px;
    padding-bottom: 24px;
}

.section-header {
    margin-bottom: 18px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Verification & Hash Cards
   ========================================================================== */
.grid-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-regular);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hash-box {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.hash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.hash-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hash-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--accent-bg);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

.hash-recommended {
    font-size: 0.775rem;
    color: var(--text-muted);
}

.hash-string {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-all;
    user-select: all;
    background: var(--bg-base);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

/* Copy Buttons */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--bg-interactive);
    color: var(--text-primary);
    border: 1px solid var(--border-regular);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn:hover {
    background-color: var(--bg-interactive-hover);
    border-color: var(--border-active);
}

.copy-btn-mini {
    padding: 4px 8px;
    background-color: var(--bg-interactive);
    color: var(--text-secondary);
    border: 1px solid var(--border-regular);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.copy-btn-mini:hover {
    color: var(--text-primary);
    background-color: var(--bg-interactive-hover);
    border-color: var(--border-active);
}

/* Sub-hashes Grid */
.sub-hashes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.sub-hash-item {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.sub-hash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.sub-hash-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.sub-hash-val {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-break: break-all;
}

/* Code Snippet Box */
.code-snippet-box {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
}

.snippet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.snippet-title {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.snippet-code {
    background-color: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    overflow-x: auto;
}

.snippet-code code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
}

/* ==========================================================================
   Installation Steps
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.step-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-regular);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--accent-bg);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.step-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.step-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-cmd-box {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-cmd-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.step-cmd {
    font-family: var(--font-mono);
    font-size: 0.775rem;
    color: var(--text-secondary);
    background-color: var(--bg-base);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    word-break: break-all;
}

.inline-code {
    font-family: var(--font-mono);
    font-size: 0.825em;
    background-color: var(--bg-surface-subtle);
    color: var(--accent-primary);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==========================================================================
   Table & System Specs
   ========================================================================== */
.table-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-regular);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.specs-table th,
.specs-table td {
    padding: 14px 20px;
    text-align: left;
}

.specs-table th {
    background-color: var(--bg-surface-elevated);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
}

.specs-table td {
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

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

.specs-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    width: 32%;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
    padding-bottom: 28px;
    background-color: var(--bg-base);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

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

.footer-copy code {
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.tls-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.775rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-surface);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}

.tls-badge svg {
    color: var(--success-primary);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-active);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    font-weight: 500;
    animation: toast-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

.toast-success-icon {
    color: var(--success-primary);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 640px) {
    .hero-card {
        padding: 24px 20px;
    }

    .hero-heading {
        font-size: 1.75rem;
    }

    .btn {
        width: 100%;
    }

    .action-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links {
        display: none;
    }

    .specs-table th,
    .specs-table td {
        padding: 10px 14px;
    }

    .specs-table td:first-child {
        width: 40%;
    }
}
