/* ===== Project Noot — Smooth Organic Redesign ===== */

:root {
    --gold: #c9a24e;
    --gold-light: #e8cc7a;
    --gold-glow: rgba(201, 162, 78, 0.25);
    --gold-dim: rgba(201, 162, 78, 0.08);
    --navy: #06090f;
    --navy-soft: #0c1220;
    --sand: #e8d9b8;
    --white: #e8e8e8;
    --text: #b0afc0;
    --text-soft: #7a7a90;
    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    --font-arabic: 'Noto Sans Arabic', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--navy);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.7;
}

/* RTL support */
html[dir="rtl"] body {
    font-family: var(--font-arabic), var(--font-body);
}
html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-label,
html[dir="rtl"] .section-headline,
html[dir="rtl"] h3, html[dir="rtl"] h4 {
    font-family: var(--font-arabic), var(--font-display);
}

/* ===== Star layers (parallax canvases) ===== */
.star-layer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
#stars-far  { z-index: 0; opacity: 0.5; }
#stars-mid  { z-index: 1; opacity: 0.7; }
#stars-near { z-index: 2; opacity: 1; }

#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ===== Language toggle ===== */
.lang-toggle {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(201, 162, 78, 0.25);
    background: rgba(6, 9, 15, 0.7);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}
.lang-toggle:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
    transform: translateY(-50%) scale(1.1);
}
.lang-icon {
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 28px;
}

.hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    filter: blur(40px);
    animation: glow-pulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -55%) scale(1); }
    50%      { opacity: 0.7; transform: translate(-50%, -55%) scale(1.15); }
}

.hero-logo {
    width: 220px;
    height: auto;
    margin-bottom: 32px;
    filter: drop-shadow(0 0 30px rgba(201, 162, 78, 0.2));
    animation: logo-float 8s ease-in-out infinite;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 10px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 60%, #a07830 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    color: var(--sand);
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    font-weight: 400;
    opacity: 0.85;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-soft);
    max-width: 420px;
    line-height: 1.8;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, transparent, var(--gold), transparent);
    animation: scroll-fade 2.5s ease-in-out infinite;
}

@keyframes scroll-fade {
    0%, 100% { opacity: 0; transform: scaleY(0.5); }
    50%      { opacity: 1; transform: scaleY(1); }
}

/* ===== Sections ===== */
.section {
    position: relative;
    z-index: 10;
    padding: 120px 0;
}

.section-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--gold);
    text-align: center;
    margin-bottom: 16px;
    opacity: 0.8;
}

.section-headline {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    color: var(--sand);
    text-align: center;
    margin-bottom: 72px;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

/* ===== Mission Journey — scroll-driven visualization ===== */
.mission-journey {
    position: relative;
    z-index: 10;
    height: 300vh;
}

.journey-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    will-change: transform;
}

#journey-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Year labels */
.journey-label {
    position: absolute;
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 60%, #a07830 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 6px;
    top: 7%;
    left: 50%;
    transform: translateX(-50%);
}

.journey-label.active { opacity: 1; }

/* Annotations */
.journey-annotation {
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--sand);
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.journey-annotation.active { opacity: 0.7; }

.journey-alt {
    top: 42%;
    right: 22%;
}

.journey-leo {
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    letter-spacing: 4px;
}

