/* ==========================================================================
   Synapse Website - V9 Final Unified (Apple High-Fidelity Theme)
   ========================================================================== */

/* --- גופנים ומשתני צבע --- */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700&display=swap');

:root {
    /* פלטת צבעים */
    --bg-light: #ffffff;
    --bg-grey: #f5f5f7;
    --bg-dark: #000000;

    --text-light-primary: #1d1d1f;
    --text-light-secondary: #515154;

    --text-dark-primary: #f5f5f7;
    --text-dark-secondary: #86868b;

    --accent-blue: #32E6E2;
    --border-light: #d2d2d7;
    --border-dark: #3a3a3c;
    --success-green: #34C759;
}

/* --- הגדרות בסיס --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Assistant', sans-serif;
    background-color: var(--bg-light); /* ברירת מחדל לבן לכל הדפים */
    color: var(--text-light-primary);
    line-height: 1.6;
    font-size: 18px;
    overflow-x: hidden;
}
body.home {
     background-color: var(--bg-dark); /* רק דף הבית מתחיל בשחור */
}


.container { width: 90%; max-width: 1100px; margin: 0 auto; }

/* --- כותרת עליונה (Header) - דקה ומדויקת --- */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    padding: 0;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-dark);
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.logo { font-size: 22px; font-weight: 600; color: var(--text-dark-primary); text-decoration: none; }
.logo span { color: var(--accent-blue); }

.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links a {
    color: var(--text-dark-primary);
    text-decoration: none;
    margin-right: 28px;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--accent-blue); }

/* --- כפתורים --- */
.cta-button { /* כפתור כחול (לרקע בהיר) */
    background-color: var(--accent-blue); color: #ffffff; border: 1px solid var(--accent-blue);
    padding: 6px 14px; font-size: 14px; border-radius: 20px; text-decoration: none;
    transition: all 0.3s ease; font-weight: 600; cursor: pointer;
    min-width: 100px;
    text-align: center;
}
.cta-button:hover { opacity: 0.85; }

.cta-button-light { /* כפתור לבן (לרקע כהה) */
    background-color: #ffffff; color: #000000; border: 1px solid #ffffff;
    padding: 6px 14px; font-size: 14px; border-radius: 20px; text-decoration: none;
    transition: all 0.3s ease; font-weight: 600; cursor: pointer;
    min-width: 100px;
    text-align: center;
}
.cta-button-light:hover { opacity: 0.85; }

/* --- אפקט "זרימה" בגלילה --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-content p { transition-delay: 0.1s; }
.hero-content .cta-button-light { transition-delay: 0.2s; }
.minimal-grid .feature-item:nth-child(2) { transition-delay: 0.1s; }
.minimal-grid .feature-item:nth-child(3) { transition-delay: 0.2s; }
.steps-grid .step-item:nth-child(1) { transition-delay: 0s; }
.steps-grid .step-item:nth-child(2) { transition-delay: 0.1s; }
.steps-grid .step-item:nth-child(3) { transition-delay: 0.2s; }
.use-case-grid .step-item:nth-child(1) { transition-delay: 0s; } /* שינוי שם הגריד */
.use-case-grid .step-item:nth-child(2) { transition-delay: 0.1s; }
.use-case-grid .step-item:nth-child(3) { transition-delay: 0.2s; }


/* --- מקטע 1: HERO (שחור - רק בדף הבית) --- */
.hero.dark-section {
    background-color: var(--bg-dark);
    color: var(--text-dark-primary);
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}
.hero-content h1 { font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1.05; font-weight: 700; margin-bottom: 25px; }
.hero-content p { font-size: clamp(1.1rem, 2.5vw, 1.4rem); max-width: 600px; margin: 0 auto 40px; color: var(--text-dark-secondary); }
.hero-content .cta-button-light { padding: 12px 28px; font-size: 18px; }

