﻿/* --- FONT IMPORTS --- */
@font-face {
    font-family: 'Junicode';
    src: url('fonts/Junicode-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Junicode';
    src: url('fonts/Junicode-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

/* --- VARIABLES --- */
:root {
    /* Zen-inspired color palette */
    --bg-dark: #212121;
    --bg-darker: #212121;
    --text-primary: #e8e6e3;
    --text-muted: #a0a0a0;
    --accent-primary: #ff7b72; /* Coral/salmon like Zen's "calmer" */
    --accent-secondary: #5482FF;
    --btn-primary: #e8e6e3;
    --btn-primary-text: #1a1a1a;
    --btn-secondary: rgba(255, 255, 255, 0.05);
    --border-subtle: rgba(255, 255, 255, 0.08);
    /* UPDATE THESE VARIABLES */
    --font-serif: 'Junicode', 'EB Garamond', serif;
    /* CHANGED: Removed Junicode from here so body text becomes clean */
    --font-sans: 'Montserrat', sans-serif; /* CHANGED from Inter */
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- NAVBAR (Updated) --- */
.navbar {
    position: absolute; /* CHANGED: 'absolute' makes it scroll with the page. 'fixed' made it stick. */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 60px;
    /* REMOVED: background-color and backdrop-filter so it's fully transparent */
    background-color: transparent;
    backdrop-filter: none;
}

/* 2. Controls the size of your logo image */
.brand-logo {
    height: 90px; /* Adjust this number to make the logo bigger/smaller */
    width: auto; /* Keeps the aspect ratio correct */
    display: block;
}

/* 1. Aligns the image and text side-by-side */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px; /* Adjusts space between logo and text */
}

.nav-brand.logo {
    font-family: var(--font-sans);
    font-size:2rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 40px;
    position: absolute;
    left: 50%;
    /* --- NEW CODE START --- */
    top: 50px; /* This pins the text 40px from the top, regardless of logo size */
    transform: translateX(-50%); /* Keeps it centered horizontally */
    /* --- NEW CODE END --- */
}

    .nav-links a {
        color: var(--text-muted);
        text-decoration: none;
        font-size: 1.15rem; /* INCREASED from 0.95rem */
        font-weight: 500;
        transition: color 0.2s ease;
    }

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    position: absolute;
    right: 40px; /* Keeps it on the right side */
    top: 50px; /* Matches the "top" value of your center links */
}

.btn-download {
    background-color: var(--btn-primary);
    color: var(--btn-primary-text);
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    background-color: #f5f3f0;
}

/* --- HERO SECTION (Zen centered style) --- */
.hero {
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 0;
    position: relative;
}

.hero-container {
    max-width: 1000px;
    text-align: center;
    margin-bottom: 0;
}

/* Hero Title - Large serif like Zen */
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 9vw, 7.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.hero-title em {
    font-family: var(--font-serif);
    font-style: italic;
    color: #4169E1;  /* Regal blue */
}

/* Hero Subtitle - Restored to original size */
.hero-subtitle {
    font-family: var(--font-sans);
    font-weight: 600; /* Set to Semi-Bold */
    font-size: 1rem; /* CHANGED: Increased from 1rem so it's readable again */
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 35px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.01em;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 18px;
}

/* Hero Buttons - Made smaller as requested */
.btn-primary,
.btn-secondary {
    padding: 16px 30px; /* CHANGED: Much smaller padding (was 18px 40px) */
    border-radius: 8px; /* Slightly tighter corners */
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem; /* CHANGED: Smaller font size (was 1.15rem) */
    transition: all 0.3s ease;
    display: inline-block;
    font-family: var(--font-sans);
    font-weight: 600; /* Set to Semi-Bold */
}

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

.btn-primary:hover {
    background-color: #f5f3f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background-color: var(--btn-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* --- VISUAL BRIDGE SECTION --- */
.visual-bridge {
    padding: 0px 40px 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.bridge-image-container {
    position: relative;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border-subtle);
    min-height: 300px;
}

/* 2. Position the text over the image */
.overlay-text {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 8%; /* Position from the left side */
    transform: translateY(-50%); /* Perfect vertical centering */
    display: flex;
    flex-direction: column; /* Stacks the words */
    z-index: 10; /* Ensures text is above the image */
    pointer-events: none; /* Lets you click through the text if needed */
}

/* 3. Style the words */
.anim-word {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 8vw, 10rem); /* Responsive giant text */
    font-weight: 400;
    line-height: 1.1;
    color: white; /* Make sure this is readable on your background */
    /* Animation Start State (Hidden & Lower down) */
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); /* Smooth 'ease-out' feel */
}

/* CORRECTED CODE */
.bridge-image-container.active .anim-word {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Stagger the timing so they appear one by one */
.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}


.bridge-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.image-placeholder-bridge {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.image-placeholder-bridge i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #4169E1;
    opacity: 0.3;
}

.image-placeholder-bridge p {
    font-size: 1.2rem;
    font-family: var(--font-serif);
}

/* --- PREVIEW SECTION (Like Zen's browser mockup) --- */
.preview-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 40px;
}

