/* ===================================================================
   /machines/diamond-wax-setting-machine — premium presentation (2026-11-12)
   -------------------------------------------------------------------
   Loaded only on that page ($page['css'] in machines/_category.php, gated on
   $isSetting). Same tokens and type as the rest of the site; the direction is
   the /machines hub's: minimal B2B, one accent, 1px borders over heavy shadows,
   photographs on a tinted stage, figures set large.
   ui-ux-pro-max: comparison-table-cta (CTA directly under the table, alternate
   rows), ux "Table Handling" (horizontal scroll on mobile, sticky label column),
   ux "Content Jumping" (aspect-ratio boxes for every photograph).

   Accessibility:
   - Small magenta text uses --brand-700 (#a81264, 7.5:1 on white). --brand
     (#e2208c, 4.36:1) only for rules and large/decorative use.
   - Secondary text uses --ink-50 (#6b7280, 4.8:1), never --ink-40.
   - Buttons and the card links are >= 44px; focus rings are visible.
   - No data-aos: nothing here waits for JavaScript to become visible.
   - Hover lifts are off under prefers-reduced-motion.
   =================================================================== */

/* ---------- Hero ---------- */
.sc-hero {
    padding-block: clamp(8px, 1.6vw, 20px) clamp(36px, 4.5vw, 64px);
    background:
        radial-gradient(55% 65% at 80% 30%, var(--brand-tint) 0%, rgba(253,242,248,0) 70%),
        linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border-bottom: 1px solid var(--line);
}
.sc-h1 {
    font-size: clamp(2.1rem, 1.35rem + 2.7vw, 3.4rem);
    line-height: 1.07; margin-bottom: 18px;
}
.sc-lede {
    font-size: clamp(1rem, .96rem + .2vw, 1.1rem); line-height: 1.7;
    color: var(--ink-70); max-width: 60ch; margin: 0 0 20px;
    padding-left: 16px; border-left: 3px solid var(--brand-tint-2);
}
.sc-hero .award-cite { margin: 0 0 26px; max-width: 60ch; }

