/* =========================================================
   RELI ANODES — HOME
   Company profile & catalogue: left sidebar, full-screen
   pages turned one at a time, thumb-index tabs.
   Fallback (small screens / reduced motion): normal scroll.
========================================================= */

.sx-home {
    --hm-side: 264px;
    --hm-pad-x: clamp(32px, 4.2vw, 80px);
    --hm-ease: cubic-bezier(0.77, 0, 0.18, 1);
    --hm-paper: #f4f5f6;
    background: var(--hm-paper);
}


/* =========================================================
   PAGES (shared)
========================================================= */

.hm-book {
    margin-left: var(--hm-side);
}

.hm-page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    color: var(--sx-ink);
    background: #ffffff;
}

.hm-tone-light:nth-child(odd) {
    background:
        linear-gradient(rgba(17, 17, 17, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(17, 17, 17, 0.04) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(180deg, #f7f8f9, #eef0f2);
}

.hm-tone-paper {
    background: #eceff1;
}

.hm-tone-dark {
    color: #ffffff;
    background:
        radial-gradient(ellipse 50% 60% at 90% 10%, rgba(229, 50, 55, 0.14), transparent 70%),
        #0f0f10;
}

.hm-tone-dark:nth-of-type(even) {
    background:
        radial-gradient(ellipse 50% 60% at 10% 90%, rgba(40, 110, 140, 0.18), transparent 70%),
        #0c1114;
}

.hm-watermark {
    position: absolute;
    right: calc(var(--hm-pad-x) + 40px);
    bottom: -0.18em;
    color: rgba(17, 17, 17, 0.04);
    font-size: clamp(180px, 30vh, 320px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    pointer-events: none;
}

.hm-tone-dark .hm-watermark {
    color: rgba(255, 255, 255, 0.035);
}

.hm-runhead,
.hm-runfoot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 calc(var(--hm-pad-x) + 56px) 0 var(--hm-pad-x);
    color: #8a8a8a;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hm-runhead {
    height: 56px;
    border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.hm-runhead b {
    color: var(--sx-ink);
    font-weight: 700;
}

.hm-runfoot {
    height: 44px;
}

.hm-runfoot-line {
    flex: 1;
    height: 1px;
    background: rgba(17, 17, 17, 0.1);
}

.hm-tone-dark .hm-runhead {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.hm-tone-dark .hm-runhead b {
    color: #ffffff;
}

.hm-tone-dark .hm-runfoot-line {
    background: rgba(255, 255, 255, 0.12);
}

.hm-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: clamp(16px, 3vh, 40px) calc(var(--hm-pad-x) + 56px) clamp(12px, 2vh, 24px) var(--hm-pad-x);
}


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

.hm-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(10px, 1.8vh, 18px);
    color: var(--sx-red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hm-kicker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #ffffff;
    font-size: 11.5px;
    letter-spacing: 0;
    background: var(--sx-red);
    border-radius: 50%;
}

.hm-h2 {
    max-width: 760px;
    font-size: clamp(28px, min(3.2vw, 5.4vh), 46px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.hm-h2-narrow {
    max-width: 880px;
}

.hm-text {
    max-width: 580px;
    margin-top: clamp(10px, 1.8vh, 18px);
    color: var(--sx-text);
    font-size: clamp(15px, 2vh, 16.5px);
    line-height: 1.7;
}

.hm-tone-dark .hm-text {
    color: #bdbdbd;
}

.hm-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: clamp(14px, 2.4vh, 24px);
    color: var(--sx-red);
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
}

.hm-link i {
    transition: transform 0.2s ease;
}

.hm-link:hover i {
    transform: translateX(4px);
}

.hm-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(16px, 3vh, 32px);
}

.hm-head-row .hm-link {
    margin-top: 0;
    white-space: nowrap;
}

.hm-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(32px, 4vw, 72px);
}

.hm-split-top {
    align-items: start;
}

.hm-split-wide {
    grid-template-columns: 0.8fr 1.2fr;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hm-btn-red {
    color: #ffffff;
    background: var(--sx-red);
}

.hm-btn-red:hover {
    background: var(--sx-red-dark);
}

.hm-btn-line {
    color: var(--sx-ink);
    border-color: var(--sx-ink);
}

.hm-btn-line:hover {
    color: #ffffff;
    background: var(--sx-ink);
}

.hm-tone-dark .hm-btn-line {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
}

.hm-tone-dark .hm-btn-line:hover {
    color: var(--sx-ink);
    background: #ffffff;
    border-color: #ffffff;
}

.hm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(18px, 3vh, 30px);
}


/* =========================================================
   01 COVER
========================================================= */

.hm-cover {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(32px, 4vw, 64px);
}

.hm-edition {
    display: inline-block;
    margin-bottom: clamp(14px, 2.4vh, 22px);
    padding: 6px 12px;
    color: var(--sx-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #ffffff;
    border: 1px solid var(--sx-line);
    border-radius: 999px;
}

.hm-display {
    font-size: clamp(36px, min(4vw, 7vh), 62px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.hm-display em {
    display: block;
    font-style: normal;
    color: var(--sx-red);
}

.hm-lead {
    max-width: 540px;
    margin-top: clamp(12px, 2.2vh, 22px);
    color: var(--sx-text);
    font-size: clamp(15.5px, 2.2vh, 17.5px);
    line-height: 1.7;
}

.hm-contents {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 24px;
    max-width: 520px;
    margin: clamp(18px, 3.4vh, 34px) 0 0;
    padding: clamp(12px, 2vh, 18px) 0 0;
    list-style: none;
    border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.hm-contents a {
    display: flex;
    gap: 10px;
    padding: 3px 0;
    color: var(--sx-text);
    font-size: 13.5px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hm-contents a span {
    color: var(--sx-red);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hm-contents a:hover {
    color: var(--sx-ink);
}

.hm-cover-visual {
    width: min(100%, calc((100vh - 200px) * 1.0667));
    justify-self: end;
}

.hm-scrollcue {
    position: absolute;
    left: var(--hm-pad-x);
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--sx-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.hm-mouse {
    position: relative;
    width: 20px;
    height: 30px;
    border: 2px solid currentColor;
    border-radius: 12px;
}

.hm-mouse span {
    position: absolute;
    top: 5px;
    left: 50%;
    width: 3px;
    height: 6px;
    margin-left: -1.5px;
    background: var(--sx-red);
    border-radius: 2px;
    animation: hm-wheel 1.6s ease-in-out infinite;
}

@keyframes hm-wheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}


/* =========================================================
   02 PROFILE
========================================================= */

.hm-photo {
    position: relative;
    margin: 0;
}

.hm-photo img {
    width: 100%;
    height: clamp(220px, 42vh, 440px);
    object-fit: cover;
    border-radius: 12px;
}

.hm-photo figcaption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 12.5px;
    background: rgba(17, 17, 17, 0.7);
    border-radius: 6px;
    backdrop-filter: blur(6px);
}

.hm-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: clamp(20px, 4vh, 44px);
    background: #ffffff;
    border: 1px solid var(--sx-line);
    border-radius: 12px;
}

.hm-stat {
    padding: clamp(14px, 2.6vh, 26px) 26px;
    border-left: 1px solid var(--sx-line);
}

.hm-stat:first-child {
    border-left: 0;
}

.hm-stat strong {
    display: block;
    color: var(--sx-ink);
    font-size: clamp(26px, 4.4vh, 40px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.hm-stat > span {
    display: block;
    margin-top: 4px;
    color: var(--sx-muted);
    font-size: 13.5px;
}


/* =========================================================
   03 CATALOGUE
========================================================= */

.hm-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.8vh, 18px);
}

.hm-cat {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 12px;
    color: inherit;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--sx-line);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hm-cat:hover {
    border-color: var(--sx-ink);
    box-shadow: 0 16px 34px rgba(17, 17, 17, 0.09);
    transform: translateY(-3px);
}

.hm-cat-img {
    flex-shrink: 0;
    width: clamp(96px, 9vw, 140px);
    height: clamp(96px, 17vh, 150px);
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #eceef0);
    border-radius: 8px;
}

.hm-cat-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8%;
    transition: transform 0.4s ease;
}

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

.hm-cat-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding-right: 18px;
}

.hm-cat-no {
    color: var(--sx-red);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hm-cat-body strong {
    margin: 4px 0 8px;
    font-size: clamp(15px, 2.1vh, 17px);
    font-weight: 700;
    line-height: 1.3;
}

.hm-cat dl {
    display: grid;
    gap: 3px;
    margin: 0;
}

.hm-cat dl div {
    font-size: 12.5px;
    line-height: 1.45;
}

.hm-cat dt,
.hm-cat dd {
    display: inline;
}

.hm-cat dt {
    color: var(--sx-muted);
}

.hm-cat dt::after {
    content: ": ";
}

.hm-cat dd {
    margin: 0;
    color: var(--sx-ink);
    font-weight: 600;
}

.hm-cat > i {
    position: absolute;
    right: 14px;
    top: 14px;
    color: var(--sx-red);
    font-size: 12px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hm-cat:hover > i {
    opacity: 1;
    transform: none;
}


/* =========================================================
   04 MATERIALS
========================================================= */

.hm-mat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: clamp(18px, 3.4vh, 34px);
}

.hm-mat {
    display: grid;
    gap: 2px;
    padding: clamp(14px, 2.4vh, 22px);
    color: inherit;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--sx-line);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hm-mat:hover {
    border-color: var(--sx-ink);
    box-shadow: 0 14px 30px rgba(17, 17, 17, 0.08);
    transform: translateY(-3px);
}

.hm-mat-sym {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 54px;
    height: 54px;
    margin-bottom: 10px;
    padding: 0 12px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
    background: var(--sx-ink);
    border-radius: 10px;
}

.hm-mat:nth-child(2) .hm-mat-sym { background: var(--sx-red); font-size: 14px; }
.hm-mat:nth-child(3) .hm-mat-sym { background: #7d838b; }
.hm-mat:nth-child(4) .hm-mat-sym { background: #3d3d3d; }

.hm-mat strong {
    font-size: 15.5px;
    font-weight: 700;
}

.hm-mat small {
    color: var(--sx-muted);
    font-size: 13px;
}

.hm-chart {
    margin: 0;
    padding: clamp(20px, 3.6vh, 36px);
    color: #ffffff;
    background: #111111;
    border-radius: 14px;
}

.hm-chart figcaption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: clamp(16px, 3vh, 28px);
}

.hm-chart figcaption strong {
    font-size: 18px;
}

.hm-chart figcaption span {
    color: #8f8f8f;
    font-size: 13px;
}

.hm-bars {
    display: grid;
    gap: clamp(14px, 2.6vh, 24px);
}

.hm-bar-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.hm-bar-top b {
    font-variant-numeric: tabular-nums;
}

.hm-bar-track {
    position: relative;
    height: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 7px;
}

.hm-bar-fill,
.hm-bar-range {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 7px;
    transition: width 1.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: calc(0.7s + var(--k) * 0.18s);
}

.hm-bar-fill {
    left: 0;
    background: linear-gradient(90deg, #b8262b, var(--sx-red));
}

.hm-bar-range {
    left: var(--l);
    background: repeating-linear-gradient(135deg, rgba(229, 50, 55, 0.55) 0 4px, rgba(229, 50, 55, 0.25) 4px 8px);
    border-radius: 0 7px 7px 0;
    transition-delay: calc(1.6s + var(--k) * 0.18s);
}

.hm-page.is-active .hm-bar-fill,
.hm-page.is-active .hm-bar-range {
    width: var(--w);
}

.hm-chart-note {
    margin-top: clamp(16px, 3vh, 26px);
    color: #a9a9a9;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   05 INDUSTRIES
========================================================= */

.hm-ind-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: clamp(92px, 17vh, 170px);
    gap: 10px;
}

.hm-ind {
    position: relative;
    display: block;
    overflow: hidden;
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
}

.hm-ind img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hm-ind::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 10, 11, 0.88) 0%, rgba(10, 10, 11, 0.25) 70%);
    transition: background 0.3s ease;
}

.hm-ind-body {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 12px;
    z-index: 1;
    display: grid;
}

.hm-ind-no {
    color: var(--sx-red);
    font-size: 11.5px;
    font-weight: 700;
}

.hm-ind-body strong {
    font-size: 15.5px;
    font-weight: 700;
}

.hm-ind-body small {
    max-height: 0;
    overflow: hidden;
    color: #d0d0d0;
    font-size: 12.5px;
    line-height: 1.45;
    transition: max-height 0.35s ease, margin 0.35s ease;
}

.hm-ind:hover img {
    transform: scale(1.08);
}

.hm-ind:hover::after {
    background: linear-gradient(0deg, rgba(229, 50, 55, 0.88) 0%, rgba(10, 10, 11, 0.35) 80%);
}

.hm-ind:hover small {
    max-height: 60px;
    margin-top: 4px;
}


/* =========================================================
   06 CAPABILITIES
========================================================= */

.hm-spec-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: clamp(18px, 3vh, 28px) 0 0;
    padding: 0;
    list-style: none;
}

.hm-spec-chips li {
    padding: 7px 12px;
    color: #e8e8e8;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.hm-val-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.hm-val {
    padding: clamp(12px, 2.2vh, 24px) clamp(16px, 1.6vw, 24px);
    background: #121314;
    transition: background-color 0.3s ease;
}

.hm-val:hover {
    background: #18191b;
}

.hm-val-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: clamp(8px, 1.4vh, 14px);
    color: #ffffff;
    font-size: 14px;
    background: var(--sx-red);
    border-radius: 9px;
}

.hm-val strong {
    display: block;
    font-size: 16px;
}

.hm-val p {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    color: #a9a9a9;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

body:not(.hm-fp-on) .hm-val p {
    display: block;
}


/* =========================================================
   07 REFERENCES
========================================================= */

.hm-ref-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: clamp(18px, 3vh, 28px);
}

.hm-ref {
    padding: clamp(16px, 2.6vh, 24px);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--sx-red);
    border-radius: 10px;
}

.hm-ref span {
    color: #9f9f9f;
    font-size: 12.5px;
}

.hm-ref span i {
    color: var(--sx-red);
}

.hm-ref strong {
    display: block;
    margin: 6px 0;
    font-size: 16px;
}

.hm-ref p {
    color: #a9a9a9;
    font-size: 13.5px;
    line-height: 1.55;
}

.hm-wind {
    width: min(100%, calc((100vh - 220px) * 0.923));
    margin: 0;
    justify-self: end;
}

.hm-wind svg {
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hm-wind figcaption {
    margin-top: 12px;
    color: #9f9f9f;
    font-size: 13px;
}

.hm-rotor {
    animation: hm-spin 6s linear infinite;
}

.hm-turbine:nth-of-type(2) .hm-rotor {
    animation-duration: 7.5s;
    animation-direction: normal;
}

@keyframes hm-spin {
    to { transform: rotate(360deg); }
}


/* =========================================================
   08 QUALITY & PROCESS
========================================================= */

.hm-process {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-top: clamp(24px, 5vh, 56px);
}

.hm-process-line {
    position: absolute;
    top: 27px;
    left: 29px;
    width: calc(75% - 14px);
    height: 4px;
}

.hm-process-line line {
    stroke: var(--sx-red);
    stroke-width: 4;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.8s cubic-bezier(0.6, 0, 0.2, 1) 0.6s;
}

.hm-page.is-active .hm-process-line line {
    stroke-dashoffset: 0;
}

.hm-step {
    position: relative;
}

.hm-step-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: clamp(14px, 2.4vh, 22px);
    color: #ffffff;
    font-size: 20px;
    background: #1a1b1d;
    border: 2px solid var(--sx-red);
    border-radius: 50%;
}

.hm-step-icon b {
    position: absolute;
    top: -8px;
    right: -10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 11px;
    background: var(--sx-red);
    border-radius: 50%;
}

.hm-step strong {
    display: block;
    font-size: 17px;
}

.hm-step p {
    margin-top: 6px;
    color: #a9a9a9;
    font-size: 14px;
    line-height: 1.6;
}

.hm-docs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    margin-top: clamp(24px, 5vh, 56px);
    padding: clamp(14px, 2.4vh, 22px) 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.hm-docs > span {
    color: var(--sx-red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hm-docs ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-docs li {
    color: #d6d6d6;
    font-size: 13.5px;
}

.hm-docs li::before {
    content: "\f00c";
    margin-right: 8px;
    color: var(--sx-red);
    font-family: "Font Awesome 6 Free";
    font-size: 10px;
    font-weight: 900;
}

.hm-docs .hm-link {
    margin: 0 0 0 auto;
}


/* =========================================================
   09 CONTACT / BACK COVER
========================================================= */

.hm-back {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
}

.hm-back-title {
    font-size: clamp(34px, min(4.4vw, 7vh), 64px);
}

.hm-back-cols {
    display: grid;
    gap: clamp(14px, 2.6vh, 24px);
}

.hm-back-cols > div {
    padding-bottom: clamp(14px, 2.6vh, 24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hm-back-cols span {
    display: block;
    margin-bottom: 6px;
    color: var(--sx-red);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hm-back-cols a,
.hm-back-cols p {
    display: block;
    color: #ffffff;
    font-size: 15.5px;
    line-height: 1.7;
    text-decoration: none;
}

.hm-back-cols a:hover {
    color: var(--sx-red);
}

.hm-colophon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
    margin-top: clamp(24px, 6vh, 64px);
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hm-colophon p {
    color: #8a8a8a;
    font-size: 13px;
}

.hm-colophon nav {
    display: flex;
    gap: 20px;
}

.hm-colophon nav a {
    color: #8a8a8a;
    font-size: 13px;
    text-decoration: none;
}

.hm-colophon nav a:hover {
    color: #ffffff;
}

.hm-backtop {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}

.hm-backtop i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.hm-backtop:hover i {
    background: var(--sx-red);
    border-color: var(--sx-red);
}


/* =========================================================
   THUMB INDEX + PROGRESS
========================================================= */

.hm-index {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 40;
    transform: translateY(-50%);
}

.hm-index ol {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-index a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    height: 34px;
    padding: 0 12px 0 0;
    color: var(--sx-ink);
    text-decoration: none;
}

.hm-index b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 34px;
    font-size: 11.5px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid var(--sx-line);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    box-shadow: -4px 4px 12px rgba(17, 17, 17, 0.06);
    transition: width 0.35s var(--hm-ease), background-color 0.25s ease, color 0.25s ease;
}

.hm-index a {
    padding: 0;
}

.hm-index span {
    position: absolute;
    right: 52px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--sx-ink);
    border-radius: 6px;
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hm-index a:hover span,
.hm-index a:focus-visible span {
    opacity: 1;
    transform: none;
}

.hm-index a:hover b {
    width: 48px;
}

.hm-index a.is-active b {
    width: 56px;
    color: #ffffff;
    background: var(--sx-red);
    border-color: var(--sx-red);
}

body[data-tone="dark"] .hm-index b {
    color: #e6e6e6;
    background: #1b1c1e;
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-tone="dark"] .hm-index a.is-active b {
    color: #ffffff;
    background: var(--sx-red);
    border-color: var(--sx-red);
}

body[data-tone="dark"] .hm-index span {
    color: var(--sx-ink);
    background: #ffffff;
}

.hm-progress {
    position: fixed;
    top: 0;
    left: var(--hm-side);
    right: 0;
    z-index: 41;
    height: 3px;
    background: transparent;
}

.hm-progress span {
    display: block;
    height: 100%;
    width: var(--p, 11.11%);
    background: var(--sx-red);
    transition: width 0.9s var(--hm-ease);
}


/* =========================================================
   ANIMATIONS (shared by both modes)
========================================================= */

[data-anim] {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), clip-path 1s cubic-bezier(0.7, 0, 0.2, 1);
    transition-delay: calc(0.35s + var(--d, 0) * 0.09s);
}

[data-anim="right"] { transform: translateX(60px); }
[data-anim="zoom"] { transform: scale(0.9); }
[data-anim="reveal"] {
    opacity: 1;
    transform: none;
    clip-path: inset(0 100% 0 0);
}

.hm-page.is-active [data-anim] {
    opacity: 1;
    transform: none;
}

.hm-page.is-active [data-anim="reveal"] {
    clip-path: inset(0 0 0 0);
}

/* page-level entrance: running head + watermark */
.hm-runhead,
.hm-watermark {
    transition: opacity 0.8s ease 0.3s, transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.hm-page:not(.is-active) .hm-watermark {
    opacity: 0;
    transform: translateY(60px);
}

.hm-page:not(.is-active) .hm-runhead {
    opacity: 0;
}


/* =========================================================
   FULL-PAGE MODE (enabled by JS on large screens)
========================================================= */

.hm-fp-on {
    overflow: hidden;
    height: 100%;
}

.hm-fp-on .hm-book {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--hm-side);
    margin: 0;
    overflow: hidden;
    perspective: 1600px;
}

.hm-fp-on .hm-page {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: 100%;
    transition: transform 1.05s var(--hm-ease), opacity 1.05s var(--hm-ease), filter 1.05s var(--hm-ease);
    will-change: transform;
}

.hm-fp-on .hm-page.is-future {
    z-index: 3;
    transform: translateY(100%);
}

.hm-fp-on .hm-page.is-active {
    z-index: 2;
    transform: none;
}

.hm-fp-on .hm-page.is-past {
    z-index: 1;
    transform: translateY(-12%) scale(0.92);
    opacity: 0.35;
    filter: brightness(0.6);
    border-radius: 18px;
}

/* page edge shadow while turning */
.hm-fp-on .hm-page.is-active::before,
.hm-fp-on .hm-page.is-future::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -40px;
    height: 40px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent);
    pointer-events: none;
}


/* =========================================================
   FALLBACK + RESPONSIVE
========================================================= */

body:not(.hm-fp-on) .hm-index,
body:not(.hm-fp-on) .hm-progress,
body:not(.hm-fp-on) .hm-scrollcue {
    display: none;
}

body:not(.hm-fp-on) .hm-page {
    min-height: 0;
}

body:not(.hm-fp-on) .hm-inner {
    padding-top: clamp(48px, 8vh, 80px);
    padding-bottom: clamp(48px, 8vh, 80px);
}

@media (max-width: 1280px) {
    .hm-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hm-cat:nth-child(n + 5) {
        display: none;
    }

    body:not(.hm-fp-on) .hm-cat:nth-child(n + 5) {
        display: flex;
    }
}

@media (max-width: 1080px) {
    .sx-home {
        --hm-side: 0px;
        --hm-pad-x: 24px;
    }

    .hm-runhead,
    .hm-runfoot,
    .hm-inner {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hm-runhead span:first-child {
        display: none;
    }

    .hm-cover,
    .hm-split,
    .hm-split-wide,
    .hm-back {
        grid-template-columns: 1fr;
    }

    .hm-cover-visual,
    .hm-wind {
        width: 100%;
        max-width: 640px;
        justify-self: start;
    }

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

    .hm-process-line {
        display: none;
    }
}

@media (max-width: 640px) {
    .hm-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hm-stat:nth-child(3) {
        border-left: 0;
    }

    .hm-stat:nth-child(n + 3) {
        border-top: 1px solid var(--sx-line);
    }

    .hm-cat-grid,
    .hm-mat-grid,
    .hm-ref-grid,
    .hm-val-grid,
    .hm-process,
    .hm-contents {
        grid-template-columns: 1fr;
    }

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

    .hm-head-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .hm-actions .hm-btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .hm-docs .hm-link,
    .hm-backtop {
        margin-left: 0;
    }

    .hm-watermark {
        font-size: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-anim] {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
        transition: none !important;
    }

    .hm-rotor,
    .hm-mouse span {
        animation: none !important;
    }
}


/* =========================================================
   COVER — black & red gradient
========================================================= */

.hm-tone-dark.hm-tone-hero {
    background:
        radial-gradient(ellipse 55% 70% at 100% 100%, rgba(229, 50, 55, 0.55), transparent 65%),
        radial-gradient(ellipse 40% 50% at 70% 0%, rgba(229, 50, 55, 0.18), transparent 70%),
        radial-gradient(ellipse 50% 60% at 0% 40%, rgba(255, 255, 255, 0.04), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(135deg, #070708 0%, #111113 38%, #2a0d0f 72%, #5c1316 100%);
}


.hm-tone-hero .hm-edition {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
}

.hm-tone-hero .hm-display {
    color: #ffffff;
}

.hm-tone-hero .hm-display em {
    background: linear-gradient(90deg, #ff5a5f, #e53237 60%, #c9272d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hm-tone-hero .hm-lead {
    color: #c9c9c9;
}

.hm-tone-hero .hm-btn-red {
    box-shadow: 0 12px 30px rgba(229, 50, 55, 0.35);
}

.hm-tone-hero .hm-contents {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.hm-tone-hero .hm-contents a {
    color: #bdbdbd;
}

.hm-tone-hero .hm-contents a:hover {
    color: #ffffff;
}

.hm-tone-hero .hm-scrollcue {
    color: #a9a9a9;
}

.hm-tone-hero .sx-cp-legend {
    color: #cfcfcf;
}

.hm-tone-hero .sx-cp-visual svg {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 60px rgba(229, 50, 55, 0.18);
}

.hm-tone-hero .hm-watermark {
    color: rgba(255, 255, 255, 0.04);
}

/* plain text link with arrow (cover) */
.hm-textlink {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hm-textlink i {
    color: var(--sx-red);
    transition: transform 0.25s ease;
}

.hm-textlink:hover {
    color: #ff6b6f;
}

.hm-textlink:hover i {
    transform: translateX(5px);
}
