/* home.css - homepage-only sections: Spin With Intention (+ values tool and
   commit step), Should You Spin On It?, and the wheel library.
   Behaviour lives in js/intention.js. */

.intent [hidden],
.library [hidden],
.library-empty[hidden] {
    display: none !important;
}

/* ------------------------------------------------------ spin with intention */

.intent {
    max-width: 1100px;
    margin: 3.5rem auto 0;
    padding: 0 16px;
}

.intent__head {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.intent__eyebrow {
    display: inline-block;
    margin: 0 0 0.6rem;
    padding: 0.28rem 0.85rem;
    border-radius: 999px;
    background: #F1EEFF;
    color: #4C3FCB;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.intent__head h2 {
    margin: 0 0 0.7rem;
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    line-height: 1.2;
    color: var(--dark-color);
}

.intent__lede {
    margin: 0 auto;
    font-size: 1.08rem;
    line-height: 1.65;
    color: #4A4560;
}

.intent__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.intent__steps li {
    padding: 1.3rem 1.3rem 1.1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(76, 63, 203, 0.08);
}

.intent__num {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 0.6rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #4C3FCB, #C2308A);
    color: #FFFFFF;
    font-family: var(--font-display);
    font-weight: 700;
}

.intent__steps h3 {
    margin: 0 0 0.35rem;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.intent__steps p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.55;
    color: #4A4560;
}

/* ---------------------------------------------------------- values tool */

.values-tool {
    position: relative;
    overflow: hidden;
    margin-top: 1.4rem;
    padding: 1.6rem 1.7rem 1.4rem;
    border: 1px solid #EEE9FB;
    border-radius: 28px;
    background: #FFFFFF;
    box-shadow: 0 16px 40px rgba(76, 63, 203, 0.10);
}

.values-tool::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--flow);
}

.values-tool__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.values-tool__title {
    margin: 0 0 0.2rem;
    font-size: 1.35rem;
    color: var(--dark-color);
}

.values-tool__sub {
    margin: 0;
    font-size: 0.92rem;
    color: #6B6880;
}

.values-tool__example,
.linklike {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
}

.values-tool__example {
    flex: none;
    padding: 0.5rem 1rem;
    border: 2px solid #DCD4FF;
    border-radius: 999px;
    background: #FFFFFF;
    font-size: 0.92rem;
    transition: background 0.15s ease, transform 0.15s ease;
}

.values-tool__example:hover {
    background: #F1EEFF;
    transform: translateY(-1px);
}

.linklike {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
    text-decoration: underline;
}

.values-tool__values {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.values-tool__values legend,
.values-tool__step {
    margin: 0 0 0.6rem;
    padding: 0;
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--dark-color);
}

.values-tool__values legend span,
.values-tool__step span {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: #6B6880;
}

.value-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.value-chip {
    position: relative;
    cursor: pointer;
}

.value-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.value-chip span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.85rem;
    border: 2px solid #E8E4F6;
    border-radius: 999px;
    background: #FBFAFF;
    color: #2D2940;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.value-chip i {
    font-style: normal;
}

.value-chip:hover span {
    border-color: #C9C1F2;
}

.value-chip input:checked + span {
    border-color: #4C3FCB;
    background: #EEEBFF;
    color: #3A2FA8;
    box-shadow: 0 3px 10px rgba(76, 63, 203, 0.18);
}

.value-chip input:focus-visible + span {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.value-chip.is-off span {
    opacity: 0.45;
    cursor: not-allowed;
}

.values-tool__rate {
    margin-top: 1.3rem;
}

.values-grid__tip,
.values-grid__empty {
    margin: 0 0 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: #FFF7EC;
    font-size: 0.9rem;
    color: #7A4B12;
}

.values-table {
    width: 100%;
    /* Past ~720px the ratings drift away from the option they belong to. */
    max-width: 720px;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.values-table thead th {
    padding: 0 0.25rem 0.2rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: #6B6880;
    text-align: center;
    vertical-align: bottom;
}

.values-table thead th:first-child {
    text-align: left;
}

.values-table thead th i {
    display: block;
    font-size: 1.1rem;
    font-style: normal;
}

.values-table tbody th {
    width: 100%;
    padding: 0.35rem 0.6rem 0.35rem 0;
    text-align: left;
    font-weight: 400;
}

.values-table__name {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--dark-color);
    overflow-wrap: anywhere;
}

.values-table__odds {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.25rem;
}

.values-table__bar {
    flex: 1;
    height: 6px;
    max-width: 220px;
    border-radius: 999px;
    background: #EEEAF8;
    overflow: hidden;
}

.values-table__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4C3FCB, #C2308A);
    transition: width 0.3s ease;
}

.values-table__pct {
    min-width: 2.8em;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: #4C3FCB;
}

.values-table td {
    padding: 0 0.2rem;
    text-align: center;
}

