/* ================================
   MODERN 2026 DESIGN SYSTEM
   Lettere alla Rossa
   ================================ */

/* CSS Reset & Variables */
:root {
    /* Colors - Ferrari Premium */
    --ferrari-red: #DC0000;
    --ferrari-dark: #8B0000;
    --ferrari-light: #FF0000;

    /* Italian Flag */
    --green: #009246;
    --white: #FFFFFF;
    --red: #CE2B37;

    /* Neutrals - Modern 2026 */
    --black: #0A0A0A;
    --gray-950: #0F0F0F;
    --gray-900: #1A1A1A;
    --gray-800: #262626;
    --gray-700: #404040;
    --gray-600: #525252;
    --gray-500: #737373;
    --gray-400: #A3A3A3;
    --gray-300: #D4D4D4;
    --gray-200: #E5E5E5;
    --gray-100: #F5F5F5;
    --gray-50: #FAFAFA;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #DC0000 0%, #8B0000 100%);
    --gradient-text: linear-gradient(135deg, #DC0000 0%, #FF0000 50%, #DC0000 100%);
    --gradient-bg: radial-gradient(circle at 50% 0%, rgba(220, 0, 0, 0.05) 0%, transparent 50%);

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px rgba(220, 0, 0, 0.3);

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --spacing-unit: 8px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index */
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1100;
    --z-fixed: 1200;
    --z-modal: 1300;
    --z-tooltip: 1400;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--black);
    color: var(--gray-100);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

/* Utilities */
.desktop-only {
    display: inline;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}

/* ================================
   NAVIGATION - Premium 2026
   ================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    transition: transform var(--transition);
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-link {
    position: relative;
    color: var(--gray-300);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: color var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--gray-400);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.nav-social:hover {
    color: var(--ferrari-red);
    background: rgba(220, 0, 0, 0.1);
}

.nav-cta {
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all var(--transition);
}

/* ================================
   HERO SECTION - WOW Effect
   ================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-bg);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(220, 0, 0, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(0, 146, 70, 0.08) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 80px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--ferrari-red);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.hero-title {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s ease infinite;
    background-size: 200% auto;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.hero-description {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--gray-400);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 48px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

/* Buttons - Modern System */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(220, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(220, 0, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

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

.hero-stats {
    display: flex;
    gap: 64px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    font-family: var(--font-display);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    background: var(--ferrari-red);
    border-radius: 2px;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(16px);
    }
}

/* ================================
   SECTIONS - Modern Layout
   ================================ */
section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    margin-bottom: 64px;
}

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

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(220, 0, 0, 0.1);
    border: 1px solid rgba(220, 0, 0, 0.2);
    border-radius: var(--radius-full);
    color: var(--ferrari-red);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-description {
    font-size: 20px;
    color: var(--gray-400);
    line-height: 1.7;
    max-width: 700px;
}

.section-header.center .section-description {
    margin: 0 auto;
}

/* ================================
   LATEST LETTER - Featured
   ================================ */
.latest {
    background: var(--gray-950);
}

.featured-letter {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 64px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
}

.letter-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--gray-500);
}

.letter-category {
    padding: 4px 12px;
    background: rgba(220, 0, 0, 0.1);
    border-radius: var(--radius-full);
    color: var(--ferrari-red);
    font-weight: 600;
}

.letter-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.letter-excerpt {
    font-size: 18px;
    line-height: 1.8;
    color: var(--gray-400);
    margin-bottom: 32px;
}

.letter-excerpt p {
    margin-bottom: 16px;
}

.letter-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ferrari-red);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.letter-link:hover {
    gap: 12px;
}

.featured-letter-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
}

.visual-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(220, 0, 0, 0.05);
    border: 2px dashed rgba(220, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    color: var(--ferrari-red);
}

/* ================================
   PHILOSOPHY - Cards Grid
   ================================ */
.philosophy {
    background: var(--black);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(220, 0, 0, 0.3);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--white);
}

.card-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-400);
}

/* ================================
   CTA SECTION - Conversion
   ================================ */
.cta-section {
    background: var(--gray-950);
}

.cta-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 64px;
    padding: 80px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--white);
}

.cta-description {
    font-size: 20px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
}

.cta-card .btn-primary {
    background: var(--white);
    color: var(--ferrari-red);
}

.cta-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cta-visual {
    position: relative;
}

.cta-shape {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
}

/* ================================
   NEWSLETTER - Inline
   ================================ */
.newsletter {
    background: var(--black);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}

.newsletter-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-description {
    font-size: 18px;
    color: var(--gray-400);
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 16px;
    transition: all var(--transition);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--ferrari-red);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-form input::placeholder {
    color: var(--gray-500);
}

/* ================================
   FOOTER - Modern
   ================================ */
.footer {
    background: var(--gray-950);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-tagline {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-400);
    margin-bottom: 24px;
    max-width: 400px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    color: var(--gray-400);
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--ferrari-red);
    color: var(--white);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
}

.footer-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 15px;
    transition: color var(--transition);
}

.footer-menu a:hover {
    color: var(--ferrari-red);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

.footer-bottom a {
    color: var(--ferrari-red);
    text-decoration: none;
}

/* ================================
   RESPONSIVE - Mobile First
   ================================ */
@media (max-width: 1024px) {
    .featured-letter,
    .cta-card {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 48px 32px;
        gap: 24px;
        transition: left var(--transition);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    section {
        padding: 80px 0;
    }

    .featured-letter {
        padding: 40px 32px;
    }

    .cta-card {
        padding: 48px 32px;
    }

    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        width: 100%;
        max-width: 100%;
    }

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

/* ================================
   ANIMATIONS - AOS Integration
   ================================ */
[data-aos] {
    transition-duration: 800ms;
}

/* Loading State */
body.loading {
    overflow: hidden;
}
