/* ============================================================
   DomusPro Cloud — Sito Vetrina
   CSS professionale, zero framework
   ============================================================ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Palette */
    --dp-blue:       #1e3a5f;
    --dp-blue-light: #2563eb;
    --dp-blue-soft:  #eff6ff;
    --dp-blue-hover: #1d4ed8;
    --dp-navy:       #0f172a;
    --dp-gray-50:    #f8fafc;
    --dp-gray-100:   #f1f5f9;
    --dp-gray-200:   #e2e8f0;
    --dp-gray-300:   #cbd5e1;
    --dp-gray-400:   #94a3b8;
    --dp-gray-500:   #64748b;
    --dp-gray-600:   #475569;
    --dp-gray-700:   #334155;
    --dp-gray-800:   #1e293b;
    --dp-gray-900:   #0f172a;
    --dp-white:      #ffffff;
    --dp-green:      #16a34a;
    --dp-green-soft: #f0fdf4;
    --dp-amber:      #d97706;
    --dp-red:        #dc2626;

    /* Tipografia */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-py: 96px;
    --container-max: 1200px;
    --container-px: 24px;

    /* Borders & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
    --shadow-xl: 0 20px 60px rgba(0,0,0,.12);

    /* Transitions */
    --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--dp-gray-700);
    background: var(--dp-white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--dp-blue-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--dp-blue-hover); }

/* ─── Container ─── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--dp-gray-900);
    line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 16px; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: 12px; }

.text-center { text-align: center; }
.text-muted { color: var(--dp-gray-500); }
.text-blue { color: var(--dp-blue-light); }

.section-subtitle {
    font-size: 1.15rem;
    color: var(--dp-gray-500);
    max-width: 680px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.section-label {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--dp-blue-light);
    background: var(--dp-blue-soft);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: .95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary {
    background: var(--dp-blue-light);
    color: var(--dp-white);
    box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-primary:hover {
    background: var(--dp-blue-hover);
    color: var(--dp-white);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37,99,235,.4);
}
.btn-outline {
    background: transparent;
    color: var(--dp-blue-light);
    border: 2px solid var(--dp-blue-light);
}
.btn-outline:hover {
    background: var(--dp-blue-light);
    color: var(--dp-white);
}
.btn-white {
    background: var(--dp-white);
    color: var(--dp-blue-light);
    box-shadow: var(--shadow-md);
}
.btn-white:hover {
    background: var(--dp-gray-50);
    color: var(--dp-blue-hover);
    transform: translateY(-1px);
}
.btn-lg { padding: 18px 40px; font-size: 1.05rem; }
.btn-sm { padding: 10px 20px; font-size: .85rem; }

/* ─── Navbar ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all .3s ease;
    background: transparent;
}
.navbar.scrolled {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    padding: 10px 0;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dp-white);
    text-decoration: none;
}
.navbar.scrolled .navbar-brand { color: var(--dp-gray-900); }
.navbar-brand svg { width: 32px; height: 32px; }
.navbar-brand img { box-shadow: 0 1px 4px rgba(0,0,0,.15); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}
.nav-links a {
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--dp-white); }
.navbar.scrolled .nav-links a:not(.nav-cta) { color: var(--dp-gray-700); }
.navbar.scrolled .nav-links a:not(.nav-cta):hover { color: var(--dp-blue-light); }

.nav-cta {
    padding: 10px 24px !important;
    background: rgba(255,255,255,.15);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
}
.nav-cta:hover { background: var(--dp-white) !important; color: var(--dp-blue-light) !important; }
.navbar.scrolled .nav-cta {
    background: var(--dp-blue-light);
    color: var(--dp-white) !important;
}
.navbar.scrolled .nav-cta:hover { background: var(--dp-blue-hover) !important; color: var(--dp-white) !important; }

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dp-white);
    margin: 5px 0;
    transition: all .3s ease;
    border-radius: 2px;
}
.navbar.scrolled .nav-toggle span { background: var(--dp-gray-700); }

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--dp-navy) 0%, var(--dp-blue) 50%, #1e40af 100%);
    overflow: hidden;
    padding: 120px 0 80px;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 70% 20%, rgba(37,99,235,.3) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(30,58,95,.4) 0%, transparent 50%);
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-content h1 {
    color: var(--dp-white);
    margin-bottom: 24px;
    letter-spacing: -.02em;
}
.hero-content h1 span { color: #60a5fa; }
.hero-tagline {
    font-size: 1.2rem;
    color: rgba(255,255,255,.75);
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 540px;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dp-white);
    line-height: 1;
}
.hero-stat-label {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}
.hero-visual {
    position: relative;
}
.hero-mockup {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-xl);
    padding: 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 40px 80px rgba(0,0,0,.3);
}
.hero-mockup-inner {
    background: var(--dp-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dp-gray-400);
    font-size: .85rem;
}
.hero-mockup-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Sections ─── */
.section {
    padding: var(--section-py) 0;
}
.section-alt {
    background: var(--dp-gray-50);
}
.section-dark {
    background: var(--dp-navy);
    color: rgba(255,255,255,.8);
}
.section-dark h2, .section-dark h3 { color: var(--dp-white); }

