/* hermit-μDC Documentation Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-brand .logo {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-repo {
    background: var(--bg-dark);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.btn-repo:hover {
    background: var(--primary-dark);
}

.btn-configurator {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-configurator:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #6d28d9 100%);
}

/* Mu symbol styling */
.mu {
    font-family: 'Times New Roman', serif;
    font-style: italic;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
    color: white;
    padding: 8rem 2rem 6rem;
    text-align: center;
    margin-top: 60px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero .mu {
    color: var(--accent);
}

.tagline {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-features .feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.hero-features .icon {
    font-size: 1.25rem;
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.section-alt .feature-card {
    background: white;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-light);
}

/* Architecture Diagram */
.architecture-diagram {
    background: var(--code-bg);
    border-radius: var(--radius);
    padding: 2rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.diagram {
    color: var(--code-text);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* Subsystems */
.subsystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.subsystem {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.subsystem h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.subsystem ul {
    list-style: none;
    color: var(--text-light);
}

.subsystem li {
    padding: 0.25rem 0;
}

.subsystem li::before {
    content: "→ ";
    color: var(--primary);
}

/* Scenarios */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.scenario-card {
    position: relative;
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border);
    transition: border-color 0.2s, transform 0.2s;
}

.scenario-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.scenario-card-new {
    border-color: var(--success);
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.scenario-card-new::before {
    content: 'NEW';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--success);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.scenario-card-new:hover {
    border-color: #059669;
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.scenario-header h3 {
    margin: 0;
}

.scenario-nodes {
    background: var(--bg-alt);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.scenario-specs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.scenario-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.scenario-hardware {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hw-tag {
    background: var(--bg-alt);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Model Section */
.model-diagrams {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.diagram-type {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.diagram-type h4 {
    margin-bottom: 0.5rem;
}

.diagram-type p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Requirements Table */
.requirements-summary {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    overflow-x: auto;
}

.requirements-summary h3 {
    margin-bottom: 1rem;
}

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

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-alt);
    font-weight: 600;
}

.priority {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority.critical {
    background: #fef2f2;
    color: var(--danger);
}

.priority.high {
    background: #fef3c7;
    color: #b45309;
}

/* Getting Started Options */
.getting-started-options {
    max-width: 900px;
    margin: 0 auto;
}

.option-recommended {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.option-recommended > h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.option-recommended > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.option-manual {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.option-manual summary {
    cursor: pointer;
    list-style: none;
}

.option-manual summary::-webkit-details-marker {
    display: none;
}

.option-manual summary h3 {
    display: inline;
    color: var(--text-light);
    font-size: 1.1rem;
}

.option-manual summary::before {
    content: "▶ ";
    color: var(--text-light);
}

.option-manual[open] summary::before {
    content: "▼ ";
}

.option-manual > p {
    color: var(--text-light);
    margin: 1rem 0;
}

.option-manual .steps {
    margin-top: 1.5rem;
}

/* Button secondary for non-hero sections */
.section .btn-secondary {
    color: var(--primary);
    border-color: var(--primary);
}

.section .btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Steps */
.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.step-content code {
    display: block;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Ingestion Methods */
.ingestion-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.method {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
}

.method-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.method h3 {
    margin-bottom: 0.5rem;
}

.method > p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.method ul {
    text-align: left;
    list-style: none;
    color: var(--text-light);
}

.method li {
    padding: 0.25rem 0;
}

.method li::before {
    content: "✓ ";
    color: var(--success);
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-brand .logo {
    font-size: 1.5rem;
}

.footer-brand .mu {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    color: #64748b;
    font-size: 0.875rem;
}

/* Active nav link */
.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Hero Small (for sub-pages) */
.hero-small {
    padding: 6rem 2rem 4rem;
}

.hero-small h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-left: 4px solid var(--primary);
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.highlight-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.highlight-card p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Data Tables */
.data-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 1.5rem 0;
}

.data-table th {
    background: var(--bg-dark);
    color: white;
}

.comparison-table .highlight-col {
    background: #eff6ff;
}

.comparison-table .check {
    color: var(--success);
    font-weight: 600;
}

/* Callouts */
.callout {
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.callout-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.callout ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

/* Principles Grid */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.principle {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.principle-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.principle h4 {
    margin-bottom: 0.25rem;
}

.principle p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Architecture ASCII */
.architecture-ascii {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 1.5rem 0;
}

/* Network Badges */
.network-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.network-admin {
    background: #fff7ed;
    color: #c2410c;
}

.network-user {
    background: #eff6ff;
    color: #1d4ed8;
}

.network-monitor {
    background: #f0fdf4;
    color: #15803d;
}

/* Use Cases Grid */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.use-case-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}

.use-case-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.use-case-card h3 {
    margin-bottom: 0.25rem;
}

.use-case-subtitle {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.use-case-card ul {
    list-style: none;
    margin-bottom: 1rem;
}

.use-case-card li {
    padding: 0.25rem 0;
    color: var(--text-light);
}

.use-case-card li::before {
    content: "• ";
    color: var(--primary);
}

.use-case-config {
    background: var(--bg-alt);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
}

/* Business Models */
.business-models {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.business-model {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.business-model h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.business-model ul {
    list-style: none;
}

.business-model li {
    padding: 0.25rem 0;
    color: var(--text-light);
}

.business-model li::before {
    content: "→ ";
    color: var(--primary);
}

/* Risk Badges */
.risk-low {
    background: #f0fdf4;
    color: #15803d;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.risk-medium {
    background: #fef3c7;
    color: #b45309;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.risk-high {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.risk-critical {
    background: #7f1d1d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.metric-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Next Steps */
.next-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.next-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 180px;
}

.step-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.next-step h4 {
    margin-bottom: 0.125rem;
    font-size: 0.95rem;
}

.next-step p {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.cta-box h3 {
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer tagline */
.footer-tagline {
    color: #94a3b8;
    font-style: italic;
}

/* Roadmap Styles */
.phase-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.phase-complete {
    background: #f0fdf4;
    color: #15803d;
}

.phase-q1 {
    background: #eff6ff;
    color: #1d4ed8;
}

.phase-q2 {
    background: #fef3c7;
    color: #b45309;
}

.phase-q3 {
    background: #fce7f3;
    color: #be185d;
}

.phase-q4 {
    background: #f3e8ff;
    color: #7c3aed;
}

.phase-future {
    background: var(--bg-alt);
    color: var(--text-light);
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.roadmap-category {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.roadmap-category h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.checklist {
    list-style: none;
}

.checklist li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
}

.checklist li::before {
    content: "○";
    position: absolute;
    left: 0;
    color: var(--text-light);
}

.checklist li.done::before {
    content: "✓";
    color: var(--success);
}

/* Contribute Options */
.contribute-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contribute-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.contribute-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contribute-card p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.contribute-card code {
    background: var(--bg-alt);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.last-updated {
    text-align: center;
    color: var(--text-light);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.125rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 3rem 0;
    }

    .section h2 {
        font-size: 2rem;
    }

    .step {
        flex-direction: column;
    }

    .diagram {
        font-size: 0.7rem;
    }
}
