/* =========================================================
   HRI HOMEPAGE NEWS
========================================================= */

.hri-news,
.hri-news *,
.hri-news *::before,
.hri-news *::after {
    box-sizing: border-box;
}

.hri-news {
    --hri-red: #E40521;
    --hri-red-dark: #B00018;
    --hri-white: #FFFFFF;
    --hri-gray: #888888;
    --hri-line: rgba(255, 255, 255, 0.08);
    --hri-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    position: relative;
    width: 100%;
    overflow: hidden;

    padding:
        clamp(72px, 10vw, 120px)
        0;

    background:
        repeating-linear-gradient(
            -45deg,
            rgba(0, 0, 0, 0.5) 0,
            rgba(0, 0, 0, 0.5) 1px,
            rgba(255, 255, 255, 0.03) 1px,
            rgba(255, 255, 255, 0.03) 2px,
            transparent 2px,
            transparent 128px
        ),
        linear-gradient(
            135deg,
            #181A1F 0%,
            #101115 45%,
            #08080A 100%
        );

    color: var(--hri-white);
    font-family: 'Exo 2', sans-serif;
}

.hri-news a {
    color: inherit;
    text-decoration: none;
}

.hri-news img {
    display: block;
}

.hri-news::before {
    content: 'NEWS';

    position: absolute;
    z-index: 0;
    top: 50%;
    right: -1%;

    transform: translateY(-50%);

    color: rgba(255, 255, 255, 0.022);

    font-family: 'Conthrax', 'Montserrat', sans-serif;
    font-size: clamp(120px, 16vw, 240px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.04em;

    pointer-events: none;
    user-select: none;
}

.hri-news::after {
    content: '';

    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(--hri-red) 0%,
            var(--hri-red-dark) 55%,
            transparent 100%
        );
}

.hri-news__inner {
    position: relative;
    z-index: 2;

    width: min(100%, 1400px);
    margin-inline: auto;

    padding-inline: clamp(24px, 5vw, 80px);
}

/* =========================================================
   HEADER
========================================================= */

.hri-news__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: clamp(32px, 4vw, 48px);
    padding-bottom: 20px;

    border-bottom: 1px solid var(--hri-line);
}

.hri-news__eyebrow {
    display: block;

    margin-bottom: 8px;

    color: var(--hri-red);

    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hri-news__heading {
    margin: 0;

    color: var(--hri-white);

    font-family: 'Conthrax', 'Montserrat', sans-serif;
    font-size: clamp(26px, 3.5vw, 44px);
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}

.hri-news__heading span {
    color: var(--hri-red);
}

.hri-news__all-link {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding-bottom: 4px;

    border-bottom: 1px solid var(--hri-red);

    color: var(--hri-white);

    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;

    transition:
        color 0.3s var(--hri-ease),
        letter-spacing 0.3s var(--hri-ease);
}

.hri-news__all-link svg {
    transition: transform 0.3s var(--hri-ease);
}

.hri-news__all-link:hover {
    color: var(--hri-red);
    letter-spacing: 0.22em;
}

.hri-news__all-link:hover svg {
    transform: translateX(4px);
}

/* =========================================================
   GRID
========================================================= */

.hri-news__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: clamp(20px, 2vw, 30px);
}

/* =========================================================
   CARD
========================================================= */

.hri-news__card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    overflow: hidden;

    border: 1px solid var(--hri-line);
    border-top-color: rgba(255, 255, 255, 0.1);

    background: rgba(10, 10, 10, 0.72);

    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 14px),
        calc(100% - 14px) 100%,
        0 100%
    );

    opacity: 0;
    transform: translateY(28px);

    transition:
        opacity 0.7s var(--hri-ease),
        transform 0.7s var(--hri-ease),
        border-color 0.35s var(--hri-ease),
        box-shadow 0.35s var(--hri-ease);
}

.hri-news__card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hri-news__card:hover {
    border-color: rgba(228, 5, 33, 0.45);

    transform: translateY(-5px);

    box-shadow:
        0 0 0 1px rgba(228, 5, 33, 0.16),
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 36px rgba(228, 5, 33, 0.1);
}

/* =========================================================
   THUMBNAIL
========================================================= */

.hri-news__thumb {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    flex-shrink: 0;
    overflow: hidden;

    background: #050507;
}

.hri-news__thumb img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    filter: brightness(0.78) saturate(0.88);

    transition:
        transform 1.1s var(--hri-ease),
        filter 0.7s var(--hri-ease);
}

