/*
 * CheapWheels.ca holding page.
 *
 * Tokens, type scale and the C-mark watermark are lifted from the store's own design system
 * (app/design/frontend/CheapWheels/Main_Theme) so this page and the shop read as one company.
 * Light only, on purpose: the store's approved system is a light monochrome one.
 */

:root {
    --ink: #17181b;
    --graphite: #3c3f44;
    --steel: #787d85;
    --mist: #c7c9cc;
    --line: #e4e4e0;
    --paper: #f7f7f4;
    --card: #ffffff;

    --radius-lg: 6px;
    --shadow-btn: 0 10px 24px -10px rgb(23 24 27 / 0.45);

    --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

/* ---- layout ------------------------------------------------------------- */

.page {
    position: relative;
    overflow: hidden;
    /* dvh, not vh: vh jumps when the iOS address bar collapses. */
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    padding: 32px 20px 24px;
    text-align: center;
}

/*
 * The C-mark, exactly as the 404 page uses it: the low-resolution file at 4% opacity, centred
 * behind the copy, decorative only. pointer-events:none so it can never intercept the button.
 */
.watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(260px, 32vw, 440px);
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0.035;
    pointer-events: none;
    user-select: none;
}

.stack {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0;
    width: 100%;
    max-width: 760px;
}

/* ---- type --------------------------------------------------------------- */

.logo {
    height: 28px;
    width: auto;
    margin-bottom: 40px;
}

.title {
    margin: 0;
    font-size: clamp(40px, 6.4vw, 84px);
    line-height: 1.04;
    letter-spacing: -0.035em;
    font-weight: 700;
    text-wrap: balance;
}

/* "Coming soon." carries the same weight and scale; only the colour separates the two halves. */
.title span {
    display: block;
    color: var(--steel);
}

.sub {
    margin: 20px auto 0;
    max-width: 42ch;
    font-size: clamp(16px, 1.7vw, 19px);
    color: var(--graphite);
}

/* ---- action ------------------------------------------------------------- */

.act {
    margin-top: 36px;
    display: grid;
    justify-items: center;
    gap: 12px;
}

/* Same geometry and behaviour as `.cw-cta` on the store. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    padding-inline: 28px;
    border: 1px solid var(--ink);
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1),
        box-shadow 0.18s,
        background-color 0.18s,
        border-color 0.18s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn);
}

.btn:active {
    transform: translateY(0) scale(0.99);
}

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

/* Counted already: the button stays legible rather than greying into the background. */
.btn[data-state="done"] {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
    cursor: default;
    transform: none;
    box-shadow: none;
}

.btn[data-state="pending"] {
    opacity: 0.7;
    cursor: progress;
}

.tally {
    margin: 0;
    min-height: 1.2em;
    font-size: 13.5px;
    color: var(--steel);
    font-variant-numeric: tabular-nums;
}

/* ---- contact ------------------------------------------------------------ */

.ask {
    margin: 44px 0 0;
    font-size: 15px;
    color: var(--steel);
}

.ask a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1.5px solid var(--ink);
    padding-bottom: 2px;
}

.ask a:hover {
    color: var(--graphite);
    border-bottom-color: var(--graphite);
}

.ask a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

/* ---- foot --------------------------------------------------------------- */

.foot {
    position: relative;
    display: grid;
    gap: 4px;
    padding-top: 40px;
    font-size: 13px;
    color: var(--steel);
}

.foot p {
    margin: 0;
}

.foot__motto {
    color: var(--graphite);
}

.foot__legal {
    color: var(--steel);
}

/* ---- motion ------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    .stack > * {
        animation: rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    }

    .stack > :nth-child(1) { animation-delay: 0.02s; }
    .stack > :nth-child(2) { animation-delay: 0.08s; }
    .stack > :nth-child(3) { animation-delay: 0.14s; }
    .stack > :nth-child(4) { animation-delay: 0.20s; }
    .stack > :nth-child(5) { animation-delay: 0.26s; }

    @keyframes rise {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* ---- small screens ------------------------------------------------------ */

@media (max-width: 600px) {
    .page {
        padding: 28px 20px 20px;
    }

    .logo {
        height: 24px;
        margin-bottom: 32px;
    }

    .act {
        margin-top: 30px;
    }

    /* A wider target on a phone, without stretching edge to edge. */
    .btn {
        min-width: 240px;
    }

    .ask {
        margin-top: 36px;
    }
}
