/* -----------------------------------------------------------
   AxioMorph Signature Theme v1
   Dark-but-not-too-dark • Gradient-driven • Motion-rich
   ----------------------------------------------------------- */

:root {
    --bg: #0d1117;
    --bg-alt: #11141c;
    --bg-deep: #0b0e14;

    --fg: #e6e8ef;
    --fg-muted: #b8bbca;

    --accent-blue: #4ea3ff;
    --accent-violet: #a78bfa;
    --accent-grad: linear-gradient(90deg, #4ea3ff, #a78bfa);

    --border: #1a1d26;
    --card-bg: #141821;

    --glow-blue: rgba(78, 163, 255, 0.35);
    --glow-violet: rgba(167, 139, 250, 0.35);

    --font-sans: 'Inter', system-ui, sans-serif;
}

/* Reset & Base ------------------------------------------------ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--fg);
    background: radial-gradient(circle at 20% 20%, #1a1f2b 0%, #0b0e14 70%);
    -webkit-font-smoothing: antialiased;
}

/* Subtle drifting background energy --------------------------- */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 60% 40%, rgba(78,163,255,0.08), transparent 60%),
        radial-gradient(circle at 30% 70%, rgba(167,139,250,0.08), transparent 60%);
    pointer-events: none;
    animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
    from { transform: translate3d(0,0,0); }
    to { transform: translate3d(12px, -18px, 0); }
}

/* Animated fractal grid overlay ------------------------------- */

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.25;
    animation: gridShift 22s linear infinite;
}

@keyframes gridShift {
    from { transform: translate3d(0,0,0); }
    to { transform: translate3d(-40px, -40px, 0); }
}

/* Typography -------------------------------------------------- */

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}
html, body {
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header ------------------------------------------------------ */

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--accent-grad);
    opacity: 0.6;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(78, 163, 255, 0.25));
    transition: transform 0.25s ease, filter 0.25s ease;
    animation: logoPulse 6s ease-in-out infinite;
}

@keyframes logoPulse {
    0% { filter: drop-shadow(0 0 6px rgba(78,163,255,0.25)); }
    50% { filter: drop-shadow(0 0 14px rgba(167,139,250,0.45)); }
    100% { filter: drop-shadow(0 0 6px rgba(78,163,255,0.25)); }
}

.nav {
    display: flex;
    gap: 1.4rem;
}

.nav-link {
    position: relative;
    font-size: 0.95rem;
    color: var(--fg-muted);
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
    color: var(--fg);
}

.nav-link.active {
    color: var(--fg);
    border-bottom-color: var(--accent-blue);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    height: 2px;
    width: 0%;
    background: var(--accent-grad);
    transition: width 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero -------------------------------------------------------- */

.hero {
    padding: 4.5rem 0 3.5rem;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(78,163,255,0.18), transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(167,139,250,0.18), transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 3rem;
    align-items: center;
    perspective: 1000px;
    transition: transform 0.3s ease;
}

.hero:hover .hero-inner {
    transform: translateZ(20px);
}

.hero h1 {
    font-size: 2.7rem;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--fg-muted);
    max-width: 36rem;
    font-size: 1.05rem;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    position: relative;
    background: var(--accent-grad);
    color: #020308;
    font-weight: 600;
    overflow: hidden;
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px var(--glow-blue);
}

.btn.primary::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: var(--accent-grad);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 4s linear infinite;
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.btn.secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--fg);
}

.btn.secondary:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

/* Hero Accent Line ------------------------------------------- */

.hero::after {
    content: "";
    display: block;
    height: 3px;
    width: 160px;
    margin-top: 2rem;
    background: var(--accent-grad);
    border-radius: 3px;
}

/* Cards ------------------------------------------------------- */

.card {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.6rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px) rotateX(4deg) rotateY(-4deg);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

/* Scanline sweep effect */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255,255,255,0.04) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: sweep 6s ease-in-out infinite;
}

@keyframes sweep {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/* Sections ---------------------------------------------------- */

.strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    padding: 3rem 0;
}

.strip-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}

