/* Explain: Styling for navigation, buttons, cards, and other UI components. */
.site-topbar {
    position: relative;
    z-index: 50;
    padding-top: 1.1rem;
    padding-bottom: 1rem;
    pointer-events: none;
}

.site-topbar-inner {
    display: flex;
    width: min(94vw, 1180px);
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-topbar-inner > * {
    pointer-events: auto;
}

.site-logo {
    display: inline-flex;
    max-width: min(84vw, 26rem);
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.site-logo-img {
    height: 13rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (min-width: 768px) {
    .site-logo-img {
        height: 20rem;
    }
}

.tech-header {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(5, 7, 10, 0.78);
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
}

.brand-mark {
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border: 1px solid rgba(255, 59, 48, 0.44);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 59, 48, 0.2), rgba(30, 136, 229, 0.08));
    box-shadow: 0 0 24px rgba(255, 59, 48, 0.18);
}

.float-nav {
    position: fixed;
    right: max(1rem, calc((100vw - 1180px) / 2));
    top: 50%;
    z-index: 45;
    display: none;
    transform: translateY(-50%);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(5, 7, 10, 0.72);
    padding: 0.45rem;
    backdrop-filter: blur(16px);
}

.nav-dot {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border-radius: 999px;
    color: var(--text-soft);
    transition: all 220ms ease;
}

.nav-dot:hover,
.nav-dot.is-active {
    background: rgba(30, 136, 229, 0.16);
    color: var(--secondary-color);
    box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.22), 0 0 26px rgba(30, 136, 229, 0.18);
}

.nav-link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 220ms ease, color 220ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(30, 136, 229, 0.14);
    color: var(--text-color);
}

.nav-link.is-active {
    background: rgba(30, 136, 229, 0.18);
    color: var(--text-color);
    box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.24);
}

.mobile-pulse-nav {
    border: 1px solid var(--border-color);
    background: rgba(5, 7, 10, 0.82);
    backdrop-filter: blur(14px);
}

.mobile-menu-panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: min(20rem, 88vw);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: rgba(5, 7, 10, 0.92);
    padding: 0.75rem;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(18px);
}

.mobile-menu-panel a {
    display: flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.75rem;
    border-radius: 999px;
    padding: 0.7rem 0.9rem;
    color: var(--text-muted);
    font-weight: 700;
    transition: background 220ms ease, color 220ms ease, transform 220ms ease;
}

.mobile-menu-panel a:hover,
.mobile-menu-panel a:focus-visible {
    background: rgba(30, 136, 229, 0.16);
    color: var(--text-color);
    transform: translateX(2px);
}

.tech-btn {
    position: relative;
    display: inline-flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(200, 210, 220, 0.2);
    padding: 0.85rem 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.tech-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.92), rgba(255, 59, 48, 0.18));
    opacity: 0;
    transition: opacity 220ms ease;
}

.tech-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 59, 48, 0.52);
    box-shadow: var(--shadow-blue);
}

.tech-btn:hover::before,
.tech-btn.primary::before {
    opacity: 1;
}

.tech-btn.ghost {
    color: var(--text-muted);
}

.tech-btn.ghost:hover {
    color: var(--text-color);
}

.grid-canvas {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    opacity: 0.82;
}

.equation-stream {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.equation-stream span {
    position: absolute;
    color: rgba(200, 210, 220, 0.34);
    font-family: var(--font-heading);
    font-size: clamp(0.78rem, 1.4vw, 1.15rem);
    letter-spacing: 0.03em;
    text-shadow: 0 0 24px rgba(30, 136, 229, 0.18);
    animation: formula-drift 12s ease-in-out infinite alternate;
}

.wire-panel,
.tech-card,
.orbit-shell,
.contact-panel {
    border: 1px solid var(--border-color);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
        rgba(11, 15, 20, 0.72);
    box-shadow: 0 18px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.tech-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.tech-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -30% 15%;
    height: 7rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.2), transparent 68%);
    opacity: 0;
    transition: opacity 260ms ease;
}

