/* Racket quiz, proposal B "La Firma": one question per screen in the display face,
   answers as big pills, the pick presented as a signed cut-out. */

.quizp {
    min-height: calc(100svh - var(--hdr));
    padding: clamp(20px, 3vw, 40px) 0 var(--sec);
}

/* ---------- Head: small title, the step in marker ---------- */

.quizp__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "crumbs" "intro";
    align-items: end;
    gap: clamp(28px, 4vw, 56px) 32px;
}

.quizp__head .crumbs {
    grid-area: crumbs;
}

.quizp__intro {
    grid-area: intro;
    display: grid;
    gap: 10px;
}

.quizp__intro h1 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: .95;
    letter-spacing: 0;
}

.quizp__intro p {
    max-width: 52ch;
    font-weight: 500;
}

.quizp__step {
    margin: clamp(28px, 4vw, 44px) 0 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    transform: rotate(-3deg);
    transform-origin: left center;
    white-space: nowrap;
}

/* ---------- Question ---------- */

.quizp__form {
    margin-top: clamp(56px, 9vw, 140px);
}

.quizp__q {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    animation: q-in .6s var(--ease);
}

@keyframes q-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

.quizp__question {
    float: left;
    width: 100%;
    max-width: 14ch;
    margin: 0 0 clamp(36px, 5vw, 64px);
    padding: 0;
    font-size: clamp(3rem, 8.6vw, 7.5rem);
    font-weight: 800;
    font-family: var(--fd);
    font-variation-settings: var(--fd-var);
    line-height: .86;
    letter-spacing: 0;
    text-wrap: balance;
}

.quizp__opts {
    clear: left;
    display: grid;
    gap: 12px;
    max-width: 820px;
}

.quizp__opt {
    position: relative;
    display: block;
}

.quizp__opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quizp__opt > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 80px;
    padding: 12px 12px 12px clamp(22px, 3vw, 36px);
    border-radius: 999px;
    box-shadow: inset 0 0 0 2px var(--ink);
    font-size: clamp(1.15rem, 1.9vw, 1.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.quizp__opt i {
    display: grid;
    place-items: center;
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--holo);
    transition: background-color .2s, color .2s;
}

.quizp__opt i .ico {
    transition: transform .3s var(--ease);
}

.quizp__opt:hover > span {
    background: rgba(242, 240, 236, .1);
}

.quizp__opt:hover i .ico {
    transform: translateX(4px);
}

.quizp__opt input:checked + span {
    background: var(--ink);
    color: var(--on-ink);
}

.quizp__opt input:checked + span i {
    background: var(--holo);
    color: var(--ink);
}

.quizp__opt input:focus-visible + span {
    outline: 3px solid var(--ink);
    outline-offset: 4px;
}

.quizp__back,
.quizp__restart {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-top: 28px;
    padding: 0 4px;
    border: 0;
    border-radius: 999px;
    background: none;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: .22em;
    cursor: pointer;
}

.quizp__back .ico {
    transform: rotate(180deg);
}

.quizp__back:hover,
.quizp__restart:hover {
    text-decoration-color: transparent;
}

/* ---------- Result: the pick, signed ---------- */

.quizp__result {
    margin-top: clamp(48px, 7vw, 110px);
    animation: q-in .7s var(--ease);
}

.quizp__pick {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 88px);
}

.quizp__fig {
    position: relative;
    margin: 0;
    aspect-ratio: 4 / 5;
    background: rgba(242, 240, 236, .07);
}

.quizp__img {
    position: absolute;
    inset: 4% 10% 8%;
}

.quizp__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: rotate(-12deg);
    filter: drop-shadow(0 32px 28px rgba(0, 0, 0, .4));
    transition: transform .7s var(--ease);
}

.quizp__fig:hover .quizp__img img {
    transform: rotate(-16deg) scale(1.03);
}

