/**
 * undoRT-home.css - Homepage and Architecture page styles
 * Version: 1.0.0
 * Used by: index.html, architecture.html only
 * Self-contained - does not depend on any other CSS
 */

/* ============================================================================
   ROOT VARIABLES
   ============================================================================ */
:root {
    --bg-main:        #030712;
    --bg-card:        #0b1329;
    --border:         #1c2541;
    --cyan:           #00b4d8;
    --lavender:       #b0a8cc;
    --text:           #f3f4f6;
    --text-muted:     #9ca3af;
    --green:          #34d399;
    --header-h:       56px;
    --font-family:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-main);
    color: var(--text);
    font-family: var(--font-family);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ============================================================================
   HEADER
   ============================================================================ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(3, 7, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--text);
    text-decoration: none;
}

.main-nav a.github-link {
    color: var(--lavender);
    border: 1px solid rgba(176, 168, 204, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    background-color: rgba(176, 168, 204, 0.03);
}

.main-nav a.github-link:hover {
    background-color: var(--lavender);
    color: var(--bg-main);
    text-decoration: none;
}

/* ============================================================================
   DROPDOWN
   ============================================================================ */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-family: inherit;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.dropdown-open .nav-dropdown-toggle {
    color: var(--text);
}

.nav-dropdown-toggle .chevron {
    width: 11px;
    height: 11px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-dropdown.dropdown-open .nav-dropdown-toggle .chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 1001;
    max-height: 80vh;
    overflow-y: auto;
}

.nav-dropdown.dropdown-open .nav-dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
}

.nav-dropdown-menu a strong {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
}

.nav-dropdown-menu a span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.nav-dropdown-menu a:hover strong {
    color: var(--cyan);
}

.nav-dropdown-soon {
    padding: 10px 12px 6px;
    font-size: 0.74rem;
    color: #4b5563;
    font-style: italic;
}

/* ============================================================================
   MOBILE TOGGLE
   ============================================================================ */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================================
   HERO
   ============================================================================ */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 150px 20px 60px 20px;
    position: relative;
}

.hero-content {
    max-width: 850px;
    text-align: center;
}

.badge {
    background: rgba(0, 180, 216, 0.1);
    color: var(--cyan);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 180, 216, 0.2);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 25px;
    background: linear-gradient(145deg, #ffffff 30%, var(--lavender) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--cyan);
    color: var(--bg-main);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 180, 216, 0.4);
    text-decoration: none;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ============================================================================
   DEV NOTICE
   ============================================================================ */
.dev-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto 20px auto;
    padding: 12px 20px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 0.88rem;
    color: #fcd34d;
    text-align: left;
}

.dev-notice a {
    color: #fcd34d;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================================
   FEATURES / ECOSYSTEM
   ============================================================================ */
.features-section {
    padding: 60px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* ============================================================================
   FEATURE CARDS
   ============================================================================ */
.feature-card {
    background-color: var(--bg-card);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 180, 216, 0.4);
    box-shadow: 0 10px 30px rgba(0, 180, 216, 0.05);
    text-decoration: none;
}

.feature-card.released {
    border-color: rgba(0, 180, 216, 0.25);
}

.feature-card.planned {
    opacity: 0.75;
}

.feature-card.planned:hover {
    opacity: 1;
}

.product-logo-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: flex-start;
    height: 35px;
    align-items: center;
}

.product-card-logo {
    height: 35px !important;
    width: auto !important;
    object-fit: contain;
}

