/* ============================================================
   ARCHITECTURE PAGE — dark technical deep-dive
   ============================================================ */

/* ------ Color tokens ------ */
:root {
    --arch-bg:       #0a0d1a;
    --arch-panel:    #111827;
    --arch-panel-2:  #192035;
    --arch-line:     rgba(255,255,255,0.09);
    --arch-text:     #ffffff;
    --arch-muted:    rgba(255,255,255,0.60);
    --arch-dim:      rgba(255,255,255,0.35);
    --arch-accent:   #7cf5c5;
    --arch-accent-2: #9d8cff;
    --arch-warn:     #ff8a9a;
    --arch-c1: #7cf5c5;
    --arch-c2: #9d8cff;
    --arch-c3: #ffb86c;
    --arch-c4: #ff7ab6;
    --arch-c5: #6ec6ff;
    --arch-c6: #ffd966;
}

/* ------ Page base — flat, no gradients ------ */
body.arch-page {
    background: var(--arch-bg);
    color: var(--arch-text);
    min-height: 100vh;
}

/* Subtle dot grid — texture only, not a gradient */
body.arch-page .arch-grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ------ Header overrides ------ */
body.arch-page #header {
    border-bottom-color: rgba(255,255,255,0.06);
    background: rgba(10, 13, 26, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.arch-page #header nav a,
body.arch-page #header nav button {
    color: var(--arch-text);
}

body.arch-page #header nav a:hover { opacity: 0.7; }

body.arch-page .logo-mark--dark  { display: none !important; }
body.arch-page .logo-mark--light { display: inline !important; }

body.arch-page .cta-btn {
    background: #ffffff;
    color: #0a0d1a;
    border-color: #ffffff;
}

body.arch-page .cta-btn:hover {
    background: rgba(255,255,255,0.88);
    border-color: rgba(255,255,255,0.88);
}

body.arch-page .lang-switcher-menu .lang-switcher-link { color: rgba(10,10,10,0.7); }

body.arch-page .lang-switcher-menu .lang-switcher-link:hover,
body.arch-page .lang-switcher-menu .lang-switcher-link.is-current { color: rgb(10,10,10); }

body.arch-page .cta-btn-secondary {
    color: var(--arch-muted);
    border-color: var(--arch-line);
}

body.arch-page .cta-btn-secondary:hover {
    color: var(--arch-text);
    border-color: rgba(255,255,255,0.2);
}

body.arch-page .menu-toggle span { background: var(--arch-text); }

/* ------ Shell — matches site container ------ */
.arch-shell {
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 48px;
}

/* ------ Hero ------ */
.arch-hero {
    position: relative;
    z-index: 1;
    padding: 160px 0 96px;
}

.arch-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--arch-muted);
    text-decoration: none;
    margin-bottom: 48px;
    transition: color 0.2s ease;
}

.arch-back-link:hover { color: var(--arch-text); }

/* Eyebrow — 12px label, no line */
.arch-eyebrow {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--arch-muted);
    margin-bottom: 24px;
}

/* H1 — matches case-hero exactly */
.arch-hero h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 88px;
    font-weight: 300;
    line-height: 88px;
    letter-spacing: -1.76px;
    margin: 0 0 32px;
    max-width: 1000px;
    color: var(--arch-text);
}

/* Dek — matches article-lede */
.arch-dek {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 22px;
    line-height: 30px;
    color: var(--arch-muted);
    max-width: 720px;
    margin: 0;
    font-weight: 300;
}

/* ------ Comparison section — no card frames ------ */
.arch-comparison-wrap {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--arch-line);
    padding: 80px 0 96px;
}

.arch-comparison {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ------ Assumption — single column, LLM box full width ------ */
.assumption {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Label — 12px/1px, red/pink to mirror green "reality" label */
.assumption-label {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--arch-warn);
    margin-bottom: 16px;
    font-weight: 500;
}

/* Assumption heading — Instrument Serif, mirrors reality h2 */
.assumption h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 44px;
    font-weight: 300;
    letter-spacing: -0.5px;
    line-height: 1.05;
    margin: 0 0 32px;
    color: var(--arch-text);
    max-width: 720px;
}

/* Strawman — full-width, flat panel, square corners */
.arch-strawman {
    border: 1px solid var(--arch-line);
    padding: 24px;
    background: var(--arch-panel);
    margin-bottom: 24px;
}

.arch-strawman-browser {
    height: 8px;
    width: 220px;
    max-width: 30%;
    background: rgba(255,255,255,0.12);
    margin-bottom: 16px;
}