.sc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.sc-btn {
    min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
    padding-inline: 24px; text-align: center;
}
.sc-wa {
    min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
    padding: 0 6px; font-weight: 600; color: var(--ink);
    text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 5px;
}
.sc-wa svg { color: #128c4a; flex: 0 0 auto; }
.sc-wa:hover { color: var(--brand-700); text-decoration-color: currentColor; }
.sc-wa:focus-visible,
.sc-model .stretched-link:focus-visible,
.sc-th-model:focus-visible {
    outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* The range photograph. Its own background is near-white, so it sits on a white
   card with a hairline border rather than straight on the tinted gradient. */
.sc-hero-figure {
    margin: 0; padding: clamp(14px, 2vw, 26px);
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl);
    box-shadow: 0 30px 60px -38px rgba(20,22,28,.35);
}
.sc-hero-figure img { display: block; width: 100%; height: auto; max-width: 560px; margin-inline: auto; }

/* Key figures */
.sc-facts {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px; margin: clamp(32px, 4vw, 52px) 0 0;
    background: var(--line); border: 1px solid var(--line);
    border-radius: var(--r-lg); overflow: hidden;
}
@media (min-width: 992px) { .sc-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sc-fact {
    display: flex; flex-direction: column-reverse; justify-content: flex-end;
    background: var(--surface); padding: clamp(16px, 2.2vw, 26px) clamp(14px, 2vw, 24px);
}
.sc-fact dd {
    margin: 0 0 6px; font-family: var(--font-display);
    font-size: clamp(1.45rem, 1.05rem + 1.4vw, 2.1rem); line-height: 1.1;
    color: var(--ink); font-variant-numeric: tabular-nums;
}
.sc-fact dt { font-weight: 500; font-size: .84rem; line-height: 1.45; color: var(--ink-50); }

/* ---------- The range: photo cards ---------- */
.sc-h2 { font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.5rem); line-height: 1.15; margin: 0; }
.sc-range-intro p { color: var(--ink-70); font-size: .98rem; line-height: 1.72; margin: 0 0 12px; }
.sc-range-intro p:last-child { margin-bottom: 0; }

.sc-models {
    list-style: none; padding: 0; margin: clamp(28px, 3.5vw, 44px) 0 0;
    display: grid; gap: clamp(14px, 1.6vw, 22px);
    grid-template-columns: 1fr;
}
@media (min-width: 576px) { .sc-models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sc-models { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sc-model-item { display: flex; }

.sc-model {
    position: relative; display: flex; flex-direction: column; width: 100%;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease;
}
.sc-model:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.sc-model:hover {
    border-color: var(--line-strong);
    box-shadow: 0 22px 44px -30px rgba(20,22,28,.45);
    transform: translateY(-3px);
}
/* Product photographs are #fdfdfd, so the stage matches them instead of showing
   a grey square on pure white. One aspect ratio for all four (the ST-HDSSM file
   is 1000x845) and object-fit: contain, so nothing is cropped and nothing shifts. */
.sc-model-media {
    aspect-ratio: 4 / 3; background: #fdfdfd;
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
}
.sc-model-media picture { display: block; width: 100%; height: 100%; }
.sc-model-media img {
    display: block; width: 100%; height: 100%; object-fit: contain;
    padding: 6%; transition: transform .35s ease;
}
.sc-model:hover .sc-model-media img { transform: scale(1.035); }

.sc-model-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 20px 20px 18px; }
.sc-model-role {
    margin: 0 0 6px; font-size: .74rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--brand-700);
}
.sc-model-name { font-family: var(--font-heading); font-size: 1.32rem; line-height: 1.2; margin: 0 0 8px; }
.sc-model-name a { color: var(--ink); text-decoration: none; }
.sc-model-line { font-size: .9rem; line-height: 1.6; color: var(--ink-70); margin: 0 0 16px; }

.sc-model-specs { margin: auto 0 0; border-top: 1px solid var(--line); }
.sc-model-specs > div {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid var(--line);
}
.sc-model-specs dt { font-weight: 500; font-size: .82rem; color: var(--ink-50); }
.sc-model-specs dd {
    margin: 0; font-weight: 700; font-size: .9rem; color: var(--ink);
    text-align: right; font-variant-numeric: tabular-nums;
}
.sc-unit { font-weight: 500; color: var(--ink-50); }
.sc-na { font-weight: 500; font-style: italic; color: var(--ink-50); }

.sc-model-go {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px; margin-top: 6px;
    font-weight: 700; font-size: .9rem; color: var(--brand-700);
}
.sc-model-go svg { transition: transform .2s ease; }
.sc-model:hover .sc-model-go svg { transform: translateX(4px); }

/* ---------- Comparison ---------- */
.sc-compare .spec-table { font-size: .9rem; }
.sc-compare .compare-table { min-width: 760px; }
.sc-compare .spec-table thead th {
    vertical-align: bottom; background: var(--surface-2);
    font-size: .8rem; letter-spacing: .06em; padding-block: 16px 14px;
}
.sc-th-model {
    display: inline-flex; flex-direction: column; align-items: flex-start; gap: 10px;
    text-decoration: none;
}
.sc-th-model img {
    width: 64px; height: 64px; object-fit: contain;
    background: #fdfdfd; border: 1px solid var(--line); border-radius: 12px; padding: 4px;
}
.sc-th-model:hover span { color: var(--brand-700); }
.sc-compare .spec-table tbody tr:nth-child(even) { background: var(--surface-2); }
.sc-compare .spec-table tbody tr:hover { background: var(--accent-tint); }
.sc-compare .spec-table td { color: var(--ink-70); }
.sc-cell-na { color: var(--ink-50) !important; }
.sc-th-note {
    display: block; margin-top: 2px;
    font-weight: 500; font-size: .76rem; color: var(--ink-50);
}

/* Sticky label column, so the parameter stays readable while the models scroll
   sideways on a phone. Horizontal sticky inside .spec-table-wrap is unaffected
   by the body's overflow-x rule. Rows need an opaque background to slide under. */
.sc-compare .spec-table tbody th,
.sc-compare .spec-table thead th:first-child {
    position: sticky; left: 0; z-index: 1;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--line);
    min-width: 150px;
}
.sc-compare .spec-table thead th:first-child { z-index: 3; background: var(--surface-2); }
.sc-compare .spec-table tbody tr:nth-child(even) th { background: var(--surface-2); }
.sc-compare .spec-table tbody tr:hover th { background: var(--accent-tint); }

.sc-compare .mp-callout { margin-top: 0; height: 100%; }
.sc-help {
    height: 100%; padding: 22px 24px;
    background: var(--ink-900); color: #fff;
    border-radius: var(--r-lg);
}
.sc-help-h { font-family: var(--font-heading); font-size: 1.2rem; margin: 0 0 8px; color: #fff; }
.sc-help-t { font-size: .92rem; line-height: 1.65; color: rgba(255,255,255,.78); margin: 0 0 18px; }
.sc-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-help .sc-btn:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; }

