/* ---------------------------------------------------------------
   CrossFit Always Varied — landing page
   Ported from the "CrossFit Always Varied Landing" design canvas.
   --------------------------------------------------------------- */

:root {
    --ink: #0d1117;
    --white: #ffffff;
    --brand: #2470f3;
    /* The design's CTA colours, used by the signup button. */
    --brand-deep: #1a49b8;
    --brand-deep-hover: #153a94;
    --body-text: #c4cad2;
    --muted: #99a1ab;
    --social: #e9ecf0;
    --link: #4d8dff;
    --link-hover: #7caaff;
    --radius: 8px;
}

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

html,
body {
    margin: 0;
    padding: 0;
    background: var(--ink);
}

body {
    font-family: Barlow, "Helvetica Neue", Arial, sans-serif;
    color: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover);
}

::placeholder {
    color: #7b838d;
}

/* --- Page shell ------------------------------------------------ */

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: var(--ink);
}

/* --- Photo collage --------------------------------------------- */

.collage {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36%;
    display: grid;
    z-index: 0;
}

.collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collage::after {
    content: "";
    position: absolute;
    inset: 0;
}

.collage--left {
    left: 0;
    grid-template-columns: 1.7fr 1fr;
    grid-template-rows: 1.05fr 1fr;
}

.collage--left .collage__wide {
    grid-column: 1 / -1;
}

.collage--left::after {
    background:
        linear-gradient(rgba(13, 17, 23, 0.38), rgba(13, 17, 23, 0.38)),
        linear-gradient(to right, rgba(13, 17, 23, 0.15) 35%, rgba(13, 17, 23, 0.97) 100%);
}

.collage--right {
    right: 0;
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: 1.05fr 1fr;
}

.collage--right::after {
    background:
        linear-gradient(rgba(13, 17, 23, 0.38), rgba(13, 17, 23, 0.38)),
        linear-gradient(to left, rgba(13, 17, 23, 0.15) 35%, rgba(13, 17, 23, 0.97) 100%);
}

/* --- Hero ------------------------------------------------------ */

.hero {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 24px 40px;
}

/* The brand lockup ships as one asset (mark + wordmark + tagline), so the
   wordmark is no longer set in web type — no font can match it exactly, and
   this is the real thing. Cropped from the supplied master, whose transparent
   padding would otherwise skew the vertical rhythm — see the README. */
.hero__lockup {
    width: clamp(260px, 34vw, 480px);
    height: auto;
    display: block;
}

.hero__headline {
    font-family: Oswald, "Arial Narrow", sans-serif;
    font-weight: 600;
    font-size: clamp(21px, 2.9vw, 38px);
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--white);
    margin: 44px 0 0;
    max-width: 1240px;
    text-wrap: balance;
}

.hero__lede {
    font-size: clamp(15px, 1.2vw, 17px);
    font-weight: 400;
    color: var(--body-text);
    line-height: 1.5;
    margin: 18px 0 0;
    max-width: 720px;
}

/* --- Signup --------------------------------------------------- */

.signup {
    width: 100%;
    max-width: 400px;
    margin-top: 26px;
}

.signup__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

/* Name and email share a row on desktop so the extra field costs almost no
   vertical space — the hero still has to fit one screen. */
.signup__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.signup__field {
    min-width: 0;
}

.signup__input {
    width: 100%;
    padding: 15px 16px;
    border-radius: var(--radius);
    border: none;
    outline: none;
    font-family: Barlow, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    color: #1a1f26;
    background: var(--white);
}

.signup__input:focus-visible {
    box-shadow: 0 0 0 3px rgba(36, 112, 243, 0.65);
}

.signup__button {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    background: var(--brand-deep);
    color: var(--white);
    font-family: Oswald, "Arial Narrow", sans-serif;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.15s ease;
}

.signup__button:hover {
    background: var(--brand-deep-hover);
}

.signup__button:focus-visible {
    outline: 3px solid var(--link-hover);
    outline-offset: 2px;
}