.arch-strawman-chat {
    border: 1px solid var(--arch-line);
    padding: 36px 20px;
    text-align: center;
    color: var(--arch-muted);
    font-size: 16px;
    background: var(--arch-panel-2);
}

.arch-strawman-chat strong {
    color: var(--arch-text);
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 16px;
}

/* Caption — plain muted text */
.assumption-caption {
    color: var(--arch-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

/* VS divider — symmetric gap above and below, sits between assumption and reality */
.arch-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 88px 0;
}

.arch-vs::before,
.arch-vs::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
}

.arch-vs::before {
    border-bottom: 13px solid var(--arch-warn);
    opacity: 0.85;
}

.arch-vs::after {
    border-top: 13px solid var(--arch-warn);
    opacity: 0.85;
}

.arch-vs span {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--arch-text);
    padding: 14px 36px;
    background: rgba(255, 138, 154, 0.16);
    border: 1px solid rgba(255, 138, 154, 0.45);
    border-radius: 999px;
}

/* ------ Reality section — no card/frame ------ */
.reality {
    position: relative;
    z-index: 1;
    padding-top: 0;
}

/* Reality label */
.reality-label {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--arch-accent);
    margin-bottom: 16px;
    font-weight: 500;
}

/* Reality H2 — Instrument Serif, prominent section heading */
.reality h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 44px;
    font-weight: 300;
    letter-spacing: -0.5px;
    line-height: 1.05;
    margin: 0 0 64px;
    color: var(--arch-text);
    max-width: 760px;
}

/* ------ Layers — inverted case-section-inner layout, connected by chevron nodes ------ */
.arch-layer {
    position: relative;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0 64px;
    align-items: start;
    padding: 56px 0;
    border-top: 1px solid var(--arch-line);
}

/* Layer connector — small downward chevron centered on the hairline,
   ties consecutive layers together as a flow */
.arch-layer:not(:first-of-type)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.45);
}

/* Layer label — left column, 12px/1px matches site */
.arch-layer-label {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--arch-muted);
    font-weight: 500;
    padding-top: 2px;
    line-height: 1.4;
}

/* No horizontal rule after label — it's a column now */
.arch-layer-label::after { display: none; }

/* Pipes between layers — hidden, layers have border-top instead */
.arch-pipe { display: none; }

/* ------ User roles — plain dots + text, no pills ------ */
.arch-users {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.arch-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--arch-text);
}

.arch-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--arch-accent);
    flex-shrink: 0;
}

/* ------ Orchestrator — flat panel, accent border ------ */
.arch-orchestrator {
    background: var(--arch-panel);
    border: 1px solid rgba(157,140,255,0.22);
    padding: 28px 32px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.arch-orch-badge {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    background: var(--arch-panel-2);
    border: 1px solid var(--arch-line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--arch-accent-2);
    font-size: 28px;
    line-height: 1;
}

.arch-orch-badge i { display: block; }

.arch-orch-text { flex: 1; }

/* Orchestrator tag — 12px/1px */
.arch-orch-tag {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--arch-accent-2);
    font-weight: 500;
    margin-bottom: 8px;
}

.arch-orch-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--arch-text);
    line-height: 1.35;
    margin-bottom: 8px;
}

.arch-orch-desc {
    font-size: 16px;
    color: var(--arch-muted);
    line-height: 1.55;
}

/* ------ Agent groups — flat, inverted site card style ------ */
.arch-groups {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--arch-line);
    border: 1px solid var(--arch-line);
}

@media (max-width: 1100px) { .arch-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .arch-groups { grid-template-columns: 1fr; } }

.arch-group {
    background: var(--arch-panel);
    padding: 24px 28px;
    border-top: 2px solid transparent;
    transition: background 0.15s ease;
}

.arch-group:hover { background: var(--arch-panel-2); }

.arch-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.arch-group-swatch {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
}

.arch-group h3 {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: var(--arch-text);
    letter-spacing: -0.1px;
}

.arch-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.arch-group li {
    font-size: 13px;
    color: var(--arch-muted);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.arch-group li::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--arch-dim);
    margin-top: 6px;
    flex-shrink: 0;
}

.arch-hint { color: var(--arch-dim); }

