/* ==========================================================================
   BSoft Server — server.bsoft.mk
   Flat, dark-navy landing page. No external fonts or libraries.
   ========================================================================== */

:root {
    --navy-950: #050a17;
    --navy-900: #071021;
    --navy-800: #0b1730;
    --blue-600: #1b5fd0;
    --blue-500: #2f7ef7;
    --blue-400: #63a4ff;
    --green-400: #34d399;

    --text: #e9eefb;
    --text-muted: #94a6c8;
    --text-dim: #6c7fa3;

    --line: rgba(148, 176, 232, .14);
    --line-strong: rgba(148, 176, 232, .26);
    --surface: rgba(148, 176, 232, .045);
    --surface-hover: rgba(148, 176, 232, .075);

    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 24px;

    --shell: 1120px;
    --ease: cubic-bezier(.22, .61, .36, 1);

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, "Noto Sans", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: clamp(20px, 4vw, 40px);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--navy-950);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.icon {
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

:focus-visible {
    outline: 2px solid var(--blue-400);
    outline-offset: 3px;
    border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(90rem 60rem at 78% -10%, rgba(47, 126, 247, .16), transparent 60%),
        radial-gradient(70rem 50rem at 6% 108%, rgba(27, 95, 208, .14), transparent 62%),
        linear-gradient(180deg, var(--navy-950), var(--navy-900) 42%, var(--navy-800) 68%, var(--navy-950));
}

.grid {
    position: absolute;
    inset: -1px;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 68px 68px;
    opacity: .28;
    mask-image: radial-gradient(75% 70% at 50% 32%, #000 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(75% 70% at 50% 32%, #000 20%, transparent 100%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    animation: drift 22s var(--ease) infinite alternate;
}

.glow--one {
    width: 38rem;
    height: 38rem;
    top: -14rem;
    right: -10rem;
    background: radial-gradient(circle, rgba(47, 126, 247, .5), transparent 68%);
}

.glow--two {
    width: 32rem;
    height: 32rem;
    bottom: -16rem;
    left: -8rem;
    background: radial-gradient(circle, rgba(52, 211, 153, .16), transparent 68%);
    animation-duration: 28s;
    animation-direction: alternate-reverse;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-3rem, 2.5rem, 0) scale(1.12); }
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: fade-down .8s var(--ease) both;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand__mark {
    width: 40px;
    height: 40px;
    display: block;
}

.brand__mark svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

.brand__mark rect {
    fill: rgba(47, 126, 247, .12);
    stroke: var(--line-strong);
    stroke-width: 1.5;
}

.mark__shield {
    fill: rgba(47, 126, 247, .22);
    stroke: var(--blue-400);
    stroke-width: 1.8;
}

.mark__lines {
    stroke: var(--blue-400);
    stroke-width: 1.8;
    opacity: .85;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__text strong {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.brand__text span {
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.masthead__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .25s var(--ease), border-color .25s var(--ease),
        background-color .25s var(--ease);
}

.masthead__link .icon {
    font-size: .875rem;
    transition: transform .25s var(--ease);
}

.masthead__link:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--surface-hover);
}

.masthead__link:hover .icon {
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.page {
    flex: 1;
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(40px, 5vw, 60px);
    padding: clamp(36px, 5vw, 60px) 0;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: clamp(32px, 6vw, 72px);
}

.hero__copy {
    max-width: 34rem;
}

/* Staggered entrance */
.reveal {
    animation: fade-up .9s var(--ease) both;
}

.hero__copy > .reveal:nth-child(1) { animation-delay: .05s; }
.hero__copy > .reveal:nth-child(2) { animation-delay: .13s; }
.hero__copy > .reveal:nth-child(3) { animation-delay: .21s; }
.hero__copy > .reveal:nth-child(4) { animation-delay: .29s; }
.hero__copy > .reveal:nth-child(5) { animation-delay: .37s; }
.hero__visual { animation-delay: .2s; }

@keyframes fade-up {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes fade-down {
    from { opacity: 0; transform: translate3d(0, -14px, 0); }
    to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Status badge
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 13px;
    border: 1px solid rgba(52, 211, 153, .3);
    border-radius: 999px;
    background: rgba(52, 211, 153, .09);
    font-size: .8125rem;
    line-height: 1.4;
}

.badge__dot {
    position: relative;
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--green-400);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}

.badge__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--green-400);
    animation: ping 2.4s var(--ease) infinite;
}

