/* PropNova Micro Fix 03 — compact spatial gateway from cross-border inputs to Austria. */

.hero-enhanced .hero-exit-preview { display: none !important; }

.pn-spatial-gateway {
    --gateway-ink: #08131f;
    --gateway-ink-soft: rgb(8 19 31 / 64%);
    --gateway-line: rgb(8 19 31 / 22%);
    --gateway-line-faint: rgb(8 19 31 / 10%);
    --gateway-paper: #f6f1e7;
    --gateway-cyan: #00aeca;
    --gateway-gold: #c79716;
    --gateway-red: #c8102e;
    position: relative;
    z-index: 3;
    height: 52svh;
    min-height: 52svh;
    max-height: 37rem;
    overflow: clip;
    color: var(--gateway-ink);
    background: var(--gateway-paper);
    isolation: isolate;
}

.pn-spatial-gateway::before {
    position: absolute;
    inset: 0 auto 0 clamp(1.25rem, 5.5vw, 6.5rem);
    width: 1px;
    content: '';
    background: var(--gateway-line-faint);
    pointer-events: none;
}

.pn-spatial-gateway::after {
    position: absolute;
    top: 0;
    left: clamp(1.25rem, 5.5vw, 6.5rem);
    width: clamp(3rem, 6vw, 5.5rem);
    height: 2px;
    content: '';
    background: var(--gateway-red);
}

.pn-gateway__shell {
    display: grid;
    grid-template-columns: minmax(19rem, 0.88fr) minmax(30rem, 1.12fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3.75rem);
    width: min(96rem, calc(100% - clamp(3rem, 11vw, 13rem)));
    height: 100%;
    margin-inline: auto;
}

.pn-gateway__header {
    position: relative;
    z-index: 3;
    align-self: center;
}

