/* ==========================================================================
   DocumentoChiaro - Design System & Custom Stylesheet
   ========================================================================== */

/* 1. Global Reset & Variables */
:root {
    /* Color Palette */
    --bg-primary: #0b090f;
    --bg-secondary: #120f1a;
    --bg-card: rgba(25, 21, 36, 0.6);
    --bg-card-hover: rgba(36, 30, 51, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #a09cb0;
    --text-muted: #6e6a82;
    
    --primary-color: #7c3aed; /* Violet */
    --primary-glow: rgba(124, 58, 237, 0.3);
    --primary-light: #a78bfa;
    --accent-gold: #f59e0b; /* Amber/Gold */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(124, 58, 237, 0.4);
    
    /* Layout & Fonts */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --container-width: 1120px;
    --transition-speed: 0.3s;
}

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

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 2. Reusable UI Components */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography styling */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

p {
    color: var(--text-secondary);
}

.section-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    max-width: 700px;
    margin-bottom: 48px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6d28d9 100%);
    color: var(--text-primary);
    border: none;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.5);
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-large {
    padding: 16px 36px;
    font-size: 18px;
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 80%);
    transform: scale(0.5);
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

.btn-glow:hover::after {
    transform: scale(1);
    opacity: 1;
}

/* 3. Header & Navigation */
.main-header {
    background-color: rgba(11, 9, 15, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.logo-text span {
    color: var(--primary-light);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-cta {
    padding: 8px 18px;
    font-size: 14px;
}

/* 4. Hero Section */
.hero-section {
    position: relative;
    padding: 100px 0 120px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
}

.highlight-text {
    background: linear-gradient(90deg, #a78bfa 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 40px;
    color: var(--text-secondary);
}

.hero-actions {
    margin-bottom: 24px;
}

.hero-note {
    font-size: 14px;
    color: var(--text-muted);
}

.hero-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -20%);
    width: 600px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* 5. Trappole Section (Grid Layout) */
.trappole-section {
    background-color: var(--bg-secondary);
    padding: 100px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: left;
}

.trappole-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Card Styling - Glassmorphism */
.trappola-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.trappola-card:hover {
    transform: translateY(-4px);
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.15);
}

.card-icon {
    font-size: 36px;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.card-title {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Highlighted Card variant */
.card-highlighted {
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.05);
}

.card-highlighted:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
}

/* Keyboard styling */
kbd {
    background-color: #2e263d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: monospace;
}

/* 6. About Section */
.about-section {
    padding: 100px 0;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.about-image-placeholder {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.avatar-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #4c1d95 100%);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.signature {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.role-text {
    font-size: 14px;
    color: var(--text-muted);
}

.about-content {
    text-align: left;
}

.about-text {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.social-links {
    margin-top: 32px;
}

.social-link-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-light);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    transition: transform var(--transition-speed);
}

.social-link-btn:hover {
    transform: translateX(4px);
    color: var(--text-primary);
}

/* 7. Final CTA Section */
.cta-section {
    padding: 60px 0 100px 0;
}

.cta-box {
    background: linear-gradient(135deg, #150f24 0%, #0d0a15 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 60px 24px;
    text-align: center;
    max-width: 840px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    pointer-events: none;
}

.cta-tag {
    display: inline-block;
    background-color: var(--primary-glow);
    color: var(--primary-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.cta-title {
    font-size: 32px;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
}

.cta-subtext {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* 8. Footer Section */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background-color: var(--bg-primary);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   9. Media Queries (Responsiveness)
   ========================================================================== */

/* Tablet & Smaller Desktop View */
@media (min-width: 768px) {
    /* General Grid updates */
    .trappole-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    .section-title {
        font-size: 40px;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .about-container {
        grid-template-columns: 350px 1fr;
        gap: 60px;
    }
    
    .about-image-placeholder {
        padding: 60px 40px;
    }
    
    .cta-box {
        padding: 80px 48px;
    }
    
    .cta-title {
        font-size: 42px;
    }
    
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Large Desktop View */
@media (min-width: 1024px) {
    .trappole-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-section {
        padding: 140px 0 160px 0;
    }
    
    .hero-glow {
        width: 800px;
        height: 400px;
    }
}

/* ==========================================================================
   8. Tech Lab Section (B2B Showcase)
   ========================================================================== */
.lab-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.lab-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .lab-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.lab-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: all var(--transition-speed) ease;
}

.lab-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.lab-card-icon {
    font-size: 28px;
    margin-bottom: 20px;
}

.lab-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.lab-card-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.lab-cta-box {
    margin-top: 50px;
    padding: 40px;
    background: rgba(124, 58, 237, 0.03);
    border: 1px dashed rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    text-align: center;
}

.lab-cta-title {
    font-size: 22px;
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.lab-cta-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
