/* ==========================================================
   CH NET GUARD — Hero Spec Card (Phase 12)
   ----------------------------------------------------------
   The cyberpunk "identity panel" that fills the empty zone
   above the headline in the hero. Pure decoration; no
   interactivity. Designed to feel like a SOC-dashboard
   subject-profile card — sharp corners, mono labels, corner
   brackets, a slow periodic scan line.

   Hidden on mobile (<1024px) — the column has no room there.
   ========================================================== */

.spec-card {
    /*
       Lives inside .hero-inner--map but sits in its own
       block flow between eyebrow and headline. Sizing is
       fixed-ish so it occupies the dead zone consistently.
    */
    position: relative;
    display: block;
    width: 360px;
    max-width: 100%;
    margin: 26px 0 38px;
    padding: 18px 22px 16px;

    /* Card surface — angular, semi-transparent so the map
       glows through slightly. The double-layer background
       creates a subtle inner glow effect at the top. */
    background:
        linear-gradient(180deg,
            rgba(15, 181, 164, 0.06) 0%,
            transparent 30%,
            transparent 100%),
        rgba(7, 11, 24, 0.62);
    border: 1px solid rgba(20, 215, 195, 0.22);
    /* No border-radius — sharp corners are the look */
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    /* Faint outer glow — same teal as the map nodes */
    box-shadow:
        0 0 0 1px rgba(20, 215, 195, 0.08),
        0 14px 40px rgba(0, 0, 0, 0.45),
        0 0 40px rgba(20, 215, 195, 0.06);

    /* Mono font baseline; specific elements override to Space Grotesk */
    font-family: 'JetBrains Mono', Consolas, monospace;
    color: var(--text-secondary, #B8C0D8);
    letter-spacing: 0.04em;
    font-size: 11px;
    line-height: 1.5;

    /* Mouse parallax — very subtle, just a few degrees */
    transition: transform 320ms ease-out;
    transform-style: preserve-3d;

    /* Reveal — starts hidden; main.js GSAP timeline animates
       opacity and y back to 1 / 0 after the headline lands.
       No-JS fallback below removes the hidden state. */
    opacity: 0;
    transform: translateY(8px);
    transition: transform 320ms ease-out;
}

/* No-JS fallback — show the card immediately if Alpine/GSAP
   isn't running, so the layout isn't visibly broken. */
html:not(.js-ready) .spec-card {
    opacity: 1;
    transform: none;
}

/* ---------- Corner brackets ---------- */
.spec-card-bracket {
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 2;
}
.spec-card-bracket--tl {
    top: 6px; left: 6px;
    border-top:  1px solid rgba(20, 215, 195, 0.6);
    border-left: 1px solid rgba(20, 215, 195, 0.6);
}
.spec-card-bracket--tr {
    top: 6px; right: 6px;
    border-top:   1px solid rgba(20, 215, 195, 0.6);
    border-right: 1px solid rgba(20, 215, 195, 0.6);
}
.spec-card-bracket--bl {
    bottom: 6px; left: 6px;
    border-bottom: 1px solid rgba(20, 215, 195, 0.6);
    border-left:   1px solid rgba(20, 215, 195, 0.6);
}
.spec-card-bracket--br {
    bottom: 6px; right: 6px;
    border-bottom: 1px solid rgba(20, 215, 195, 0.6);
    border-right:  1px solid rgba(20, 215, 195, 0.6);
}

/* ---------- Periodic scan line ---------- */
.spec-card-scan {
    position: absolute;
    top: 0; bottom: 0;
    left: -40px;
    width: 80px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(20, 215, 195, 0.18) 50%,
        transparent 100%
    );
    animation: spec-card-scan-sweep 7s ease-in-out infinite;
    animation-delay: 3s;
}
@keyframes spec-card-scan-sweep {
    0%   { left: -40px;             opacity: 0; }
    10%  {                           opacity: 1; }
    50%  { left: calc(100% + 40px); opacity: 1; }
    51%  { opacity: 0; }
    100% { left: calc(100% + 40px); opacity: 0; }
}

/* ---------- TOP: live tag + ID ---------- */
.spec-card-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 9.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted, #8089A8);
    margin-bottom: 16px;
}
.spec-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 9px;
    border: 1px solid rgba(20, 215, 195, 0.35);
    background: rgba(20, 215, 195, 0.08);
    color: var(--accent-teal-2, #14D7C3);
    font-size: 9px;
}
.spec-card-tag-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-teal-2, #14D7C3);
    box-shadow: 0 0 6px var(--accent-teal-2, #14D7C3);
    animation: spec-card-tag-pulse 1.6s ease-in-out infinite;
}
@keyframes spec-card-tag-pulse {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%      { opacity: 0.45; transform: scale(0.7); }
}
.spec-card-id {
    color: rgba(229, 193, 88, 0.85);    /* faint gold */
    font-size: 9.5px;
}

/* ---------- MIDDLE: brand mark ---------- */
.spec-card-brand {
    position: relative;
    z-index: 2;
    margin-bottom: 18px;
}
.spec-card-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-primary, #F1F4FF);
    margin: 0 0 8px;
    line-height: 1;
}
.spec-card-rule {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg,
        var(--accent-gold, #C9A227),
        rgba(201, 162, 39, 0));
    margin-bottom: 8px;
}
.spec-card-tagline {
    font-size: 10px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--accent-teal-2, #14D7C3);
    margin: 0;
    opacity: 0.85;
}

/* ---------- BOTTOM: region grid ---------- */
.spec-card-regions {
    position: relative;
    z-index: 2;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
}
.spec-card-regions li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: var(--text-secondary, #B8C0D8);
}
.spec-card-region-dot {
    width: 6px; height: 6px; border-radius: 50%;
    flex: 0 0 6px;
    box-shadow: 0 0 6px currentColor;
}
.spec-card-region-dot[data-region="it"] { background: #14D7C3; color: #14D7C3; }
.spec-card-region-dot[data-region="se"] { background: #93C5FD; color: #93C5FD; }
.spec-card-region-dot[data-region="ch"] { background: #EC4899; color: #EC4899; }
.spec-card-region-dot[data-region="ae"] { background: #E5C158; color: #E5C158; }

.spec-card-region-name {
    color: var(--text-primary, #F1F4FF);
    letter-spacing: 0.05em;
}
.spec-card-region-meta {
    margin-left: auto;
    font-size: 8.5px;
    letter-spacing: 0.12em;
    color: var(--text-muted, #8089A8);
    text-transform: uppercase;
}

/* ---------- FOOTER ---------- */
.spec-card-foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed rgba(20, 215, 195, 0.18);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted, #8089A8);
}
.spec-card-foot-sep {
    opacity: 0.5;
}

/* ==========================================================
   HIDE on mobile + reduced-motion adjustments
   ========================================================== */
@media (max-width: 1023px) {
    .spec-card { display: none; }
}

/* Short laptop viewports — shrink the card so the hero
   content (headline, CTAs, chips) still fits comfortably
   without overflowing past 100vh. */
@media (min-width: 1024px) and (max-height: 820px) {
    .spec-card {
        width: 320px;
        margin: 16px 0 22px;
        padding: 14px 18px 12px;
    }
    .spec-card-name      { font-size: 19px; }
    .spec-card-regions   { gap: 6px 12px; }
    .spec-card-foot      { padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .spec-card-scan,
    .spec-card-tag-dot {
        animation: none !important;
    }
    .spec-card {
        transition: none !important;
    }
}
