/* משתני מערכת לעיצוב אחיד */
:root {
    --bg-color: #0d0d0f; /* שחור עמוק */
    --surface-color: #161619; /* אפור פחם */
    --text-color: #f4f4f5;
    --text-muted: #a1a1a6;
    --accent-color: #ad8619; 
    --transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* הפונטים המיוחדים החדשים */
    --font-heading: 'Bellefair', serif;
    --font-body: 'Rubik', sans-serif;
    --font-accent: 'Karantina', system-ui;
}

/* נגישות */
.skip-link {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    z-index: 1000;
    font-weight: bold;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }
*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

/* איפוס */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.15rem;
    overflow-x: hidden;
    font-weight: 300;
}

/* טיפוגרפיה למראה מגזין */
.serif-title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 400;
    margin-bottom: 30px;
    line-height: 1.1;
    color: #ffffff;
    letter-spacing: 1px;
}
.accent-text { color: var(--accent-color); font-style: italic; }
.center-text { text-align: center; }
.max-width-title { max-width: 800px; margin: 0 auto 50px; }

/* פריסה כללית */
.container { width: 90%; max-width: 1400px; margin: 0 auto; }
.narrow-container { max-width: 900px; margin: 0 auto; }
.section-padding { padding: 140px 0; }
.dark-bg { background-color: var(--surface-color); }

/* --- Header --- */
.main-header {
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(13, 13, 15, 0.9);
    backdrop-filter: blur(15px);
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1600px;
    margin: 0 auto;
}
.logo-placeholder {
    width: 140px; height: 50px;
    border: 1px dashed var(--accent-color);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-color); font-size: 0.9rem;
}
.logo-placeholder.small { width: 100px; height: 40px; margin: 0 auto 20px; }
.logo-img { max-height: 60px; width: auto; }

nav ul { display: flex; list-style: none; gap: 40px; }
nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}
nav ul li a:hover { color: var(--accent-color); }
nav ul li a::after {
    content: ''; position: absolute;
    width: 0; height: 2px;
    background: var(--accent-color);
    bottom: 0; right: 0;
    transition: var(--transition);
}
nav ul li a:hover::after { width: 100%; }

.mobile-menu-btn {
    display: none; background: none; border: none;
    color: var(--text-color); font-size: 2rem; cursor: pointer;
}

/* --- Hero --- */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #000;
    overflow: hidden; /* חובה כדי שהאנימציות לא ייצרו גלילה אופקית */
}

/* 
   הגדרות הסליידר ואנימציות המעבר המיוחדות
   אפקט "חשיפת עדשה / וילון מחליק" מטורף
*/
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0; /* מוסתר כברירת מחדל */
    z-index: 0;
}

/* מחלקה לתמונה הקודמת שהייתה פעילה (היא שוקעת אחורה ומתכהה) */
.slide.prev {
    opacity: 1;
    z-index: 1;
    animation: slideOut 1.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* מחלקה לתמונה החדשה שנכנסת (נחשפת באמצעות חיתוך ויזואלי ומסתדרת לפוקוס) */
.slide.active {
    opacity: 1;
    z-index: 2;
    animation: slideIn 1.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes slideOut {
    0% {
        transform: scale(1);
        filter: brightness(1) grayscale(0%);
    }
    100% {
        /* התמונה הקודמת נדחפת אחורה ושמאלה ומאבדת פוקוס וצבע */
        transform: scale(1.1) translateX(-30px);
        filter: brightness(0.3) grayscale(80%);
    }
}

@keyframes slideIn {
    0% {
        /* מתחיל מוסתר לחלוטין בצד ימין (חיתוך מוחלט) */
        clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
        transform: scale(1.3) translateX(30px);
        filter: blur(15px) brightness(1.5);
    }
    100% {
        /* נפתח על פני כל המסך בתנועת ניגוב שמאלה */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        transform: scale(1) translateX(0);
        filter: blur(0px) brightness(1);
    }
}

/* שכבת ההחשכה הקבועה (מעל התמונות מתחת לטקסט) */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 3;
}

.hero-content {
    text-align: center;
    z-index: 4;
    padding: 0 20px;
    position: relative;
}
.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 400;
    margin-bottom: 15px;
    text-shadow: 2px 4px 20px rgba(0,0,0,0.8);
    line-height: 1;
}
.hero-content p {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: #e0e0e0;
    margin-bottom: 40px;
    letter-spacing: 1px;
    text-shadow: 1px 2px 10px rgba(0,0,0,0.8);
}
.btn {
    display: inline-block;
    padding: 15px 45px;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.2rem;
    border-radius: 50px;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}
