/* =====================================================================
   Rivaldom / QasbahLabs — Investor & Publisher landing page
   Pure CSS, responsive, RTL-ready. No framework dependency.
   ===================================================================== */

/* ---------- Fonts ---------- */
@font-face {
    font-family: 'Monument';
    src: url('./Fonts/MONUMENTEXTENDED-REGULAR.otf') format('opentype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Monument';
    src: url('./Fonts/MonumentExtended-Bold.otf') format('opentype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Monument';
    src: url('./Fonts/MONUMENTEXTENDED-ULTRABOLD.otf') format('opentype');
    font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('./Fonts/MONTSERRAT-REGULAR.TTF') format('truetype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('./Fonts/MONTSERRAT-MEDIUM.TTF') format('truetype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('./Fonts/MONTSERRAT-SEMIBOLD.TTF') format('truetype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Montserrat';
    src: url('./Fonts/MONTSERRAT-BOLD.TTF') format('truetype');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
    --bg:        #0c171b;
    --bg-2:      #0f1d21;
    --bg-3:      #15262b;
    --surface:   #16292f;
    --surface-2: #1b333a;
    --line:      rgba(255,255,255,.10);
    --text:      #eaf2f2;
    --muted:     #9fb3b6;
    --teal:      #0FEACA;
    --gold:      #E7B884;
    --orange:    #F4A261;
    --red:       #FD3E40;
    --maxw:      1180px;
    --radius:    16px;
    --shadow:    0 20px 50px rgba(0,0,0,.45);
    --display:   'Monument', 'Arial Black', sans-serif;
    --body:      'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; }
p { margin: 0 0 1rem; }
section { position: relative; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
    font-family: var(--body); font-weight: 700; letter-spacing: .18em;
    text-transform: uppercase; font-size: .78rem; color: var(--teal);
    margin-bottom: 14px;
}
.section-pad { padding: 100px 0; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--body); font-weight: 700; font-size: .98rem;
    padding: 14px 26px; border-radius: 999px; cursor: pointer;
    border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #07211d; box-shadow: 0 12px 30px rgba(15,234,202,.28); }
.btn-gold    { background: var(--gold); color: #2a1d0c; box-shadow: 0 12px 30px rgba(231,184,132,.25); }
.btn-ghost   { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Header / Nav ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(12,23,27,.72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 38px; width: auto; }
.brand .brand-text { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .02em; }
.nav-links { display: flex; gap: 28px; margin-inline-start: auto; align-items: center; }
.nav-links a { font-weight: 600; font-size: .92rem; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-inline-start: 8px; }

/* Language switcher */
.lang {
    display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
    overflow: hidden; margin-inline-start: 6px;
}
.lang button {
    background: transparent; color: var(--muted); border: 0; cursor: pointer;
    font-family: var(--body); font-weight: 700; font-size: .78rem; padding: 7px 12px;
    transition: background .15s, color .15s;
}
.lang button.active { background: var(--teal); color: #07211d; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 8px; margin-inline-start: auto; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1000px 500px at 80% -10%, rgba(15,234,202,.14), transparent 60%),
        radial-gradient(800px 500px at 0% 100%, rgba(231,184,132,.10), transparent 55%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
    border-bottom: 1px solid var(--line);
}
.hero-grid {
    display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
    padding: 90px 0 80px;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.01em; }
.hero h1 .accent { color: var(--teal); }
.hero .tagline { color: var(--gold); font-weight: 700; letter-spacing: .04em; margin-bottom: 18px; font-family: var(--body); }
.hero p.pitch { font-size: 1.18rem; color: var(--muted); max-width: 52ch; margin: 20px 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Store badges */
.stores { display: flex; gap: 14px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.stores a { transition: transform .18s; }
.stores a:hover { transform: translateY(-2px); }
.stores img { height: 48px; width: auto; }

/* ---------- Facts strip ---------- */
.facts { background: var(--bg-3); border-bottom: 1px solid var(--line); }
.facts-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 28px 0;
}
.fact { text-align: center; padding: 8px; border-inline-end: 1px solid var(--line); }
.fact:last-child { border-inline-end: 0; }
.fact .k { font-family: var(--display); font-weight: 700; color: var(--teal); font-size: 1.02rem; }
.fact .l { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }

/* ---------- Generic section head ---------- */
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 800; margin-bottom: 14px; }

/* ---------- The Game ---------- */
.game { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.diff-list { list-style: none; padding: 0; margin: 18px 0 0; }
.diff-list li { position: relative; padding-inline-start: 30px; margin-bottom: 14px; color: var(--muted); }
.diff-list li::before {
    content: ""; position: absolute; inset-inline-start: 0; top: .55em;
    width: 12px; height: 12px; border-radius: 3px; background: var(--teal); transform: rotate(45deg);
}
.diff-list li b { color: var(--text); }
.game-media img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* Game screens gallery */
.screens-head { text-align: center; margin: 0 auto 34px; max-width: 640px; }
.screens-head h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; margin-bottom: 10px; }
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.screens .shot:first-child { grid-column: span 3; }
.shot {
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface);
    transition: transform .2s, border-color .2s; position: relative;
}
.shot:hover { transform: translateY(-4px); border-color: rgba(15,234,202,.4); }
.shot img { width: 100%; height: auto; display: block; }
.shot .cap {
    padding: 12px 16px; font-weight: 600; font-size: .92rem;
    display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line);
}
.shot .cap .num {
    width: 22px; height: 22px; border-radius: 6px; background: var(--teal); color: #07211d;
    font-family: var(--display); font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

/* ---------- Gameplay highlight cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; transition: transform .2s, border-color .2s, background .2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(15,234,202,.4); background: var(--surface-2); }
.card .ic { font-size: 1.7rem; margin-bottom: 12px; }
.card h3 { font-family: var(--body); font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Factions ---------- */
.factions { background: var(--bg-2); }
.faction-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 60px; }
.faction {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
    background: linear-gradient(180deg, var(--surface), transparent);
}
.faction h3 { font-family: var(--body); font-weight: 700; font-size: 1.15rem; margin-bottom: 8px; }
.faction .tag { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.faction.humans .tag { color: var(--gold); }
.faction.ai .tag { color: var(--teal); }
.faction.animals .tag { color: var(--orange); }
.faction p { color: var(--muted); font-size: .95rem; margin: 10px 0 0; }

/* Character gallery */
.char-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px;
}
.char {
    position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    background: radial-gradient(120% 90% at 50% 0%, var(--surface-2), var(--bg-3));
    cursor: pointer; aspect-ratio: 1 / 1;
}
.char .frame { position: relative; width: 100%; height: 78%; }
.char .frame img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
    transition: opacity .35s ease; padding: 8px;
}
.char .frame .def { opacity: 0; }
.char:hover .frame .norm, .char.show-def .frame .norm { opacity: 0; }
.char:hover .frame .def,  .char.show-def .frame .def  { opacity: 1; }
.char .name {
    position: absolute; bottom: 0; inset-inline: 0; height: 22%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--display); font-weight: 700; font-size: .82rem;
    background: linear-gradient(0deg, rgba(0,0,0,.55), transparent);
}
.char .state {
    font-family: var(--body); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--teal); border: 1px solid var(--line); padding: 2px 6px; border-radius: 999px;
}
.char.show-def .state, .char:hover .state { color: var(--red); }
.gallery-hint { color: var(--muted); font-size: .85rem; margin-top: 16px; text-align: center; }

/* ---------- Studio ---------- */
.studio { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.member {
    border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--surface);
}
.member .mn { font-weight: 700; font-size: .95rem; }
.member .mr { color: var(--teal); font-size: .8rem; margin-top: 2px; }
.member a { color: var(--muted); font-size: .8rem; }
.member a:hover { color: var(--teal); }
.locations { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); margin-top: 20px; font-weight: 600; }
.team-photo { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.team-photo img { width: 100%; height: auto; display: block; }
.team-photo .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 46px 20px 16px; font-size: .9rem; color: #eaf2f2; background: linear-gradient(transparent, rgba(0,0,0,.8)); font-weight: 500; }

/* ---------- Investors band ---------- */
.invest {
    background:
        radial-gradient(700px 400px at 100% 0%, rgba(231,184,132,.12), transparent 60%),
        radial-gradient(700px 400px at 0% 100%, rgba(15,234,202,.10), transparent 60%),
        var(--bg-3);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.value-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-bottom: 46px; }
.value {
    display: flex; gap: 16px; padding: 22px; border: 1px solid var(--line);
    border-radius: var(--radius); background: rgba(255,255,255,.02);
}
.value .vic { font-size: 1.6rem; line-height: 1; }
.value h3 { font-family: var(--body); font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.value p { color: var(--muted); font-size: .94rem; margin: 0; }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin: 10px 0 46px; }
.milestone { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--surface); position: relative; }
.milestone .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--teal); margin-bottom: 14px; box-shadow: 0 0 0 6px rgba(15,234,202,.15); }
.milestone .when { color: var(--gold); font-weight: 700; font-size: .82rem; letter-spacing: .06em; }
.milestone .what { font-size: .95rem; margin-top: 6px; }
.milestone.done .dot { background: var(--gold); box-shadow: 0 0 0 6px rgba(231,184,132,.15); }

