@tailwind base;
@tailwind components;
@tailwind utilities;

/* =============================================================
   css/global.css — Northlink Office Systems Corporation
   Shared styles across all pages. Page-specific overrides
   remain in each HTML file's <style> block.
   ============================================================= */

/* --- Canonical CSS Variables --- */
:root {
    --ink: #050505;
    --ink-soft: #0d0d0d;
    --line: rgba(255, 255, 255, 0.12);
    --blue: rgb(59 130 246);
    --violet: rgb(168 85 247);
    --glass-bg: rgba(12, 12, 12, 0.78);
    --glass-border: 1px solid var(--line);
}

/* --- Base Body --- */
body {
    font-family: 'Montserrat', sans-serif;
    scroll-behavior: smooth;
    background-color: var(--ink);
    background-attachment: fixed;
}

/* --- Ambient Glow Animation (shared by all pages) --- */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

/* Default ambient: blue top-left, purple top-right, blue bottom-center.
   Pages that need different colors override body::before in their own <style>. */
body::before {
    background:
        radial-gradient(circle at 14% 14%, rgba(56, 189, 248, 0.14), transparent 30%),
        radial-gradient(circle at 86% 18%, rgba(168, 85, 247, 0.12), transparent 30%),
        radial-gradient(circle at 52% 84%, rgba(59, 130, 246, 0.10), transparent 34%);
    filter: blur(20px);
    animation: ambientDrift 18s ease-in-out infinite alternate;
}

body::after {
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.03),
        transparent 18%,
        transparent 82%,
        rgba(255, 255, 255, 0.025)
    );
    opacity: 0.8;
}

@keyframes ambientDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(0, -14px, 0) scale(1.03); }
}

/* --- Background Grid --- */
.bg-grid {
    background-size: 50px 50px;
    background-image:
        linear-gradient(to right,  rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* --- Glass Panel --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Hamburger Bar Animations (data-attribute driven) --- */
.bar {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.bar[data-bar-state="open"]:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.bar[data-bar-state="open"]:nth-child(2) {
    opacity: 0;
}

.bar[data-bar-state="open"]:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.bar[data-bar-state="closed"] {
    transform: none;
    opacity: 1;
}

/* --- Body Utility --- */
body.overflow-hidden {
    overflow: hidden;
}

/* --- Shared Footer --- */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: #9ca3af; /* gray-400 */
    font-weight: 700;
}
