/* ═══════════════════════════════════════════
   AI ENGINEERING — Landing Page Styles (RED)
   ═══════════════════════════════════════════ */

:root {
    --aie-black: #0a0a0f;
    --aie-dark: #12121a;
    --aie-surface: #1a1a26;
    --aie-border: rgba(255,255,255,0.08);
    --aie-text: #e0e0e8;
    --aie-text-dim: #8888a0;
    --aie-accent: #e2241c;
    --aie-accent-light: #ff4a3d;
    --aie-accent-glow: rgba(226,36,28,0.3);
    --aie-blue: #3b82f6;
    --aie-blue-glow: rgba(59,130,246,0.2);
    --aie-amber: #f59e0b;
    --aie-violet: #8b5cf6;
    --aie-font: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --aie-mono: 'JetBrains Mono', monospace;
}

.aie-page * { box-sizing: border-box; margin: 0; padding: 0; }
.aie-page { font-family: var(--aie-font); color: var(--aie-text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
.aie-page a { color: inherit; text-decoration: none; }
.aie-page strong { font-weight: 700; color: #fff; }

/* Sezioni */
.aie-section { padding: 100px 0; position: relative; overflow: hidden; }
.aie-section--dark { background: var(--aie-black); }
.aie-section--surface { background: var(--aie-dark); }
.aie-section--gradient { background: linear-gradient(170deg, var(--aie-black) 0%, #2a0a0a 50%, var(--aie-black) 100%); }

.aie-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.aie-hero {
    display: flex;
    align-items: flex-start;
    background: var(--aie-black);
    position: relative;
    overflow: hidden;
    padding: 80px 0 60px;
}
.aie-hero__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
}
.aie-hero__glow {
    position: absolute; width: 600px; height: 600px;
    border-radius: 50%; filter: blur(120px); pointer-events: none;
}
.aie-hero__glow--accent { background: var(--aie-accent); top: -200px; right: -100px; opacity: 0.18; }
.aie-hero__glow--violet { background: var(--aie-violet); bottom: -200px; left: -100px; opacity: 0.10; }

.aie-hero__inner {
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.aie-hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(226,36,28,0.10); border: 1px solid rgba(226,36,28,0.30);
    border-radius: 100px; padding: 6px 16px;
    font-size: 13px; font-weight: 600; color: var(--aie-accent-light);
    letter-spacing: 0.5px; text-transform: uppercase;
    margin-bottom: 32px;
    animation: aie-fadeUp 0.6s ease both;
}
.aie-hero__title {
    font-size: clamp(34px, 4.6vw, 58px);
    font-weight: 800; line-height: 1.08; letter-spacing: -0.03em;
    color: #fff; margin-bottom: 24px;
    animation: aie-fadeUp 0.6s 0.1s ease both;
}
.aie-hero__title span {
    background: linear-gradient(135deg, var(--aie-accent), #ff8a7a);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.aie-hero__sub {
    font-size: 18px; line-height: 1.7; color: var(--aie-text-dim);
    max-width: 540px; margin-bottom: 36px;
    animation: aie-fadeUp 0.6s 0.2s ease both;
}
.aie-hero__actions {
    display: flex; gap: 16px; flex-wrap: wrap;
    animation: aie-fadeUp 0.6s 0.3s ease both;
}

/* Hero visual — diagramma architetturale */
.aie-hero__visual {
    animation: aie-fadeUp 0.8s 0.3s ease both;
}
.aie-arch {
    position: relative;
    background: var(--aie-surface);
    border: 1px solid var(--aie-border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-width: 460px;
    margin: 0 auto;
}
.aie-arch__title {
    font-family: var(--aie-mono); font-size: 11px;
    color: var(--aie-text-dim); text-transform: uppercase;
    letter-spacing: 2px; margin-bottom: 18px;
    display: flex; align-items: center; gap: 8px;
}
.aie-arch__title::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--aie-accent); box-shadow: 0 0 10px var(--aie-accent);
    animation: aie-pulse 2s ease-in-out infinite;
}
.aie-arch__layer {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--aie-border);
    margin-bottom: 10px; font-size: 13px; font-weight: 600; color: #fff;
}
.aie-arch__layer i { width: 28px; text-align: center; font-size: 14px; }
.aie-arch__layer--llm i { color: var(--aie-accent); }
.aie-arch__layer--mcp i { color: var(--aie-violet); }
.aie-arch__layer--tools i { color: var(--aie-blue); }
.aie-arch__layer--data i { color: var(--aie-amber); }
.aie-arch__layer__sub {
    font-family: var(--aie-mono); font-size: 11px;
    font-weight: 400; color: var(--aie-text-dim);
    margin-left: auto;
}
.aie-arch__connector {
    width: 2px; height: 12px; margin-left: 27px;
    background: linear-gradient(180deg, var(--aie-accent), transparent);
    opacity: 0.6;
}

@keyframes aie-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ── Bottoni ── */
.aie-btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--aie-font); font-weight: 700; font-size: 15px;
    padding: 14px 32px; border-radius: 12px; border: none;
    cursor: pointer; transition: all 0.3s; letter-spacing: 0.2px;
}
.aie-btn--primary {
    background: var(--aie-accent); color: #fff;
    box-shadow: 0 4px 20px var(--aie-accent-glow);
}
.aie-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--aie-accent-glow);
    background: var(--aie-accent-light); color: #fff;
}
.aie-btn--ghost {
    background: transparent; color: var(--aie-text);
    border: 1px solid var(--aie-border);
}
.aie-btn--ghost:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); color: #fff; }

