/* 
 * CITADEL.CSS - V3.0: Product-First SaaS Design
 * Clean, modern tech startup aesthetic
 */

/* 
 * GLOBAL TEXTURE 
 */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 
 * 1. HERO: PRODUCT-FIRST
 */
.hero-product {
    min-height: 100vh;
    padding: 160px 0 100px;
    background: linear-gradient(180deg, #080810 0%, #050505 50%, #0a0a12 100%);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.hero-text {
    max-width: 560px;
}

.hero-text .t-label {
    display: inline-block;
    margin-bottom: 24px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    color: var(--lex-signal);
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-text h1 span {
    color: var(--lex-txt-dim);
}

.hero-text .hero-desc {
    font-size: 1.25rem;
    color: var(--lex-txt-primary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    background: transparent;
    color: var(--lex-txt-primary);
    border: 1px solid var(--lex-border);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--lex-txt-heading);
}

/* Hero Product Mockup */
.hero-product-visual {
    position: relative;
}

.product-mockup {
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(59, 130, 246, 0.1);
}

.mockup-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mockup-dot.red { background: #ff5f56; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #27c93f; }

.mockup-title {
    margin-left: auto;
    font-family: var(--lex-font-mono);
    font-size: 0.75rem;
    color: var(--lex-txt-dim);
    letter-spacing: 0.05em;
}

.mockup-body {
    padding: 32px;
}

/* Narrative Card inside mockup */
.narrative-preview {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
}

.narrative-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.confidence-pill {
    font-family: var(--lex-font-mono);
    font-size: 0.7rem;
    padding: 6px 12px;
    background: rgba(39, 201, 63, 0.15);
    color: #27c93f;
    border-radius: 100px;
    font-weight: 500;
}

.narrative-type {
    font-family: var(--lex-font-mono);
    font-size: 0.7rem;
    color: var(--lex-txt-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.narrative-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--lex-signal), #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--lex-font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
}

.user-info {
    flex: 1;
}

.user-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--lex-txt-heading);
    margin-bottom: 2px;
}

.user-info span {
    font-family: var(--lex-font-mono);
    font-size: 0.75rem;
    color: var(--lex-txt-dim);
}

/* Mini Timeline */
.mini-timeline {
    position: relative;
    padding-left: 20px;
}

.mini-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(251, 62, 62, 0.5) 100%);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--lex-void);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.timeline-item.warning::before {
    border-color: #ffbd2e;
}

.timeline-item.critical::before {
    border-color: #fb3e3e;
    background: rgba(251, 62, 62, 0.2);
    box-shadow: 0 0 8px rgba(251, 62, 62, 0.4);
}

.timeline-time {
    font-family: var(--lex-font-mono);
    font-size: 0.7rem;
    color: var(--lex-txt-dim);
    width: 50px;
    flex-shrink: 0;
}

.timeline-label {
    font-size: 0.85rem;
    color: var(--lex-txt-primary);
}

.timeline-item.critical .timeline-label {
    color: #fb3e3e;
    font-weight: 500;
}

/* Action button in mockup */
.action-row {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-pill {
    font-family: var(--lex-font-mono);
    font-size: 0.75rem;
    padding: 10px 20px;
    background: rgba(251, 62, 62, 0.1);
    border: 1px solid rgba(251, 62, 62, 0.3);
    color: #fb3e3e;
    border-radius: 6px;
    font-weight: 500;
}

.context-hint {
    font-size: 0.8rem;
    color: var(--lex-txt-dim);
}

/* 
 * 2. LOGOS SECTION
 */
.logos-section {
    padding: 60px 0;
    background: var(--lex-void);
    border-top: 1px solid var(--lex-border);
    border-bottom: 1px solid var(--lex-border);
}

.logos-section .t-label {
    display: block;
    text-align: center;
    margin-bottom: 32px;
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
}

.logo-item {
    opacity: 0.4;
    transition: opacity 0.3s ease;
    font-family: var(--lex-font-sans);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--lex-txt-dim);
    letter-spacing: -0.01em;
}

.logo-item:hover {
    opacity: 0.7;
}

/* 
 * 3. PRODUCT SHOWCASE
 */
.showcase-section {
    padding: 140px 0;
    background: linear-gradient(180deg, #050505 0%, #080810 100%);
}

.showcase-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px;
}

.showcase-header .t-label {
    display: block;
    margin-bottom: 16px;
}

.showcase-header h2 {
    margin-bottom: 20px;
}

.showcase-header p {
    font-size: 1.25rem;
    color: var(--lex-txt-dim);
    margin: 0 auto;
}

.showcase-visual {
    max-width: 1000px;
    margin: 0 auto;
}

/* 
 * 4. FEATURES SECTION
 */
.features-section {
    padding: 140px 0;
    background: var(--lex-void);
}

.features-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 80px;
}

.features-header .t-label {
    display: block;
    margin-bottom: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--lex-border);
    border-radius: 16px;
    padding: 40px 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--lex-signal);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.feature-card p {
    font-size: 1rem;
    color: var(--lex-txt-dim);
    line-height: 1.6;
    margin: 0;
}

/* 
 * 5. HOW IT WORKS
 */
.how-section {
    padding: 140px 0;
    background: linear-gradient(180deg, var(--lex-void) 0%, #080810 100%);
}

.how-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 80px;
}

.how-header .t-label {
    display: block;
    margin-bottom: 16px;
}

