/* Color tokens are generated from colors in site.config.js */
:root {
    --secondary: #4cc9f0;
    --accent: #f72585;
    --violet: #7209b7;
    --bg-dark: #10002b;
    --bg-light: #240046;
    --text-light: #e0e1dd;
    --text-highlight: #c77dff;
    /* Direction-aware values, flipped for right-to-left pages */
    --to-inline-end: to right;
    --bullet: "▹";
}

[dir="rtl"] {
    --to-inline-end: to left;
    --bullet: "◃";
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
    color: var(--text-light);
    line-height: 1.6;
    background-attachment: fixed;
}

header {
    background: color-mix(in srgb, var(--bg-dark) 80%, transparent);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--accent);
}

header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(0deg, transparent, var(--secondary), transparent);
    transform: rotate(45deg);
    animation: shine 6s linear infinite;
    opacity: 0.1;
    z-index: 0;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

h1, h2, h3 {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

/* Logo and company name side by side; the lockup is not mirrored in RTL */
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.brand-logo {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    flex: none;
}

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

.hero h1 {
    font-size: 3rem;
    white-space: nowrap;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.intro {
    margin-bottom: 3rem;
    padding: 2rem;
    background: color-mix(in srgb, var(--bg-dark) 50%, transparent);
    border-radius: 10px;
    border-inline-start: 4px solid var(--accent);
}

.intro-heading {
    color: var(--secondary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.intro-subheading {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.language-switch {
    position: fixed;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-block;
    background: color-mix(in srgb, var(--secondary) 20%, transparent);
    border: 1px solid var(--secondary);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover, .btn:focus-visible, .btn[aria-current="page"] {
    background: var(--secondary);
    color: var(--bg-dark);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: color-mix(in srgb, var(--bg-light) 80%, transparent);
    border-radius: 10px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--secondary) 30%, transparent);
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card h3 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.section {
    margin-bottom: 3rem;
}

.section h2 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(var(--to-inline-end), var(--accent), transparent);
    border-radius: 3px;
}

ul {
    list-style-type: none;
    margin-inline-start: 1rem;
}

li {
    position: relative;
    padding-inline-start: 1.5rem;
    margin-bottom: 0.5rem;
}

li::before {
    content: var(--bullet);
    position: absolute;
    inset-inline-start: 0;
    color: var(--accent);
}

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

footer {
    text-align: center;
    padding: 2rem;
    background: color-mix(in srgb, var(--bg-dark) 80%, transparent);
    margin-top: 2rem;
}

.not-found {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
    font-size: 1.2rem;
}

.not-found .code {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

.not-found .links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .brand {
        gap: 0.6rem;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .language-switch {
        top: 0.5rem;
        inset-inline-end: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    header::before {
        animation: none;
        display: none;
    }

    .card, .btn {
        transition: none;
    }

    .card:hover {
        transform: none;
    }
}
