/* ═══════════════════════════════════════════════════════════
   GasheAI — Common Design System "Abyssinia Premium"
   Unified CSS Variables, Reset, Base, and Shared Components
   
   Conventions:
     - All shared variables use --g- prefix (GasheAI brand)
     - This file is ALWAYS loaded FIRST before any page-specific CSS
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Skip Navigation (Accessibility) ── */
.skip-nav {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 10000;
}
.skip-nav:focus {
    position: fixed;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 12px 20px;
    background: var(--g-gold);
    color: var(--g-bg-dark);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    z-index: 10001;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

/* ── 2. Standardized Design Tokens ── */
:root {
    /* Core Brand Colors */
    --g-bg-dark: #0c0f1a;
    --g-bg-deep: #0a0d16;
    --g-bg-navy: #111833;
    --g-bg-surface: #161d35;
    --g-bg-card: #1a1f35;
    --g-gold: #f59e0b;
    --g-gold-light: #fbbf24;
    --g-gold-dark: #d97706;
    --g-gold-dim: rgba(245, 158, 11, 0.15);
    --g-gold-glow: rgba(245, 158, 11, 0.25);
    --g-green: #10b981;
    --g-blue: #3b82f6;
    --g-purple: #8b5cf6;
    --g-cyan: #06b6d4;
    --g-orange: #f97316;
    --g-red: #ef4444;
    --g-text: #f1f5f9;
    --g-text-muted: #94a3b8;
    --g-text-dim: #64748b;
    --g-border: rgba(255, 255, 255, 0.08);
    --g-glass-bg: rgba(255, 255, 255, 0.04);
    --g-glass-bg-navy: rgba(17, 24, 51, 0.5);
    --g-glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Gradients */
    --g-gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
    --g-gradient-shine: linear-gradient(135deg, #fde68a, #f59e0b, #fbbf24, #f59e0b);
    --g-gradient-hero: linear-gradient(145deg, #0c0f1a 0%, #111833 40%, #0f1b2e 70%, #0c0f1a 100%);

    /* Shadows */
    --g-shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --g-shadow-glow: 0 0 30px rgba(245, 158, 11, 0.15);

    /* Font */
    --g-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Navbar height */
    --g-navbar-h: 60px;

    /* Shared Radius Tokens (unified across all pages) */
    --g-radius-xs: 6px;
    --g-radius-sm: 10px;
    --g-radius-md: 16px;
    --g-radius-lg: 24px;
    --g-radius-pill: 100px;

    /* Shared Input Styling Tokens */
    --g-input-bg: #0d1225;
    --g-input-border: rgba(245, 158, 11, 0.08);
    --g-input-focus-border: #f59e0b;
    --g-input-focus-glow: rgba(245, 158, 11, 0.1);
    --g-input-focus-shadow: 0 0 20px rgba(245, 158, 11, 0.05);
    --g-input-focus-ring: 0 0 0 3px rgba(245, 158, 11, 0.1);
    --g-input-padding: 13px 16px;
    --g-input-radius: var(--g-radius-sm);

    /* Shared Button Tokens */
    --g-btn-radius: var(--g-radius-sm);
    --g-btn-padding: 14px;
    --g-btn-font-weight: 700;
    --g-btn-font-size: 0.95rem;
    --g-btn-transition: all 0.3s ease;

    /* Shared Transition Tokens */
    --g-transition-fast: 0.2s ease;
    --g-transition-normal: 0.3s ease;
    --g-transition-smooth: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 3. CSS Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── 4. Base Styles ── */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--g-font);
    background: var(--g-bg-deep);
    color: var(--g-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s, opacity 0.3s;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* ── 5. Scrollbar (Gold tinted) ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.4);
}

/* ── 6. Shared Navbar ── */
.g-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--g-navbar-h);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(12, 15, 26, 0.92);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4), inset 0 -1px 0 var(--g-border);
    border-bottom: 1px solid var(--g-border);
    flex-shrink: 0;
}

/* ── 7. Nav Logo ── */
.g-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.g-nav-logo-text {
    background: var(--g-gradient-shine);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.g-nav-logo-icon {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 0 8px var(--g-gold-glow));
}

/* ── 8. Nav Back Button ── */
.g-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--g-gold);
    text-decoration: none;
    transition: all 0.3s ease;
}

.g-nav-back:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--g-gold);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.g-nav-back svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.g-nav-back:hover svg {
    transform: translateX(-3px);
}

/* ── 9. Nav Breadcrumb ── */
.g-nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--g-text-dim);
    flex-wrap: nowrap;
    overflow: hidden;
}