.how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.how-steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, var(--lex-border) 0%, var(--lex-signal) 50%, var(--lex-border) 100%);
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--lex-void);
    border: 2px solid var(--lex-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    font-family: var(--lex-font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--lex-txt-heading);
    position: relative;
    z-index: 2;
}

.step-card:nth-child(2) .step-number {
    border-color: var(--lex-signal);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.step-card p {
    font-size: 1rem;
    color: var(--lex-txt-dim);
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 
 * 6. INTEGRATIONS
 */
.integrations-section {
    padding: 140px 0;
    background: var(--lex-void);
}

.integrations-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.integrations-header .t-label {
    display: block;
    margin-bottom: 16px;
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto 40px;
}

.integration-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--lex-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    min-height: 80px;
}

.integration-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.integration-card:hover .integration-logo {
    opacity: 0.9;
}

.integration-logo {
    height: 32px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    color: var(--lex-txt-heading);
}

.integration-logo svg {
    height: 32px;
    width: auto;
}

/* Text-only integrations grid */
.integrations-text-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px 48px;
    max-width: 900px;
    margin: 0 auto 40px;
}

.integration-text {
    font-family: var(--lex-font-sans);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--lex-txt-primary);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.integration-text:hover {
    opacity: 1;
}

.integrations-note {
    text-align: center;
    font-size: 1.1rem;
    color: var(--lex-txt-dim);
    max-width: 500px;
    margin: 0 auto;
}

/* 
 * 7. METRICS (Simplified)
 */
.metrics-section {
    padding: 100px 0;
    background: rgba(59, 130, 246, 0.03);
    border-top: 1px solid var(--lex-border);
    border-bottom: 1px solid var(--lex-border);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.metric-item h3 {
    font-size: clamp(3rem, 6vw, 4rem);
    font-weight: 600;
    color: var(--lex-txt-heading);
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.metric-item p {
    font-size: 1rem;
    color: var(--lex-txt-dim);
    margin: 0;
}

/* 
 * 8. CTA SECTION
 */
.cta-section {
    padding: 160px 0;
    background: linear-gradient(180deg, var(--lex-void) 0%, #080810 100%);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--lex-txt-dim);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 
 * BUTTON UPDATES
 */
.btn-citadel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: var(--lex-txt-heading);
    color: var(--lex-void);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
}

.btn-citadel:hover {
    transform: translateY(-2px);
    background: #E0E0E0;
    color: var(--lex-void);
    border: none;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

/* 
 * RESPONSIVE
 */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }

    .hero-text .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .how-steps {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .how-steps::before {
        display: none;
    }

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

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero-product {
        padding: 120px 0 60px;
    }

    .hero-text h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .hero-text .hero-desc {
        font-size: 1rem;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-ctas .btn-citadel,
    .hero-ctas .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Product Mockup Mobile */
    .product-mockup {
        border-radius: 12px;
    }

    .mockup-header {
        padding: 12px 16px;
    }

    .mockup-dot {
        width: 10px;
        height: 10px;
    }

    .mockup-title {
        font-size: 0.65rem;
    }

    .mockup-body {
        padding: 16px;
    }

    .narrative-preview {
        padding: 16px;
        border-radius: 8px;
    }

    .narrative-top {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .confidence-pill,
    .narrative-type {
        flex: 0 0 auto;
    }

    .confidence-pill {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .narrative-type {
        font-size: 0.6rem;
    }

    .narrative-user {
        margin-bottom: 16px;
    }

    .user-avatar-sm {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
    }

    .user-info strong {
        font-size: 0.85rem;
    }

    .user-info span {
        font-size: 0.65rem;
    }

    /* Mini Timeline Mobile */
    .mini-timeline {
        padding-left: 16px;
    }

    .timeline-item {
        gap: 10px;
        padding: 8px 0;
    }

    .timeline-item::before {
        left: -16px;
        width: 10px;
        height: 10px;
    }

    .timeline-time {
        font-size: 0.6rem;
        min-width: 40px;
    }

    .timeline-event {
        font-size: 0.8rem;
    }

    .narrative-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 16px;
        padding-top: 12px;
    }

    .narrative-actions .action-button {
        padding: 8px 12px;
        font-size: 0.7rem;
        flex: 0 0 auto;
    }

    .narrative-actions .action-badge {
        padding: 4px 8px;
        font-size: 0.6rem;
        flex: 0 0 auto;
    }

    .action-button {
        padding: 10px 16px;
        font-size: 0.75rem;
    }

    .action-badge {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .logo-grid {
        gap: 24px;
    }

    .logo-item {
        height: 32px;
    }

    .showcase-section,
    .features-section,
    .how-section,
    .integrations-section {
        padding: 80px 0;
    }

    .showcase-header h2,
    .features-header h2,
    .how-header h2,
    .integrations-header h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .showcase-header p,
    .features-header p {
        font-size: 1rem;
    }

    .integrations-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .integration-card {
        padding: 20px 16px;
    }

    .integration-logo {
        font-size: 0.9rem;
    }

    /* CTA Section Mobile */
    .cta-section {
        padding: 80px 0;
    }

    .cta-box {
        padding: 40px 24px;
    }

    .cta-headline {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .cta-desc {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    /* Metrics Mobile */
    .metric-value {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .metric-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }

    .integrations-grid {
        grid-template-columns: 1fr;
    }

    .integration-card {
        padding: 16px;
    }

    /* Very narrow mockup adjustments */
    .narrative-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .narrative-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .narrative-actions .action-button,
    .narrative-actions .action-badge {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