.btn:hover, .btn:focus {
    background: rgba(13, 13, 15, 0.8);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

/* --- About (2 עמודות) --- */
.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}
.split-text p { margin-bottom: 20px; color: var(--text-muted); font-size: 1.2rem; }
.split-text strong { color: var(--text-color); font-size: 1.4rem; font-weight: 500; font-family: var(--font-heading); font-size: 2rem;}
.vertical-image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--surface-color);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    border: 1px dashed var(--accent-color);
    box-shadow: -20px 20px 0 rgba(173, 134, 25, 0.1);
}

/* --- Portfolio --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.portfolio-item {
    display: block;
    text-decoration: none;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
    background: #000;
}
.portfolio-img-placeholder {
    width: 100%; height: 100%;
    background: #2a2a2d;
    display: flex; align-items: center; justify-content: center;
    color: #555;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.portfolio-item:hover .portfolio-img-placeholder,
.portfolio-item:focus-visible .portfolio-img-placeholder {
    transform: scale(1.1) rotate(-1deg);
}
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 13, 15, 0.95) 0%, rgba(13, 13, 15, 0.1) 70%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 40px 30px;
    opacity: 0;
    transition: all 0.5s ease;
    border: 2px solid transparent;
    border-radius: 12px;
}
.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus-visible .portfolio-overlay {
    opacity: 1;
    border-color: var(--accent-color);
}
.portfolio-overlay h3 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 400;
    color: #fff;
    transform: translateY(30px);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:focus-visible .portfolio-overlay h3 {
    transform: translateY(0);
}

/* --- Articles --- */
.article-block {
    text-align: center;
    margin-bottom: 60px;
}
.article-block p {
    color: var(--text-muted);
    font-size: 1.3rem;
    margin-bottom: 20px;
}
.separator {
    width: 2px;
    height: 80px;
    background: var(--accent-color);
    margin: 60px auto;
    opacity: 0.5;
}

/* --- 4 Cubes --- */
.cubes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}
.cube {
    background: var(--bg-color);
    padding: 60px 35px 40px;
    border-radius: 16px;
    border-bottom: 4px solid transparent;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.03);
    overflow: hidden;
}
.cube:hover {
    border-bottom-color: var(--accent-color);
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    background: rgba(22, 22, 25, 0.8);
}
.cube-number {
    position: absolute;
    top: 5px; right: 15px;
    font-family: var(--font-accent);
    font-size: 8rem;
    line-height: 1;
    color: rgba(173, 134, 25, 0.1);
    transition: color 0.5s ease;
    z-index: 1;
}
.cube:hover .cube-number {
    color: rgba(173, 134, 25, 0.3);
}
.cube h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    z-index: 2;
}
.cube p {
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    font-size: 1.1rem;
}

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(rgba(13, 13, 15, 0.95), rgba(13, 13, 15, 0.85)), var(--surface-color);
    border-top: 1px solid rgba(173, 134, 25, 0.15);
    border-bottom: 1px solid rgba(173, 134, 25, 0.15);
    text-align: center;
}
.cta-text {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 45px;
    background-color: #25D366; 
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}
.whatsapp-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.whatsapp-btn:hover, .whatsapp-btn:focus-visible {
    background-color: #128C7E;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
    color: #ffffff;
}

/* --- Footer --- */
.main-footer {
    background: #08080a;
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}
.footer-links p { color: var(--text-muted); margin-bottom: 10px; }
.accessibility-statement {
    color: var(--accent-color);
    text-decoration: underline;
    font-size: 0.95rem;
}

/* --- אנימציות גלילה --- */
.hidden-element {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.show-element { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --- מובייל --- */
@media (max-width: 992px) {
    .split-content { grid-template-columns: 1fr; gap: 40px; }
    .split-text { order: 2; text-align: center; }
    .split-image { order: 1; }
    .serif-title { font-size: 3rem; }
}
@media (max-width: 768px) {
    .header-container { padding: 15px 20px; }
    nav ul {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; right: 0; width: 100%;
        background: rgba(13, 13, 15, 0.98);
        padding: 0; max-height: 0; overflow: hidden;
        text-align: center; transition: max-height 0.4s ease;
    }
    nav ul.active { max-height: 400px; padding: 20px 0; border-bottom: 2px solid var(--accent-color); }
    .mobile-menu-btn { display: block; }
}