@keyframes ping {
    0%        { opacity: .7; transform: scale(1); }
    70%, 100% { opacity: 0; transform: scale(3.4); }
}

.badge__label {
    font-weight: 600;
    letter-spacing: .02em;
    color: #7defc0;
}

.badge__note {
    padding-left: 10px;
    border-left: 1px solid rgba(52, 211, 153, .25);
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Hero text + actions
   -------------------------------------------------------------------------- */

.hero__title {
    margin-top: 26px;
    font-size: clamp(2.5rem, 6.2vw, 4rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.035em;
    background: linear-gradient(180deg, #ffffff, #b9cdf2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    margin-top: 10px;
    font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
    font-weight: 500;
    letter-spacing: .01em;
    color: var(--blue-400);
}

.hero__text {
    margin-top: 20px;
    max-width: 33rem;
    font-size: 1rem;
    color: var(--text-muted);
}

.actions {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    transition: transform .22s var(--ease), box-shadow .22s var(--ease),
        background-color .22s var(--ease), border-color .22s var(--ease),
        color .22s var(--ease);
}

.btn .icon {
    font-size: 1rem;
    transition: transform .22s var(--ease);
}

.btn--primary {
    background: linear-gradient(180deg, var(--blue-500), var(--blue-600));
    color: #fff;
    box-shadow: 0 10px 24px -12px rgba(47, 126, 247, .85),
        inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px rgba(47, 126, 247, .95),
        inset 0 1px 0 rgba(255, 255, 255, .28);
}

.btn--primary:hover .icon {
    transform: translateX(4px);
}

.btn--ghost {
    border-color: var(--line);
    background: var(--surface);
    color: var(--text-muted);
}

.btn--ghost:hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
    color: var(--text);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Hero visual
   -------------------------------------------------------------------------- */

.hero__visual {
    display: flex;
    justify-content: center;
}

.stage {
    position: relative;
    width: 100%;
    max-width: 22rem;
    aspect-ratio: 1;
    transition: transform .5s var(--ease);
    will-change: transform;
}

.stage::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 126, 247, .28), transparent 66%);
    filter: blur(28px);
    animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: .55; transform: scale(.96); }
    50%      { opacity: .9;  transform: scale(1.04); }
}

.stage__art {
    position: relative;
    width: 100%;
    height: 100%;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
}

.ring {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 1;
    stroke-dasharray: 4 9;
}

.ring--outer {
    animation: spin 60s linear infinite;
    transform-origin: 160px 160px;
}

.ring--inner {
    stroke-dasharray: 2 12;
    opacity: .7;
    animation: spin 42s linear infinite reverse;
    transform-origin: 160px 160px;
}

.orbit {
    transform-origin: 160px 160px;
    animation: spin 14s linear infinite;
}

.orbit--reverse {
    animation-duration: 20s;
    animation-direction: reverse;
}

.orbit__dot {
    fill: var(--blue-400);
    filter: drop-shadow(0 0 6px rgba(99, 164, 255, .9));
}

.orbit__dot--sm {
    fill: var(--green-400);
    filter: drop-shadow(0 0 6px rgba(52, 211, 153, .8));
}

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