/* Group color accents — solid top border */
.ag1 { border-top-color: var(--arch-c1); } .ag1 .arch-group-swatch { background: var(--arch-c1); }
.ag2 { border-top-color: var(--arch-c2); } .ag2 .arch-group-swatch { background: var(--arch-c2); }
.ag3 { border-top-color: var(--arch-c3); } .ag3 .arch-group-swatch { background: var(--arch-c3); }
.ag4 { border-top-color: var(--arch-c4); } .ag4 .arch-group-swatch { background: var(--arch-c4); }
.ag5 { border-top-color: var(--arch-c5); } .ag5 .arch-group-swatch { background: var(--arch-c5); }
.ag6 { border-top-color: var(--arch-c6); } .ag6 .arch-group-swatch { background: var(--arch-c6); }

/* ------ State/memory cards — flat, inline grid ------ */
.arch-state-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--arch-line);
    border: 1px solid var(--arch-line);
}

@media (max-width: 900px) { .arch-state-row { grid-template-columns: 1fr; } }

.arch-state-card {
    background: var(--arch-panel);
    padding: 24px 28px;
}

.arch-state-card .arch-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--arch-text);
    margin-bottom: 6px;
}

.arch-state-card .arch-card-body {
    font-size: 13px;
    color: var(--arch-muted);
    line-height: 1.55;
}

/* ------ Integration chips ------ */
.arch-integrations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.arch-integration {
    font-size: 13px;
    padding: 7px 14px;
    background: var(--arch-panel);
    border: 1px solid var(--arch-line);
    border-radius: 999px;
    color: var(--arch-muted);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.arch-integration-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--arch-accent);
    flex-shrink: 0;
}

/* ------ Stats footer ------ */
.arch-stats-wrap {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--arch-line);
    padding: 80px 0 112px;
}

.arch-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--arch-line);
    border: 1px solid var(--arch-line);
}

@media (max-width: 1100px) { .arch-stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .arch-stats-grid { grid-template-columns: 1fr; } }

.arch-stat {
    background: var(--arch-panel);
    padding: 28px 28px;
}

/* Stat number — solid accent color, no gradient */
.arch-stat strong {
    display: block;
    font-family: 'Instrument Serif', serif;
    font-size: 30px;
    font-weight: 300;
    letter-spacing: -0.4px;
    color: var(--arch-accent);
    margin-bottom: 8px;
    line-height: 1.1;
    white-space: nowrap;
}

.arch-stat span {
    font-size: 13px;
    color: var(--arch-muted);
    line-height: 1.4;
}

/* ------ Footer overrides ------ */
body.arch-page footer {
    border-top-color: var(--arch-line);
    background: var(--arch-panel);
    color: var(--arch-muted);
}

body.arch-page .footer-intro p { color: var(--arch-muted); }

body.arch-page .footer-nav-links a,
body.arch-page .footer-dot { color: var(--arch-dim); }

body.arch-page .footer-nav-links a:hover { color: var(--arch-text); }

body.arch-page .footer-link { color: var(--arch-muted); }

/* ------ Responsive ------ */
@media (max-width: 1200px) {
    .arch-hero h1 { font-size: 64px; letter-spacing: -1.28px; line-height: 66px; }
    .arch-dek { font-size: 20px; line-height: 28px; }
    .reality h2 { font-size: 36px; }
    .assumption h2 { font-size: 36px; }
    .arch-stat strong { font-size: 26px; }
}

@media (max-width: 900px) {
    .arch-layer {
        grid-template-columns: 1fr;
        gap: 16px 0;
    }
}

@media (max-width: 768px) {
    .arch-shell { padding: 0 20px; }
    .arch-hero { padding-top: 120px; padding-bottom: 56px; }
    .arch-hero h1 { font-size: 42px; letter-spacing: -0.84px; line-height: 46px; }
    .arch-dek { font-size: 18px; line-height: 26px; }
    .arch-comparison-wrap { padding-top: 56px; padding-bottom: 64px; }
    .reality h2 { font-size: 28px; margin-bottom: 40px; }
    .assumption { grid-template-columns: 1fr; padding-bottom: 48px; }
    .assumption h2 { font-size: 28px; }
    .assumption-label, .assumption h2, .arch-strawman,
    .assumption-caption, .arch-vs { grid-column: 1; grid-row: auto; }
    .arch-strawman { margin-top: 20px; }
    .arch-layer { padding: 40px 0; }
    .arch-users { gap: 18px; }
}

/* ------ Fade-in animation ------ */
@keyframes arch-rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.arch-hero,
.assumption,
.reality { animation: arch-rise 0.5s ease both; }

/* ------ Print ------ */
@media print {
    body.arch-page { background: white; color: black; }
    body.arch-page .arch-grid-bg { display: none; }
}
