/* ==========================================================================
   Village Gym maintenance page
   ========================================================================== */

@font-face {
    font-family: "VillageFlex";
    src: url("../assets/fonts/VillageFlex-Light-WebS.woff") format("woff");
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: "VillageFlex";
    src: url("../assets/fonts/VillageFlex-Regular-WebS.woff") format("woff");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "VillageFlex";
    src: url("../assets/fonts/VillageFlex-Medium-WebS.woff") format("woff");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "VillageFlex";
    src: url("../assets/fonts/VillageFlex-Bold-WebS.woff") format("woff");
    font-weight: 700;
    font-display: swap;
}

:root {
    --green: #9fc63b;
    --green-glow: rgba(159, 198, 59, 0.45);
    --ink: #0b0d10;
    --white: #ffffff;
    --text: rgba(255, 255, 255, 0.86);
    --muted: rgba(255, 255, 255, 0.55);
    --line: rgba(255, 255, 255, 0.14);

    --font: "VillageFlex", "Helvetica Neue", Arial, sans-serif;
    --gutter: clamp(1.25rem, 5vw, 4.5rem);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font);
    font-weight: 300;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Backdrop ---------------------------------------------------------------- */

.backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.backdrop__image {
    position: absolute;
    inset: -4%;
    background: url("../assets/images/holding.jpg") 70% center / cover no-repeat;
    animation: drift 40s ease-in-out infinite alternate;
    will-change: transform;
}

.backdrop__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 13, 16, 0.96) 0%, rgba(11, 13, 16, 0.85) 38%, rgba(11, 13, 16, 0.35) 75%, rgba(11, 13, 16, 0.55) 100%),
        linear-gradient(0deg, rgba(11, 13, 16, 0.9) 0%, rgba(11, 13, 16, 0) 40%);
}

@keyframes drift {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to   { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}

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

.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(1.5rem, 4vw, 3rem) var(--gutter);
}

.masthead__logo {
    display: block;
    width: clamp(150px, 18vw, 210px);
    height: auto;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 38rem;
    padding: clamp(2.5rem, 8vh, 5rem) 0;
}

.panel > * {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.9s var(--ease) forwards;
}

.panel > *:nth-child(1) { animation-delay: 0.10s; }
.panel > *:nth-child(2) { animation-delay: 0.20s; }
.panel > *:nth-child(3) { animation-delay: 0.30s; }
.panel > *:nth-child(4) { animation-delay: 0.40s; }
.panel > *:nth-child(5) { animation-delay: 0.50s; }
.panel > *:nth-child(6) { animation-delay: 0.60s; }

@keyframes rise {
    to { opacity: 1; transform: none; }
}

/* Content ----------------------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    align-self: flex-start;
    margin: 0 0 1.5rem;
    padding: 0.45rem 0.9rem 0.4rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--white);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow__dot {
    position: relative;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--green);
}

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

@keyframes ping {
    0%   { transform: scale(1);   opacity: 0.7; }
    100% { transform: scale(3.2); opacity: 0; }
}

.title {
    margin: 0;
    color: var(--white);
    font-weight: 700;
    font-size: clamp(3rem, 2rem + 6vw, 6.5rem);
    line-height: 0.92;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.title__accent {
    color: var(--green);
}

.pulse {
    display: block;
    width: min(100%, 22rem);
    height: 2.75rem;
    margin: 1.75rem 0 1.5rem;
    overflow: visible;
}

.pulse path {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.pulse__track {
    stroke: var(--line);
}

.pulse__line {
    stroke: var(--green);
    stroke-dasharray: 90 520;
    stroke-dashoffset: 90;
    filter: drop-shadow(0 0 6px var(--green-glow));
    animation: beat 2.4s linear infinite;
}

@keyframes beat {
    to { stroke-dashoffset: -520; }
}

.copy p {
    margin: 0 0 0.75rem;
}

.copy .lead {
    color: var(--white);
    font-weight: 400;
    font-size: 1.2em;
    line-height: 1.45;
}

.eta {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.95em;
}

.eta strong {
    color: var(--white);
    font-weight: 500;
}

.actions {
    margin-top: 2rem;
}

/* Button ------------------------------------------------------------------ */

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem 0.9rem;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -8px var(--green-glow);
}

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

.button:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 3px;
}

.button__icon {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button.is-busy .button__icon {
    animation: spin 0.8s linear infinite;
}

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

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

.footer {
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.footer p {
    margin: 0;
}

/* Small screens ------------------------------------------------------------ */

@media (max-width: 640px) {
    .backdrop__image {
        background-position: 62% center;
    }

    .backdrop__shade {
        background:
            linear-gradient(0deg, rgba(11, 13, 16, 0.97) 0%, rgba(11, 13, 16, 0.85) 55%, rgba(11, 13, 16, 0.6) 100%);
    }

    .button {
        width: 100%;
        justify-content: center;
    }
}

/* Motion ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .pulse__line {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
    }
}