.page-hero {
    padding: 3.5rem 0 2rem;
}

.page-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--fg-muted);
    max-width: 42rem;
}

/* Content Layout --------------------------------------------- */

.content-section {
    padding: 3rem 0;
}

.content-section.alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.content-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.muted {
    color: var(--fg-muted);
    font-size: 0.9rem;
}

/* Timeline ---------------------------------------------------- */

.timeline {
    display: grid;
    gap: 1.8rem;
    margin-top: 1.5rem;
}

.timeline-item {
    padding-left: 1.4rem;
    border-left: 2px solid var(--border);
}

.timeline-item h3 {
    margin-top: 0;
}

/* Footer ------------------------------------------------------ */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
    background: var(--bg);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
}

.footer-links {
    display: flex;
    gap: 1.2rem;
}

.footer-links a {
    color: var(--fg-muted);
}

.footer-links a:hover {
    color: var(--fg);
}

/* Motion ------------------------------------------------------ */

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive -------------------------------------------------- */

@media (max-width: 900px) {
    .hero-inner,
    .content-two-col,
    .strip-inner,
    .grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 0.75rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* -----------------------------------------------------------
   AxioMorph Loading Animation
   ----------------------------------------------------------- */

#axm-loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, #11141c 0%, #0b0e14 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: loaderFadeOut 0.8s ease forwards;
    animation-delay: 1.8s; /* how long the loader stays visible */
}

/* Soft background glow */
.axm-loader-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(78,163,255,0.25), rgba(167,139,250,0.25), transparent 70%);
    filter: blur(40px);
    animation: glowPulse 3s ease-in-out infinite;
}

/* Rotating ring */
.axm-loader-ring {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #4ea3ff;
    border-right-color: #a78bfa;
    animation: ringSpin 1.8s linear infinite;
}

/* Pulsing core */
.axm-loader-core {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(90deg, #4ea3ff, #a78bfa);
    box-shadow: 0 0 18px rgba(78,163,255,0.45);
    animation: corePulse 1.6s ease-in-out infinite;
}

/* Animations */

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes corePulse {
    0% { transform: scale(0.9); box-shadow: 0 0 10px rgba(78,163,255,0.35); }
    50% { transform: scale(1.15); box-shadow: 0 0 22px rgba(167,139,250,0.55); }
    100% { transform: scale(0.9); box-shadow: 0 0 10px rgba(78,163,255,0.35); }
}

@keyframes glowPulse {
    0% { opacity: 0.35; }
    50% { opacity: 0.55; }
    100% { opacity: 0.35; }
}

/* Fade out the loader */
@keyframes loaderFadeOut {
    from { opacity: 1; visibility: visible; }
    to { opacity: 0; visibility: hidden; }
}
/* -----------------------------------------------------------
   AxioMorph Logo Loader
   ----------------------------------------------------------- */

#axm-loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, #11141c 0%, #0b0e14 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Soft background glow */
.axm-loader-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(78,163,255,0.25), rgba(167,139,250,0.25), transparent 70%);
    filter: blur(50px);
    animation: glowPulse 3s ease-in-out infinite;
}

/* Rotating gradient ring */
.axm-loader-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #4ea3ff;
    border-right-color: #a78bfa;
    animation: ringSpin 1.8s linear infinite;
    opacity: 0.9;
}

/* Logo core */
.axm-loader-logo img {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(78,163,255,0.45));
    animation: logoPulse 2.2s ease-in-out infinite;
}

/* Animations */

@keyframes ringSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes logoPulse {
    0% { transform: scale(0.92); filter: drop-shadow(0 0 8px rgba(78,163,255,0.35)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 18px rgba(167,139,250,0.55)); }
    100% { transform: scale(0.92); filter: drop-shadow(0 0 8px rgba(78,163,255,0.35)); }
}

@keyframes glowPulse {
    0% { opacity: 0.35; }
    50% { opacity: 0.55; }
    100% { opacity: 0.35; }
}

/* Fade-out class applied by JS */
.axm-loader-hide {
    opacity: 0;
    visibility: hidden;
}
