/* ============================================================
   Legion by IAXOV — Product Website Styles
   Design: Dark, confident, premium. No noise. Every element earns its space.
   ============================================================ */

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

:root {
    --bg-primary: #0A0A0F;
    --bg-surface: #0c0c16;
    --bg-elevated: #12122a;
    --bg-card: #161630;
    --text-primary: #eaeaf0;
    --text-secondary: #8a8aa0;
    --text-muted: #5a5a72;
    --accent: #C6168D;
    --accent-purple: #6c3fc5;
    --accent-gold: #D4AF37;
    --accent-blue: #3a7bd5;
    --border: rgba(255,255,255,0.06);
    --border-accent: rgba(185,58,136,0.25);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-w: 1200px;
    --max-w-narrow: 800px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dim { color: var(--text-muted); font-weight: 400; }

/* ============================================================
   NAV
   ============================================================ */

nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 0 2rem; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(10,10,15,0.88); backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}
.nav-logo {
    font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em;
    color: var(--text-primary); text-decoration: none;
    display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo-img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.875rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
    padding: 0.5rem 1.25rem !important; background: var(--accent);
    color: #fff !important; border-radius: 6px; font-weight: 600; transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.9; }
.nav-mobile {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 4px; padding: 8px;
}
.nav-mobile span { display: block; width: 20px; height: 2px; background: var(--text-primary); }

@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-primary); padding: 1rem 2rem; border-bottom: 1px solid var(--border); gap: 1rem; }
    .nav-links.open { display: flex; }
    .nav-mobile { display: flex; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 8rem 2rem 4rem; position: relative; overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: var(--max-w-narrow); }
.hero-glow {
    position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
    width: 900px; height: 900px; pointer-events: none;
    background: radial-gradient(ellipse, rgba(185,58,136,0.07) 0%, rgba(108,63,197,0.03) 40%, transparent 70%);
}
.hero-eyebrow {
    font-size: 0.8125rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--accent); margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 4.25rem); font-weight: 800;
    letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1.5rem;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--accent-purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
    font-size: 1.1875rem; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* BUTTONS */

.btn-primary {
    display: inline-block; padding: 0.875rem 2rem; background: var(--accent);
    color: #fff; border: none; border-radius: 8px; font-size: 1rem;
    font-weight: 600; cursor: pointer; text-decoration: none; transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary.btn-lg { padding: 1rem 2.5rem; font-size: 1.0625rem; }
.btn-secondary {
    display: inline-block; padding: 0.875rem 2rem; background: transparent;
    color: var(--text-primary); border: 1px solid var(--border);
    border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: var(--text-muted); background: var(--bg-surface); }

/* ============================================================
   TRUST BAR
   ============================================================ */

.trust-bar {
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}
.trust-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 2rem;
    display: flex; align-items: center; justify-content: center; gap: 3rem;
    flex-wrap: wrap;
}
.trust-item { text-align: center; }
.trust-value {
    display: block; font-size: 1.75rem; font-weight: 700;
    letter-spacing: -0.02em; color: var(--text-primary);
}
.trust-label { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
.trust-divider { width: 1px; height: 40px; background: var(--border); }

@media (max-width: 640px) {
    .trust-inner { gap: 1.5rem; }
    .trust-divider { display: none; }
    .trust-item { flex: 1 1 40%; }
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */

.content-section {
    padding: 6rem 2rem; max-width: var(--max-w); margin: 0 auto;
}
.dark-section {
    max-width: none; background: var(--bg-surface);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.dark-section > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; }

.section-label {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--accent); margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700;
    letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 1rem;
}
.section-desc {
    font-size: 1.0625rem; color: var(--text-secondary);
    max-width: 640px; line-height: 1.7; margin-bottom: 3rem;
}
.body-text {
    font-size: 1.0625rem; color: var(--text-secondary); line-height: 1.7;
}

/* ============================================================
   STACK SECTION (architecture diagram + CEO quote)
   ============================================================ */

.stack-section {
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}
.stack-layout {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center;
}
.stack-visual { text-align: center; }
.stack-img {
    width: 100%; max-width: 640px; height: auto; border-radius: 8px;
    cursor: zoom-in; transition: opacity 0.2s;
}
.stack-img:hover { opacity: 0.9; }

/* Lightbox overlay */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
    align-items: center; justify-content: center; cursor: zoom-out;
    padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 95vw; max-height: 92vh; width: auto; height: auto;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: none; border: none; color: var(--text-secondary);
    font-size: 2rem; cursor: pointer; line-height: 1; padding: 0.5rem;
}
.lightbox-close:hover { color: var(--text-primary); }
.stack-quote blockquote {
    border-left: 3px solid var(--accent); padding-left: 1.5rem; margin-bottom: 2rem;
}
.stack-quote blockquote p {
    font-size: 1.25rem; font-weight: 600; line-height: 1.5;
    color: var(--text-primary); letter-spacing: -0.01em;
}
.stack-quote blockquote footer {
    margin-top: 1rem; display: flex; flex-direction: column; gap: 0.125rem;
}
.stack-quote blockquote footer strong {
    font-size: 0.9375rem; color: var(--text-primary);
}
.stack-quote blockquote footer span {
    font-size: 0.8125rem; color: var(--text-muted);
}
.stack-context {
    font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.7;
}

