:root {
    --white: #f6f5f2;
    --muted: #d7d7d4;
    --gold: #e2bd75;
    --line: rgba(255, 255, 255, .28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    background: #050708;
    color: var(--white);
    font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

a { color: inherit; }

.page-shell {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    overflow: hidden;
    background-image: var(--hero-background);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.page-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 4, 5, .72) 0%, rgba(2, 4, 5, .34) 43%, rgba(2, 4, 5, .03) 72%),
        linear-gradient(180deg, rgba(2, 4, 5, .34), transparent 22%, transparent 69%, rgba(2, 4, 5, .68));
}

.navbar {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 6.25rem;
    padding: 1.1rem 5vw;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1.35rem, 2.8vw, 3rem);
}

.nav-links a,
.invite-link {
    text-decoration: none;
    font-size: clamp(.68rem, .78vw, .9rem);
    font-weight: 500;
    letter-spacing: .25em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-links a { position: relative; }
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: .25em;
    bottom: -.55rem;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }

.brand {
    display: block;
    width: clamp(13rem, 18vw, 21rem);
}
.brand img { display: block; width: 100%; height: auto; }

.invite-link {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: .9rem;
}
.invite-link svg {
    width: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: square;
    stroke-width: 1.5;
}

main { min-height: calc(100svh - 6.25rem); }

.hero-copy {
    width: min(36rem, 42vw);
    margin-left: 5vw;
    padding: 1.3rem 0 2rem;
}

.identity-line {
    display: flex;
    flex-direction: column;
    gap: .38rem;
    margin-bottom: 1.6rem;
    font-size: .76rem;
    letter-spacing: .25em;
    line-height: 1.25;
    text-transform: uppercase;
}

.identity-line i,
.drop-copy > i {
    display: block;
    width: 5.2rem;
    height: 1px;
    margin-top: .6rem;
    background: linear-gradient(90deg, var(--white) 72%, rgba(255,255,255,.15) 72%);
}

.headline-art {
    display: block;
    width: min(100%, 35rem);
    height: auto;
    margin-left: -.8rem;
    filter: drop-shadow(0 .25rem .8rem rgba(0,0,0,.25));
}

