/* ================================================== */
/* BASIC */
/* ================================================== */

.main:has(.popover.open) > section:not(.popover) { opacity: 0.2; }

/* ================================================== */
/* KEYFRAMES */
/* ================================================== */

@keyframes visionVisual {
    0% { stroke-dashoffset: 600; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -600; }
}

@keyframes glowElem {
    0%, 100% { transform: scale(1.1) translate(50%, -40%); }
    50% { transform: scale(1) translate(50%, -50%); }
}

/* ================================================== */
/* HERO */
/* ================================================== */

.hero {
    background-image: url('/assets/images/desktop/connect.webp');
    background-size: cover;
    background-position: center;

    padding-top: 70px;
    position: relative;
    z-index: 0;
    height: 100dvh;
    transition: height 0.5s;
}

.hero .btn {
    position: relative;
    z-index: 0;
    background: transparent;
    border: 2px solid var(--color-accent-main);
    backdrop-filter: blur(4px);
}

.hero .btn::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: 50px;
    clip-path: circle(20% at 0% 100%);
    transition: all 0.5s;
    background-color: var(--color-accent-main);
}

.hero .btn:hover { color: var(--color-text-main); }
.hero .btn:hover::before { clip-path: circle(150% at 0% 100%); }

/* ================================================== */
/* SIGNAL */
/* ================================================== */

.signal .body .category {
    border: 1px solid var(--color-border-dark);
    background-color: var(--color-bg-card);
    aspect-ratio: 1 / 1;
}

/* ================================================== */
/* LAST */
/* ================================================== */

.last {
    background-image: url('/assets/images/desktop/connect-last.webp');
    background-size: cover;
    background-position: center;
}

.last .line {
    width: 36px;
    height: 2px;
    background-color: var(--color-text-main);
}

.last .img { max-width: 128px; }

/* ================================================== */
/* POPOVERS */
/* ================================================== */

.popover {
    position: fixed;
    z-index: 30;
    border: 1px solid var(--color-bg-card);
    color: var(--color-text-main);
    backdrop-filter: blur(4px);
    width: min(512px, calc(100% - 24px));
    margin: auto;
    transition: transform 0.3s cubic-bezier(0.911, 0.161, 0.181, 0.797);
}

/* ----- WORK FORM SPECIFIC ----- */

.work-form {
    max-width: 568px;
    background:
        radial-gradient(circle at 0% 0%, var(--color-accent-alt) 0%, var(--color-surface-alt) 20%),
        radial-gradient(circle at 100% 100%, var(--color-accent-alt) 0%, var(--color-surface-alt) 25%);
}

.work-form .input-elem .err-msg {
    padding-left: 12px;
    color: var(--color-state-red);
    transition:
        display 0.4s,
        opacity 0.4s 100ms;
}

.work-form .btn { border: 1px solid var(--color-accent-main); }

/* ----- SUCCESS PAGE SPECIFIC ----- */

.success-page {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background:
        radial-gradient(circle at 0% 0%, var(--color-state-green) 0%, var(--color-surface-alt) 20%),
        radial-gradient(circle at 100% 100%, var(--color-state-green) 0%, var(--color-surface-alt) 25%);
}

.success-page .symbol {
    background-color: var(--color-state-green);
    border-radius: 50%;
    padding: 12px;
}

.success-page .btn { background-color: var(--color-state-green); }
.success-page.open { transform: translate(-50%, -50%) scale(1); }

/* ================================================== */
/* & RESPONSIVENESS */
/* ================================================== */

@media (max-width: 568px) {
    .hero { background-image: url('/assets/images/phone/connect.webp'); }
    .last { background-image: url('/assets/images/phone/connect-last.webp'); }
}