/* ============================================================
   Design tokens
   ============================================================ */
:root {
    --ink: #0F1420;
    --panel: #171E2C;
    --panel-line: #262E40;
    --amber: #F2A03D;
    --blue: #4FA3D1;
    --green: #3FB68A;
    --text-onDark: #EDEFF4;
    --text-onDark-muted: #8B94A7;
    --text-onLight: #1B2130;
    --text-onLight-muted: #626B7E;
    --bg-light: #F7F8FA;
    --font-display: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
    --font-body: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--text-onLight); background: #fff; line-height: 1.55; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; }
img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header { background: var(--ink); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--panel-line); }
.header-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.site-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; text-decoration: none; color: var(--text-onDark); letter-spacing: -0.01em; display: flex; align-items: center; }
.logo-chip { display: inline-flex; align-items: center; background: #fff; padding: 6px 12px; border-radius: 5px; }
.logo-chip img { height: 26px; width: auto; display: block; }
.footer-brand .logo-chip img { height: 30px; }
.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a { text-decoration: none; color: var(--text-onDark-muted); font-size: 0.93rem; font-weight: 500; transition: color .15s; }
.site-nav a:hover { color: var(--text-onDark); }
.nav-cta { background: var(--amber); color: var(--ink) !important; padding: 9px 18px; border-radius: 4px; font-weight: 600 !important; }
.nav-cta:hover { background: #e2913a; color: var(--ink) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text-onDark); display: block; }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--ink); border-bottom: 1px solid var(--panel-line);
        flex-direction: column; align-items: flex-start; gap: 0;
        max-height: 0; overflow: hidden; transition: max-height .25s ease;
    }
    .site-nav.open { max-height: 320px; }
    .site-nav a { width: 100%; padding: 14px 24px; border-top: 1px solid var(--panel-line); }
    .nav-cta { margin: 12px 24px; text-align: center; }
}

/* ============================================================
   Layout shell
   ============================================================ */
.site-main { min-height: 50vh; }
.section { max-width: 1240px; margin: 0 auto; padding: 64px 24px; }
.section-title { font-size: 1.6rem; margin-bottom: 8px; color: var(--text-onLight); }
.section-subtitle { color: var(--text-onLight-muted); font-size: 0.98rem; margin-bottom: 32px; max-width: 60ch; }