.preview-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.code-preview {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.preview-header {
    margin-bottom: 10px;
}

.preview-tabs {
    display: flex;
    gap: 12px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.tab.active {
    background: rgba(84, 130, 255, 0.1);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.tab i {
    font-size: 0.95rem;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.value-badge {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.value-badge:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-secondary);
    transform: translateX(5px);
}

.value-badge i {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-top: 4px;
}

.value-badge .fa-python {
    color: #3776ab; /* Python's official blue */
}

.badge-text h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 400;
}

.badge-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Preview Image/Gradient Side */
.preview-image {
    background: linear-gradient(135deg, 
        rgba(84, 130, 255, 0.15) 0%, 
        rgba(255, 123, 114, 0.1) 50%,
        rgba(84, 130, 255, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.preview-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(84, 130, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 123, 114, 0.15) 0%, transparent 50%);
    filter: blur(60px);
}

/* --- FOOTER --- */
.footer {
    padding: 40px 40px 30px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-contact a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--accent-primary);
}

/* --- FEATURES SECTION (2x2 Grid) --- */
.features-section {
    padding: 120px 40px 140px;
    max-width: 1600px;
    margin: 0 auto;
}

.features-container {
    width: 100%;
}

.features-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 100px;
    text-align: center;
    letter-spacing: -0.01em;
}

.features-title em {
    font-style: italic;
    color: #4169E1; /* Matching the hero regal blue */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.feature-card {
    font-family: var(--font-sans);
    font-weight: 600; /* Set to Semi-Bold */
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 60px 50px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: #4169E1;
    transform: translateY(-8px);
}

.feature-card h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.feature-card p {
        font-family: var(--font-sans); /* CHANGED */
        font-size: 1.15rem; /* Slightly smaller for sans-serif balance */
        color: var(--text-primary);
        line-height: 1.7;
        letter-spacing: 0.01em;
}


/* Style for the "Email me" links on the Get Involved page */
.btn-text {
    display: inline-block;
    color: var(--accent-primary); /* Uses your coral color */
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-sans);
    margin-top: 10px;
    transition: opacity 0.2s;
}

    .btn-text:hover {
        opacity: 0.8;
        text-decoration: underline;
    }

/* --- CUSTOM SCROLLBAR --- */

/* 1. The width of the scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

/* 2. The background of the bar (matches your site bg) */
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

/* 3. The moving part (the thumb) */
::-webkit-scrollbar-thumb {
    background: #333; /* Dark Grey */
    border-radius: 5px; /* Round edges */
    border: 2px solid var(--bg-dark); /* Creates a nice padding effect */
}

    /* 4. Color when you hover over it */
    ::-webkit-scrollbar-thumb:hover {
        background: #555; /* Slightly lighter when grabbing */
    }


/* --- ZEN SCROLL ANIMATIONS --- */

/* 1. The Starting State (Hidden & Lower) */
.reveal {
    opacity: 0;
    transform: translateY(40px); /* Starts 40px lower */
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); /* The "Zen" smooth curve */
    filter: blur(5px); /* Optional: adds a slight blur as it fades in */
}

    /* 2. The Active State (Visible & In Place) */
    .reveal.active {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }

/* 3. Staggered Delays (For lists/grids) */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* 4. Bonus: Floating Animation for your Hero Image */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

/* --- LANGUAGE SWITCHER --- */
.lang-switch {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

    .lang-switch:hover {
        color: var(--text-primary);
        background-color: rgba(255, 255, 255, 0.05); /* Subtle hover background */
    }


/* --- SUBTLE TOAST NOTIFICATION (PROFI VERSION) --- */
.lang-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(30, 30, 30, 0.9); /* Slightly darker for better contrast */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start; /* Align to top since we have two lines of text */
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    /* Animation */
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

    .lang-toast.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

/* Text Formatting inside the toast */
.toast-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .toast-text strong {
        font-family: var(--font-sans);
        font-size: 0.95rem;
        font-weight: 600;
        color: #ffffff;
    }

    .toast-text p {
        font-family: var(--font-sans);
        font-size: 0.85rem;
        color: var(--text-muted);
        margin: 0;
        line-height: 1.4;
    }

/* The little 'RO' badge to mimic your navbar button */
.toast-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.close-toast {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    transition: color 0.2s;
}

    .close-toast:hover {
        color: #ffffff;
    }

/* =========================================
   📱 MOBILE RESPONSIVENESS (The "Phone" Fix)
   ========================================= */

@media (max-width: 768px) {
    /* 1. NAVBAR: Stack it neatly */
    .navbar {
        flex-direction: column;
        padding: 15px 20px;
        gap: 15px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 0.9rem;
    }

    /* --- FIX 1: NAVBAR BUTTONS & LANG SWITCHER --- */
    .nav-cta {
        width: 100%;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* 👈 This stops them from falling underneath each other! */
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important; /* Tighter gap for small screens */
    }

    /* 2. HERO SECTION: Shrink the massive text and add breathing room */
    .hero {
        padding-top: 180px; /* Make room for the taller stacked navbar */
        padding-bottom: 40px;
    }

    /* --- FIX 2: PERFECT TEXT SCALING --- */
    h1, .hero-title {
        /* Am mărit valorile aici pentru un titlu mai mare și mai de impact */
        font-size: clamp(2.8rem, 12vw, 4.2rem) !important;
        line-height: 1.05; /* Un spațiu puțin mai strâns între rânduri arată mai bine la texte mari */
        letter-spacing: -1px;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        padding: 0 10px;
    }

    /* Keep ONLY the main hero/footer buttons full width */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
        gap: 15px;
    }

    .nav-cta .btn-download,
    .nav-cta .btn-secondary {
        white-space: nowrap !important; /* Forces text to stay on one line */
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
    }

        .hero-buttons .btn-primary,
        .hero-buttons .btn-secondary,
        .footer-content .btn-primary {
            width: 100%;
            text-align: center;
            justify-content: center;
        }

    /* 4. THE FEATURES GRID: Stack cards vertically (1 column) */
    .features-grid, .bento-grid {
        grid-template-columns: 1fr !important; /* 1 column layout */
        gap: 20px;
        padding: 0 15px;
    }

    /* 5. VISUAL BRIDGE IMAGE: Keep it contained */
    .visual-bridge {
        padding: 20px 15px;
    }

    /* --- FIX 3: THE UNCROPPED IMAGE --- */
    .bridge-image-container {
        min-height: unset !important; /* Removes the forced tallness */
        height: auto !important;
        aspect-ratio: 16 / 9 !important; /* Forces a standard landscape rectangle */
        border-radius: 12px !important;
    }

    .bridge-image {
        object-position: center center !important; /* Keeps you centered in the frame */
    }

    /* Shrink the floating words so they don't block your face */
    .overlay-text {
        font-size: 1.5rem !important;
        gap: 5px !important;
    }

    /* 6. TOAST NOTIFICATION: Don't let it cover the whole screen */
    .lang-toast {
        bottom: 15px;
        left: 15px;
        right: 15px;
        flex-direction: column; /* Stack the text and button */
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .lang-switch {
        white-space: nowrap !important;
        padding: 8px !important;
    }
}