.shield {
    fill: url(#gShield);
    stroke: rgba(99, 164, 255, .55);
    stroke-width: 1.6;
}

.rack__unit rect {
    fill: rgba(8, 18, 38, .82);
    stroke: var(--line-strong);
    stroke-width: 1.4;
}

.rack__bar {
    stroke: rgba(148, 176, 232, .4);
    stroke-width: 2.4;
    stroke-dasharray: 14 6;
}

.rack__unit {
    animation: lift 5s ease-in-out infinite;
}

.rack__unit:nth-child(2) { animation-delay: .35s; }
.rack__unit:nth-child(3) { animation-delay: .7s; }

@keyframes lift {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

.led {
    fill: var(--green-400);
    animation: blink 2.2s ease-in-out infinite;
}

.led--2 {
    fill: var(--blue-400);
    animation-delay: .5s;
}

.led--3 { animation-delay: 1s; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    45%      { opacity: .25; }
}

.scan {
    stroke: var(--blue-400);
    stroke-width: 2;
    opacity: 0;
    animation: scan 4.5s var(--ease) infinite;
}

@keyframes scan {
    0%        { opacity: 0; transform: translateY(-48px); }
    12%, 60%  { opacity: .55; }
    75%, 100% { opacity: 0; transform: translateY(48px); }
}

.check {
    stroke: var(--green-400);
    stroke-width: 3.4;
    stroke-dasharray: 56;
    stroke-dashoffset: 56;
    filter: drop-shadow(0 0 8px rgba(52, 211, 153, .5));
    animation: draw 1.4s var(--ease) .9s forwards;
}

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    position: relative;
    padding: 26px 24px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--surface), rgba(148, 176, 232, .015));
    overflow: hidden;
    transition: transform .3s var(--ease), border-color .3s var(--ease),
        background-color .3s var(--ease);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 164, 255, .55), transparent);
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.card:hover::before {
    opacity: 1;
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(99, 164, 255, .22);
    border-radius: var(--radius);
    background: rgba(47, 126, 247, .12);
    color: var(--blue-400);
}

.card__icon .icon {
    font-size: 1.375rem;
}

.card__title {
    margin-top: 18px;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -.01em;
}

.card__text {
    margin-top: 8px;
    font-size: .9375rem;
    color: var(--text-muted);
}

/* Scroll-triggered variant (JS adds .is-watched, then .is-visible) */
.card.is-watched {
    animation: none;
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.card.is-watched.is-visible {
    opacity: 1;
    transform: none;
}

.cards .card:nth-child(2).is-watched { transition-delay: .1s; }
.cards .card:nth-child(3).is-watched { transition-delay: .2s; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: .875rem;
    color: var(--text-dim);
}

.footer__managed {
    font-weight: 600;
    color: var(--text);
}

.footer__site {
    position: relative;
    color: var(--blue-400);
    transition: color .25s var(--ease);
}

.footer__site::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
}

.footer__site:hover {
    color: #9cc4ff;
}

.footer__site:hover::after {
    transform: scaleX(1);
}

.footer__legal {
    margin-left: auto;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
        gap: 44px;
    }

    .hero__copy {
        order: 2;
        width: 100%;
        max-width: 36rem;
    }

    .hero__visual {
        order: 1;
        width: 100%;
    }

    .hero__text {
        margin-inline: auto;
    }

    .actions {
        justify-content: center;
    }

    .badge {
        margin-inline: auto;
    }

    .stage {
        max-width: 21rem;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cards .card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    body {
        padding: 18px 18px 26px;
    }

    .masthead__link {
        padding: 8px 13px;
        font-size: .8125rem;
    }

    .badge {
        flex-direction: column;
        gap: 2px;
        padding: 10px 18px;
        text-align: center;
    }

    .badge__dot {
        margin-bottom: 2px;
    }

    .badge__note {
        padding-left: 0;
        border-left: 0;
        font-size: .75rem;
    }

    .actions {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stage {
        max-width: 17rem;
    }

    .cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .cards .card:last-child {
        grid-column: auto;
    }

    .footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 4px;
    }

    .footer__legal {
        margin-left: 0;
        margin-top: 4px;
    }
}

@media (max-width: 380px) {
    .brand__text span {
        letter-spacing: .12em;
    }
}

/* --------------------------------------------------------------------------
   Motion & contrast preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .card.is-watched {
        opacity: 1;
        transform: none;
    }

    .check {
        stroke-dashoffset: 0;
    }

    .scan {
        opacity: .35;
    }

    .stage {
        transform: none !important;
    }
}

@media print {
    .backdrop,
    .hero__visual {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}