/* ─── Features Grid ─── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.feature-card {
    background: var(--dp-white);
    border: 1px solid var(--dp-gray-200);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    border-color: var(--dp-blue-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--dp-blue-light);
    transform: scaleX(0);
    transition: transform .3s ease;
}
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dp-white);
}
.feature-icon.blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.feature-icon.green { background: linear-gradient(135deg, #16a34a, #15803d); }
.feature-icon.amber { background: linear-gradient(135deg, #d97706, #b45309); }
.feature-icon.purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.feature-icon.red { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.feature-icon.teal { background: linear-gradient(135deg, #0d9488, #0f766e); }
.feature-icon.indigo { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.feature-icon.rose { background: linear-gradient(135deg, #e11d48, #be123c); }

.feature-card h3 { font-size: 1.15rem; }
.feature-card p {
    font-size: .92rem;
    color: var(--dp-gray-500);
    line-height: 1.7;
    margin-bottom: 16px;
}
.feature-list {
    list-style: none;
    padding: 0;
}
.feature-list li {
    position: relative;
    padding-left: 24px;
    font-size: .85rem;
    color: var(--dp-gray-600);
    margin-bottom: 8px;
    line-height: 1.5;
}
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 8px;
    height: 8px;
    background: var(--dp-blue-light);
    border-radius: 50%;
}

/* ─── Module Spotlight (alternating image/text) ─── */
.spotlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    padding: 64px 0;
}
.spotlight.reverse { direction: rtl; }
.spotlight.reverse > * { direction: ltr; }
.spotlight-visual {
    background: var(--dp-gray-100);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
}
.spotlight-visual-inner {
    background: var(--dp-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dp-gray-400);
    font-size: .85rem;
    overflow: hidden;
}
.spotlight-visual-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.spotlight-content h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.spotlight-content p {
    font-size: 1rem;
    color: var(--dp-gray-500);
    margin-bottom: 24px;
}

/* ─── Numbers / Stats Bar ─── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
    padding: 64px 0;
}
.stat-item {}
.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dp-blue-light);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label {
    font-size: .85rem;
    color: var(--dp-gray-500);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ─── Modules showcase (icon tabs) ─── */
.modules-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.module-tab {
    padding: 10px 20px;
    border-radius: 100px;
    font-size: .85rem;
    font-weight: 600;
    background: var(--dp-gray-100);
    color: var(--dp-gray-600);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}
.module-tab.active, .module-tab:hover {
    background: var(--dp-blue-light);
    color: var(--dp-white);
}
.module-panel { display: none; }
.module-panel.active { display: block; }

/* ─── CTA Section ─── */
.cta-section {
    background: linear-gradient(135deg, var(--dp-blue) 0%, #1e40af 100%);
    padding: 80px 0;
    text-align: center;
}
.cta-section h2 { color: var(--dp-white); margin-bottom: 16px; }
.cta-section p {
    color: rgba(255,255,255,.7);
    font-size: 1.15rem;
    max-width: 560px;
    margin: 0 auto 36px;
}

/* ─── Footer ─── */
.footer {
    background: var(--dp-navy);
    color: rgba(255,255,255,.5);
    padding: 64px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dp-white);
    margin-bottom: 16px;
}
.footer-desc {
    font-size: .88rem;
    line-height: 1.7;
    max-width: 320px;
}
.footer h4 {
    color: var(--dp-white);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 20px;
}
.footer-links {
    list-style: none;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,.5);
    font-size: .88rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--dp-white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
}

/* ─── Contact Form ─── */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--dp-gray-700);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--dp-gray-200);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--dp-white);
}
.form-input:focus {
    outline: none;
    border-color: var(--dp-blue-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
textarea.form-input { min-height: 120px; resize: vertical; }

/* ─── Checklist ─── */
.checklist {
    list-style: none;
    padding: 0;
}
.checklist li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 14px;
    font-size: .95rem;
    color: var(--dp-gray-600);
    line-height: 1.6;
}
.checklist li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background: var(--dp-green-soft);
    color: var(--dp-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
}

/* ─── Trust badges ─── */
.trust-row {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding: 48px 0;
}
.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dp-gray-500);
    font-size: .88rem;
    font-weight: 500;
}
.trust-badge svg {
    width: 24px;
    height: 24px;
    color: var(--dp-green);
}

/* ─── App section ─── */
.app-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.app-feature {
    background: var(--dp-white);
    border: 1px solid var(--dp-gray-200);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-align: center;
    transition: all .3s ease;
}
.app-feature:hover {
    border-color: var(--dp-blue-light);
    box-shadow: var(--shadow-md);
}
.app-feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* ─── Scroll animations ─── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 1023px) {
    :root { --section-py: 72px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-tagline { margin: 0 auto 40px; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .spotlight { grid-template-columns: 1fr; gap: 40px; }
    .spotlight.reverse { direction: ltr; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .app-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 639px) {
    :root { --section-py: 56px; --container-px: 16px; }
    .features-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--dp-navy);
        justify-content: center;
        align-items: center;
        gap: 24px;
        z-index: 999;
    }
    .nav-links.open a { color: var(--dp-white); font-size: 1.2rem; }
    .nav-toggle { display: block; }
    .stats-bar { grid-template-columns: 1fr 1fr; gap: 24px; }
    .hero-stats { flex-wrap: wrap; gap: 24px; justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .btn-lg { padding: 14px 28px; font-size: .95rem; }
    .app-features { grid-template-columns: 1fr; }
    .modules-tabs { gap: 4px; }
    .module-tab { padding: 8px 14px; font-size: .78rem; }
}