.g-nav-breadcrumb a {
    color: var(--g-text-muted);
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.25s;
}

.g-nav-breadcrumb a:hover {
    color: var(--g-gold);
}

.g-nav-breadcrumb .breadcrumb-sep {
    color: var(--g-text-dim);
    font-weight: 400;
}

.g-nav-breadcrumb .breadcrumb-current {
    color: var(--g-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* ── 9b. Mobile Nav Toggle ── */
.g-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--g-border);
    border-radius: 10px;
    cursor: pointer;
    gap: 5px;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.g-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.g-nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--g-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.g-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.g-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.g-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── 9c. Mobile Nav Overlay ── */
.g-mobile-nav {
    position: fixed;
    top: var(--g-navbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: rgba(10, 13, 22, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.g-mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.g-mobile-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--g-text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: color 0.3s ease, background 0.3s ease;
    min-width: 240px;
    justify-content: center;
}

.g-mobile-nav a:hover {
    color: var(--g-gold);
    background: rgba(245, 158, 11, 0.06);
}

.g-mobile-nav a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.g-mobile-nav .g-mobile-nav-cta {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--g-gold);
    margin-top: 8px;
}

.g-mobile-nav .g-mobile-nav-cta:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--g-gold);
}

/* ── 10. Page Hero Section ── */
.g-page-hero {
    padding: 140px 24px 60px;
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(245, 158, 11, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 100%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
        var(--g-gradient-hero);
    overflow: hidden;
}

/* ── 11. Page Hero Label (Badge) ── */
.g-page-hero-label {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 100px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--g-gold);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* ── 12. Page Hero Title ── */
.g-page-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.15;
    position: relative;
    z-index: 2;
}

.g-page-hero h1 span {
    background: var(--g-gradient-shine);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.g-page-hero > p {
    color: var(--g-text-muted);
    font-size: 1.1rem;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

/* ── 13. Site Footer ── */
.g-site-footer {
    margin-top: auto;
    border-top: 1px solid var(--g-border);
    padding: 24px;
    text-align: center;
    background: var(--g-bg-deep);
}

.g-site-footer p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 0;
}

/* ── 14. Footer Links ── */
.g-footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.g-footer-links a {
    color: var(--g-text-dim);
    font-size: 0.85rem;
    transition: color 0.25s;
}

.g-footer-links a:hover {
    color: var(--g-gold);
}

/* ── 15. Glass Card Base ── */
.g-card {
    background: var(--g-glass-bg-navy);
    border: 1px solid var(--g-border);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--g-glass-shadow);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.g-card:hover {
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: var(--g-shadow-card), var(--g-shadow-glow);
}

/* ── 16. Content Section ── */
.g-section {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 24px;
    position: relative;
}

/* ── 17. Generic Badge ── */
.g-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.g-badge-gold {
    background: rgba(245, 158, 11, 0.1);
    color: var(--g-gold);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.g-badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--g-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.g-badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--g-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.g-badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--g-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── 18. Back to Top Button ── */
.g-back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 900;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    color: #000;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.g-back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.g-back-to-top:hover {
    background: var(--g-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

/* ── 19. Animations ── */
@keyframes gFadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gFadeIn {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes gPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes gShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

@keyframes gGlowPulse {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.05); }
}

@keyframes gOrbDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.97); }
}

@keyframes gSlideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes gShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ── 20. Responsive Breakpoints ── */

@media (max-width: 768px) {
    .g-navbar {
        padding: 0 16px;
        height: 56px;
    }

    .g-nav-toggle {
        display: flex;
    }

    .g-nav-back-text {
        display: none;
    }

    .g-page-hero {

        padding: 100px 20px 40px;
    }

    .g-page-hero h1 {
        font-size: 2rem;
    }

    .g-page-hero > p {
        font-size: 1rem;
    }

    .g-section {
        padding: 40px 16px;
    }

    .g-nav-back {
        padding: 6px 14px;
        font-size: 0.82rem;
    }

    .g-nav-breadcrumb {
        font-size: 0.78rem;
    }

    .g-card {
        padding: 24px 20px;
        border-radius: 14px;
    }

    .g-footer-links {
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .g-navbar {
        padding: 0 12px;
    }

    .g-page-hero {
        padding: 90px 16px 32px;
    }

    .g-page-hero h1 {
        font-size: 1.75rem;
    }

    .g-nav-back .g-nav-back-text {
        display: none;
    }

    .g-nav-breadcrumb .breadcrumb-text {
        display: none;
    }

    .g-section {
        padding: 32px 12px;
    }

    .g-card {
        padding: 20px 16px;
    }

    .g-back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* ── 21. Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