/* Text overlays */
.journey-text {
    position: absolute;
    max-width: 300px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

.journey-text.active {
    opacity: 1;
    transform: translateY(0);
}

.journey-text-ancient.active {
    transform: translateX(-50%) translateY(0);
}

.journey-text-sovereign {
    bottom: 14%;
    left: 6%;
}

.journey-text-ancient {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 400px;
}

.journey-text-glyph {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.6;
    filter: drop-shadow(0 0 10px var(--gold-glow));
}

.journey-text h3 {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 1.05rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.journey-text p {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.85rem;
}

/* RTL overrides for journey */
html[dir="rtl"] .journey-text-sovereign { left: auto; right: 6%; }
html[dir="rtl"] .journey-text-ancient { left: 50%; right: auto; transform: translateX(-50%); }
html[dir="rtl"] .journey-alt { right: auto; left: 18%; }

/* ===== Roles — floating bubbles ===== */
.join {
    background: radial-gradient(ellipse at 50% 30%, rgba(201, 162, 78, 0.03) 0%, transparent 50%);
}

.roles-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 64px;
}

.role-bubble {
    flex: 0 1 200px;
    text-align: center;
    padding: 36px 24px;
    border-radius: 50% / 40%;
    background: radial-gradient(ellipse at center, rgba(201, 162, 78, 0.06) 0%, transparent 80%);
    transition: transform 0.5s ease, background 0.5s ease;
    cursor: default;
}

.role-bubble:hover {
    transform: translateY(-8px);
    background: radial-gradient(ellipse at center, rgba(201, 162, 78, 0.12) 0%, transparent 80%);
}

.role-icon {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 14px;
    opacity: 0.6;
    filter: drop-shadow(0 0 8px var(--gold-glow));
}

.role-bubble h4 {
    font-family: var(--font-display);
    color: var(--sand);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.role-bubble p {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.6;
}

/* ===== Forms — smooth, borderless ===== */
.apply-float,
.email-float {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 40px;
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(201, 162, 78, 0.04) 0%, rgba(12, 18, 32, 0.6) 100%);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 80px rgba(201, 162, 78, 0.04), inset 0 0 0 1px rgba(201, 162, 78, 0.06);
}

.apply-float h3 {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.apply-sub {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.88rem;
    margin-bottom: 32px;
}

.smooth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-row {
    display: flex;
    gap: 12px;
}

.smooth-form input,
.smooth-form select {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-bottom: 1px solid rgba(201, 162, 78, 0.12);
    border-radius: 16px;
    color: var(--white);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: all 0.4s ease;
}

.smooth-form input::placeholder {
    color: var(--text-soft);
}

.smooth-form input:focus,
.smooth-form select:focus {
    background: rgba(201, 162, 78, 0.04);
    border-bottom-color: var(--gold);
    box-shadow: 0 4px 20px rgba(201, 162, 78, 0.06);
}

.smooth-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c9a24e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
html[dir="rtl"] .smooth-form select {
    background-position: left 16px center;
}

.smooth-form select option {
    background: var(--navy-soft);
    color: var(--white);
}

/* File drop zone */
.file-drop {
    position: relative;
    padding: 28px 20px;
    border-radius: 20px;
    background: rgba(201, 162, 78, 0.02);
    border: 1px dashed rgba(201, 162, 78, 0.12);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.file-drop:hover,
.file-drop.dragover {
    background: rgba(201, 162, 78, 0.06);
    border-color: rgba(201, 162, 78, 0.3);
    box-shadow: 0 0 30px rgba(201, 162, 78, 0.06);
}

.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-drop-text {
    display: block;
    color: var(--sand);
    font-size: 0.88rem;
    margin-bottom: 4px;
}

.file-drop-hint {
    display: block;
    color: var(--text-soft);
    font-size: 0.75rem;
}

.file-drop-name {
    display: none;
    color: #6dca82;
    font-size: 0.82rem;
    margin-top: 8px;
}
.file-drop-name.visible { display: block; }

/* Submit button */
.submit-btn {
    padding: 16px 32px;
    border-radius: 24px;
    border: none;
    background: linear-gradient(135deg, var(--gold) 0%, #a07830 100%);
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 24px rgba(201, 162, 78, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201, 162, 78, 0.35);
}

/* Status messages */
.form-status {
    text-align: center;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    display: none;
}
.form-status.success {
    display: block;
    background: rgba(109, 202, 130, 0.08);
    color: #6dca82;
}
.form-status.error {
    display: block;
    background: rgba(220, 80, 70, 0.08);
    color: #dc5046;
}
.form-status.loading {
    display: block;
    background: rgba(100, 160, 220, 0.08);
    color: #64a0dc;
}

/* Inline form (email signup) */
.inline-form {
    gap: 12px;
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 10;
    padding: 48px 0;
    text-align: center;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0.4;
    font-size: 0.8rem;
}

.footer-glyph {
    font-size: 1.2rem;
}

.footer-name {
    font-family: var(--font-display);
    color: var(--gold);
    letter-spacing: 2px;
}

.footer-copy {
    color: var(--text-soft);
}

/* ===== Scroll animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .hero-logo { width: 160px; }
    .hero-title { letter-spacing: 5px; }
    .section { padding: 80px 0; }
    .section-headline { margin-bottom: 48px; }

    .field-row {
        flex-direction: column;
        gap: 16px;
    }

    .role-bubble { flex: 0 1 140px; padding: 24px 16px; }

    .apply-float, .email-float {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .lang-toggle {
        left: 12px;
        width: 38px;
        height: 38px;
    }
    .lang-icon { font-size: 0.75rem; }

    .logo-glow { width: 200px; height: 200px; }

    .mission-journey { height: 250vh; }
    .journey-text { max-width: 180px; padding: 12px; }
    .journey-text h3 { font-size: 0.85rem; }
    .journey-text p { font-size: 0.75rem; }
    .journey-label { font-size: clamp(2rem, 6vw, 3.5rem); }
}