.signup__success {
    padding: 17px 16px;
    border-radius: var(--radius);
    background: rgba(36, 112, 243, 0.14);
    border: 1px solid var(--brand);
    color: #dbe6ff;
    font-size: 16px;
    font-weight: 500;
}

.signup__error {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #ffb4b4;
    text-align: left;
}

.signup__error:empty {
    display: none;
}

.signup__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--body-text);
    cursor: pointer;
}

.signup__consent input {
    flex: none;
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--brand);
    cursor: pointer;
}

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

.site-footer {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px 40px;
    flex-wrap: wrap;
    padding: 22px 36px;
}

.site-footer__legal {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
    text-align: center;
}

.social {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
    justify-content: center;
}

.social__link {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--social);
}

.social__link:hover {
    color: var(--white);
}

.social__label {
    font-size: 14px;
    font-weight: 500;
    color: currentColor;
}

/* Instagram glyph, drawn to match the design canvas */
.icon-instagram {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 6px;
    position: relative;
    flex: none;
}

.icon-instagram::before {
    content: "";
    position: absolute;
    inset: 3px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.icon-instagram::after {
    content: "";
    position: absolute;
    top: 1.5px;
    right: 1.5px;
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    background: currentColor;
}

/* Facebook glyph */
.icon-facebook {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.icon-facebook::before {
    content: "f";
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
}

/* --- Responsive ------------------------------------------------ */

@media (max-width: 1100px) {
    .collage {
        width: 28%;
    }

    .hero__headline {
        font-size: clamp(21px, 3.6vw, 38px);
    }
}

/* Laptop-height viewports: the design's fixed vertical rhythm adds up to
   ~940px, so tighten the gaps to keep the hero on one screen. Taller
   displays get the authored spacing untouched. */
@media (min-width: 560px) {
    .signup {
        max-width: 560px;
    }

    .signup__row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 821px) and (max-height: 960px) {
    .hero {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .hero__lockup {
        width: clamp(240px, 26vw, 372px);
    }

    .hero__headline {
        margin-top: 22px;
    }

    .hero__lede {
        margin-top: 12px;
    }

    .signup {
        margin-top: 18px;
    }

    .site-footer {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

/* Below 760px the side panels stack into a single full-bleed
   backdrop: top half from the left grid, bottom half from the right. */
/* Below this width the side panels restack into a full-bleed backdrop:
   top half from the left grid, bottom half from the right. */
@media (max-width: 820px) {
    .collage {
        left: 0;
        right: 0;
        width: 100%;
    }

    .collage--left {
        top: 0;
        bottom: auto;
        height: 52%;
    }

    .collage--left::after {
        background:
            linear-gradient(rgba(13, 17, 23, 0.45), rgba(13, 17, 23, 0.45)),
            linear-gradient(to bottom, rgba(13, 17, 23, 0.2) 20%, rgba(13, 17, 23, 0.97) 100%);
    }

    .collage--right {
        top: auto;
        bottom: 0;
        height: 48%;
    }

    .collage--right::after {
        background:
            linear-gradient(rgba(13, 17, 23, 0.45), rgba(13, 17, 23, 0.45)),
            linear-gradient(to top, rgba(13, 17, 23, 0.2) 20%, rgba(13, 17, 23, 0.97) 100%);
    }

    .hero {
        padding: 28px 20px 24px;
    }

    .hero__lockup {
        width: clamp(220px, 62vw, 300px);
    }

    .hero__headline {
        margin-top: 22px;
    }

    .site-footer {
        gap: 18px;
        padding: 18px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* --- Utilities -------------------------------------------------- */

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

/* --- Error page -------------------------------------------------- */

.page--plain {
    background:
        radial-gradient(120% 80% at 50% 0%, #16202c 0%, var(--ink) 60%);
}

.error__request-id {
    font-size: 13px;
    color: var(--muted);
    margin: 16px 0 0;
}

.error__request-id code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--body-text);
}
