/* ================================
   Global Theme (Landing)
   ================================ */

:root {
    --bg-body: #050816;
    --bg-elevated: #0b1020;
    --bg-elevated-soft: #0e1526;
    --bg-input: #101827;
    --border-subtle: rgba(148, 163, 253, 0.15);

    --accent: #6366f1;          /* Indigo primary */
    --accent-soft: rgba(99, 102, 241, 0.16);
    --accent-alt: #22c55e;      /* Lime/green highlight */
    --accent-danger: #ef4444;
    --accent-warning: #f97316;

    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-soft: #6b7280;

    --radius-xl: 18px;
    --radius-lg: 12px;
    --radius-md: 8px;

    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.55);
    --shadow-soft-sm: 0 10px 30px rgba(15, 23, 42, 0.45);

    --transition-fast: 0.18s ease-out;
    --transition-med: 0.28s cubic-bezier(.33,.02,.11,.99);

    --font-sans: system-ui, -apple-system, BlinkMacSystemFont,
                 "SF Pro Text", -system-ui, sans-serif;
}

/* Flex layout so footer can sit at bottom */
html,
body {
    height: 100%;
}

/* Background gradient + layout */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 55%),
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.06), transparent 55%),
        radial-gradient(circle at bottom, rgba(15, 23, 42, 0.9), #020817);

    display: flex;
    flex-direction: column;
}

/* ================================
   Layout & Header / Footer
   ================================ */

/* Simple width limiter for page content */
#page-wrapper,
.wrapper,
.container {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 18px 40px;
    box-sizing: border-box;
}

/* HEADER: full-width bar with centered inner content */
header,
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent),
                rgba(5, 8, 22, 0.94);
    border-bottom: 1px solid rgba(148, 163, 253, 0.16);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
    padding: 6px 0; /* vertical only */
}

/* Inner wrapper so header content lines up with main container */
.header-inner {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}

/* Logo / brand text */
header .logo,
.site-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

header .logo img,
.site-header .logo img {
    display: block;
}

/* Top navigation */
header nav,
.site-header nav {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: nowrap;   /* no wrapping on desktop */
    white-space: nowrap; /* keep single line on desktop */
}

header nav a,
.site-header nav a {
    color: var(--text-muted);
    padding: 7px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.01em;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

header nav a:hover,
.site-header nav a:hover {
    color: var(--accent-alt);
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 253, 0.16);
    box-shadow: 0 9px 26px rgba(15, 23, 42, 0.65);
}

header nav a.active,
.site-header nav a.active {
    color: #e5e7ff;
    background: var(--accent-soft);
    border-color: rgba(129, 140, 248, 0.9);
}

/* FOOTER: full-width bar with centered inner content */
footer,
.site-footer {
    background: rgba(5, 8, 22, 0.92);
    border-top: 1px solid rgba(148, 163, 253, 0.14);
    margin-top: auto;             /* push footer to bottom when content is short */
    padding: 10px 0 18px;         /* vertical only; horizontal via .footer-inner */
    font-size: 11px;
    color: var(--text-soft);
    opacity: 0.9;
}

.footer-inner {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 18px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand img {
    max-width: 220px;
    height: auto;
    display: block;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-alt);
    text-decoration: underline;
}

.footer-meta {
    font-size: 11px;
    color: var(--text-soft);
    margin-top: 4px;
}

/* ================================
   Typography
   ================================ */

h1, h2, h3 {
    color: #e5e7ff;
    margin-top: 10px;
    margin-bottom: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 19px;
    margin-top: 24px;
}

p, li {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Subtle glow underline for main page titles */
h1::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent), transparent);
    opacity: 0.9;
}

/* Basic HR */
hr {
    border: none;
    border-top: 1px solid rgba(148, 163, 253, 0.16);
    margin: 24px 0;
}

/* ================================
   Global utility / base
   ================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    transition: background-color var(--transition-fast),
                color var(--transition-fast),
                border-color var(--transition-fast),
                box-shadow var(--transition-fast),
                transform var(--transition-fast);
}

:focus-visible {
    outline: 2px solid rgba(129, 140, 248, 0.85);
    outline-offset: 3px;
}

/* ================================
   Mobile responsiveness
   ================================ */

@media (max-width: 900px) {
    #page-wrapper,
    .wrapper,
    .container {
        padding: 20px 14px 32px;
    }

    .header-inner {
        padding: 8px 14px;
        flex-direction: column;
        align-items: flex-start;
    }

    header nav,
    .site-header nav {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: wrap;      /* allow wrapping on mobile */
        white-space: normal;  /* allow line breaks on mobile */
    }

    header nav a,
    .site-header nav a {
        padding: 6px 10px;
        font-size: 12px;
    }

    .footer-inner {
        padding: 10px 14px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-brand img {
        max-width: 180px;
    }
}