@media (max-width: 900px) {
    .stack-layout { grid-template-columns: 1fr; gap: 2rem; }
    .stack-img { max-width: 100%; }
}

.section-grid { display: grid; gap: 3rem; }
.section-grid.two-col { grid-template-columns: 1fr 1fr; }

@media (max-width: 768px) {
    .section-grid.two-col { grid-template-columns: 1fr; }
}

/* ============================================================
   PILLARS (Three Governance Planes)
   ============================================================ */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.pillar {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 2.5rem 2rem; position: relative; overflow: hidden;
}
.pillar-accent {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.pillar-accent.magenta { background: var(--accent); }
.pillar-accent.purple { background: var(--accent-purple); }
.pillar-accent.gold { background: var(--accent-gold); }
.pillar-num {
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
    letter-spacing: 0.05em; margin-bottom: 1rem;
}
.pillar h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.pillar-subtitle {
    font-size: 0.875rem; color: var(--accent); font-weight: 500; margin-bottom: 1rem;
}
.pillar p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.65; }

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

/* ============================================================
   CAPABILITY GRID
   ============================================================ */

.capability-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden;
}
.capability-card {
    background: var(--bg-primary); padding: 2.5rem;
}
.capability-card h3 {
    font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.75rem;
}
.capability-card p {
    color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.65;
}

@media (max-width: 900px) {
    .capability-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .capability-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   USE CASES
   ============================================================ */

.use-case-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.use-case {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 2.5rem;
}
.use-case h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; }
.use-case p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.65; margin-bottom: 1.25rem; }
.use-case-list { list-style: none; }
.use-case-list li {
    position: relative; padding-left: 1.25rem; margin-bottom: 0.5rem;
    font-size: 0.875rem; color: var(--text-secondary);
}
.use-case-list li::before {
    content: ''; position: absolute; left: 0; top: 0.5em;
    width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

@media (max-width: 768px) {
    .use-case-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   COMPLIANCE STRIP
   ============================================================ */

.compliance-strip {
    display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
}
.compliance-badge {
    padding: 0.625rem 1.25rem; background: var(--bg-surface);
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 0.875rem; font-weight: 600; color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
    padding: 6rem 2rem; text-align: center;
}
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700;
    letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 1.25rem;
}
.cta-section p {
    font-size: 1.0625rem; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 2.5rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    border-top: 1px solid var(--border); background: var(--bg-surface);
    padding: 4rem 2rem 2rem;
}
.footer-inner {
    max-width: var(--max-w); margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
.footer-logo {
    font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.footer-tagline { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.footer-col h4 {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 1rem;
}
.footer-col a {
    display: block; color: var(--text-secondary); text-decoration: none;
    font-size: 0.875rem; margin-bottom: 0.5rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
    max-width: var(--max-w); margin: 3rem auto 0; padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between;
    font-size: 0.8125rem; color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* ============================================================
   COMPARISON TABLE (compare page)
   ============================================================ */

.category-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.category-grid-wide {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.category-card-wide { grid-column: 1 / -1; }
.category-card {
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 2rem;
}
.category-card-accent { border-color: var(--border-accent); }
.category-tag {
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.75rem;
}
.category-tag.accent { color: var(--accent); }
.category-card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; }
.category-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; margin-bottom: 1rem; }
.category-examples { font-size: 0.8125rem; color: var(--text-muted); font-style: italic; }

@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .category-grid { grid-template-columns: 1fr; } }

.compare-table-wrap { overflow-x: auto; max-width: var(--max-w); margin: 0 auto; }
.compare-table {
    width: 100%; min-width: 900px; border-collapse: collapse;
    font-size: 0.8125rem; line-height: 1.5;
}
.compare-table th, .compare-table td {
    padding: 1rem; border-bottom: 1px solid var(--border);
    text-align: left; vertical-align: top;
}
.compare-table thead th {
    font-weight: 600; font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted);
    border-bottom: 2px solid var(--border); white-space: nowrap;
    background: var(--bg-surface);
}
.compare-table thead th:first-child { min-width: 200px; }
.compare-table thead th:nth-child(2) { color: var(--accent); }
.compare-question { font-weight: 600; color: var(--text-primary); }
.compare-yes { color: var(--text-primary); }
.compare-yes::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin-right: 0.5rem; vertical-align: middle; }
.compare-partial { color: var(--text-secondary); }
.compare-partial::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent-gold); border-radius: 50%; margin-right: 0.5rem; vertical-align: middle; }
.compare-no { color: var(--text-muted); }
.compare-no::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--text-muted); border-radius: 50%; margin-right: 0.5rem; vertical-align: middle; opacity: 0.5; }

