/* ═══════════════════════════════════════════════════════════════
   IOTWIZZ — AI ARCHITECTURE PAGE STYLES
   Circuit Breaker design · AI-specific components
   ═══════════════════════════════════════════════════════════════ */

/* ═══ AI HERO ═══ */
.hero--ai {
    min-height: 90vh;
}

.hero--ai .hero__title-line--1 {
    background: linear-gradient(135deg, var(--n-purple), var(--n-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ═══ ARCHITECTURE BLOCKS ═══ */
.arch-block {
    background: var(--glass);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top gradient line */
.arch-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--n-green), var(--n-cyan), transparent);
    opacity: 0.5;
}

.arch-block:hover {
    border-color: var(--border-lit);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 255, 157, 0.05);
}

/* ─── Block Header ─── */
.arch-block__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.arch-block__icon {
    font-size: 36px;
    filter: drop-shadow(0 0 12px rgba(0, 255, 157, 0.25));
    flex-shrink: 0;
}

.arch-block__info {
    flex: 1;
    min-width: 200px;
}

.arch-block__name {
    font-family: var(--f-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--n-green);
    text-shadow: 0 0 12px rgba(0, 255, 157, 0.2);
    letter-spacing: -0.5px;
}

.arch-block__tagline {
    font-size: 12px;
    color: var(--n-cyan);
    margin-top: 2px;
}

/* ─── Novelty Badge ─── */
.arch-block__badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.arch-block__badge::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: badgeShine 3s ease-in-out infinite;
}

@keyframes badgeShine {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}

.arch-block__badge--novel {
    background: rgba(0, 255, 157, 0.1);
    color: var(--n-green);
    border: 1px solid rgba(0, 255, 157, 0.3);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.1);
}

.arch-block__badge--partial {
    background: rgba(168, 85, 247, 0.1);
    color: var(--n-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.1);
}

/* ─── Problem / Solution ─── */
.arch-block__problem,
.arch-block__solution {
    margin-bottom: 20px;
    padding: 18px 22px;
    border-radius: 12px;
    border-left: 3px solid;
}

.arch-block__problem {
    background: rgba(255, 71, 87, 0.04);
    border-left-color: var(--n-red);
}

.arch-block__solution {
    background: rgba(0, 255, 157, 0.04);
    border-left-color: var(--n-green);
}

.arch-block__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.arch-block__problem .arch-block__label {
    color: var(--n-red);
}

.arch-block__solution .arch-block__label {
    color: var(--n-green);
}

.arch-block__problem p,
.arch-block__solution p {
    font-size: 13px;
    color: var(--t-secondary);
    line-height: 1.8;
}

/* ─── Diagram ─── */
.arch-diagram {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.arch-diagram::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--n-green), var(--n-cyan), transparent);
    opacity: 0.6;
    z-index: 1;
}

.ascii-arch {
    font-family: var(--f-mono);
    font-size: 11px;
    line-height: 1.5;
    color: var(--n-green);
    background: rgba(5, 8, 16, 0.7);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    white-space: pre;
    overflow-x: auto;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.15);
    backdrop-filter: blur(4px);
}

/* Scanline overlay inside diagrams */
.ascii-arch::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg,
        transparent, transparent 3px,
        rgba(0, 255, 157, 0.012) 3px, rgba(0, 255, 157, 0.012) 4px);
    pointer-events: none;
}

.arch-diagram--full .ascii-arch {
    font-size: 10px;
}

/* ─── Advantages ─── */
.arch-block__advantages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    margin: 20px 0;
}

.adv {
    padding: 10px 16px;
    background: rgba(0, 255, 157, 0.04);
    border: 1px solid rgba(0, 255, 157, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: var(--t-secondary);
    transition: all 0.2s ease;
}

.adv:hover {
    border-color: rgba(0, 255, 157, 0.3);
    color: var(--n-green);
    transform: translateX(4px);
}

/* ─── Whitepaper Link ─── */
.wp-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(0, 255, 157, 0.06);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 8px;
    color: var(--n-green);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.wp-link::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.12), transparent);
    transition: left 0.4s ease;
}

.wp-link:hover::before { left: 100%; }

.wp-link:hover {
    background: rgba(0, 255, 157, 0.12);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
    transform: translateY(-2px);
}

/* ═══ WORKFLOW FEATURES ═══ */
.workflow-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.wf-feature {
    background: var(--glass);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
}

.wf-feature:hover {
    border-color: var(--border-lit);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.wf-feature__icon {
    font-size: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0.2));
}

.wf-feature__text {
    font-size: 13px;
    color: var(--t-secondary);
    line-height: 1.7;
}

.wf-feature__text strong {
    color: var(--n-green);
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

/* ═══ TEST CASES ═══ */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
}

.test-card {
    background: var(--glass);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.test-card:hover {
    border-color: var(--border-lit);
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), 0 0 20px rgba(0, 255, 157, 0.05);
}

.test-card--summary {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.06), rgba(0, 212, 255, 0.03));
    border-color: rgba(0, 255, 157, 0.15);
}

.test-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(13, 19, 34, 0.3);
}

.test-card__icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0.2));
}

.test-card__title {
    font-family: var(--f-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--t-primary);
}

.test-card__body {
    padding: 16px 22px;
    flex: 1;
}

.test-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.test-row:last-of-type {
    border-bottom: none;
}

.test-row__id {
    font-size: 10px;
    font-weight: 700;
    color: var(--n-purple);
    padding: 2px 8px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 4px;
    flex-shrink: 0;
}

.test-row__name {
    font-size: 12px;
    color: var(--t-secondary);
    flex: 1;
}