/* ── Titoli ── */
.aie-heading { margin-bottom: 20px; }
.aie-heading__eyebrow {
    display: inline-block; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--aie-accent-light); margin-bottom: 16px; font-family: var(--aie-mono);
}
.aie-heading__title {
    font-size: clamp(28px, 3.8vw, 44px); font-weight: 800;
    line-height: 1.15; letter-spacing: -0.02em; color: #fff;
}
.aie-heading__desc {
    font-size: 18px; color: var(--aie-text-dim);
    max-width: 700px; margin-top: 16px; line-height: 1.7;
}
.aie-heading--center { text-align: center; }
.aie-heading--center .aie-heading__desc { margin-left: auto; margin-right: auto; }

/* ── Stats ── */
.aie-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1px; background: var(--aie-border);
    border: 1px solid var(--aie-border); border-radius: 16px;
    overflow: hidden; margin-top: -30px; position: relative; z-index: 3;
}
.aie-stats__item {
    background: var(--aie-dark); padding: 36px 24px; text-align: center;
    transition: background 0.3s;
}
.aie-stats__item:hover { background: var(--aie-surface); }
.aie-stats__number {
    font-size: 36px; font-weight: 800; color: #fff;
    letter-spacing: -0.02em; margin-bottom: 4px; font-family: var(--aie-mono);
}
.aie-stats__number em { font-style: normal; color: var(--aie-accent-light); }
.aie-stats__label {
    font-size: 13px; color: var(--aie-text-dim);
    text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}

/* ── Capability blocks (alternati testo+visual) ── */
.aie-block {
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
    align-items: center; margin-top: 40px;
}
.aie-block + .aie-block { margin-top: 100px; }
.aie-block--reverse .aie-block__visual { order: -1; }
.aie-block__text { font-size: 17px; color: var(--aie-text-dim); line-height: 1.75; margin-bottom: 16px; }
.aie-block__text strong { color: #fff; }

/* Visual cards (riusabili come piccoli diagrammi) */
.aie-vcard {
    background: var(--aie-surface); border: 1px solid var(--aie-border);
    border-radius: 20px; padding: 32px; position: relative; overflow: hidden;
}
.aie-vcard::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--aie-accent), var(--aie-violet));
}
.aie-vcard__head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 22px; font-family: var(--aie-mono);
    font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--aie-text-dim);
}
.aie-vcard__head i { color: var(--aie-accent); font-size: 13px; }

/* MCP connector pills */
.aie-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.aie-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 100px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--aie-border);
    font-size: 13px; font-weight: 600; color: #fff;
    transition: all 0.3s;
}
.aie-pill:hover { border-color: var(--aie-accent); background: rgba(226,36,28,0.06); }
.aie-pill i { color: var(--aie-accent-light); font-size: 11px; }