.struggle {
    margin: .8rem 0 1.65rem;
    font-size: clamp(.9rem, 1.22vw, 1.35rem);
    letter-spacing: .31em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.drop-copy h1 {
    margin: 1.5rem 0 .45rem;
    font-size: clamp(.83rem, 1vw, 1.1rem);
    font-weight: 500;
    letter-spacing: .31em;
    line-height: 1.25;
    text-transform: uppercase;
}

.drop-copy p {
    margin: 0 0 1.4rem;
    color: var(--muted);
    font-size: clamp(.68rem, .73vw, .82rem);
    letter-spacing: .19em;
    line-height: 1.72;
    text-transform: uppercase;
}

.signup-form {
    display: grid;
    grid-template-columns: 1fr 12.5rem;
    max-width: 35rem;
}

.signup-form input,
.signup-form button {
    min-height: 3.2rem;
    border-radius: 0;
    font-family: inherit;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.signup-form input {
    min-width: 0;
    padding: 0 1.35rem;
    border: 1px solid rgba(255,255,255,.55);
    background: rgba(2,4,5,.5);
    color: var(--white);
    outline: none;
}
.signup-form input::placeholder { color: rgba(255,255,255,.78); }
.signup-form input:focus { border-color: var(--gold); }

.signup-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;

    border: 1px solid #8e4adf;
    background: #8e4adf;
    color: #ffffff;

    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        filter 0.2s ease;
}
.signup-form button:hover,
.signup-form button:focus-visible {
    background: #a363ee;
    border-color: #a363ee;
    filter: none;
}
.signup-form button:disabled { cursor: wait; filter: saturate(.55); }

.honeypot { position: fixed !important; left: -9999px !important; }
.form-message { margin: .7rem 0 0; font-size: .75rem; letter-spacing: .1em; }
.form-message--success { color: #f0d59c; }
.form-message--error { color: #ffaaa0; }

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.14);
}

.benefits article {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 0 .65rem;
    text-align: center;
}
.benefits article + article { border-left: 1px solid rgba(255,255,255,.08); }
.benefits svg {
    width: 2.15rem;
    height: 2.15rem;
    margin-bottom: .55rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
}
.benefits strong {
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .18em;
    line-height: 1.25;
    text-transform: uppercase;
}
.benefits span {
    margin-top: .25rem;
    color: #bbb;
    font-size: .55rem;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.wordmark {
    display: flex;
    flex-direction: column;
    width: 20rem;
    margin-top: 1.25rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255,255,255,.45);
    text-transform: uppercase;
}
.wordmark span { font-size: .75rem; letter-spacing: .55em; }
.wordmark small { margin-top: .38rem; font-size: .58rem; letter-spacing: .34em; }

.culture-statement {
    position: absolute;
    top: 8.2rem;
    right: 2.1vw;
    padding-right: 1.65rem;
    border-right: 1px solid rgba(255,255,255,.65);
}
.culture-statement p,
.corner-statement p {
    margin: 0;
    font-size: .69rem;
    font-weight: 500;
    letter-spacing: .2em;
    line-height: 1.8;
    text-transform: uppercase;
}
.culture-statement strong { font-weight: 500; }

.corner-statement {
    position: absolute;
    right: 2.9vw;
    bottom: 5.2rem;
    padding-right: 1.3rem;
    border-right: 1px solid rgba(255,255,255,.65);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1050px) {
    .navbar { grid-template-columns: 1fr auto; }
    .brand { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
    .nav-links { grid-column: 1; grid-row: 2; padding-top: 1rem; }
    .invite-link { grid-column: 2; grid-row: 2; padding-top: 1rem; }
    .hero-copy { width: min(38rem, 58vw); }
    .culture-statement { top: 10.3rem; }
}

@media (max-width: 760px) {
    .page-shell { overflow: visible; background-position: 62% center; }
    .page-shade { background: linear-gradient(90deg, rgba(2,4,5,.9), rgba(2,4,5,.5)), linear-gradient(180deg, rgba(2,4,5,.4), transparent 20%, rgba(2,4,5,.78)); }
    .nav-links a, .invite-link { font-size: .57rem; letter-spacing: .15em; }
    .invite-link span { display: none; }
    .headline-art { width: min(33rem, 96%); }
    .struggle { font-size: clamp(.72rem, 3vw, 1rem); letter-spacing: .23em; white-space: normal; }
    .signup-form { grid-template-columns: 1fr; gap: .5rem; }
    .culture-statement, .corner-statement { display: none; }
    .benefits { background: rgba(2,4,5,.28); }
}

@media (max-width: 460px) {
    .nav-links a { font-size: .5rem; }
    .benefits strong { font-size: .55rem; }
    .benefits span { font-size: .48rem; }
    .wordmark { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-copy > * { animation: enter .62s both; }
    .hero-copy > :nth-child(2) { animation-delay: .06s; }
    .hero-copy > :nth-child(3) { animation-delay: .11s; }
    .hero-copy > :nth-child(4) { animation-delay: .16s; }
    .hero-copy > :nth-child(5) { animation-delay: .21s; }
    @keyframes enter { from { opacity: 0; transform: translateY(.7rem); } to { opacity: 1; transform: translateY(0); } }
}

/* Mobile redesign — hidden on laptop */
.mobile-hero {
    display: none;
}

@media (max-width: 760px) {
    .page-shell {
    min-height: 100svh;
    overflow: hidden;
    background-image: none !important;
}

    /*
     * Seamless mobile photograph:
     * no black navbar panel.
     */
    .navbar {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 20;

        display: grid;
        grid-template-columns: 3rem 1fr 3rem;
        align-items: center;

        width: 100%;
        min-height: auto;
        padding: 1.2rem 1.25rem;

        background: transparent;
        border: 0;
    }

    /*
 * Dark at the top, fading seamlessly into the photograph.
 */
.navbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;

    width: 100%;
    height: 9rem;

    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.52) 32%,
        rgba(0, 0, 0, 0.2) 65%,
        rgba(0, 0, 0, 0) 100%
    );

    pointer-events: none;
}

/*
 * Keep the logo and icons above the gradient.
 */
.navbar > * {
    position: relative;
    z-index: 1;
}

    /*
     * Hide the desktop navigation links.
     */
    .nav-links {
        display: none;
    }

    /*
     * Keep the Gymstar logo centred over the photograph.
     */
    .brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        order: initial;

        width: min(13.5rem, 56vw);
        padding: 0;
    }

    .brand img {
        width: 100%;
        height: auto;
    }

    /*
     * Keep only the lock icon on mobile.
     */
    .invite-link {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        order: initial;

        padding: 0;
    }

    .invite-link span {
        display: none;
    }

    .invite-link svg {
        width: 1.65rem;
        height: auto;
    }

    /*
     * Hide all desktop-only hero content.
     */
    .hero-copy,
    .culture-statement,
    .corner-statement {
        display: none;
    }

    main {
        min-height: 100svh;
    }

    /*
     * Show the new mobile composition.
     */
    .mobile-hero {
    position: relative;
    display: flex;
    align-items: flex-end;

    width: 100%;
    min-height: 100svh;
    padding: 7rem 1.25rem 2.8rem;

    /* Fallback mobile background */
    background-image: url("../images/background-mobile-01.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

    /*
     * Dark gradient behind the text and form,
     * without hiding the upper photograph.
     */
    .mobile-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        pointer-events: none;

        background:
            linear-gradient(
                180deg,
                rgba(0, 0, 0, 0) 35%,
                rgba(0, 0, 0, 0.15) 52%,
                rgba(0, 0, 0, 0.82) 77%,
                rgba(0, 0, 0, 0.96) 100%
            );
    }

    .mobile-hero__content {
        position: relative;
        z-index: 2;
        width: 100%;
    }

    .mobile-hero__headlines {
        margin-bottom: 1.8rem;
        text-align: center;
        text-transform: uppercase;
    }

    .mobile-hero__headlines p {
        margin: 0;
        color: #fff;
        font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
        font-weight: 400;
        line-height: 1.45;
        letter-spacing: 0.22em;
    }

    .mobile-hero__headlines p:nth-child(1) {
        font-size: clamp(1.5rem, 6vw, 2.1rem);
    }

    .mobile-hero__headlines p:nth-child(2) {
        margin-top: 0.65rem;
        font-size: clamp(1rem, 4vw, 1.35rem);
    }

    .mobile-hero__headlines p:nth-child(3) {
        margin-top: 0.65rem;
        font-size: clamp(0.8rem, 3.2vw, 1.05rem);
    }

    .mobile-signup-form {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(8.5rem, 1fr);
        gap: 0.5rem;
        width: 100%;
    }

    .mobile-signup-form input,
    .mobile-signup-form button {
        min-width: 0;
        min-height: 4rem;
        border-radius: 0;
        font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
        font-size: clamp(0.68rem, 2.8vw, 0.9rem);
        letter-spacing: 0.17em;
        text-transform: uppercase;
    }

    .mobile-signup-form input {
        padding: 0 1rem;
        border: 1px solid rgba(255, 255, 255, 0.85);
        background: rgba(0, 0, 0, 0.52);
        color: #fff;
        outline: none;
    }

    .mobile-signup-form input::placeholder {
        color: rgba(255, 255, 255, 0.7);
    }

    .mobile-signup-form input:focus {
        border-color: #8e4adf;
        box-shadow: inset 0 0 0 1px #8e4adf;
    }

    .mobile-signup-form button {
        padding: 0 0.75rem;
        border: 1px solid #8e4adf;
        background: #8e4adf;
        color: #fff;
        cursor: pointer;
    }

    .mobile-form-message {
        margin: 0.8rem 0 0;
        text-align: center;
        font-size: 0.72rem;
        letter-spacing: 0.08em;
    }

    .mobile-form-message--success {
        color: #fff;
    }

    .mobile-form-message--error {
        color: #ffaaa0;
    }
}

/*
 * Stack the form on narrower phones.
 */
@media (max-width: 390px) {
    .mobile-signup-form {
        grid-template-columns: 1fr;
    }

    .mobile-signup-form input,
    .mobile-signup-form button {
        min-height: 3.65rem;
    }

    .mobile-hero {
        padding-inline: 1rem;
        padding-bottom: 1.7rem;
    }
}