@media (max-width: 575.98px) {
    .sc-actions .sc-btn { flex: 1 1 100%; }
    .sc-help-actions .sc-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-model, .sc-model-media img, .sc-model-go svg { transition: none; }
    .sc-model:hover { transform: none; }
    .sc-model:hover .sc-model-media img { transform: none; }
}

/* ===================================================================
   Opt-in "showcase" categories (2026-11-12, laser-category-ux).
   Same file, because the layout is shared with the setting page; loaded
   only on categories that set the 'showcase' key (and the setting page).
   =================================================================== */
.sc-head { max-width: 720px; margin-bottom: clamp(24px, 3vw, 36px); }
.sc-head .sc-h2 { margin-bottom: 12px; }

/* Hero: the machines' own photographs, 2 x 2, on one white card */
.sc-mosaic {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.2vw, 14px);
}
.sc-mosaic-tile {
    margin: 0; display: flex; flex-direction: column;
    background: #fdfdfd; border: 1px solid var(--line); border-radius: var(--r);
    overflow: hidden;
}
.sc-mosaic-tile img {
    display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
    object-fit: contain; padding: 6%;
}
.sc-mosaic-tile figcaption {
    padding: 8px 12px 10px; border-top: 1px solid var(--line);
    font-family: var(--font-heading); font-size: .95rem; color: var(--ink);
    background: var(--surface);
}

/* Card spec lists whose values are sentences ("110 × 110 mm standard; 150 × 150 mm extended") */
.sc-model-specs.is-stacked > div { display: block; }
.sc-model-specs.is-stacked dt { margin-bottom: 2px; }
.sc-model-specs.is-stacked dd { text-align: left; font-weight: 600; font-size: .88rem; line-height: 1.5; }

/* Which machine for which job */
.sc-jobs-table { min-width: 640px; }
.sc-jobs-table tbody th { width: 30%; }
.sc-jobs-table td { color: var(--ink-70); }
.sc-jobs-table tbody tr:nth-child(even) { background: var(--surface-2); }
.sc-jobs-machines { font-weight: 600; color: var(--ink) !important; white-space: normal; }
.sc-jobs-machines a {
    color: var(--brand-700); text-decoration: underline;
    text-decoration-color: var(--brand-tint-2); text-underline-offset: 4px;
}
.sc-nw { white-space: nowrap; }
.sc-jobs-machines a:hover { text-decoration-color: currentColor; }
.sc-jobs-machines a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sc-jobs .spec-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.sc-jobs .spec-table tbody tr:nth-child(even) th { background: var(--surface-2); }

/* Comparison on a tinted section: keep the table and its sticky column white */
.section-alt.sc-compare .spec-table-wrap { background: var(--surface); }

/* Showcase variants (2026-11-12, welding-category-ux) */
.sc-hero-single { text-align: center; }
.sc-hero-single img { display: block; width: 100%; max-width: 440px; height: auto; margin-inline: auto; }
.sc-hero-single figcaption {
    margin-top: 6px; font-family: var(--font-heading); font-size: 1rem; color: var(--ink-70);
}
.sc-model-nophoto {
    margin: 0; padding: 0 16px; text-align: center;
    font-size: .85rem; font-weight: 500; color: var(--ink-50);
}
.sc-jobs-table.is-two-col { min-width: 0; }
.sc-jobs-table.is-two-col tbody th { width: 34%; }
.sc-note { padding-block: clamp(36px, 4.5vw, 64px); }
.sc-note .mp-callout-title { font-size: 1.08rem; }

/* Two models or fewer: full-width horizontal cards instead of half an empty row */
@media (min-width: 768px) {
    .sc-models.is-few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .sc-models.is-few .sc-model { flex-direction: row; }
    .sc-models.is-few .sc-model-media {
        flex: 0 0 44%; aspect-ratio: auto; min-height: 300px;
        border-bottom: 0; border-right: 1px solid var(--line);
    }
}