.alert { max-width: 1240px; margin: 16px auto 0; padding: 12px 24px; border-radius: 6px; font-size: .9rem; }
.alert-success { background: #e4f8ec; color: #1a7a44; border: 1px solid #b6ebc9; }
.alert-error { background: #fdeaea; color: #b42323; border: 1px solid #f5c2c2; }

/* ============================================================
   Hero - monitoring wall
   ============================================================ */
.hero { background: var(--ink); color: var(--text-onDark); overflow: hidden; }
.hero-inner {
    max-width: 1240px; margin: 0 auto; padding: 72px 24px 64px;
    display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
.hero-eyebrow { color: var(--amber); font-size: 0.85rem; font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; max-width: 16ch; }
.hero p.hero-lede { color: var(--text-onDark-muted); font-size: 1.05rem; max-width: 46ch; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.monitor-wall { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.monitor-tile {
    position: relative; aspect-ratio: 4/3; background: #0B0F18; border-radius: 3px;
    border: 1px solid var(--panel-line); overflow: hidden;
}
.monitor-tile svg { width: 100%; height: 100%; display: block; }
.monitor-tile .rec-dot {
    position: absolute; top: 6px; left: 8px; width: 6px; height: 6px; border-radius: 50%;
    background: #E14B4B; box-shadow: 0 0 4px #E14B4B;
}
.monitor-tile .tile-label {
    position: absolute; bottom: 5px; left: 8px; font-size: 0.6rem; color: rgba(255,255,255,0.55);
    font-family: var(--font-body); letter-spacing: 0.02em;
}
.monitor-tile::before, .monitor-tile::after,
.monitor-tile .corner-tl, .monitor-tile .corner-br { content: ''; }
.corner-bracket { position: absolute; width: 12px; height: 12px; border-color: var(--amber); opacity: .8; }
.corner-tl { top: 4px; left: 4px; border-top: 2px solid var(--amber); border-left: 2px solid var(--amber); }
.corner-br { bottom: 4px; right: 4px; border-bottom: 2px solid var(--amber); border-right: 2px solid var(--amber); }

.scan-line {
    position: absolute; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--amber), transparent);
    top: 0; opacity: 0.9;
    animation: scan-sweep 2.4s ease-in-out 0.3s 1;
}
@keyframes scan-sweep {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; padding: 48px 20px; }
    .hero h1 { font-size: 2rem; max-width: none; }
    .monitor-wall { max-width: 440px; margin: 0 auto; }
}

/* ============================================================
   Category switches (breaker-panel motif)
   ============================================================ */
.switch-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.switch-tile {
    display: flex; align-items: center; gap: 12px; padding: 18px 18px;
    background: var(--panel); border: 1px solid var(--panel-line); border-radius: 6px;
    text-decoration: none; color: var(--text-onDark);
}
.switch-indicator { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); flex-shrink: 0; }
.switch-tile .switch-label { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; }
.switch-tile .switch-sub { display: block; color: var(--text-onDark-muted); font-size: 0.8rem; font-weight: 400; margin-top: 2px; }
.category-band { background: var(--ink); padding: 56px 24px; }
.category-band .section-title, .category-band .section-subtitle { color: var(--text-onDark); }
.category-band .section-subtitle { color: var(--text-onDark-muted); }

/* ============================================================
   Product cards
   ============================================================ */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.card-item {
    border: 1px solid #E7E9EE; border-radius: 6px; overflow: hidden; text-decoration: none;
    color: inherit; background: #fff; display: block; transition: border-color .15s, box-shadow .15s;
    position: relative;
}
.card-item:hover { border-color: var(--amber); box-shadow: 0 6px 20px rgba(15,20,32,0.08); }
.card-item .thumb-wrap { position: relative; }
.card-item .thumb-wrap .corner-bracket { border-color: var(--amber); }
.card-item img { width: 100%; height: 180px; object-fit: contain; background: var(--bg-light); padding: 10px; }
.no-image { width: 100%; height: 180px; background: var(--bg-light); }
.no-image svg { width: 100%; height: 100%; }
.no-image-large { height: 320px; border-radius: 6px; border: 1px solid #E7E9EE; }
.card-body { padding: 16px; }
.card-body h3 { font-size: 1rem; margin-bottom: 6px; font-weight: 600; }
.card-body p { margin: 0; font-size: 0.86rem; color: var(--text-onLight-muted); }
.price-tag { margin-top: 10px; font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.05rem; }

.category-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.category-pills a { padding: 8px 18px; border-radius: 4px; background: var(--bg-light); text-decoration: none; font-size: 0.85rem; color: var(--text-onLight); border: 1px solid #E7E9EE; }
.category-pills a.active { background: var(--ink); color: var(--text-onDark); border-color: var(--ink); }
.product-search-form { display: flex; gap: 10px; margin-bottom: 24px; max-width: 500px; flex-wrap: wrap; }
.product-search-form input[type=text] { flex: 1; min-width: 200px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-onLight-muted); }
.empty-state p { margin-bottom: 16px; }

/* ============================================================
   Spec / trust section (datasheet style)
   ============================================================ */
.spec-list { border-top: 1px solid #E7E9EE; }
.spec-row { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid #E7E9EE; }
.spec-row .spec-label { font-family: var(--font-display); font-weight: 600; color: var(--text-onLight); }
.spec-row .spec-value { color: var(--text-onLight-muted); }
@media (max-width: 640px) {
    .spec-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
    background: linear-gradient(120deg, var(--ink) 0%, #1a2436 100%);
    color: var(--text-onDark); border-radius: 8px; padding: 44px 36px;
    display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
    margin: 0 24px 64px; max-width: 1192px; margin-left: auto; margin-right: auto;
}
.cta-band h2 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-band p { color: var(--text-onDark-muted); margin: 0; font-size: 0.95rem; }
.cta-band .btn { flex-shrink: 0; }

/* ============================================================
   Buttons / forms (shared)
   ============================================================ */
.btn {
    display: inline-block; padding: 12px 24px; border-radius: 4px; background: var(--amber);
    color: var(--ink); text-decoration: none; border: none; cursor: pointer; font-size: 0.92rem;
    font-weight: 600; transition: background .15s;
}
.btn:hover { background: #e2913a; }
.btn-outline { background: transparent; border: 1px solid #C7CCD6; color: var(--text-onLight); font-weight: 500; }
.btn-outline:hover { border-color: var(--ink); background: var(--bg-light); }
.btn-outline-invert { background: transparent; border: 1px solid var(--text-onDark-muted); color: var(--text-onDark); font-weight: 500; }
.btn-outline-invert:hover { border-color: var(--text-onDark); background: rgba(255,255,255,0.06); }

.form-card { max-width: 560px; margin: 0 auto; background: var(--bg-light); border: 1px solid #E7E9EE; border-radius: 8px; padding: 32px; }
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 0.87rem; color: var(--text-onLight); }
input[type=text], input[type=email], input[type=tel], textarea, select {
    width: 100%; padding: 11px 13px; border: 1px solid #D7DBE3; border-radius: 5px; font-size: 0.92rem;
    font-family: var(--font-body);
}
textarea { min-height: 110px; }

/* ============================================================
   Product detail page
   ============================================================ */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1240px; margin: 0 auto; padding: 48px 24px; }
.product-gallery img { width: 100%; max-height: 420px; object-fit: contain; background: var(--bg-light); border-radius: 6px; margin-bottom: 10px; border: 1px solid #E7E9EE; }
.thumb-row { display: flex; gap: 8px; }
.thumb-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid #E7E9EE; }
@media (max-width: 760px) {
    .product-detail { grid-template-columns: 1fr; padding: 32px 20px; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: var(--text-onDark-muted); margin-top: 0; }
.footer-grid {
    max-width: 1240px; margin: 0 auto; padding: 52px 24px 32px;
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
}
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--text-onDark); margin-bottom: 10px; }
.footer-tagline { font-size: 0.88rem; max-width: 32ch; }
.footer-col h4 { font-size: 0.85rem; color: var(--text-onDark); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; text-decoration: none; color: var(--text-onDark-muted); font-size: 0.88rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--text-onDark); }
.footer-col p { font-size: 0.88rem; margin: 0 0 8px; }
.footer-bottom {
    border-top: 1px solid var(--panel-line); max-width: 1240px; margin: 0 auto; padding: 18px 24px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    font-size: 0.8rem;
}
.footer-portals { display: flex; gap: 18px; }
.footer-portals a { text-decoration: none; color: var(--text-onDark-muted); font-size: 0.8rem; }
.footer-portals a:hover { color: var(--amber); }
@media (max-width: 760px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   WhatsApp / Telegram floating chat bubbles
   ============================================================ */
.chat-bubble-stack {
    position: fixed; right: 20px; bottom: 20px; z-index: 50;
    display: flex; flex-direction: column; gap: 12px;
}
.chat-bubble {
    width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: transform .15s;
}
.chat-bubble:hover { transform: scale(1.08); }
.chat-bubble svg { width: 26px; height: 26px; }
.chat-bubble-whatsapp { background: #25D366; }
.chat-bubble-telegram { background: #229ED9; }

@media (max-width: 600px) {
    .chat-bubble-stack { right: 14px; bottom: 14px; gap: 10px; }
    .chat-bubble { width: 44px; height: 44px; }
    .chat-bubble svg { width: 22px; height: 22px; }
    /* Keep floating bubbles from sitting on top of the last button/card on
       short mobile pages by reserving clear space before the footer. */
    .site-main { display: block; padding-bottom: 76px; }
}

/* ============================================================
   About / Contact / Policy pages
   ============================================================ */
.page-hero { background: var(--ink); color: var(--text-onDark); padding: 56px 24px; text-align: center; }
.page-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.page-hero p { color: var(--text-onDark-muted); max-width: 60ch; margin: 0 auto; }
.prose { max-width: 800px; margin: 0 auto; padding: 56px 24px; }
.prose h2 { font-size: 1.3rem; margin: 32px 0 12px; color: var(--text-onLight); }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-onLight-muted); margin: 0 0 14px; line-height: 1.65; }
.prose p:last-child { margin-bottom: 0; }
.product-description p { color: var(--text-onLight-muted); margin: 0 0 12px; line-height: 1.6; }
.product-description p:last-child { margin-bottom: 0; }
.prose ul { color: var(--text-onLight-muted); padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }

.contact-grid { max-width: 1100px; margin: 0 auto; padding: 56px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.contact-info-card { background: var(--bg-light); border: 1px solid #E7E9EE; border-radius: 8px; padding: 28px; }
.contact-info-card h3 { font-size: 1.1rem; margin-bottom: 18px; }
.contact-info-row { display: flex; gap: 12px; margin-bottom: 16px; font-size: 0.92rem; color: var(--text-onLight-muted); }
.contact-info-row strong { color: var(--text-onLight); display: block; font-size: 0.85rem; }
@media (max-width: 760px) {
    .contact-grid { grid-template-columns: 1fr; padding: 40px 20px; }
}

/* ============================================================
   Software catalog page
   ============================================================ */
.software-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.software-card {
    border: 1px solid #E7E9EE; border-radius: 8px; background: #fff; overflow: hidden;
    display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s;
    text-decoration: none; color: inherit;
}
.software-card:hover { border-color: var(--amber); box-shadow: 0 6px 20px rgba(15,20,32,0.08); }
.software-thumb { width: 100%; aspect-ratio: 16/10; background: var(--bg-light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.software-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.software-body { padding: 16px; display: flex; flex-direction: column; }
.software-body h3 { font-size: 1rem; margin-bottom: 4px; font-weight: 600; }
.software-version { font-size: 0.78rem; color: var(--text-onLight-muted); margin-bottom: 8px; }
.software-desc { font-size: 0.87rem; color: var(--text-onLight-muted); overflow-wrap: anywhere; }
.software-desc-clamp {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 14px; min-height: 2.6em;
}
.software-body .btn { text-align: center; margin-top: auto; }

/* Software detail page */
.software-detail-grid { max-width: 1100px; margin: 0 auto; padding: 0 24px 20px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
.software-detail-image {
    background: var(--bg-light); border: 1px solid #E7E9EE; border-radius: 8px;
    aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.software-detail-image img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.software-detail-info h1 { font-size: 1.6rem; margin-bottom: 10px; }
.software-detail-overview { color: var(--text-onLight-muted); margin-bottom: 20px; }
.software-spec-box { background: var(--bg-light); border: 1px solid #E7E9EE; border-radius: 8px; padding: 6px 18px; margin-bottom: 22px; }
.software-spec-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #E7E9EE; font-size: 0.9rem; }
.software-spec-row:last-child { border-bottom: none; }
.software-spec-row span { color: var(--text-onLight-muted); }
.software-download-btn { display: block; text-align: center; font-size: 1rem; padding: 14px 24px; }
@media (max-width: 760px) {
    .software-detail-grid { grid-template-columns: 1fr; padding: 0 20px 20px; }
}