/* --- מקטע 2: FEATURES (שחור - רק בדף הבית) --- */
.section {
    padding: 120px 0;
    width: 100%;
}
.section.dark-section {
    background-color: var(--bg-dark);
    color: var(--text-dark-primary);
    text-align: center;
}
.section h2 {
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-light-primary);
}
.section.dark-section h2 { color: var(--text-dark-primary); }
.minimal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; text-align: right; padding: 0 5%; }
.minimal-grid h3 { font-size: 24px; font-weight: 700; margin-bottom: 15px; color: var(--text-dark-primary); }
.minimal-grid p { color: var(--text-dark-secondary); }


/* --- מקטע 3: HOW-IT-WORKS + USE CASES (אפור, עיצוב אחיד - רק בדף הבית) --- */
.section.grey-section {
    background-color: var(--bg-grey);
    color: var(--text-light-primary);
    text-align: center;
     border-top: 1px solid var(--border-light);
}
.section.grey-section h2 { color: var(--text-light-primary); }
.section.grey-section h2.sub-heading {
     margin-top: 80px;
     font-size: clamp(2rem, 4vw, 2.8rem);
}

.steps-grid, .use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 5%;
}
.step-item {
    background-color: var(--bg-light);
    color: var(--text-light-primary);
    border-radius: 12px;
    padding: 25px 30px;
    text-align: right;
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
}
.step-item:hover {
    transform: translateY(0);
    box-shadow: none;
    border-color: var(--accent-blue);
}
.step-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light-primary);
}
.step-item p {
    font-size: 16px;
    color: var(--text-light-secondary);
    line-height: 1.5;
}

/* --- מקטע 5: סיום (לבן - רק בדף הבית) --- */
.section.light-section {
    background-color: var(--bg-light);
    color: var(--text-light-primary);
    text-align: center;
    border-top: 1px solid var(--border-light);
}
.section.light-section h2 { color: var(--text-light-primary); }
.section.light-section p { color: var(--text-light-secondary); }

/* --- עמודים פנימיים (אודות, צור קשר...) --- */
.page-header { background-color: var(--bg-light); position: relative; z-index: 1; padding: 80px 0; text-align: center; border-bottom: 1px solid #eee; }
.page-header h1 { font-size: clamp(2.5rem, 5vw, 3.2rem); font-weight: 700; color: var(--text-light-primary); line-height: 1.2; }
.content-section { background-color: var(--bg-light); position: relative; z-index: 1; padding: 80px 0; }
.content-section .container { max-width: 800px; margin: 0 auto; }
.content-section h2 { text-align: right; font-size: 32px; color: var(--text-light-primary); font-weight: 700; margin-bottom: 20px; }
.content-section p, .content-section ul { margin-bottom: 20px; color: var(--text-light-secondary); font-size: 1.1rem; }
.content-section ul { padding-right: 20px; }

/* --- טופס יצירת קשר (בעמודים פנימיים) --- */
.contact-form { display: flex; flex-direction: column; gap: 20px; max-width: 600px; margin: 40px auto 0; text-align: right; position: relative; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 15px; background-color: var(--bg-grey); border: 1px solid var(--border-light);
    border-radius: 8px; color: var(--text-light-primary); font-family: 'Assistant', sans-serif; font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(0,122,255,0.2);
}
.contact-form button { align-self: flex-start; }

.loader {
    border: 4px solid var(--bg-grey);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    display: none;
    position: absolute;
    right: 120px;
    top: calc(100% - 46px);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    color: var(--success-green);
    background-color: #e6f7ec;
    border: 1px solid #b7ebc9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
    text-align: center;
    font-weight: 600;
}

/* --- כותרת תחתונה (Footer) --- */
footer {
    position: relative; z-index: 1; text-align: center; padding: 40px 0;
    background-color: var(--bg-grey);
    border-top: 1px solid var(--border-light);
    color: var(--text-light-secondary);
}
footer a { color: var(--accent-blue); text-decoration: none; margin: 0 10px; }

/* --- רספונסיביות --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    header .container { padding-right: 5%; padding-left: 5%; }
    .hero { min-height: 70vh; }
    .section { padding: 80px 20px; }
    .steps-grid { grid-template-columns: 1fr; }
    .loader {
         right: auto;
         left: 10px;
         top: calc(100% - 46px);
    }
}