/* Prices on showcase cards and comparison (2026-11-12, gold-category-ux) */
.sc-model-specs.is-stacked .sc-model-price dd {
    font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.sc-compare .sc-price-row td { font-weight: 700; color: var(--ink); white-space: nowrap; }
/* MRP under an offer price (2026-11-13, FSDD): "MRP <del>₹15,00,000</del> · 13% off". Body-size ink text, so it keeps
   the price's contrast; the word "MRP" names the struck figure for screen readers. */
.sc-mrp {
    display: block; margin-top: 2px; font-family: var(--font-heading); font-size: .8rem; font-weight: 500;
    color: var(--ink); white-space: nowrap;
}
.sc-mrp del { text-decoration-thickness: 1.5px; }

/* Five models: one row of five on wide screens, three-and-two below, never a lone fifth card */
@media (min-width: 992px) { .sc-models.is-five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) {
    .sc-models.is-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .sc-models.is-five .sc-model-body { padding: 18px 16px 16px; }
    .sc-models.is-five .sc-model-name { font-size: 1.18rem; }
}

/* Six models: three by two (2026-11-12, 3dprint-category-ux) */
@media (min-width: 992px) { .sc-models.is-six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Hero grid with three photographs: the first one spans the top row */
.sc-mosaic > .sc-mosaic-tile:first-child:nth-last-child(3) { grid-column: 1 / -1; }
.sc-mosaic > .sc-mosaic-tile:first-child:nth-last-child(3) img { aspect-ratio: 2 / 1; }
/* Phones: a card without a photograph does not need a full 4:3 empty stage */
@media (max-width: 575.98px) {
    .sc-model-media:has(.sc-model-nophoto) { aspect-ratio: auto; min-height: 64px; }
}

/* Hero capacity panel, for a range with no photographs (2026-11-12, casting-category-ux) */
.sc-hero-panel { padding: clamp(20px, 2.6vw, 32px); }
.sc-hp-title {
    margin: 0 0 18px; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--brand-700);
}
.sc-hp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.sc-hp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sc-hp-model { font-family: var(--font-heading); font-size: 1.12rem; color: var(--ink); text-decoration: none; }
a.sc-hp-model { min-height: 32px; display: inline-flex; align-items: center; }
a.sc-hp-model:hover { color: var(--brand-700); }
a.sc-hp-model:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sc-hp-value { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-hp-bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.sc-hp-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-700)); }
.sc-hp-sub { display: block; margin-top: 6px; font-size: .84rem; color: var(--ink-50); }
.sc-hp-note { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .84rem; line-height: 1.6; color: var(--ink-70); }

/* Cards without a media stage: a coloured top rule keeps them from reading as unfinished */
.sc-model.no-media { border-top: 3px solid var(--brand); }
.sc-model.no-media .sc-model-body { padding-top: 22px; }

/* Range grouped by stage, for a category without machine pages (2026-11-12, polishing-category-ux) */
.sc-groups {
    display: grid; gap: clamp(14px, 1.6vw, 22px); margin-top: clamp(28px, 3.5vw, 44px);
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .sc-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sc-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sc-group {
    background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--brand);
    border-radius: var(--r-lg); padding: 22px 22px 8px;
}
.sc-group-title { font-family: var(--font-heading); font-size: 1.3rem; color: var(--ink); margin: 0 0 4px; }
.sc-group-note { font-size: .86rem; color: var(--ink-50); margin: 0 0 12px; }
.sc-group-list { list-style: none; margin: 0; padding: 0; }
.sc-group-list > li { padding: 12px 0; border-top: 1px solid var(--line); }
.sc-group-name { margin: 0 0 4px; font-weight: 700; font-size: .95rem; color: var(--ink); }
.sc-group-name a {
    color: var(--brand-700); text-decoration: underline; text-decoration-color: var(--brand-tint-2);
    text-underline-offset: 4px; display: inline-flex; min-height: 32px; align-items: center;
}
.sc-group-name a:hover { text-decoration-color: currentColor; }
.sc-group-name a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sc-group-text { margin: 0; font-size: .88rem; line-height: 1.6; color: var(--ink-70); }
.sc-hp-row:not(:has(.sc-hp-bar)) .sc-hp-head { margin-bottom: 2px; }
.sc-hp-value { white-space: nowrap; }

/* Long hero panels (seven rows): tighter rhythm (2026-11-12, rolling-category-ux) */
.sc-hp-list:has(> li:nth-child(6)) { gap: 10px; }
.sc-hp-list:has(> li:nth-child(6)) .sc-hp-row { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sc-hp-list:has(> li:nth-child(6)) .sc-hp-row:last-child { padding-bottom: 0; border-bottom: 0; }
.sc-hp-list:has(> li:nth-child(6)) .sc-hp-value { font-size: 1.15rem; }