.rate {
    width: 52px;
    height: 38px;
    border: 2px solid #E6E0FA;
    border-radius: 12px;
    background: #FBFAFF;
    color: #9A94B3;
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.rate:active {
    transform: scale(0.94);
}

.rate[data-score="1"] {
    border-color: #C9BEF5;
    background: #EDE9FF;
    color: #4C3FCB;
}

.rate[data-score="2"] {
    border-color: transparent;
    background: linear-gradient(135deg, #6E5DF0, #4C3FCB);
    color: #FFFFFF;
}

.rate:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.values-tool__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.values-tool__actions .btn {
    border-radius: 999px;
    padding: 0.62rem 1.2rem;
}

.values-tool__actions .btn-secondary,
.commit__actions .btn-secondary {
    border: 2px solid #E4E0F5;
    background: #FFFFFF;
    color: #4A4560;
}

.values-tool__actions .btn-secondary:hover,
.commit__actions .btn-secondary:hover {
    background: #F6F3FF;
}

.values-tool__status {
    min-height: 1.3em;
    margin: 0.8rem 0 0;
    font-family: var(--font-display);
    font-weight: 600;
    color: #4C3FCB;
}

/* ------------------------------------------------------------ commit */

.commit {
    margin-top: 1rem;
    padding: 1.2rem 1.3rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #FFF6EA, #F5F0FF 60%, #EAF8F4);
}

.commit__verdict {
    margin: 0 0 0.8rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--dark-color);
}

.commit__verdict strong {
    color: #4C3FCB;
}

.commit__pick p {
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.commit__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.commit__chip {
    padding: 0.45rem 0.9rem;
    border: 2px solid #DCD4FF;
    border-radius: 999px;
    background: #FFFFFF;
    color: #3A2FA8;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
}

.commit__chip:hover {
    background: #F1EEFF;
}

.commit__step label[for="commitStep"] {
    display: block;
    margin-bottom: 0.35rem;
    font-family: var(--font-display);
    font-weight: 600;
}

.commit__step input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 2px solid #E0DAF5;
    border-radius: 12px;
    background: #FFFFFF;
    font-size: 1rem;
}

.commit__step input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.commit__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.commit__actions .btn {
    border-radius: 999px;
}

.commit__when {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    color: #4A4560;
}

.commit__when select {
    padding: 0.45rem 0.6rem;
    border: 2px solid #E0DAF5;
    border-radius: 10px;
    background: #FFFFFF;
    font-size: 0.92rem;
}

/* ------------------------------------------------ should you spin on it */

.spin-guide {
    max-width: 1100px;
    margin: 3.5rem auto 0;
    padding: 0 16px;
}

.spin-guide h2 {
    margin: 0 0 0.5rem;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--dark-color);
}

.spin-guide__lede {
    max-width: 640px;
    margin: 0 auto 1.6rem;
    text-align: center;
    color: #4A4560;
}

.spin-guide__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.guide-card {
    --tone: #4C3FCB;
    padding: 1.3rem 1.2rem 1.1rem;
    border-top: 5px solid var(--tone);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(30, 27, 46, 0.07);
}

.guide-card--go { --tone: #13A594; }
.guide-card--weigh { --tone: #4C3FCB; }
.guide-card--mirror { --tone: #C2308A; }
.guide-card--stop { --tone: #D9483B; }

.guide-card__icon {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 1.6rem;
}

.guide-card h3 {
    margin: 0 0 0.2rem;
    font-size: 1.2rem;
    color: var(--dark-color);
}

.guide-card__when {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--tone);
}

.guide-card p:last-child {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #4A4560;
}

/* ---------------------------------------------------------- the library */

.library-search {
    max-width: 560px;
    margin: 0 auto 1.6rem;
}

.library-search input {
    width: 100%;
    padding: 0.85rem 1.15rem;
    border: 2px solid #E4E0F5;
    border-radius: 999px;
    background: #FFFFFF;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.library-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 63, 203, 0.12);
}

.library {
    /* Columns, not a grid: shelves differ in length, and a grid row is as tall
       as its longest shelf, which left holes under the short ones. */
    columns: 260px 4;
    column-gap: 1.1rem;
}

.shelf {
    break-inside: avoid;
    margin-bottom: 1.1rem;
    padding: 1.1rem 0.9rem 0.8rem;
    border: 1px solid #EEE9FB;
    border-radius: 22px;
    background: #FBFAFF;
}

.shelf h3 {
    margin: 0 0 0.45rem 0.35rem;
    font-size: 1.08rem;
    color: var(--dark-color);
}

.shelf ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.shelf a {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: 14px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.shelf a:hover,
.shelf a:focus-visible {
    background: #FFFFFF;
    box-shadow: 0 6px 16px rgba(76, 63, 203, 0.12);
    transform: translateX(2px);
}

.shelf a strong {
    font-family: var(--font-display);
    font-weight: 600;
    color: #3A2FA8;
}

.shelf a > span {
    display: block;
    font-size: 0.86rem;
    color: #6B6880;
}

.shelf__pop {
    margin-left: 0.35rem;
    padding: 1px 7px;
    border-radius: 999px;
    background: #FFF0E6;
    color: #B4450C;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 600;
    vertical-align: 2px;
}

.library-empty,
.library-embed {
    margin: 1.3rem auto 0;
    text-align: center;
    color: #6B6880;
}

.library-empty a,
.library-embed a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
    .spin-guide__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .intent__steps {
        grid-template-columns: 1fr;
    }

    .values-tool {
        padding: 1.3rem 1rem 1.1rem;
        border-radius: 22px;
    }

    .values-tool__top {
        flex-direction: column;
    }

    .rate {
        width: 44px;
    }

    .values-table thead th span {
        font-size: 0.72rem;
    }
}

@media (max-width: 560px) {
    .spin-guide__grid {
        grid-template-columns: 1fr;
    }

    /* Thirty-three wheels with descriptions is a very long scroll on a phone.
       Names only, two to a row; the descriptions stay in the markup. */
    .shelf ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.1rem 0.3rem;
    }

    .shelf a {
        padding: 0.45rem 0.5rem;
        font-size: 0.95rem;
    }

    .shelf a > span {
        display: none;
    }

    .shelf__pop {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .values-table__bar span,
    .shelf a,
    .value-chip span,
    .rate {
        transition: none;
    }
}