.quizp__sign {
    position: absolute;
    left: 6%;
    bottom: 7%;
    pointer-events: none;
}

.quizp__sign .hand {
    display: block;
    font-size: clamp(2.2rem, 4.4vw, 3.8rem);
    color: var(--paper);
    transform: rotate(-9deg);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.quizp__arrow {
    position: absolute;
    left: 58%;
    bottom: 92%;
    width: clamp(60px, 7vw, 96px);
    height: auto;
    aspect-ratio: 1.6;
    color: var(--paper);
    stroke-width: 5;
    transform: rotate(-20deg);
}

/* The signature writes left to right and the arrow draws after it, once the result shows. */
.quizp__result:not([hidden]) .quizp__sign .hand {
    animation: q-sign 1.2s var(--ease) .35s both;
}

.quizp__result:not([hidden]) .quizp__arrow use {
    animation: q-draw .8s var(--ease) 1.3s both;
}

.quizp__result:not([hidden]) .quizp__reasons .br use {
    animation: q-draw .6s var(--ease) both;
}

.quizp__result:not([hidden]) .quizp__reasons li:nth-child(2) .br use {
    animation-delay: .15s;
}

.quizp__result:not([hidden]) .quizp__reasons li:nth-child(3) .br use {
    animation-delay: .3s;
}

@keyframes q-sign {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes q-draw {
    from {
        stroke-dashoffset: 100;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.quizp__why {
    display: grid;
    justify-items: start;
    gap: 20px;
}

.quizp__why h2 {
    font-size: clamp(2.6rem, 5.4vw, 5rem);
    outline: none;
}

.quizp__price {
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1;
}

.quizp__reasons {
    display: grid;
    gap: 12px;
    margin: 4px 0 8px;
    padding: 0;
    list-style: none;
}

.quizp__reasons li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    font-weight: 500;
    max-width: 52ch;
}

.quizp__reasons .br {
    width: 26px;
    height: 22px;
    margin-top: 1px;
    stroke-width: 6;
}

.quizp__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Alternatives ---------- */

.quizp__alts {
    margin-top: clamp(64px, 8vw, 120px);
    padding-top: clamp(28px, 3vw, 40px);
    border-top: 2px solid var(--ink);
}

.quizp__alts h3 {
    margin-bottom: 24px;
}

.quizp__alts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 32px);
}

.quizp__alt {
    display: grid;
    grid-template-columns: clamp(96px, 10vw, 140px) minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    text-decoration: none;
}

.quizp__alt-img {
    display: block;
    aspect-ratio: 1;
    padding: 8%;
    background: rgba(242, 240, 236, .07);
}

.quizp__alt img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .3));
    transition: transform .6s var(--ease);
}

.quizp__alt:hover img {
    transform: rotate(-6deg) scale(1.04);
}

.quizp__alt > span:last-child {
    display: grid;
    gap: 4px;
    font-weight: 600;
}

.quizp__alt b {
    font-size: clamp(1.25rem, 1.8vw, 1.6rem);
    font-weight: 800;
    font-family: var(--fd);
    font-variation-settings: var(--fd-var);
    line-height: 1;
    letter-spacing: 0;
}

.quizp__alt:hover b {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: .18em;
}

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

@media (max-width: 900px) {
    .quizp__pick {
        grid-template-columns: minmax(0, 1fr);
    }

    .quizp__fig {
        width: min(100%, 440px);
    }
}

@media (max-width: 640px) {
    .quizp__head {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "crumbs" "intro";
        gap: 20px;
    }

    .quizp__step {
        transform-origin: left bottom;
    }

    .quizp__form {
        margin-top: 40px;
    }

    .quizp__opt > span {
        min-height: 68px;
        gap: 12px;
        padding: 8px 8px 8px 22px;
    }

    .quizp__opt i {
        width: 48px;
        height: 48px;
    }

    .quizp__alts-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .quizp__ctas .btn {
        width: 100%;
    }
}
