/* ------------------------------------------------------------------
   Buttons
   .btn-1          compact outline button (navbar)
   .btn-2          ghost button with a sweeping fill on hover
   .btn-2--primary solid light button for the main call to action
   ------------------------------------------------------------------ */

.btn-1,
.btn-2 {
    position: relative;
    isolation: isolate; /* keeps the ::before fill above the background */
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6em;
    font-family: Arkitech;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.35s var(--ease-out), border-color 0.35s ease,
        background-color 0.35s ease, box-shadow 0.35s ease,
        transform 0.2s var(--ease-out);
}

.btn-1::before,
.btn-2::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease-out);
}

.btn-1:focus-visible,
.btn-2:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.btn-1:active,
.btn-2:active {
    transform: scale(0.97);
}

/* ---- btn-1 (navbar) ---- */
.btn-1 {
    height: 36px;
    min-width: 180px;
    padding: 0 16px;
    font-size: 0.6rem;
    color: var(--text-color);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
}
.btn-1::before {
    background: #fff;
}

/* ---- btn-2 (ghost) ---- */
.btn-2 {
    min-height: 46px;
    padding: 0 1.9em;
    font-size: 11px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.btn-2::before {
    background: rgba(255, 255, 255, 0.1);
}

/* ---- btn-2--primary (solid) ---- */
.btn-2--primary {
    color: #0a0a0a;
    background: #f2f2f2;
    border-color: #f2f2f2;
}
.btn-2--primary::before {
    background: #fff;
}
.btn-2--primary::after {
    /* light sheen that sweeps across on hover */
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: linear-gradient(
        100deg,
        transparent,
        rgba(255, 255, 255, 0.85),
        transparent
    );
    transform: translateX(-160%) skewX(-20deg);
    pointer-events: none;
}

@media (hover: hover) {
    .btn-1:hover {
        color: #0a0a0a;
        border-color: #fff;
        box-shadow: 0 6px 24px -8px rgba(255, 255, 255, 0.45);
    }
    .btn-1:hover::before,
    .btn-2:hover::before {
        transform: scaleX(1);
        transform-origin: left;
    }
    .btn-2:hover {
        color: #fff;
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 10px 30px -12px rgba(255, 255, 255, 0.35);
    }
    .btn-2--primary:hover {
        color: #000;
        border-color: #fff;
        box-shadow: 0 10px 36px -10px rgba(255, 255, 255, 0.55);
    }
    .btn-2--primary:hover::after {
        transform: translateX(360%) skewX(-20deg);
        transition: transform 0.9s var(--ease-out);
    }
}

.btn-1:focus-visible::before,
.btn-2:focus-visible::before {
    transform: scaleX(1);
}
.btn-1:focus-visible {
    color: #0a0a0a;
}

/* disabled / loading */
.btn-2:disabled {
    cursor: progress;
    opacity: 0.7;
}
.btn-2.is-loading {
    color: transparent;
}
.btn-2.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-top-color: #0a0a0a;
    background: none;
    transform: none;
    animation: btn-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .btn-1,
    .btn-2,
    .btn-1::before,
    .btn-2::before,
    .btn-2--primary::after {
        transition-duration: 0.01ms !important;
    }
}
