/* ================================================================
   Hallmarks page blocks (Proves zīmogi)
   Sections: how to read a mark, marks by metal
   Section heads reuse .pub-section / .pub-section__head
   from publications-block.css
   ================================================================ */

.hm-guide *,
.hm-metals * {
    box-sizing: border-box;
}

/* metal palettes: face colour, light tint, dark edge */
.hm-gold {
    --hm-face: #d4ae55;
    --hm-tint: #f7eed3;
    --hm-edge: #8a6a1f;
}

.hm-silver {
    --hm-face: #b9bec5;
    --hm-tint: #eff1f4;
    --hm-edge: #6b7078;
}

.hm-platinum {
    --hm-face: #a6b0b6;
    --hm-tint: #e9eef0;
    --hm-edge: #56636a;
}

.hm-palladium {
    --hm-face: #bdb3a7;
    --hm-tint: #f1ece6;
    --hm-edge: #6f655a;
}

/* ================= shape of the fineness mark ================= */

.hm-shape {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.hm-shape__body {
    fill: var(--hm-tint);
    stroke: var(--hm-edge);
    stroke-width: 2;
}

.hm-shape__num {
    font-size: 26px;
    font-weight: 700;
    fill: var(--hm-edge);
}

/* ================= 1. how to read a mark ================= */

.hm-guide {
    position: relative;
    padding: 72px 0;
    background-color: #fdfbf9;
}

.hm-guide__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

/* the sample mark on a soft "loupe" */
.hm-guide__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    padding: 48px 40px;
    border: 1px solid var(--pub-line);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 50%, rgba(212, 174, 85, .22) 0, rgba(212, 174, 85, 0) 58%),
        linear-gradient(160deg, #fff 0%, var(--pub-rose) 100%);
    box-shadow: var(--pub-shadow-s);
    overflow: hidden;
}

.hm-guide__stage::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px dashed #dcc9ce;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hm-guide__stage img {
    position: relative;
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    filter: drop-shadow(0 12px 20px rgba(88, 20, 40, .16));
}

.hm-guide__caption {
    position: absolute;
    left: 24px;
    bottom: 20px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pub-bordo-soft);
}

.hm-guide__steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-step {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 0;
    border-top: 1px solid var(--pub-line);
}

.hm-step:first-child {
    padding-top: 0;
    border-top: 0;
}

.hm-step__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--pub-card);
    font-size: 20px;
    font-weight: 700;
    color: var(--pub-red);
}

.hm-step__title {
    margin: 4px 0 6px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pub-bordo);
}

.hm-step__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--pub-muted);
}

/* legend: which shape belongs to which metal */
.hm-legend {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin: 56px 0 0;
    padding: 0;
    list-style: none;
}

.hm-legend__item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    padding: 22px 22px 20px;
    border: 1px solid var(--pub-line);
    border-radius: 14px;
    background-color: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

a.hm-legend__item:hover,
a.hm-legend__item:focus-visible {
    transform: translateY(-3px);
    border-color: #dcc9ce;
    box-shadow: var(--pub-shadow-m);
}

.hm-legend__shape {
    width: 100%;
    max-width: 150px;
}

.hm-legend__name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--pub-bordo);
}

.hm-legend__name::before {
    content: '';
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--hm-face);
    box-shadow: inset 0 0 0 1px var(--hm-edge);
}

.hm-legend__text {
    display: block;
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--pub-muted);
}

/* ================= 2. marks by metal ================= */

.hm-metals__list {
    display: grid;
    gap: 28px;
}

.hm-metal {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 40px;
    padding: 36px 40px 36px 46px;
    border: 1px solid var(--pub-line);
    border-radius: 18px;
    background-color: #fff;
    box-shadow: var(--pub-shadow-s);
    scroll-margin-top: 90px;
    overflow: hidden;
}

/* metal-coloured stripe on the left */
.hm-metal::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--hm-face) 0%, var(--hm-edge) 100%);
}

.hm-metal__head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 18px;
}

.hm-metal__symbol {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #fff 0%, var(--hm-tint) 38%, var(--hm-face) 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 6px 14px rgba(0, 0, 0, .08);
    font-size: 22px;
    font-weight: 700;
    color: var(--hm-edge);
}

.hm-metal__kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--pub-bordo-soft);
}

.hm-metal__title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--pub-bordo);
}

.hm-metal__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--pub-ink);
}

.hm-metal__form {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 0;
    padding: 14px 16px;
    border-radius: 12px;
    background-color: var(--hm-tint);
}

.hm-metal__form .hm-shape {
    flex: none;
    width: 74px;
}

.hm-metal__form .hm-shape__num {
    display: none;
}

.hm-metal__form p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--pub-ink);
}

.hm-metal__form b {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--hm-edge);
}

