/* ============================================================
   RizForge Global Stylesheet
   styles/global.css
   ============================================================ */

/* --- CSS VARIABLES --- */
:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --bg-card-accent: #2A1A15;
    --primary-orange: #FF6B35;
    --primary-orange-hover: #e55a2b;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --text-body: #f4f4f4;
    --border-color: #333;
    --container-width: 1200px;
    --font-main: 'Poppins', sans-serif;

    /* Typography Scale — default for interior pages */
    --h1-size: 45px;
    --h2-size: 40px;
    --h3-size: 28px;
    --body-size: 18px;
    --small-size: 20px;

    /* Animation */
    --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    font-size: var(--body-size);
    font-weight: 400;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: 0.2s ease; }
ul { list-style: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-weight: 700; font-size: var(--h1-size); }
h2, .section-title { font-weight: 700; font-size: var(--h2-size); }
h3 { font-weight: 500; font-size: var(--h3-size); }
p, li, a { font-weight: 400; font-size: var(--body-size); color: var(--text-gray); }
.small-text { font-weight: 300; font-size: var(--small-size); }

/* --- CONTAINER --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; width: 100%; }

/* --- UTILITIES --- */
.text-orange { color: var(--primary-orange); }

/* --- BUTTONS --- */
.btn {
    display: inline-block; padding: 14px 28px; border-radius: 8px; font-weight: 500; font-size: 16px;
    cursor: pointer; text-align: center;
    transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
    will-change: transform, box-shadow; letter-spacing: 0.02em;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2); }

@keyframes btnGlowPulse {
    0%   { box-shadow: 0 0 20px rgba(238, 226, 96, 0.5); }
    50%  { box-shadow: 0 0 35px rgba(238, 226, 96, 0.7); }
    100% { box-shadow: 0 0 20px rgba(238, 226, 96, 0.5); }
}

.btn-primary {
    background: linear-gradient(to right, #FBB59C, #FF6B35);
    color: white; border: 1px solid transparent;
    box-shadow: 0 0 20px rgba(238, 226, 96, 0.5);
}
header .btn-primary { animation: btnGlowPulse 3s infinite ease-in-out; }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 0 40px rgba(238, 226, 96, 0.8); animation: none; }

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 107, 53, 0.5);
    color: var(--primary-orange);
}
.btn-outline:hover {
    background-color: rgba(255, 107, 53, 0.08);
    border-color: var(--primary-orange);
}

/* --- SECTION UTILITIES --- */
.section-padding {
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- SCROLL REVEALS --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    transition: opacity 1s var(--ease-premium), transform 1s var(--ease-premium);
    will-change: opacity, transform;
}
.reveal-on-scroll.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }

.reveal-right { transform: translate3d(40px, 0, 0) scale(0.98); }
.reveal-left  { transform: translate3d(-40px, 0, 0) scale(0.98); }

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --- HEADER --- */
header {
    padding: 30px 0;
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1001;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

header.header-scrolled {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* For pages where header is always dark (contact, privacy, tos) */
header.always-dark {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* --- NAVIGATION --- */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo { width: 180px; }
.logo-link { display: flex; align-items: center; }

.mobile-menu-logo { display: none; width: 160px; margin-bottom: 20px; }

.nav-links { display: flex; gap: 50px; }

.nav-links a {
    color: var(--text-white);
    font-size: 16px;
    font-weight: 300;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s var(--ease-premium), color 0.3s ease;
}
.nav-links a:hover { color: var(--primary-orange); opacity: 1; }

.nav-links a.active {
    opacity: 1;
    font-weight: 500;
    color: var(--text-white);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
    background-color: var(--primary-orange);
    border-radius: 2px;
}

/* --- MOBILE NAV --- */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 44px; height: 44px;
    z-index: 1002;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}
.mobile-nav-toggle span {
    display: block;
    width: 28px; height: 2px;
    background-color: var(--text-white);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-nav-backdrop {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}
.mobile-nav-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.mobile-close-btn {
    display: none;
    position: absolute;
    top: 30px; right: 30px;
    background: none; border: none;
    color: white; font-size: 2rem;
    cursor: pointer; opacity: 0.7;
}

/* --- FOOTER --- */
footer {
    background-color: #181818;
    padding: 80px 0;
    border-top: 1px solid #222;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 400px;
    background-color: #EEE260;
    opacity: 0.25;
    filter: blur(100px);
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.footer-brand img { width: 180px; opacity: 0.6; }

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 40px;
    justify-items: start;
}

.footer-links a {
    color: var(--text-gray);
    font-size: 16px;
    font-weight: 300;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--primary-orange); }

.footer-copyright-col {
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* --- LEGAL CONTENT (privacy.html + tos.html) --- */
.legal-content {
    padding-top: 150px;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 100px;
}
.legal-content h2 {
    font-weight: 700; font-size: 32px;
    margin-top: 40px; margin-bottom: 20px;
    color: var(--text-white);
    letter-spacing: -0.02em;
}
.legal-content h3 {
    font-weight: 600; font-size: 24px;
    margin-top: 30px; margin-bottom: 15px;
    color: var(--primary-orange);
    letter-spacing: -0.01em;
}
.legal-content p { margin-bottom: 20px; color: var(--text-gray); }
.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--text-gray);
}
.legal-content li { margin-bottom: 8px; }

/* --- RESPONSIVE: GLOBAL --- */
@media (max-width: 992px) {
    .mobile-nav-toggle { display: flex; }
    .logo-link { display: none; }

    .nav-links {
        position: fixed; top: 0; left: 0;
        height: 100vh; width: 75%;
        background-color: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1001;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        padding: 40px;
        transform: translateX(-100%);
        transition: transform 0.4s var(--ease-premium);
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links li a { font-size: 1.25rem; }
    .mobile-menu-logo { display: block; }
    .mobile-close-btn { display: block; }

    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .footer-links { justify-items: center; gap: 15px 30px; }
    .footer-copyright-col { text-align: center; }
    .footer-brand img { margin: 0 auto; }
}

@media (max-width: 768px) {
    .footer-links { grid-template-columns: repeat(2, 1fr); justify-items: center; }
    .section-padding { padding: 70px 0; }
}