/* State machine viz */
.aie-states { display: flex; flex-direction: column; gap: 8px; }
.aie-state {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--aie-border);
    font-size: 13px; color: var(--aie-text); font-family: var(--aie-mono);
}
.aie-state__num {
    width: 24px; height: 24px; border-radius: 6px;
    background: rgba(226,36,28,0.15); color: var(--aie-accent-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.aie-state__arrow { color: var(--aie-text-dim); margin: 0 4px; font-size: 11px; }

/* RAG pipeline */
.aie-pipe { display: flex; flex-direction: column; gap: 4px; }
.aie-pipe__step {
    padding: 10px 14px; border-radius: 8px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--aie-border);
    font-size: 13px; color: var(--aie-text); font-family: var(--aie-mono);
    display: flex; align-items: center; gap: 10px;
}
.aie-pipe__step i { color: var(--aie-accent); font-size: 11px; }
.aie-pipe__arrow {
    text-align: center; color: var(--aie-text-dim);
    font-size: 14px; line-height: 0.6; margin: 2px 0;
}

/* Stack tech grid */
.aie-stack {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.aie-stack__item {
    padding: 14px 16px; border-radius: 10px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--aie-border);
    text-align: center; font-size: 13px; font-weight: 600; color: #fff;
    transition: all 0.3s;
}
.aie-stack__item:hover { border-color: var(--aie-accent); transform: translateY(-2px); }
.aie-stack__item i { display: block; font-size: 22px; color: var(--aie-accent-light); margin-bottom: 8px; }

/* Vendor logos */
.aie-vendors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.aie-vendor {
    padding: 16px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--aie-border);
    text-align: center; font-weight: 700; font-size: 14px; color: #fff;
    transition: all 0.3s;
}
.aie-vendor span { display: block; font-size: 11px; font-weight: 500; color: var(--aie-text-dim); margin-top: 4px; font-family: var(--aie-mono); }
.aie-vendor:hover { border-color: var(--aie-accent); }

/* ── FAQ ── */
.aie-faqs { max-width: 820px; margin: 64px auto 0; }
.aie-faq {
    border: 1px solid var(--aie-border); border-radius: 14px;
    margin-bottom: 12px; overflow: hidden; transition: all 0.3s;
    background: var(--aie-surface);
}
.aie-faq:hover { border-color: rgba(255,255,255,0.15); }
.aie-faq__q {
    padding: 20px 24px; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 15px; font-weight: 700; color: #fff;
    user-select: none; transition: background 0.3s; gap: 16px;
}
.aie-faq__q:hover { background: rgba(255,255,255,0.02); }
.aie-faq__q i { color: var(--aie-accent-light); font-size: 14px; transition: transform 0.3s; flex-shrink: 0; }
.aie-faq.aie-faq--open .aie-faq__q i { transform: rotate(180deg); }
.aie-faq__a {
    max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 24px; font-size: 15px; color: var(--aie-text-dim); line-height: 1.7;
}
.aie-faq.aie-faq--open .aie-faq__a { max-height: 500px; padding: 0 24px 22px; }

/* ── CTA ── */
.aie-cta { text-align: center; padding: 120px 0; position: relative; }
.aie-cta__glow {
    position: absolute; width: 500px; height: 500px; border-radius: 50%;
    background: var(--aie-accent); filter: blur(150px); opacity: 0.10;
    top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none;
}
.aie-cta__title {
    font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; color: #fff;
    letter-spacing: -0.02em; margin-bottom: 20px; position: relative; z-index: 2;
}
.aie-cta__desc {
    font-size: 18px; color: var(--aie-text-dim); max-width: 580px;
    margin: 0 auto 40px; line-height: 1.7; position: relative; z-index: 2;
}

/* ── Animations ── */
@keyframes aie-fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.aie-reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.aie-reveal.aie-visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 991px) {
    .aie-section { padding: 80px 0; }
    .aie-hero__inner { grid-template-columns: 1fr; }
    .aie-hero__visual { order: -1; }
    .aie-stats { grid-template-columns: repeat(2, 1fr); }
    .aie-block { grid-template-columns: 1fr; gap: 40px; }
    .aie-block--reverse .aie-block__visual { order: 0; }
    .aie-stack { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .aie-section { padding: 60px 0; }
    .aie-hero { padding: 70px 0 50px; }
    .aie-stats { grid-template-columns: 1fr 1fr; }
    .aie-stack { grid-template-columns: 1fr 1fr; }
    .aie-vendors { grid-template-columns: 1fr; }
    .aie-hero__actions { flex-direction: column; }
    .aie-hero__actions .aie-btn { width: 100%; justify-content: center; }
}