.invest-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
    padding: 34px; border: 1px solid var(--line); border-radius: var(--radius);
    background: linear-gradient(120deg, var(--surface-2), var(--bg-2));
}
.invest-cta h3 { font-size: 1.5rem; font-weight: 800; }
.invest-cta p { color: var(--muted); margin: 6px 0 0; }

/* ---------- Contact ---------- */
.contact { background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.contact-card {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--surface);
}
.contact-card h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; margin-bottom: 12px; color: var(--teal); }
.contact-card a, .contact-card p { color: var(--muted); font-size: .95rem; margin: 4px 0; }
.contact-card a:hover { color: var(--text); }
.social-row { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.social-row a {
    width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; transition: border-color .15s, transform .15s;
}
.social-row a:hover { border-color: var(--teal); transform: translateY(-2px); }
.social-row img { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-inner img { height: 34px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: .88rem; }
.footer-links a:hover { color: var(--text); }
.copyright { color: var(--muted); font-size: .82rem; width: 100%; text-align: center; margin-top: 22px; border-top: 1px solid var(--line); padding-top: 22px; }

/* ---------- RTL ---------- */
[dir="rtl"] body, [dir="rtl"] { text-align: right; }
[dir="rtl"] .nav-links { margin-inline-start: auto; }
[dir="rtl"] .hero-art img { animation: none; } /* keep simple in rtl */
[dir="rtl"] .lead, [dir="rtl"] .hero p.pitch { margin-inline: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero-grid, .game-grid, .studio-grid { grid-template-columns: 1fr; }
    .hero-art { order: -1; max-width: 460px; margin: 0 auto; }
    .facts-grid { grid-template-columns: repeat(3,1fr); }
    .fact:nth-child(3) { border-inline-end: 0; }
    .cards, .faction-row, .roadmap, .contact-grid { grid-template-columns: 1fr 1fr; }
    .value-grid { grid-template-columns: 1fr; }
    .screens { grid-template-columns: repeat(2, 1fr); }
    .screens .shot:first-child { grid-column: span 2; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .section-pad { padding: 68px 0; }

    /* Hero: balance avatar, pitch and store buttons on phones */
    .hero-grid { padding: 24px 0 44px; gap: 8px; text-align: center; }
    .hero-art { max-width: 260px; }
    .hero h1 { font-size: clamp(1.85rem, 8vw, 2.35rem); }
    .hero p.pitch { font-size: 1.02rem; margin-inline: auto; }
    .hero .hero-cta { justify-content: center; }
    .hero .stores { justify-content: center; }
    .hero .stores img { height: 44px; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; position: absolute; top: 72px; inset-inline: 0; flex-direction: column;
        background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 18px 24px; gap: 16px;
        margin: 0;
    }
    .nav-links.open .nav-cta { align-self: flex-start; }
    .nav-toggle { display: block; }
    .lang { margin-inline-start: auto; }
    .facts-grid { grid-template-columns: repeat(2,1fr); }
    .fact { border-inline-end: 0; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
    .cards, .faction-row, .roadmap, .contact-grid, .team { grid-template-columns: 1fr; }
    .char-grid { grid-template-columns: repeat(2, 1fr); }
    .screens { grid-template-columns: 1fr; }
    .screens .shot:first-child { grid-column: span 1; }
    .invest-cta { flex-direction: column; align-items: flex-start; }
    .footer-inner { flex-direction: column; text-align: center; }
}