/* ============================================================
   ARTICLE (long-form content — why-legion)
   ============================================================ */

.article { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 2rem; }
.article-header {
    padding: 8rem 0 3rem; text-align: center;
}
.article-header h1 {
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
    letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 1.5rem;
}
.article-meta {
    font-size: 0.9375rem; color: var(--text-muted);
}
.article-meta strong { color: var(--text-secondary); }

.article-body { padding-bottom: 4rem; }
.article-body p {
    font-size: 1.0625rem; color: var(--text-secondary); line-height: 1.8;
    margin-bottom: 1.5rem;
}
.article-body .article-lede {
    font-size: 1.25rem; color: var(--text-primary); line-height: 1.7;
    border-left: 3px solid var(--accent); padding-left: 1.5rem;
    margin-bottom: 2rem;
}
.article-body h2 {
    font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
    color: var(--text-primary); margin-top: 3rem; margin-bottom: 1rem;
}
.article-body strong { color: var(--text-primary); }
.article-body em { color: var(--text-primary); font-style: italic; }

.article-cta {
    margin-top: 3rem; padding: 2.5rem; background: var(--bg-surface);
    border: 1px solid var(--border); border-radius: 12px; text-align: center;
}
.article-cta h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.article-cta p { color: var(--text-secondary); font-size: 1rem; margin-bottom: 1.5rem; }

/* ============================================================
   CONTACT FORM
   ============================================================ */

.form-section { max-width: 640px; margin: 0 auto; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block; font-size: 0.875rem; font-weight: 500;
    margin-bottom: 0.5rem; color: var(--text-primary);
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.75rem 1rem;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-primary); font-size: 1rem;
    font-family: var(--font); transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--accent);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-success {
    padding: 1.5rem; background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3); border-radius: 8px;
    color: #10b981; text-align: center; display: none;
}
.form-success.show { display: block; }

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   PAGE HEADER (for sub-pages)
   ============================================================ */

.page-header {
    padding: 8rem 2rem 4rem; text-align: center;
    max-width: var(--max-w-narrow); margin: 0 auto;
}
.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 700;
    letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 1rem;
}
.page-header p {
    font-size: 1.125rem; color: var(--text-secondary); line-height: 1.7;
}

/* ============================================================
   SECURITY PAGE
   ============================================================ */

.security-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden;
}
.security-card {
    background: var(--bg-surface); padding: 2.5rem;
}
.security-card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.75rem; }
.security-card p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.65; }

@media (max-width: 768px) {
    .security-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DETAIL LIST (for platform page)
   ============================================================ */

.detail-list { list-style: none; margin-top: 1.5rem; }
.detail-list li {
    padding: 1rem 0; border-bottom: 1px solid var(--border);
    display: grid; grid-template-columns: 200px 1fr; gap: 1rem;
    font-size: 0.9375rem;
}
.detail-list li strong { color: var(--text-primary); font-weight: 600; }
.detail-list li span { color: var(--text-secondary); }

@media (max-width: 600px) {
    .detail-list li { grid-template-columns: 1fr; gap: 0.25rem; }
}