/* fineness chips */
.hm-fin {
    margin: 26px 0 0;
}

.hm-fin__label {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--pub-bordo-soft);
}

.hm-fin__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-fin__chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 76px;
    padding: 10px 12px 9px;
    border: 1px solid var(--pub-line);
    border-radius: 12px;
    background-color: #fff;
    transition: border-color .2s ease, background-color .2s ease;
}

.hm-fin__chip:hover {
    border-color: var(--hm-face);
    background-color: var(--hm-tint);
}

.hm-fin__num {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--pub-bordo);
}

.hm-fin__pct {
    margin-top: 3px;
    font-size: 12px;
    color: var(--pub-muted);
}

/* the two stamp images */
.hm-marks {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 18px;
    align-self: stretch;
}

.hm-mark {
    display: flex;
    flex-direction: column;
    margin: 0;
    border: 1px solid var(--pub-line);
    border-radius: 14px;
    background-color: var(--pub-rose);
    overflow: hidden;
}

.hm-mark__img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 28px 22px;
    background:
        radial-gradient(circle at 50% 50%, var(--hm-tint) 0, rgba(255, 255, 255, 0) 70%),
        #fff;
}

.hm-mark__img img {
    display: block;
    max-width: 100%;
    max-height: 150px;
    height: auto;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .12));
    transition: transform .35s ease;
}

.hm-mark:hover .hm-mark__img img {
    transform: scale(1.06);
}

.hm-mark__caption {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 64px;
    padding: 12px 18px;
    border-top: 1px solid var(--pub-line);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--pub-bordo);
}

.hm-mark__caption span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    color: var(--pub-muted);
}

/* large image: a chart of several marks or a photo */
.hm-guide--large .hm-guide__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.hm-guide--large .hm-guide__stage {
    padding: 36px 32px 56px;
}

.hm-guide--large .hm-guide__stage::before {
    display: none;
}

.hm-guide--large .hm-guide__stage img {
    max-width: 560px;
    border-radius: 10px;
    filter: drop-shadow(0 12px 24px rgba(88, 20, 40, .14));
}

/* ================= responsive ================= */

@media (max-width: 1200px) {
    .hm-guide {
        padding: 60px 0;
    }

    .hm-guide__grid {
        gap: 40px;
    }

    .hm-metal {
        gap: 32px;
        padding: 32px 32px 32px 38px;
    }
}

@media (max-width: 1024px) {
    .hm-guide__grid,
    .hm-guide--large .hm-guide__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hm-guide__stage {
        min-height: 300px;
    }

    .hm-legend {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hm-metal__title {
        font-size: 29px;
    }
}

@media (max-width: 768px) {
    .hm-guide {
        padding: 48px 0;
    }

    .hm-guide__stage {
        min-height: 260px;
        padding: 40px 24px 52px;
    }

    .hm-guide__stage::before {
        width: 220px;
        height: 220px;
    }

    .hm-step {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 14px;
    }

    .hm-step__num {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .hm-step__title {
        font-size: 19px;
    }

    .hm-legend {
        gap: 14px;
        margin-top: 40px;
    }

    .hm-legend__item {
        padding: 18px;
    }

    .hm-metals__list {
        gap: 20px;
    }

    .hm-metal {
        padding: 26px 24px 26px 30px;
    }

    .hm-metal__symbol {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    .hm-mark__img {
        min-height: 180px;
        padding: 22px 16px;
    }

    .hm-mark__img img {
        max-height: 120px;
    }
}

@media (max-width: 576px) {
    .hm-guide__stage {
        min-height: 220px;
    }

    .hm-guide--large .hm-guide__stage {
        padding: 20px 14px 44px;
    }

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

    .hm-legend__item {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .hm-legend__shape {
        flex: none;
        width: 96px;
    }

    .hm-legend__text {
        margin: 4px 0 0;
        font-size: 13px;
    }

    .hm-metal {
        padding: 22px 18px 22px 24px;
        border-radius: 14px;
    }

    .hm-metal__head {
        gap: 14px;
    }

    .hm-metal__title {
        font-size: 25px;
    }

    .hm-metal__text {
        font-size: 14px;
    }

    .hm-marks {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .hm-mark {
        flex-direction: row;
        align-items: stretch;
    }

    .hm-mark__img {
        flex: none;
        width: 46%;
        min-height: 120px;
        padding: 14px 10px;
    }

    .hm-mark__img img {
        max-height: 88px;
    }

    .hm-mark__caption {
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-top: 0;
        border-left: 1px solid var(--pub-line);
    }

    .hm-fin__chip {
        min-width: 66px;
        padding: 8px 10px 7px;
    }

    .hm-fin__num {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hm-legend__item,
    .hm-mark__img img {
        transition: none;
    }
}