/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
    --home-primary: #4f46e5;
    --home-primary-hover: #4338ca;
    --home-primary-light: #eef2ff;
    --home-surface: #ffffff;
    --home-surface-alt: #f9fafb;
    --home-text: #0f172a;
    --home-text-secondary: #475569;
    --home-text-muted: #94a3b8;
    --home-border: #e2e8f0;
    --home-radius: 12px;
    --home-shadow-sm: 0 4px 15px rgba(0,0,0,0.06);
    --home-shadow-md: 0 10px 40px rgba(0,0,0,0.08);
    --home-shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
}

/* ========================================
   BASE & UTILITIES
   ======================================== */
.home-section {
    padding: 80px 0;
}

.home-section--alt {
    background: var(--home-surface-alt);
}

.home-section--primary {
    background: var(--home-primary);
}

.home-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.home-section-title {
    text-align: center;
    margin-bottom: 60px;
}

.home-section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--home-text);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.home-section-title p {
    font-size: 1.1rem;
    color: var(--home-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   BUTTONS
   ======================================== */
.home-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--home-radius);
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.5;
}

.home-btn:focus-visible {
    outline: 2px solid var(--home-primary);
    outline-offset: 2px;
}

.home-btn--primary {
    background: var(--home-primary);
    color: #ffffff;
    border-color: var(--home-primary);
}

.home-btn--primary:hover {
    background: var(--home-primary-hover);
    border-color: var(--home-primary-hover);
    color: #ffffff;
    text-decoration: none;
}

.home-btn--outline {
    background: transparent;
    color: var(--home-primary);
    border-color: var(--home-border);
}

.home-btn--outline:hover {
    border-color: var(--home-primary);
    background: var(--home-primary-light);
    color: var(--home-primary);
    text-decoration: none;
}

.home-btn--white {
    background: #ffffff;
    color: var(--home-primary);
    border-color: #ffffff;
}

.home-btn--white:hover {
    background: var(--home-primary-light);
    border-color: var(--home-primary-light);
    color: var(--home-primary-hover);
    text-decoration: none;
}

/* ========================================
   HERO
   ======================================== */
.home-hero {
    padding: 100px 0 0;
    text-align: center;
    background: var(--home-surface);
    overflow: hidden;
}

.home-hero__headline {
    font-size: 3rem;
    font-weight: 900;
    color: var(--home-text);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.home-hero__subtitle {
    font-size: 1.2rem;
    color: var(--home-text-secondary);
    line-height: 1.6;
    margin: 0 0 32px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.home-hero__ctas {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.home-hero__microcopy {
    font-size: 0.875rem;
    color: var(--home-text-muted);
    margin: 0 0 24px;
}

.home-hero__trust {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin: 0 0 60px;
}

.home-hero__trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--home-text-muted);
}

.home-hero__trust-item svg {
    color: var(--home-primary);
    flex-shrink: 0;
}

.home-hero__screenshot {
    max-width: 960px;
    margin: 0 auto;
    border-radius: var(--home-radius) var(--home-radius) 0 0;
    overflow: hidden;
    box-shadow: var(--home-shadow-lg);
}

.home-hero__screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

/* ========================================
   PAIN POINTS
   ======================================== */
.home-pains__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.home-pains__card {
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    padding: 32px 24px;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.home-pains__card:hover {
    box-shadow: var(--home-shadow-sm);
}

.home-pains__icon {
    width: 24px;
    height: 24px;
    color: var(--home-text-muted);
    margin: 0 auto 16px;
}

.home-pains__card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--home-text);
    margin: 0;
    line-height: 1.5;
}

.home-pains__card p {
    font-size: 0.9rem;
    color: var(--home-text-secondary);
    margin: 12px 0 0;
    line-height: 1.6;
}

/* ========================================
   FEATURES
   ======================================== */
.home-features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 32px;
}

.home-features__item {
    text-align: center;
}

.home-features__icon {
    width: 32px;
    height: 32px;
    color: var(--home-primary);
    margin: 0 auto 16px;
}

.home-features__item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--home-text);
    margin: 0 0 8px;
}

.home-features__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--home-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 6px;
}

.home-features__item p {
    font-size: 0.95rem;
    color: var(--home-text-secondary);
    margin: 0;
    line-height: 1.6;
}

.home-features__link {
    text-align: center;
    margin-top: 40px;
}

.home-features__link a {
    color: var(--home-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
}

.home-features__link a:hover {
    color: var(--home-primary-hover);
    text-decoration: underline;
}

/* ========================================
   HOW IT WORKS
   ======================================== */
.home-steps__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}

.home-steps__number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--home-primary);
    line-height: 1;
    margin: 0 0 16px;
}

.home-steps__item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--home-text);
    margin: 0 0 8px;
}