.test-pass {
    font-size: 10px;
    font-weight: 700;
    color: var(--n-green);
    padding: 2px 8px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0, 255, 157, 0.1);
    flex-shrink: 0;
}

.test-row__detail {
    font-size: 11px;
    color: var(--t-muted);
    padding: 4px 0 12px 0;
    line-height: 1.6;
}

.test-card__footer {
    padding: 12px 22px;
    font-size: 11px;
    color: var(--n-green);
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 255, 157, 0.03);
    text-align: center;
    font-weight: 600;
}

.test-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    color: var(--t-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.test-summary-row span:last-child {
    color: var(--n-green);
    font-weight: 600;
}

.test-summary-row--total {
    border-top: 2px solid rgba(0, 255, 157, 0.2);
    border-bottom: none;
    margin-top: 8px;
    padding-top: 10px;
    font-weight: 700;
    font-size: 14px;
}

.test-summary-row--total span:last-child {
    font-size: 16px;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.3);
}

/* ═══ WHITEPAPER CARDS ═══ */
.wp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.wp-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: var(--glass);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Top gradient line */
.wp-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--n-purple), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Scanning line */
.wp-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 1px;
    background: var(--grad-trace);
    transition: left 0.6s ease;
}

.wp-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-lit);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3), 0 0 20px rgba(168, 85, 247, 0.08);
}

.wp-card:hover::before { opacity: 1; }
.wp-card:hover::after { left: 160%; }

.wp-card__icon {
    font-size: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.2));
    transition: transform 0.3s ease;
}

.wp-card:hover .wp-card__icon {
    transform: scale(1.15);
}

.wp-card__body {
    flex: 1;
    min-width: 0;
}

.wp-card__category {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--n-purple);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.wp-card__title {
    font-family: var(--f-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--t-primary);
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.wp-card:hover .wp-card__title {
    color: var(--n-green);
}

.wp-card__subtitle {
    font-size: 11px;
    color: var(--t-muted);
    line-height: 1.5;
}

.wp-card__badge {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.wp-card__badge--novel {
    background: rgba(0, 255, 157, 0.1);
    color: var(--n-green);
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.wp-card__badge--partial {
    background: rgba(168, 85, 247, 0.1);
    color: var(--n-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.wp-card__arrow {
    font-size: 18px;
    color: var(--n-green);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.wp-card:hover .wp-card__arrow {
    transform: translateX(6px);
}

/* ═══ WHITEPAPER READER ═══ */
.wp-reader {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 32px 60px;
    position: relative;
    z-index: 1;
}

.wp-reader__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.wp-reader__back {
    color: var(--n-cyan);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.wp-reader__back:hover {
    color: var(--n-green);
}

.wp-reader__category {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--n-purple);
    padding: 4px 12px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 4px;
}

.wp-reader__article {
    background: var(--glass);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Markdown rendered content */
.wp-reader__article h1,
.wp-reader__article .wp-title {
    font-family: var(--f-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--n-green);
    text-shadow: 0 0 12px rgba(0, 255, 157, 0.15);
    margin: 32px 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 255, 157, 0.1);
    line-height: 1.3;
}

.wp-reader__article h2 {
    font-family: var(--f-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--n-cyan);
    margin: 28px 0 12px;
    line-height: 1.3;
}

.wp-reader__article h3 {
    font-family: var(--f-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--n-purple);
    margin: 20px 0 8px;
}

.wp-reader__article h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--n-green);
    margin: 16px 0 6px;
}

.wp-reader__article p {
    font-size: 14px;
    color: var(--t-secondary);
    line-height: 1.8;
    margin: 12px 0;
}

.wp-reader__article strong {
    color: var(--n-green);
    font-weight: 600;
}

.wp-reader__article em {
    color: var(--n-cyan);
}

.wp-reader__article ul {
    padding-left: 24px;
    margin: 12px 0;
}

.wp-reader__article li {
    font-size: 13px;
    color: var(--t-secondary);
    margin: 6px 0;
    list-style: disc;
    line-height: 1.7;
}

.wp-reader__article .wp-codeblock {
    background: rgba(5, 8, 16, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    overflow-x: auto;
    margin: 18px 0;
    font-size: 12px;
    color: var(--n-green);
    text-shadow: 0 0 6px rgba(0, 255, 157, 0.1);
    line-height: 1.5;
}

.wp-reader__article .wp-inline-code {
    background: rgba(13, 19, 34, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--n-cyan);
}

.wp-reader__article .wp-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

.wp-reader__article table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 12px;
}

.wp-reader__article table th,
.wp-reader__article table td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
    color: var(--t-secondary);
}

.wp-reader__article table th {
    background: rgba(13, 19, 34, 0.5);
    color: var(--n-cyan);
    font-weight: 600;
}

.wp-reader__article a {
    color: var(--n-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-reader__article a:hover {
    color: var(--n-green);
    text-decoration: underline;
}

.wp-reader__footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .arch-block {
        padding: 20px;
        border-radius: 14px;
    }

    .arch-block__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .arch-block__name {
        font-size: 20px;
    }

    .ascii-arch {
        font-size: 8px;
        padding: 14px;
    }

    .arch-diagram--full .ascii-arch {
        font-size: 7px;
    }

    .test-grid,
    .wp-grid {
        grid-template-columns: 1fr;
    }

    .workflow-features {
        grid-template-columns: 1fr;
    }

    .wp-reader {
        padding: 80px 16px 40px;
    }

    .wp-reader__article {
        padding: 20px;
        border-radius: 14px;
    }

    .wp-reader__article h1,
    .wp-reader__article .wp-title {
        font-size: 20px;
    }

    .wp-reader__article h2 {
        font-size: 17px;
    }

    .arch-block__advantages {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ascii-arch {
        font-size: 7px;
    }
}