/* dela-gothic-one-regular - cyrillic_latin */
@font-face {
  font-display: swap;
  font-family: 'Dela Gothic One';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/dela-gothic-one-v19-cyrillic_latin-regular.woff2') format('woff2');
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --red: #E03000;
    --red-dark: #CC2200;
    --white: #ffffff;
    --white-dim: rgba(255,255,255,0.85);
    --pill-bg: rgba(255,255,255,0.07);
    --pill-border: rgba(255,255,255,0.75);
    --glow-red: rgba(224, 48, 0, 0.45);
    --font-main: 'Dela Gothic One', sans-serif;
    --font-ar: 'Noto Sans Arabic', sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: #111111;
    color: var(--white);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Arabic font override */
html[lang="ar"] body,
html[lang="ar"] .pill span,
html[lang="ar"] .subtext,
html[lang="ar"] .brand-name {
    font-family: var(--font-ar), var(--font-main);
}

/* ===== Canvas Background ===== */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== Language Switcher ===== */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 30px;
    padding: 6px 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html[dir="rtl"] .lang-switcher {
    right: auto;
    left: 24px;
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.25s ease, background 0.25s ease;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: var(--white);
}

.lang-btn.active {
    color: var(--white);
    background: rgba(224, 48, 0, 0.35);
    border-radius: 20px;
    padding: 2px 8px;
}

.lang-sep {
    color: rgba(255,255,255,0.2);
    font-size: 0.7rem;
    user-select: none;
}

/* ===== Main Content ===== */
.main-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 900px;
    gap: 0;
}

/* ===== Logo ===== */
.logo-wrap {
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 0 18px rgba(255,255,255,0.35)) drop-shadow(0 0 40px rgba(224,48,0,0.3));
    animation: logoFloat 5s ease-in-out infinite;
}

.logo-svg {
    width: clamp(180px, 28vw, 320px);
    height: auto;
    display: block;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ===== Brand Name ===== */
.brand-name {
    font-size: clamp(2rem, 7vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--white);
    text-shadow:
        0 0 20px rgba(255,255,255,0.25),
        0 0 60px rgba(224,48,0,0.2);
    margin-bottom: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
    white-space: nowrap;
}

/* ===== Pills Row ===== */
.pills-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(0.8rem, 2.5vw, 1.8rem);
    flex-wrap: wrap;
    margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
}

/* ===== Individual Pill ===== */
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: clamp(0.85rem, 1.8vw, 1.1rem) clamp(2.2rem, 4.5vw, 3rem);
    cursor: default;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 12px rgba(224, 48, 0, 0.08),
        0 0 28px rgba(224, 48, 0, 0.05),
        0 4px 20px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pill::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 55%);
    pointer-events: none;
}

.pill span {
    font-size: clamp(0.85rem, 2.2vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--white);
    text-transform: lowercase;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.pill:hover {
    background: rgba(224, 48, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow:
        0 0 20px rgba(224, 48, 0, 0.45),
        0 0 50px rgba(224, 48, 0, 0.2),
        0 0 80px rgba(224, 48, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Floating animations — staggered, slower and more airy */
.float-1 {
    animation: floatPill 5.5s ease-in-out infinite;
    animation-delay: 0s;
}
.float-2 {
    animation: floatPill 6.2s ease-in-out infinite;
    animation-delay: 0.9s;
}
.float-3 {
    animation: floatPill 5.8s ease-in-out infinite;
    animation-delay: 1.8s;
}

@keyframes floatPill {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Pause float on hover, apply hover transform instead */
.pill:hover {
    animation-play-state: paused;
    transform: scale(1.06) translateY(-6px);
}

/* ===== Subtext ===== */
.subtext {
    font-size: clamp(0.75rem, 1.8vw, 1rem);
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.06em;
    font-weight: 400;
    text-transform: lowercase;
    margin-top: 0.5rem;
    transition: opacity 0.4s ease;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 768px) {
    .brand-name {
        letter-spacing: 0.12em;
    }
    .pills-row {
        gap: 0.9rem;
    }
    .pill span {
        font-size: clamp(0.8rem, 3.5vw, 1rem);
    }
    .pill {
        padding: 0.6rem 1.4rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .brand-name {
        font-size: clamp(1.7rem, 10vw, 2.8rem);
        letter-spacing: 0.1em;
        white-space: normal;
        word-break: break-word;
    }
    .pills-row {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    .pill {
        width: min(260px, 80vw);
        padding: 0.65rem 1.2rem;
    }
    .pill span {
        font-size: 0.9rem;
    }
    .lang-switcher {
        top: 14px;
        right: 14px;
        padding: 5px 10px;
    }
    html[dir="rtl"] .lang-switcher {
        right: auto;
        left: 14px;
    }
    .subtext {
        font-size: 0.72rem;
        padding: 0 1rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .brand-name {
        font-size: 1.5rem;
    }
    .pill {
        width: 90vw;
    }
}

/* ===== Fade-in entrance ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-wrap {
    animation: logoFloat 5s ease-in-out infinite, fadeInUp 0.8s ease both;
}

.brand-name {
    animation: fadeInUp 0.9s ease 0.15s both;
}

.pills-row {
    animation: fadeInUp 1s ease 0.3s both;
}

.subtext {
    animation: fadeInUp 1s ease 0.5s both;
}

/* ===== RTL adjustments ===== */
html[dir="rtl"] .pills-row {
    flex-direction: row-reverse;
}

@media (max-width: 480px) {
    html[dir="rtl"] .pills-row {
        flex-direction: column;
    }
}