.home-steps__item p {
    font-size: 0.95rem;
    color: var(--home-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.home-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.home-testimonials__item {
    position: relative;
}

.home-testimonials__quote-mark {
    font-size: 3rem;
    color: var(--home-primary);
    opacity: 0.15;
    line-height: 1;
    margin: 0 0 8px;
}

.home-testimonials__text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--home-text-secondary);
    line-height: 1.7;
    margin: 0 0 20px;
}

.home-testimonials__author {
    font-size: 0.9rem;
    color: var(--home-text-muted);
    margin: 0;
}

.home-testimonials__author strong {
    color: var(--home-text);
    font-weight: 600;
}

/* ========================================
   PRICING
   ======================================== */
.home-pricing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.home-pricing__card {
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    padding: 36px 24px;
    text-align: center;
}

.home-pricing__card--featured {
    border-color: var(--home-primary);
    border-width: 2px;
    position: relative;
}

.home-pricing__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--home-primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.home-pricing__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--home-text);
    margin: 0 0 12px;
}

.home-pricing__price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--home-text);
    line-height: 1;
    margin: 0;
}

.home-pricing__period {
    font-size: 0.85rem;
    color: var(--home-text-muted);
    margin: 4px 0 24px;
}

.home-pricing__features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    text-align: left;
}

.home-pricing__features li {
    padding: 7px 0;
    font-size: 0.9rem;
    color: var(--home-text-secondary);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.home-pricing__features li::before {
    content: '\2713';
    color: var(--home-primary);
    font-weight: 700;
    flex-shrink: 0;
}

.home-pricing__card .home-btn {
    width: 100%;
}

.home-pricing__footer {
    text-align: center;
    margin-top: 32px;
}

.home-pricing__trust {
    font-size: 0.9rem;
    color: var(--home-text-muted);
    margin: 0 0 12px;
}

.home-pricing__link {
    color: var(--home-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.home-pricing__link:hover {
    color: var(--home-primary-hover);
    text-decoration: underline;
}

/* ========================================
   CTA FINAL
   ======================================== */
.home-cta-final {
    text-align: center;
    padding: 80px 0;
}

.home-cta-final h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
}

.home-cta-final p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 32px;
}

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

.home-cta-final__secondary {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 16px;
}

.home-cta-final__secondary:hover {
    color: #ffffff;
}

/* ========================================
   PUBLISHER STRIP
   ======================================== */
.home-publisher-strip {
    display: block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    text-decoration: none;
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    overflow: hidden;
    transition: filter 0.25s ease;
}

.home-publisher-strip:hover {
    color: #fff;
    filter: brightness(1.06);
    text-decoration: none;
}

.home-publisher-strip__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.home-publisher-strip__icon {
    display: inline-flex;
    align-items: center;
}

.home-publisher-strip__text strong {
    font-weight: 700;
}

.home-publisher-strip__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.25s ease;
}

.home-publisher-strip:hover .home-publisher-strip__cta {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   SPOTLIGHT (FisCaal / Spedilibri)
   ======================================== */
.home-spotlight__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.home-spotlight--reverse .home-spotlight__grid {
    direction: rtl;
}

.home-spotlight--reverse .home-spotlight__grid > * {
    direction: ltr;
}

.home-spotlight__label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--home-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.home-spotlight__content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--home-text);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.home-spotlight__content p {
    font-size: 1.05rem;
    color: var(--home-text-secondary);
    line-height: 1.6;
    margin: 0 0 24px;
}

.home-spotlight__benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

.home-spotlight__benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--home-text-secondary);
    line-height: 1.5;
}

.home-spotlight__benefits li svg {
    color: var(--home-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.home-spotlight__mockup {
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    overflow: hidden;
    box-shadow: var(--home-shadow-md);
}

.home-spotlight__mockup-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: var(--home-surface-alt);
    border-bottom: 1px solid var(--home-border);
}

.home-spotlight__mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--home-border);
}

.home-spotlight__mockup-body {
    padding: 20px;
}

/* FisCaal receipt mockup */
.home-spotlight__receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--home-text);
    border-bottom: 1px solid var(--home-border);
}

.home-spotlight__receipt-row:last-child {
    border-bottom: none;
}

.home-spotlight__receipt-row--detail {
    font-size: 0.85rem;
    color: var(--home-text-muted);
}

.home-spotlight__receipt-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    background: #f0fdf4;
    padding: 2px 10px;
    border-radius: 20px;
}

/* Spedilibri shipment mockup */
.home-spotlight__shipment-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--home-text);
    border-bottom: 1px solid var(--home-border);
}

.home-spotlight__shipment-row:last-child {
    border-bottom: none;
}

.home-spotlight__shipment-row svg {
    color: var(--home-text-muted);
    flex-shrink: 0;
}

.home-spotlight__shipment-row span:nth-child(2) {
    flex: 1;
    font-family: monospace;
    font-size: 0.8rem;
}

.home-spotlight__shipment-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.home-spotlight__shipment-badge--delivered {
    color: #16a34a;
    background: #f0fdf4;
}