.product-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.product-badge.core       { background-color: rgba(239, 68, 68, 0.1);   color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.product-badge.runtime    { background-color: rgba(16, 185, 129, 0.1);  color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.product-badge.fieldbus   { background-color: rgba(6, 182, 212, 0.1);   color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.2); }
.product-badge.compiler   { background-color: rgba(245, 158, 11, 0.1);  color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.product-badge.utility    { background-color: rgba(176, 168, 204, 0.1); color: #c3bcdf; border: 1px solid rgba(176, 168, 204, 0.2); }
.product-badge.foundation { background-color: rgba(0, 180, 216, 0.1);   color: var(--cyan); border: 1px solid rgba(0, 180, 216, 0.2); }

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.2s ease;
    flex: 1;
    margin-bottom: 20px;
}

.feature-card:hover p {
    color: var(--text);
}

/* ============================================================================
   STATUS PILLS (Home)
   ============================================================================ */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    align-self: flex-start;
    margin-top: auto;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-pill.available {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-pill.available::before {
    background: #34d399;
    box-shadow: 0 0 6px #34d399;
}

.status-pill.in-development {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-pill.in-development::before {
    background: #fbbf24;
    box-shadow: 0 0 6px #fbbf24;
}

/* ============================================================================
   ROADMAP
   ============================================================================ */
.roadmap-section {
    padding: 60px 5% 20px;
    max-width: 1300px;
    margin: 0 auto;
}

.roadmap-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.roadmap-section .section-subtitle {
    margin-bottom: 36px;
}

.roadmap-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 760px;
}

.roadmap-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.roadmap-item.active {
    border-color: rgba(52, 211, 153, 0.3);
}

.roadmap-item.next-release {
    border-color: rgba(243, 9, 255, 0.2);
}

.roadmap-step {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 3px;
    min-width: 60px;
}

.roadmap-item.active .roadmap-step {
    color: #34d399;
}

.roadmap-item.next-release .roadmap-step {
    color: #f975e9;
}

.roadmap-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.roadmap-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ============================================================================
   ARCHITECTURE PAGE
   ============================================================================ */
main {
    padding-top: 140px;
    padding-left: 5%;
    padding-right: 5%;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 80vh;
}

main h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 800;
}

.architecture-card {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.architecture-card h2 {
    margin-bottom: 20px;
    color: var(--cyan);
    font-size: 1.6rem;
}

.architecture-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.architecture-card p:last-child {
    margin-bottom: 0;
}

.shared-core-section {
    background: rgba(0, 180, 216, 0.05);
    border: 1px solid rgba(0, 180, 216, 0.15);
    border-radius: 12px;
    padding: 24px 28px;
    margin-top: 20px;
}

.shared-core-section h3 {
    color: var(--cyan);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.shared-core-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================================================================
   PIPELINE (Architecture)
   ============================================================================ */
.pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin: 30px 0 10px;
    row-gap: 12px;
}

.pipeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pipeline-box {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.pipeline-box.ready {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34d399;
}

.pipeline-box.planned {
    background: rgba(156, 163, 175, 0.07);
    border: 1px solid rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.pipeline-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pipeline-arrow {
    color: #1c2541;
    font-size: 1.4rem;
    padding: 0 6px;
    margin-bottom: 20px;
}

.pipeline-legend {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pipeline-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.green {
    background: #34d399;
}

.dot.gray {
    background: #4b5563;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
footer {
    text-align: center;
    padding: 60px 20px;
    color: #4b5563;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    margin-top: 100px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .features-grid { grid-template-columns: 1fr; }

    .nav-toggle { display: flex; }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(3, 7, 18, 0.97);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.nav-open {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav > a,
    .main-nav > .nav-dropdown > .nav-dropdown-toggle {
        width: 100%;
        padding: 16px 5%;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        justify-content: space-between;
    }

    .main-nav > a.github-link {
        margin: 14px 5% 16px;
        width: auto;
        text-align: center;
        justify-content: center;
        border-bottom: none;
    }

    .nav-dropdown { width: 100%; }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        max-height: 0;
        overflow: hidden;
        border: none;
        border-radius: 0;
        padding: 0;
        background: rgba(255, 255, 255, 0.02);
        box-shadow: none;
        transition: max-height 0.25s ease;
    }

    .nav-dropdown.dropdown-open .nav-dropdown-menu {
        max-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0 8px 5%;
    }

    .nav-dropdown-menu a,
    .nav-dropdown-soon {
        padding: 10px 5% 10px 0;
        border-bottom: none;
    }

    main {
        padding-top: 100px;
        padding-left: 4%;
        padding-right: 4%;
    }

    .architecture-card { padding: 24px; }

    .pipeline { justify-content: center; }
    .pipeline-arrow { font-size: 1rem; padding: 0 4px; }
    .pipeline-box { font-size: 0.75rem; padding: 6px 12px; }
    .pipeline-legend { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 420px) {
    .hero h1 { font-size: 2rem; }
    .tagline { font-size: 1rem; }
    .features-section h2 { font-size: 1.8rem; }
    .roadmap-item { flex-direction: column; gap: 8px; }
    .roadmap-step { min-width: auto; }
}

/* ============================================================================
   PRINT
   ============================================================================ */
@media print {
    body { background: #fff !important; color: #000 !important; }
    header { position: static; background: #fff !important; border-color: #ccc !important; }
    .main-nav { display: none !important; }
    .nav-toggle { display: none !important; }
    .hero { min-height: auto; padding: 40px 20px; }
    .hero h1 { background: none !important; -webkit-text-fill-color: #000 !important; color: #000 !important; }
    .badge { border: 1px solid #ccc !important; background: #f5f5f5 !important; color: #000 !important; }
    .btn { border: 1px solid #ccc !important; background: #f5f5f5 !important; color: #000 !important; box-shadow: none !important; transform: none !important; }
    .btn-primary { background: #f5f5f5 !important; color: #000 !important; }
    .btn-secondary { background: #f5f5f5 !important; color: #000 !important; }
    .feature-card { border: 1px solid #ccc !important; background: #f5f5f5 !important; }
    .feature-card:hover { transform: none !important; box-shadow: none !important; }
    .feature-card p { color: #000 !important; }
    .status-pill { border: 1px solid #ccc !important; background: #f5f5f5 !important; color: #000 !important; }
    .status-pill::before { display: none !important; }
    .roadmap-item { border: 1px solid #ccc !important; background: #f5f5f5 !important; }
    .roadmap-item.active { border-color: #ccc !important; }
    .architecture-card { border: 1px solid #ccc !important; background: #f5f5f5 !important; }
    .architecture-card p { color: #000 !important; }
    .pipeline-box { border: 1px solid #ccc !important; background: #f5f5f5 !important; color: #000 !important; }
    .pipeline-box.ready,
    .pipeline-box.planned { background: #f5f5f5 !important; border-color: #ccc !important; color: #000 !important; }
    .shared-core-section { border: 1px solid #ccc !important; background: #f5f5f5 !important; }
    .shared-core-section h3 { color: #000 !important; }
    .shared-core-section p { color: #000 !important; }
    .dev-notice { border: 1px solid #ccc !important; background: #f5f5f5 !important; color: #000 !important; }
    .dev-notice a { color: #000 !important; }
    .dot { display: none !important; }
    footer { margin-top: 40px !important; border-top: 1px solid #ccc !important; color: #666 !important; }
}