/* ============================================
   cornOS Platform Page — Additional Styles
   ============================================ */

/* --- Hero overrides --- */
.cornos-hero .hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
}

.hero-subtitle-large {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 650px;
    margin-bottom: 3rem;
}

.cornos-stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.cornos-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cornos-stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.cornos-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Dark section variant --- */
.section-dark {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* --- Overview --- */
.overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: start;
}

.overview-text p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.overview-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.highlight {
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.highlight h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--accent);
}

.highlight p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Architecture diagram --- */
.arch-diagram {
    margin-bottom: 3.5rem;
}

.arch-tree {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem 2.5rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.arch-tree code {
    font-family: inherit;
}

.arch-h {
    color: var(--accent);
    font-weight: 600;
}

.arch-c {
    color: var(--text-muted);
}

/* --- Flow horizontal --- */
.arch-flow {
    margin-top: 3rem;
}

.flow-horizontal {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 2rem;
}

.flow-h-step {
    flex: 1;
    text-align: center;
    padding: 0 0.75rem;
}

.flow-h-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-glow-strong);
    border: 1px solid var(--accent-dim);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.flow-h-step h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.flow-h-step p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.flow-h-arrow {
    color: var(--accent);
    opacity: 0.4;
    margin-top: 0.3rem;
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

/* --- Dream Engine --- */
.dream-melatonin {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2.5rem;
    margin-bottom: 3rem;
}

.dream-melatonin h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dream-melatonin > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.melatonin-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.mel-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    flex: 1;
    min-width: 220px;
}

.mel-trigger {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mel-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.mel-neg {
    color: #e07a5f;
}

.mel-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Dream types */
.dream-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dream-type {
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.dream-type:hover {
    border-color: var(--border-strong);
    box-shadow: 0 0 30px var(--accent-glow);
}

.dream-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dream-stage {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.dream-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.dream-cost {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.dream-body {
    padding: 0.75rem 1.5rem 1rem;
}

.dream-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.dream-specs {
    display: flex;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.dream-bio {
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.dream-bio strong {
    color: var(--text-secondary);
}

/* Dream output */
.dream-output {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2.5rem;
}

.dream-output h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dream-output > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    white-space: nowrap;
}

.code-block-wide {
    padding: 2rem;
}

.code-header {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* --- Channels --- */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.channel-card {
    padding: 1.5rem;
    border-radius: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    transition: border-color 0.3s var(--ease);
}

.channel-card:hover {
    border-color: var(--border-strong);
}

.channel-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.channel-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.status-live {
    color: var(--accent);
}

.status-planned {
    color: var(--text-muted);
}

.channel-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Trust model */
.trust-model {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2.5rem;
}

.trust-model > h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.trust-model > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.trust-tiers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.trust-tier {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.trust-level {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.trust-blocked { background: rgba(224, 122, 95, 0.15); color: #e07a5f; border: 1px solid rgba(224, 122, 95, 0.3); }
.trust-chat { background: rgba(200, 180, 100, 0.15); color: #c8b464; border: 1px solid rgba(200, 180, 100, 0.3); }
.trust-limited { background: rgba(100, 180, 200, 0.15); color: #64b4c8; border: 1px solid rgba(100, 180, 200, 0.3); }
.trust-trusted { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent-dim); }
.trust-owner { background: rgba(180, 130, 220, 0.15); color: #b482dc; border: 1px solid rgba(180, 130, 220, 0.3); }

.trust-tier p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.trust-arrow {
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 1.2rem;
}

/* --- Tools --- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.tool-group {
    padding: 1.5rem;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.tool-group h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tool-group ul {
    list-style: none;
}

.tool-group li {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border);
}

.tool-group li:last-child {
    border-bottom: none;
}

.tool-group-mcp {
    grid-column: span 2;
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.tool-group-mcp ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}

/* --- Intelligence --- */
.intel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.intel-card {
    padding: 2rem;
    border-radius: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    transition: border-color 0.3s var(--ease);
}

.intel-card:hover {
    border-color: var(--border-strong);
}

.intel-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.intel-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.intel-card strong {
    color: var(--text-primary);
}

.intel-card code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--bg-primary);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

/* --- Plan demo --- */
.plan-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.plan-context {
    grid-column: 1 / -1;
}

.plan-context p {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 700px;
}

.plan-code {
    grid-column: 1 / -1;
}

.plan-details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.plan-detail {
    padding: 1.25rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.plan-detail h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.plan-detail p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Tech grid --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.tech-item {
    padding: 1.5rem;
    border-radius: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
}

.tech-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.tech-item p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tool-group-mcp {
        grid-column: span 2;
    }

    .intel-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .dream-types-grid {
        grid-template-columns: 1fr;
    }

    .flow-horizontal {
        flex-direction: column;
        align-items: center;
    }

    .flow-h-arrow {
        transform: rotate(90deg);
    }

    .tools-grid,
    .intel-grid,
    .tech-grid,
    .channels-grid {
        grid-template-columns: 1fr;
    }

    .tool-group-mcp {
        grid-column: span 1;
    }

    .tool-group-mcp ul {
        grid-template-columns: 1fr;
    }

    .plan-details {
        grid-template-columns: 1fr;
    }

    .trust-tiers {
        flex-direction: column;
        align-items: stretch;
    }

    .trust-arrow {
        transform: rotate(90deg);
        text-align: center;
    }

    .cornos-stats-row {
        gap: 1rem;
    }

    .cornos-stat-value {
        font-size: 1.2rem;
    }

    .melatonin-rates {
        flex-direction: column;
    }
}
