/* font import handled in HTML for performance */

:root {
    /* Colors */
    --primary: hsl(258, 70%, 50%);
    --primary-glow: hsla(258, 70%, 50%, 0.3);
    --secondary: hsl(175, 80%, 40%);
    --secondary-glow: hsla(175, 80%, 40%, 0.3);

    --bg-dark: hsl(220, 20%, 10%);
    --bg-darker: hsl(220, 20%, 8%);
    --bg-card: hsla(220, 20%, 16%, 0.4);
    --bg-card-border: hsla(220, 20%, 80%, 0.1);
    --text-main: hsl(220, 10%, 95%);
    --text-muted: hsl(220, 10%, 70%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Ambient Lights */
.ambient-light {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.light-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary), transparent 70%);
}

.light-2 {
    bottom: 0%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 50px);
    }
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.text-gradient {
    background: linear-gradient(135deg, #fff, var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 20, 30, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bg-card-border);
    padding: 0.5rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
}

.logo-icon {
    color: var(--primary);
    stroke-width: 3px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.btn-text {
    font-weight: 600;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Language Switcher */
.language-selector {
    position: relative;
    margin-right: 1rem;
    padding-bottom: 20px;
    /* Invisible bridge downwards */
    margin-bottom: -20px;
    /* Compensate for layout */
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 140px;
    background: var(--bg-darker);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-top: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.lang-dropdown.show {
    display: flex;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-dropdown a {
    display: block;
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 4px;
    transition: 0.2s;
    text-decoration: none !important;
}

.lang-dropdown a:hover {
    background: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    padding-top: 160px;
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    margin-right: 0.5rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-social-proof {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatars {
    display: flex;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
    margin-right: -10px;
}

/* Hero Visual - Dashboard Mockup */
.hero-visual {
    position: relative;
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(20px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.glass-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.stat-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.stat-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.positive {
    color: var(--secondary);
}

.chart-placeholder {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 120px;
    padding-top: 1rem;
    gap: 8px;
}

.bar,
.barhighlight {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: height 1s ease;
}

.barhighlight {
    background: linear-gradient(to top, var(--primary), #a855f7);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Floating Elements */
.float-card {
    position: absolute;
    bottom: 20px;
    right: -20px;
    background: rgba(20, 25, 40, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-card-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: float 6s infinite ease-in-out;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.float-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.float-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Why Referalis (Problem/Solution) */
.problem-solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.ps-card {
    background: rgba(255, 100, 100, 0.03);
    /* Subtle red tint for problems */
    border: 1px solid rgba(255, 100, 100, 0.1);
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: transform 0.3s;
}

.ps-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 100, 100, 0.06);
}

.icon-box-danger {
    width: 50px;
    height: 50px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    /* Red color for visual "problem" cue */
    margin-bottom: 1.5rem;
}

.ps-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.ps-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.solution-highlight {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.1), transparent);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--primary-glow);
}

.solution-highlight p {
    font-size: 1.2rem;
    color: white;
}

.text-primary {
    color: var(--primary);
    font-weight: 600;
}

/* Sections General */
.section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bg-card-border);
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: transform 0.3s, background 0.3s;
}

.glass-panel:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Steps (How it works) */
.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.step-item {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.step-image {
    width: 100%;
    max-width: 220px;
    /* Limit size */
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bg-card-border);
    transition: transform 0.3s ease;
}

.step-image:hover {
    transform: translateY(-5px) scale(1.02);
}

.step-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    margin-bottom: -1.5rem;
    /* Adjusted for image presence */
    position: relative;
    z-index: -1;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    display: none;
    /* Hide on mobile defaults, show on desktop via media query */
}

/* CTA Section */
.cta-box {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(124, 58, 237, 0.1));
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-desc {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid var(--bg-card-border);
    padding: 4rem 0 0;
    margin-top: 4rem;
    background: var(--bg-darker);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.link-column h4 {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.link-column a {
    display: block;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.link-column a:hover {
    color: var(--primary);
}

.copyright {
    border-top: 1px solid var(--bg-card-border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (min-width: 768px) {
    .step-connector {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons,
    .hero-social-proof {
        justify-content: center;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .navbar.nav-open {
        background: var(--bg-darker);
        height: 100vh;
        overflow-y: auto;
    }

    .navbar.nav-open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        padding: 2rem;
        align-items: center;
        gap: 2rem;
    }

    .navbar.nav-open .nav-actions {
        display: flex;
        flex-direction: column;
        position: absolute;
        bottom: 40px;
        left: 0;
        width: 100%;
        padding: 0 2rem;
    }

    .navbar.nav-open .menu-toggle {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .steps-container {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

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

/* Icon sizes */
.icon-sm {
    width: 18px;
    height: 18px;
}

/* Pulsing Animation for Problem Icons */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

.icon-box-danger.pulse {
    animation: pulse-red 2s infinite;
}