/* =========================================================
   style.css — Global styles for moserab.com
   Shared across all pages. Page-specific styles go in /css/
   ========================================================= */

/* ----- Variables ----- */
:root {
    --primary-light: #3e85ac;
    --primary: #2D749A;
    --primary-dark: #1a5f7f;
    --link: #cdf6ff;
    --white: #FFFFFF;
    --dark: #001c3a;
    --light-gray: #f5f9fa;
    --success: #00C851;
    --warning: #FF8800;
    --danger: #FF4444;

    --font-display: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    cursor: none;
}

body {
    font-family: var(--font-body);
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

a {
    color: var(--link);
    cursor: none;
}

section {
    padding: 96px 48px;
    background: var(--dark);
}

::selection {
    color: var(--white);
    background-color: var(--primary-light);
}

/* ----- Custom Cursor ----- */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity, transform 0.3s ease;
}

.custom-cursor.active  { opacity: 1; }
.custom-cursor.hover   { transform: translate(-50%, -50%) scale(1.5); background: rgba(62, 133, 172, 0.4); }

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-cursor-dot.hover  { background: var(--white); }
.custom-cursor-dot.active { opacity: 1; }

@media (hover: none) {
    html, body { cursor: auto; }
    .custom-cursor, .custom-cursor-dot { display: none; }
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 8.2px; background: var(--dark); border: none; }
::-webkit-scrollbar-thumb {
    border-radius: 8.2px;
    background-color: var(--primary-light);
    background-image: linear-gradient(160deg, var(--active) 0%, var(--active-dark) 100%);
}

/* ----- Navigation ----- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(5, 13, 18, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(45, 116, 154, 0.18);
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    cursor: none;
    z-index: 1001;
    position: relative;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    cursor: none;
}

.nav-link:hover { color: var(--white); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after { width: 100%; }

.btn-demo {
    padding: 0.65rem 1.35rem;
    background: linear-gradient(135deg, #2D749A 0%, #1a5f7f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: none;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-demo:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(45,116,154,0.4); }

/* ── Hamburger: SVG animated button ── */
.hamburger {
    display: none;
    position: relative;
    z-index: 1002;
    background: none;
    border: none;
    padding: 0;
    cursor: none;
    -webkit-user-select: none;
    user-select: none;
}

.ham {
    cursor: pointer;
    transition: transform 400ms;
    -webkit-user-select: none;
    user-select: none;
}

.ham .line {
    fill: none;
    transition: stroke-dasharray 400ms, stroke-dashoffset 400ms;
    stroke: #E5F4FA;
    stroke-width: 5.5;
    stroke-linecap: round;
}

.ham .top    { stroke-dasharray: 40 160; }
.ham .middle { stroke-dasharray: 40 142; transform-origin: 50%; transition: transform 400ms; }
.ham .bottom { stroke-dasharray: 40 85;  transform-origin: 50%; transition: transform 400ms, stroke-dashoffset 400ms; }

.ham.active .top    { stroke-dashoffset: -64px; }
.ham.active .middle { transform: rotate(90deg); }
.ham.active .bottom { stroke-dashoffset: -64px; }
.hamRotate.active   { transform: rotate(45deg); }

/* ── Fullscreen overlay menu ── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: rgba(5, 13, 18, 0.98);
    clip-path: circle(0px at calc(100% - 44px) 44px);
    transition: clip-path 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow: hidden;
}

.mobile-menu.active {
    clip-path: circle(170% at calc(100% - 44px) 44px);
}

.mobile-menu ul {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    list-style: none;
    text-align: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-menu li {
    margin: 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.active li {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entrance for each item */
.mobile-menu.active li:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu.active li:nth-child(2) { transition-delay: 0.20s; }
.mobile-menu.active li:nth-child(3) { transition-delay: 0.25s; }
.mobile-menu.active li:nth-child(4) { transition-delay: 0.30s; }
.mobile-menu.active li:nth-child(5) { transition-delay: 0.35s; }
.mobile-menu.active li:nth-child(6) { transition-delay: 0.40s; }
.mobile-menu.active li:nth-child(7) { transition-delay: 0.45s; }