.tech-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 59, 48, 0.36);
    box-shadow: var(--shadow-blue);
}

.tech-card:hover::after {
    opacity: 1;
}

.cad-corner {
    position: relative;
}

.cad-corner::before,
.cad-corner::after {
    content: "";
    position: absolute;
    width: 2.25rem;
    height: 2.25rem;
    pointer-events: none;
}

.cad-corner::before {
    top: 0.85rem;
    left: 0.85rem;
    border-top: 1px solid var(--secondary-color);
    border-left: 1px solid var(--secondary-color);
}

.cad-corner::after {
    right: 0.85rem;
    bottom: 0.85rem;
    border-right: 1px solid var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

.orbit-shell {
    position: relative;
    min-height: 29rem;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.orbit-ring {
    position: absolute;
    inset: 12%;
    border: 1px dashed rgba(200, 210, 220, 0.18);
    border-radius: 50%;
    animation: slow-spin 36s linear infinite;
}

.orbit-ring.second {
    inset: 23%;
    animation-duration: 27s;
    animation-direction: reverse;
}

.orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 8.5rem;
    height: 8.5rem;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 59, 48, 0.42);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 59, 48, 0.2), rgba(30, 136, 229, 0.1), rgba(5, 7, 10, 0.78));
    box-shadow: 0 0 60px rgba(255, 59, 48, 0.14);
}

.orbit-node {
    position: absolute;
    left: var(--node-x);
    top: var(--node-y);
    display: flex;
    min-width: 9rem;
    align-items: center;
    gap: 0.65rem;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(200, 210, 220, 0.18);
    border-radius: 999px;
    background: rgba(5, 7, 10, 0.82);
    padding: 0.55rem 0.75rem;
    color: var(--text-muted);
    transition: all 220ms ease;
}

.orbit-node:hover {
    border-color: rgba(255, 59, 48, 0.44);
    color: var(--text-color);
    box-shadow: 0 0 34px rgba(30, 136, 229, 0.22);
}

.project-visual {
    min-height: 12rem;
    border-bottom: 1px solid var(--border-color);
    background:
        radial-gradient(circle at 28% 34%, rgba(255, 59, 48, 0.2), transparent 9rem),
        linear-gradient(135deg, rgba(30, 136, 229, 0.2), transparent 44%),
        repeating-linear-gradient(90deg, rgba(200, 210, 220, 0.08) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(0deg, rgba(200, 210, 220, 0.06) 0 1px, transparent 1px 26px);
}

.node-diagram {
    filter: drop-shadow(0 0 20px rgba(255, 59, 48, 0.16));
}

.metric-chip,
.industry-chip {
    border: 1px solid rgba(200, 210, 220, 0.16);
    border-radius: 999px;
    background: rgba(200, 210, 220, 0.06);
    color: var(--text-muted);
}

.faq-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(11, 15, 20, 0.72);
}

.faq-panel[open] {
    border-color: rgba(255, 59, 48, 0.34);
    box-shadow: var(--shadow-green);
}

.form-status {
    display: none;
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    font-weight: 600;
}

.form-status.is-success,
.form-status.is-error {
    display: block;
}

.form-status.is-success {
    border: 1px solid rgba(255, 59, 48, 0.34);
    background: rgba(255, 59, 48, 0.1);
    color: var(--secondary-color);
}

.form-status.is-error {
    border: 1px solid rgba(255, 106, 106, 0.34);
    background: rgba(255, 106, 106, 0.1);
    color: #ff9d9d;
}

@media (min-width: 1024px) {
    .float-nav {
        display: grid;
        gap: 0.3rem;
    }
}

@keyframes formula-drift {
    from {
        transform: translate3d(-12px, 18px, 0) rotate(-2deg);
        opacity: 0.18;
    }
    to {
        transform: translate3d(18px, -18px, 0) rotate(2deg);
        opacity: 0.62;
    }
}

@keyframes slow-spin {
    to {
        transform: rotate(360deg);
    }
}