.pn-gateway__header h2 {
    margin: 0;
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 2.65vw, 3.55rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.pn-gateway__header h2 span { display: block; }

.pn-gateway__header p {
    max-width: 48ch;
    margin: clamp(1rem, 2vh, 1.4rem) 0 0;
    color: var(--gateway-ink-soft);
    font-size: clamp(0.78rem, 0.9vw, 0.96rem);
    line-height: 1.58;
}

.pn-gateway__field {
    position: relative;
    align-self: stretch;
    min-width: 0;
    min-height: 0;
    contain: layout paint;
}

.pn-gateway__field::before {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    content: '';
    background: var(--gateway-line-faint);
}

.pn-gateway__graphic {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.pn-gateway__graphic--mobile { display: none; }

.pn-gateway__graphic path,
.pn-gateway__graphic circle {
    vector-effect: non-scaling-stroke;
}

.pn-gateway__fragments {
    fill: none;
    stroke: var(--gateway-line);
    stroke-width: 1;
}

.pn-gateway__fragments path:nth-child(1) { transform: translate(-6px, -3px); }
.pn-gateway__fragments path:nth-child(2) { transform: translate(8px, 5px); }
.pn-gateway__fragments path:nth-child(3) { transform: translate(5px, -6px); }
.pn-gateway__fragments path:nth-child(4) { transform: translate(-7px, 4px); }

.pn-gateway__stage-group {
    --prox-x: 0px;
    --prox-y: 0px;
    transform: translate3d(var(--prox-x), var(--prox-y), 0);
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms ease;
}

.pn-gateway__route,
.pn-gateway__austria-outline,
.pn-gateway__danube,
.pn-gateway__network-line,
.pn-gateway__handoff-route {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pn-gateway__route {
    stroke: var(--gateway-cyan);
    stroke-width: 1.65;
}

.pn-gateway__route--property,
.pn-gateway__handoff-route {
    stroke: var(--gateway-gold);
}

.pn-gateway__handoff-route { stroke-width: 1.4; }

.pn-gateway__austria-outline {
    stroke: rgb(8 19 31 / 62%);
    stroke-width: 1.3;
}

.pn-gateway__federal-cues {
    fill: var(--gateway-ink-soft);
    stroke: var(--gateway-line);
    stroke-width: 0.7;
}

.pn-gateway__federal-cues text,
.pn-gateway__network-labels text {
    stroke: none;
    font: 700 8px/1 'Inter', sans-serif;
    letter-spacing: 0.12em;
}

.pn-gateway__austria-accent {
    fill: none;
    stroke: var(--gateway-red);
    stroke-width: 0.9;
}

.pn-gateway__danube {
    stroke: rgb(0 174 202 / 58%);
    stroke-width: 1;
}

.pn-gateway__network-line {
    stroke: rgb(8 19 31 / 34%);
    stroke-width: 0.85;
}

.pn-gateway__network-labels { fill: rgb(8 19 31 / 58%); }

.pn-gateway__coordinate {
    fill: none;
    stroke: rgb(8 19 31 / 46%);
    stroke-width: 0.8;
}

.pn-gateway__node {
    fill: var(--gateway-paper);
    stroke: var(--gateway-ink);
    stroke-width: 1;
}

.pn-gateway__node--origin { stroke: var(--gateway-cyan); }
.pn-gateway__node--vienna { fill: var(--gateway-cyan); stroke: var(--gateway-paper); stroke-width: 2; }
.pn-gateway__node--property { fill: var(--gateway-gold); stroke: var(--gateway-paper); stroke-width: 2; }

.pn-gateway__stage-group.is-proximate {
    opacity: 1 !important;
}

.pn-gateway__stage-group.is-proximate .pn-gateway__austria-outline,
.pn-spatial-gateway.is-endpoint-active .pn-gateway__austria-outline {
    stroke: var(--gateway-ink);
    stroke-width: 1.65;
}

.pn-gateway__stage-group.is-proximate .pn-gateway__node {
    stroke-width: 1.8;
}

.pn-gateway__states {
    position: absolute;
    inset: 0;
    z-index: 3;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: none;
}

.pn-gateway__states li {
    position: absolute;
    pointer-events: auto;
}

.pn-gateway__states li:nth-child(1) { top: 51%; left: 1%; }
.pn-gateway__states li:nth-child(2) { top: 10%; left: 30%; }
.pn-gateway__states li:nth-child(3) { top: 11%; left: 63%; }
.pn-gateway__states li:nth-child(4) { top: 58%; left: 69%; }

.pn-gateway__state {
    position: relative;
    display: grid;
    max-width: 15rem;
    min-height: 44px;
    padding: 0.55rem 0.6rem 0.55rem 1.15rem;
    border: 0;
    color: rgb(8 19 31 / 58%);
    background: transparent;
    font-family: 'Inter', sans-serif;
    text-align: left;
    cursor: pointer;
}

.pn-gateway__state::before {
    position: absolute;
    top: 1rem;
    left: 0;
    width: 5px;
    height: 5px;
    border: 1px solid currentColor;
    border-radius: 50%;
    content: '';
    background: var(--gateway-paper);
}

.pn-gateway__state span {
    font-size: clamp(0.57rem, 0.62vw, 0.69rem);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0.13em;
}

.pn-gateway__state small {
    display: block;
    width: 24ch;
    margin-top: 0.4rem;
    color: var(--gateway-ink-soft);
    font-size: 0.62rem;
    line-height: 1.45;
}

.pn-spatial-gateway.is-enhanced .pn-gateway__state small {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 300ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pn-gateway__state[aria-current='step'],
.pn-gateway__state.is-proximate,
.pn-gateway__state:hover,
.pn-gateway__state:focus-visible {
    color: var(--gateway-ink);
}

.pn-spatial-gateway.is-enhanced .pn-gateway__state[aria-current='step'] small,
.pn-spatial-gateway.is-enhanced .pn-gateway__state.is-proximate small,
.pn-spatial-gateway.is-enhanced .pn-gateway__state:hover small,
.pn-spatial-gateway.is-enhanced .pn-gateway__state:focus-visible small {
    opacity: 1;
    transform: none;
}

.pn-gateway__state[aria-current='step']::before,
.pn-gateway__state.is-proximate::before {
    border-color: var(--gateway-cyan);
    background: var(--gateway-cyan);
}

.pn-gateway__state:focus-visible,
.pn-gateway__endpoint:focus-visible {
    outline: 2px solid #007f92;
    outline-offset: 4px;
}

.pn-gateway__endpoint {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: clamp(1.1rem, 2.3vh, 1.8rem);
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.8rem;
    color: var(--gateway-ink);
    font: 750 0.68rem/1 'Inter', sans-serif;
    letter-spacing: 0.15em;
    text-decoration: none;
}

.pn-gateway__endpoint i {
    width: 9px;
    height: 9px;
    border: 1px solid var(--gateway-gold);
    border-radius: 50%;
    background: var(--gateway-paper);
    transition: background 180ms ease, transform 180ms ease;
}

.pn-gateway__endpoint b {
    width: 0.65rem;
    height: 0.65rem;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    rotate: 45deg;
    transition: transform 180ms ease;
}

.pn-gateway__endpoint:hover i,
.pn-gateway__endpoint:focus-visible i,
.pn-spatial-gateway.is-endpoint-active .pn-gateway__endpoint i {
    background: var(--gateway-gold);
    transform: scale(1.15);
}

.pn-gateway__endpoint:hover b,
.pn-gateway__endpoint:focus-visible b,
.pn-spatial-gateway.is-endpoint-active .pn-gateway__endpoint b {
    transform: translateX(4px);
}

.pn-gateway__edge-trace {
    position: absolute;
    z-index: 2;
    right: 0.3rem;
    bottom: -1px;
    width: 1px;
    height: clamp(1.2rem, 4vh, 2.6rem);
    background: var(--gateway-gold);
    transform-origin: bottom;
}

.pn-spatial-gateway.is-endpoint-active .pn-gateway__handoff-route,
.pn-spatial-gateway.is-endpoint-active .pn-gateway__edge-trace {
    stroke-width: 2;
    transform: scaleY(1.08);
}

@media (max-width: 1100px) {
    .pn-gateway__shell {
        grid-template-columns: minmax(17rem, 0.82fr) minmax(28rem, 1.18fr);
        width: min(100% - 3rem, 68rem);
    }

    .pn-gateway__header h2 { font-size: clamp(1.8rem, 2.8vw, 2.75rem); }
    .pn-gateway__states li:nth-child(3) { left: 58%; }
    .pn-gateway__states li:nth-child(4) { left: 65%; }
}

@media (max-width: 900px) and (min-width: 769px) {
    .pn-gateway__shell {
        grid-template-columns: minmax(16rem, 0.78fr) minmax(27rem, 1.22fr);
        gap: 1rem;
        width: calc(100% - 2rem);
    }

    .pn-gateway__header h2 { font-size: 1.72rem; }
    .pn-gateway__header p { font-size: 0.76rem; }
    .pn-gateway__state small { width: 20ch; }
}

@media (max-width: 768px) {
    .pn-spatial-gateway {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: hidden;
    }

    .pn-spatial-gateway::before { left: 1.25rem; }
    .pn-spatial-gateway::after { left: 1.25rem; width: 3.25rem; }

    .pn-gateway__shell {
        display: block;
        width: min(100% - 2.5rem, 36rem);
        height: auto;
        padding-block: clamp(3.2rem, 9vw, 4.5rem) 0;
    }

    .pn-gateway__header h2 {
        max-width: 18ch;
        font-size: clamp(1.85rem, 8vw, 2.8rem);
    }

    .pn-gateway__header p {
        max-width: 38ch;
        margin-top: 0.9rem;
        font-size: 0.78rem;
    }

    .pn-gateway__field {
        min-height: 30rem;
        margin-top: 0.65rem;
    }

    .pn-gateway__field::before { display: none; }
    .pn-gateway__graphic--desktop { display: none; }
    .pn-gateway__graphic--mobile { display: block; }

    .pn-gateway__states {
        inset: 1.2rem 0 5rem;
        display: grid;
        grid-template-rows: repeat(4, 1fr);
    }

    .pn-gateway__states li { position: relative; inset: auto !important; }
    .pn-gateway__states li:nth-child(odd) { margin-right: 33%; }
    .pn-gateway__states li:nth-child(even) { margin-left: 36%; }

    .pn-gateway__state {
        max-width: 100%;
        padding-block: 0.45rem;
    }

    .pn-gateway__state span { font-size: 0.61rem; }
    .pn-gateway__state small { width: min(28ch, 100%); font-size: 0.58rem; }

    .pn-gateway__endpoint {
        right: 0;
        bottom: 0.7rem;
        font-size: 0.63rem;
    }

    .pn-gateway__edge-trace { right: 0.25rem; height: 1.35rem; }
    .pn-gateway__network-labels { display: none; }
}

@media (max-width: 430px) {
    .pn-gateway__shell { width: calc(100% - 2rem); padding-top: 3.25rem; }
    .pn-gateway__header h2 { font-size: clamp(1.78rem, 8.4vw, 2.15rem); }
    .pn-gateway__field { min-height: 29rem; }
    .pn-gateway__states li:nth-child(odd) { margin-right: 27%; }
    .pn-gateway__states li:nth-child(even) { margin-left: 31%; }
}

@media (max-width: 430px) and (max-height: 700px) {
    .pn-gateway__shell { padding-top: 2.75rem; }
    .pn-gateway__field { min-height: 27rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pn-spatial-gateway,
    .pn-spatial-gateway *,
    .pn-spatial-gateway *::before,
    .pn-spatial-gateway *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }

    .pn-gateway__stage-group,
    .pn-gateway__fragments,
    .pn-gateway__route,
    .pn-gateway__austria-outline,
    .pn-gateway__danube,
    .pn-gateway__network-line,
    .pn-gateway__handoff-route {
        opacity: 1 !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
    }

    .pn-spatial-gateway .pn-gateway__state small {
        opacity: 1;
        transform: none;
    }
}

@media print {
    .pn-spatial-gateway { height: auto; min-height: 0; max-height: none; background: #fff; }
    .pn-gateway__shell { width: 100%; min-height: 28rem; padding: 2rem; }
}