.mobile-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: rgba(229, 244, 250, 0.8);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.25s ease;
    cursor: none;
}

.mobile-menu a:hover { color: var(--primary); }

/* ----- Section shared layout ----- */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--dark);
    color: var(--white);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    margin: 1rem 0 1.5rem;
    color: var(--white);
}

.section-title .moserab { color: var(--primary); }

.section-description {
    font-size: 1.2rem;
    opacity: 0.8;
    line-height: 1.8;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(45, 116, 154, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-tag-white {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(45, 116, 154, 0.9);
    color: var(--link);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ----- Grid utilities ----- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

/* ----- Cards ----- */
.card {
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(255,255,255,0.1) 0%, rgba(170,207,227,0.1) 25%, rgba(120,174,204,0.1) 50%, rgba(86,150,186,0.1) 75%, rgba(45,115,154,.1) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-description {
    font-size: 1.05rem;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-list { list-style: none; margin-bottom: 2rem; }

.card-list li {
    padding: 0.6rem 0;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.card-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

/* ----- Shared buttons ----- */
.btn-card {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2D749A 0%, #1a5f7f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: none;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.btn-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-primary {
    padding: 1.2rem 2.5rem;
    background: rgba(255,255,255,0.95);
    color: var(--dark);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: none;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.btn-primary:hover { transform: translateY(-3px); }

.btn-secondary {
    padding: 1.2rem 2.5rem;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover { background: white; color: var(--dark); }

/* ----- Footer ----- */
.footer {
    background: var(--dark);
    color: white;
    padding: 96px 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-brand p  { opacity: 0.7; line-height: 1.7; }

.footer-section h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-links         { list-style: none; }
.footer-links li      { margin-bottom: 0.75rem; }

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
    cursor: none;
}

.footer-links a:hover { opacity: 1; color: var(--primary); }

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ----- Responsive (global) ----- */
@media (max-width: 1024px) {
    .nav-links   { display: none; }
    .hamburger   { display: block; }
    .mobile-menu { display: block; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

    .footer-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {

    /* ── Global section padding ──────────────────────────────
       style.css sets section { padding: 96px 48px }.
       48px sides overflow on iPhone. Tighten to 20px sides. */
    section {
        padding: 60px 20px;
    }

    /* ── Hero ────────────────────────────────────────────────
       .parallax-section-hero is a <section>, so it inherits
       the global padding. The fixed nav is ~70px tall —
       without explicit top padding the h1 hides behind it.
       Zero the section padding; control spacing in content. */
    .parallax-section-hero {
        padding: 0 !important;
        min-height: 100svh;
    }

    .parallax-content-hero {
        padding: 110px 20px 64px;
        box-sizing: border-box;
    }

    .hero-title {
        font-size: clamp(1.7rem, 7.5vw, 2.6rem) !important;
        line-height: 1.2;
    }

    .hero-vision {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .hero-cta {
        flex-direction: column !important;
        gap: 0.75rem;
        align-items: stretch;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-secondary {
        text-align: center;
        padding: 0.9rem 1.25rem;
        font-size: 1rem;
    }

    /* ── Other parallax sections ─────────────────────────── */
    .parallax-section,
    .parallax-section-app {
        padding: 0 !important;
    }

    .parallax-content {
        padding: 64px 20px;
        box-sizing: border-box;
    }

    /* ── Typography ──────────────────────────────────────── */
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-description {
        font-size: 1rem;
    }

    /* ── Cards ───────────────────────────────────────────── */
    .card {
        padding: 1.5rem;
    }

    /* ── Footer ──────────────────────────────────────────── */
    .footer {
        padding: 60px 20px 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}