/* ==========================================================================
   Stang Computer — Design System
   Theme: "System Online" — a dark, circuit-inspired IT/AI identity built
   around the idea that this shop lives and breathes real systems, not
   stock-photo tech. Terminal-style labels + a live status pulse are the
   signature motif, echoed from the nav down to the footer.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Kanit:wght@500;600;700&family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
    /* Color tokens */
    --bg: #070B14;
    --bg-alt: #0B1220;
    --surface: #101A2E;
    --surface-2: #16223B;
    --border: #223049;
    --border-hover: #3A4F72;

    --cyan: #33E6FF;
    --cyan-dim: #1AA9C2;
    --violet: #8B7CFF;
    --green: #3DDC97;
    --amber: #FFB454;

    --text-primary: #EAF1FB;
    --text-secondary: #93A2BE;
    --text-muted: #5D6D8A;

    /* Type tokens */
    --font-display: 'Kanit', 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans Thai', 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

::selection {
    background: var(--cyan);
    color: #04101a;
}

a {
    text-decoration: none;
}

/* Focus visibility (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Background textures
   ========================================================================== */

.bg-base {
    background: var(--bg);
}

.bg-alt {
    background: var(--bg-alt);
}

.circuit-grid {
    background-image:
        linear-gradient(rgba(51, 230, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 230, 255, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
}

.hero-glow {
    background:
        radial-gradient(ellipse 60% 50% at 20% 0%, rgba(139, 124, 255, 0.25), transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 20%, rgba(51, 230, 255, 0.18), transparent 60%),
        var(--bg);
}

/* ==========================================================================
   Terminal / status motif — the signature element
   ========================================================================== */

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    background: rgba(51, 230, 255, 0.08);
    border: 1px solid rgba(51, 230, 255, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--cyan);
    display: inline-block;
}

.cursor-blink::after {
    content: '_';
    color: var(--cyan);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav-shell {
    background: rgba(7, 11, 20, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--cyan);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--cyan);
    transition: width 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-dropdown {
    background: var(--surface);
    border: 1px solid var(--border);
}

.nav-dropdown a {
    color: var(--text-secondary);
}

.nav-dropdown a:hover {
    background: var(--surface-2);
    color: var(--cyan);
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 26px;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #05121D;
    box-shadow: 0 8px 24px rgba(51, 230, 255, 0.18);
}

.btn-primary:hover {
    box-shadow: 0 12px 28px rgba(51, 230, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-outline:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 9px 18px;
    font-size: 13px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    border-color: var(--cyan-dim);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(51, 230, 255, 0.15);
}

.card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(51, 230, 255, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 230, 255, 0.09) 1px, transparent 1px);
    background-size: 20px 20px;
    mix-blend-mode: overlay;
}

.icon-tile {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, rgba(51, 230, 255, 0.14), rgba(139, 124, 255, 0.14));
    border: 1px solid var(--border);
    margin: 0 auto 1.25rem;
}

/* ==========================================================================
   Tags / badges
   ========================================================================== */

.tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(139, 124, 255, 0.12);
    color: var(--violet);
    border: 1px solid rgba(139, 124, 255, 0.3);
}

/* ==========================================================================
   Category filter pills (products)
   ========================================================================== */

.filter-pill {
    font-size: 14px;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    border-color: var(--cyan-dim);
    color: var(--text-primary);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #05121D;
    border-color: transparent;
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stat-value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.field-input {
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
}

.field-input::placeholder {
    color: var(--text-muted);
}

.field-input:focus {
    border-color: var(--cyan);
    outline: none;
}

/* ==========================================================================
   Map frame
   ========================================================================== */

.map-frame {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    filter: grayscale(0.4) invert(0.92) contrast(0.9);
}

/* ==========================================================================
   Animations
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(28px);
    animation: fadeInUp 0.7s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Page header (sub-pages)
   ========================================================================== */

.page-header {
    padding-top: 128px;
    padding-bottom: 56px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-shell {
    background: #050810;
    border-top: 1px solid var(--border);
}
