/* ============================================================
   PixelArt Pianeta Bambini - Landing Page Stylesheet
   ============================================================ */

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

:root {
    --primary: #F58220;
    --primary-dark: #E5721A;
    --primary-light: #FFF3E5;
    --secondary: #2B7CB3;
    --accent: #D32F2F;
    --dark: #333333;
    --gray: #757575;
    --light: #E0E0E0;
    --lighter: #F9F9F9;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --font-main: 'Poppins', sans-serif;
    --font-title: 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--lighter);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Header --- */
.header {
    background: var(--white);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--primary);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img { height: 46px; width: auto; }

.logo h1 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--dark);
}

.logo-accent { color: var(--primary); }

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, #F58220 0%, #F9A825 50%, #FFB74D 100%);
    color: var(--white);
    text-align: center;
    padding: 4rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: repeating-linear-gradient(45deg, transparent, transparent 25px, rgba(255,255,255,0.04) 25px, rgba(255,255,255,0.04) 50px);
    animation: heroPattern 25s linear infinite;
}

@keyframes heroPattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(255,255,255,0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.15rem;
}

.btn-white {
    background: var(--white);
    color: var(--primary-dark);
}

.btn-white:hover { background: #f0f0f0; }

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.15);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    background: var(--light);
    color: var(--dark);
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

/* --- Features Section --- */
.features {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

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

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    margin-bottom: 1rem;
}

.feature-icon img {
    width: 130px;
    height: 130px;
}

.feature-card-lg .feature-icon img {
    width: 170px;
    height: 170px;
}

.feature-card h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* --- How it works --- */
.how-it-works {
    padding: 4rem 1.5rem;
    background: var(--white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.step-card h3 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* --- CTA Section --- */
.cta-section {
    padding: 4rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #F58220 0%, #F9A825 100%);
    color: var(--white);
}

.cta-section h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Modal Overlay --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--lighter);
    color: var(--dark);
}

.modal h2 {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--light);
}

.modal-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.modal-tab:hover {
    color: var(--primary-dark);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- Form --- */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.form-submit {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.form-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.form-privacy-note {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.form-privacy-note a {
    color: var(--primary);
    text-decoration: underline;
}

.form-divider {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    margin: 1rem 0;
    position: relative;
}

.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--light);
}

.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

.form-error {
    color: #F44336;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
    display: none;
}

.form-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 700;
    margin-bottom: 1rem;
    display: none;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--gray);
    font-size: 0.85rem;
    background: var(--white);
    border-top: 2px solid var(--primary-light);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 0.75rem 0;
        gap: 0.5rem;
    }

    .logo h1 { font-size: 1rem; }
    .logo-img { height: 36px; }

    .hero { padding: 3rem 1rem; }
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1rem; }

    .features { padding: 2.5rem 1rem; }
    .section-title { font-size: 1.5rem; }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .modal { padding: 1.5rem; }
}