.hri-news__card:hover .hri-news__thumb img {
    transform: scale(1.07);

    filter:
        brightness(0.96)
        saturate(1.12);
}

.hri-news__thumb::after {
    content: '';

    position: absolute;
    z-index: 1;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            transparent 50%,
            rgba(5, 5, 7, 0.62) 100%
        );

    pointer-events: none;
}

.hri-news__thumb::before {
    content: '';

    position: absolute;
    z-index: 3;
    bottom: 0;
    left: 0;

    width: 0;
    height: 2px;

    background: var(--hri-red);

    transition: width 0.5s var(--hri-ease);
}

.hri-news__card:hover .hri-news__thumb::before {
    width: 100%;
}

.hri-news__thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background:
        radial-gradient(
            circle at 70% 20%,
            rgba(228, 5, 33, 0.18),
            transparent 42%
        ),
        #111111;
}

.hri-news__thumb-placeholder span {
    color: rgba(255, 255, 255, 0.08);

    font-family: 'Conthrax', 'Montserrat', sans-serif;
    font-size: clamp(36px, 5vw, 68px);
}

/* =========================================================
   BADGE
========================================================= */

.hri-news__badge {
    position: absolute;
    z-index: 5;
    top: 12px;
    left: 12px;

    max-width: calc(100% - 24px);

    padding: 5px 10px;

    overflow: hidden;

    background: var(--hri-red);
    color: var(--hri-white);

    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.13em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;

    clip-path: polygon(
        6px 0,
        100% 0,
        calc(100% - 6px) 100%,
        0 100%
    );
}

/* =========================================================
   CARD BODY
========================================================= */

.hri-news__card-body {
    position: relative;

    display: flex;
    flex: 1;
    flex-direction: column;

    min-height: 225px;

    gap: 10px;

    padding:
        clamp(20px, 2vw, 26px)
        clamp(18px, 2vw, 24px)
        clamp(22px, 2vw, 28px);
}

.hri-news__card-body::before {
    content: '';

    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;

    width: 2px;

    background:
        linear-gradient(
            to bottom,
            var(--hri-red),
            transparent
        );

    opacity: 0;

    transition: opacity 0.35s var(--hri-ease);
}

.hri-news__card:hover .hri-news__card-body::before {
    opacity: 1;
}

.hri-news__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 8px;

    color: var(--hri-gray);

    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hri-news__meta-dot {
    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: var(--hri-red);
}

.hri-news__card-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    margin: 0;

    color: var(--hri-white);

    font-family: 'Conthrax', 'Montserrat', sans-serif;
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 600;
    line-height: 1.42;

    transition: color 0.3s var(--hri-ease);
}

.hri-news__card:hover .hri-news__card-title {
    color: var(--hri-red);
}

.hri-news__excerpt {
    display: -webkit-box;
    flex: 1;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    margin: 0;

    color: var(--hri-gray);

    font-size: 13px;
    line-height: 1.7;
}

.hri-news__arrow {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    margin-top: auto;
    padding-top: 14px;

    border-top: 1px solid var(--hri-line);

    color: var(--hri-red);

    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    transition:
        gap 0.3s var(--hri-ease),
        color 0.3s var(--hri-ease);
}

.hri-news__arrow svg {
    width: 15px;
    height: 15px;

    flex-shrink: 0;

    transition: transform 0.3s var(--hri-ease);
}

.hri-news__card:hover .hri-news__arrow {
    gap: 12px;
    color: var(--hri-white);
}

.hri-news__card:hover .hri-news__arrow svg {
    transform: translateX(4px);
}

/* =========================================================
   EMPTY STATE
========================================================= */

.hri-news__empty {
    grid-column: 1 / -1;

    padding: 48px;

    border: 1px solid var(--hri-line);

    color: var(--hri-gray);

    font-family: 'Share Tech Mono', monospace;
    text-align: center;
    text-transform: uppercase;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (min-width: 769px) {
    .hri-news__card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

@media (max-width: 1024px) {
    .hri-news__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hri-news__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hri-news__card {
        background: rgba(10, 10, 10, 0.94);
    }
}

@media (max-width: 600px) {
    .hri-news {
        padding-block: 64px;
    }

    .hri-news__inner {
        padding-inline: 20px;
    }

    .hri-news__grid {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .hri-news__card-body {
        min-height: 210px;
    }

    .hri-news__excerpt {
        -webkit-line-clamp: 2;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    .hri-news__card {
        opacity: 1;
        transform: none;
    }

    .hri-news *,
    .hri-news *::before,
    .hri-news *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}