.home-spotlight__shipment-badge--transit {
    color: #d97706;
    background: #fffbeb;
}

.home-spotlight__shipment-badge--ready {
    color: var(--home-primary);
    background: var(--home-primary-light);
}

/* Gutenbot chat mockup */
.home-spotlight__chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-spotlight__chat-msg {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 90%;
}

.home-spotlight__chat-msg--user {
    background: var(--home-primary-light);
    color: var(--home-primary);
    align-self: flex-end;
    font-weight: 500;
}

.home-spotlight__chat-msg--bot {
    background: var(--home-surface-alt);
    color: var(--home-text-secondary);
    align-self: flex-start;
}

.home-spotlight__chat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--home-primary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Chat animations */
.home-spotlight__chat-fadein {
    opacity: 0;
    transform: translateY(8px);
    animation: chatFadeIn 0.4s ease forwards;
    animation-delay: 0.3s;
}

.home-spotlight__chat-fadein--delayed {
    animation-delay: 1s;
}

@keyframes chatFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-spotlight__chat-typing {
    display: block;
    overflow: hidden;
    max-height: 0;
    animation: typingReveal 2s ease forwards 1.4s;
}

.home-spotlight__chat-msg--bot::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 0.9em;
    background: var(--home-primary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: typingCursor 0.6s step-end infinite 1.4s,
               typingCursorHide 0s linear forwards 3.8s;
}

@keyframes typingReveal {
    to {
        max-height: 200px;
    }
}

@keyframes typingCursor {
    50% {
        opacity: 0;
    }
}

@keyframes typingCursorHide {
    to {
        opacity: 0;
    }
}

/* Librerie.cloud store mockup */
.home-spotlight__store-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--home-border);
}

.home-spotlight__store-item:last-child {
    border-bottom: none;
}

.home-spotlight__store-cover {
    width: 40px;
    height: 56px;
    background: var(--home-primary-light);
    border-radius: 4px;
    flex-shrink: 0;
}

.home-spotlight__store-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.home-spotlight__store-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--home-text);
}

.home-spotlight__store-author {
    font-size: 0.8rem;
    color: var(--home-text-muted);
}

.home-spotlight__store-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--home-primary);
}

/* Cloud Drive mockup */
.home-spotlight__drive-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--home-text);
    border-bottom: 1px solid var(--home-border);
}

.home-spotlight__drive-row:last-child {
    border-bottom: none;
}

.home-spotlight__drive-row svg {
    color: var(--home-text-muted);
    flex-shrink: 0;
}

.home-spotlight__drive-row span:nth-child(2) {
    flex: 1;
    font-family: monospace;
    font-size: 0.8rem;
}

.home-spotlight__drive-size {
    font-size: 0.75rem;
    color: var(--home-text-muted);
    white-space: nowrap;
}

/* ========================================
   INTEGRATIONS
   ======================================== */
.home-integrations__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.home-integrations__item {
    text-align: center;
    padding: 32px 20px;
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    transition: box-shadow 0.2s ease;
}

.home-integrations__item:hover {
    box-shadow: var(--home-shadow-sm);
}

.home-integrations__icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 16px;
    color: var(--home-primary);
}

.home-integrations__icon svg {
    width: 100%;
    height: 100%;
}

.home-integrations__item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--home-text);
    margin: 0 0 6px;
}

.home-integrations__item p {
    font-size: 0.9rem;
    color: var(--home-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .home-hero__headline {
        font-size: 2.5rem;
    }

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

    .home-spotlight__grid {
        gap: 40px;
    }

    .home-spotlight__content h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .home-section {
        padding: 60px 0;
    }

    .home-hero {
        padding: 80px 0 0;
    }

    .home-hero__headline {
        font-size: 2rem;
    }

    .home-hero__subtitle {
        font-size: 1.05rem;
    }

    .home-hero__ctas {
        flex-direction: column;
        align-items: center;
    }

    .home-hero__ctas .home-btn {
        width: 100%;
        max-width: 320px;
    }

    .home-hero__trust {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .home-section-title h2 {
        font-size: 1.8rem;
    }

    .home-pains__grid,
    .home-features__grid,
    .home-steps__grid,
    .home-testimonials__grid,
    .home-pricing__grid,
    .home-integrations__grid {
        grid-template-columns: 1fr;
    }

    .home-spotlight__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .home-spotlight--reverse .home-spotlight__grid {
        direction: ltr;
    }

    .home-spotlight__content h2 {
        font-size: 1.6rem;
    }

    .home-cta-final h2 {
        font-size: 1.8rem;
    }

    .home-cta-final__ctas {
        flex-direction: column;
        align-items: center;
    }

    .home-publisher-strip {
        padding: 10px 0;
    }

    .home-publisher-strip__inner {
        font-size: 0.85rem;
        gap: 10px;
    }
}
