@import "./shared/design-tokens.css";

/* ========== Quick Edit ========== */
/* Use this block for homepage rhythm, spacing, and section density tweaks. */

/* ========== Base Layout ========== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.home-page #siteHeader {
    position: fixed;
    z-index: 120;
    top: 0;
    right: 0;
    left: 0;
}

.home-page .site-header {
    border-bottom-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.86);
    transition: background 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.home-page.home-header-at-top .site-header {
    border-bottom-color: transparent;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.home-page.home-header-at-top .site-nav,
.home-page.home-header-at-top .site-nav .active {
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.home-page.home-header-at-top .mobile-nav-toggle span {
    color: #fff;
}

.home-page.home-header-at-top .premium-nav-menu-container {
    border-top-color: rgba(255, 255, 255, 0.18);
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.home-page.home-header-at-top .mega-menu-title {
    border-bottom-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.home-page.home-header-at-top .mega-menu-column li a {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.home-page.home-header-at-top .mega-menu-column a:hover {
    color: #fff;
}

.home-hero {
    position: relative;
    display: grid;
    min-height: 100vh;
    overflow: hidden;
    align-items: center;
    padding: 120px clamp(20px, 7vw, 96px) 98px;
    color: #fff;
}

.hero-visual,
.home-hero::before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-visual {
    background: var(--hero-fallback-image) center / cover no-repeat;
    opacity: 1;
    transition: opacity 0.45s ease, transform 0.8s ease;
}

.hero-carousel {
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.8s ease, transform 1.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    right: clamp(20px, 5vw, 72px);
    bottom: clamp(30px, 5vw, 70px);
    display: flex;
    gap: 2px;
}

.hero-dot {
    display: grid;
    min-width: 58px;
    min-height: 28px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.hero-dot::before {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    content: "";
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.active::before,
.hero-dot:hover::before {
    background: var(--primary);
    transform: scaleX(1.18);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    width: 44px;
    height: 64px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    background: rgba(4, 18, 31, 0.28);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    border-color: rgba(255, 255, 255, 0.72);
    background: var(--primary);
    transform: translateY(-50%) scale(1.04);
}

.hero-arrow::before {
    width: 13px;
    height: 13px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    content: "";
}

.hero-arrow-prev {
    left: clamp(18px, 4vw, 64px);
}

.hero-arrow-prev::before {
    transform: translateX(3px) rotate(-135deg);
}

.hero-arrow-next {
    right: clamp(18px, 4vw, 64px);
}

.hero-arrow-next::before {
    transform: translateX(-3px) rotate(45deg);
}

.hero-video-play {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: grid;
    width: 74px;
    height: 74px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 50%;
    background: rgba(4, 18, 31, 0.38);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-video-play:hover {
    border-color: #fff;
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.05);
}

.hero-video-play::before {
    width: 0;
    height: 0;
    margin-left: 5px;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 20px solid #fff;
    content: "";
}

.hero-video-layer {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: grid;
    background: #02070d;
}

.hero-video-player {
    width: 100%;
    height: 100%;
    background: #02070d;
    object-fit: cover;
}

.hero-video-close {
    position: absolute;
    z-index: 7;
    top: clamp(86px, 9vw, 122px);
    right: clamp(18px, 4vw, 58px);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(4, 18, 31, 0.5);
    cursor: pointer;
}

.hero-video-close::before,
.hero-video-close::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #fff;
    content: "";
}

.hero-video-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.hero-video-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.home-hero.is-video-playing .hero-video-play {
    display: none;
}

.home-hero::before {
    z-index: -2;
    content: "";
    background: var(--hero-fallback-image) center / cover no-repeat;
}

.primary-button,
.ghost-button,
.pill-button,
.ghost-dark-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
}

.primary-button,
.pill-button {
    background: var(--primary);
    color: #fff;
}

.primary-button:hover,
.pill-button:hover {
    background: var(--primary-dark);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.62);
    color: #fff;
}

.ghost-dark-button {
    border: 1px solid rgba(255, 255, 255, 0.46);
    color: #fff;
}

.home-section {
    width: var(--space-content-width);
    margin-inline: auto;
    padding: 68px 0 0;
}

.section-title {
    margin-bottom: 24px;
}

.section-title.centered {
    text-align: center;
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-title p,
.case-band p {
    margin: 0 0 8px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.section-title h2,
.case-band h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 3.5vw, 38px);
    line-height: 1.2;
}

.section-title > span {
    display: block;
    max-width: 680px;
    margin: 14px auto 0;
    color: var(--muted);
    font-size: 16px;
}

.section-title-row a {
    color: var(--accent-dark);
    font-weight: 900;
}

.product-mosaic {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(220px, 1fr));
    gap: 18px;
}

.product-card {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 260px;
    overflow: hidden;
    align-content: end;
    gap: 18px;
    padding: 30px;
    color: #fff;
}

.product-card-large {
    grid-row: span 2;
    min-height: 520px;
}

.product-card::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    content: "";
    background: var(--card-image) center / cover no-repeat;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.product-card::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(3, 15, 25, 0.72), rgba(3, 15, 25, 0.16)),
        linear-gradient(0deg, rgba(3, 15, 25, 0.58), rgba(3, 15, 25, 0.08));
    transition: opacity 0.5s ease;
}

.product-card:hover::before {
    transform: scale(1.055);
    filter: saturate(1.08);
}

.product-card:hover::after {
    opacity: 0.62;
}

.product-card small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.product-card span {
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    font-size: 22px;
    font-weight: 900;
}

.product-card strong {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    white-space: nowrap;
}

.product-card:hover strong {
    opacity: 1;
    transform: translateX(0);
}

.solution-section {
    width: 100%;
    padding-top: 76px;
    padding-bottom: 66px;
    background: #edf2ef;
}

.solution-section > .section-title,
.solution-tabs,
.solution-feature {
    width: var(--space-content-width);
    margin-inline: auto;
}

.solution-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid #dce5dd;
    background: #fff;
}

.solution-tab {
    min-height: 58px;
    border: 0;
    border-right: 1px solid #dce5dd;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.solution-tab:last-child {
    border-right: 0;
}

.solution-tab.active {
    background: var(--primary);
    color: #fff;
}

.solution-feature {
    display: grid;
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
    overflow: hidden;
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--shadow);
}

.solution-copy {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: clamp(28px, 5vw, 56px);
}

.solution-copy p,
.solution-copy h3,
.solution-copy span {
    margin: 0;
}

.solution-copy p {
    color: var(--accent-dark);
    font-size: 25px;
    font-weight: 900;
}

.solution-copy h3 {
    color: var(--ink);
    font-size: clamp(23px, 3vw, 42px);
    line-height: 1.22;
}

.solution-copy span {
    color: var(--muted);
    font-size: 17px;
}

.solution-points {
    display: grid;
    gap: 10px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.solution-points li {
    position: relative;
    padding-left: 20px;
    color: #3b4a5b;
    font-size: 15px;
    font-weight: 700;
}

.solution-points li::before {
    position: absolute;
    top: 9px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    content: "";
}

.solution-copy .pill-button {
    justify-self: start;
    margin-top: 12px;
}

.solution-feature img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.solution-feature:hover img {
    opacity: 0.94;
    transform: scale(1.035);
}

.solution-card-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: var(--space-content-width);
    margin: 22px auto 0;
}

.solution-mini-card {
    position: relative;
    isolation: isolate;
    display: grid;
    min-height: 154px;
    overflow: hidden;
    align-content: end;
    gap: 8px;
    padding: 22px;
    color: #fff;
}

.solution-mini-card::before,
.solution-mini-card::after {
    position: absolute;
    inset: 0;
    content: "";
}

.solution-mini-card::before {
    z-index: -2;
    background: var(--solution-card-image) center / cover no-repeat;
    transition: transform 0.45s ease;
}

.solution-mini-card::after {
    z-index: -1;
    background: linear-gradient(0deg, rgba(4, 18, 31, 0.72), rgba(4, 18, 31, 0.18));
}

.solution-mini-card:hover::before {
    transform: scale(1.055);
}

.solution-mini-card span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.solution-mini-card strong {
    font-size: 18px;
    line-height: 1.35;
}

.legacy-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: var(--space-content-width);
    margin: 56px auto 0;
    border: 1px solid var(--line);
    background: #fff;
}

.legacy-stats div {
    display: grid;
    min-height: 132px;
    align-content: center;
    gap: 8px;
    padding: 24px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.legacy-stats div:last-child {
    border-right: 0;
}

.legacy-stats strong {
    color: var(--accent-dark);
    font-size: clamp(30px, 3.5vw, 42px);
    line-height: 1;
}

.legacy-stats span {
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.news-card {
    display: flex;
    height: 100%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 32, 51, 0.08);
}

.news-card a {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
    transition: background 0.35s ease, transform 0.35s ease;
}

.news-card:hover a {
    transform: translateY(-4px);
}

.news-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.news-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 13px;
    padding: 20px 24px 24px;
}

.news-card h3 {
    display: -webkit-box;
    min-height: calc(1.35em * 2);
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.news-card p {
    display: -webkit-box;
    min-height: calc(1.7em * 5);
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.news-card-action {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    padding: 9px 0 0;
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.case-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 300px;

    padding: clamp(28px, 5vw, 58px);
    background:
        linear-gradient(90deg, rgba(8, 22, 36, 0.9), rgba(8, 22, 36, 0.58)),
        var(--case-image) center / cover no-repeat;
    color: #fff;
}

.case-band p {
    color: var(--accent);
}

.case-band h2 {
    color: #fff;
}

.case-band span {
    display: block;
    max-width: 680px;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
}

.case-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.ghost-dark-button-muted {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== Responsive ========== */
@media (max-width: 980px) {
    .product-mosaic,
    .solution-feature,
    .news-grid,
    .solution-card-strip {
        grid-template-columns: 1fr;
    }

    .product-card-large {
        grid-row: auto;
        min-height: 320px;
    }

    .news-card {
        border-right: 0;
    }

    .legacy-stats div {
        min-height: 116px;
        padding: 18px 10px;
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .legacy-stats div:last-child {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .home-page #siteHeader {
        position: fixed;
    }

    .home-page.home-header-at-top .site-header.is-mobile-nav-open .site-nav {
        background: rgba(8, 12, 18, 0.94);
        opacity: 1;
        pointer-events: auto;
        text-shadow: none;
        transform: translateX(0);
    }

    .home-page.home-header-at-top .site-header.is-mobile-nav-open .site-nav > a,
    .home-page.home-header-at-top .site-header.is-mobile-nav-open .site-nav-link-row > a {
        color: #fff;
        text-shadow: none;
    }

    .home-page.home-header-at-top .site-header.is-mobile-nav-open .site-nav .active {
        color: #93d221;
        text-shadow: none;
    }

    .home-page.home-header-at-top .site-header.is-mobile-nav-open .premium-nav-menu-container {
        background: transparent;
        box-shadow: none;
        text-shadow: none;
    }

    .home-page.home-header-at-top .site-header.is-mobile-nav-open .mega-menu-column li a {
        color: #fff;
        text-shadow: none;
    }

    .home-hero {
        min-height: 720px;
        padding-top: 72px;
        padding-bottom: 160px;
    }

    .hero-dots {
        bottom: 100px;
    }

    .hero-video-play {
        width: 62px;
        height: 62px;
    }

    .hero-video-close {
        top: 96px;
        right: 20px;
    }

    .section-title-row,
    .case-band {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-card {
        min-height: 240px;
        padding: 24px;
    }

    .news-card a {
        flex-direction: row;
        min-height: 138px;
    }

    .news-card img {
        flex: 0 0 38%;
        width: 38%;
        max-width: 150px;
        min-height: 138px;
        aspect-ratio: auto;
        object-fit: cover;
    }

    .news-card-body {
        min-width: 0;
        gap: 8px;
        padding: 14px 14px 12px;
    }

    .news-card h3 {
        min-height: auto;
        font-size: 16px;
        line-height: 1.32;
    }

    .news-card p {
        min-height: auto;
        font-size: 13px;
        line-height: 1.45;
        -webkit-line-clamp: 2;
    }

    .news-card-action {
        margin-top: auto;
        padding: 0;
        font-size: 13px;
    }

    .solution-tabs {
        display: none;
    }

    .solution-tab {
        border-right: 1px solid #dce5dd;
        border-bottom: 1px solid #dce5dd;
    }

    .solution-tab:nth-child(2n) {
        border-right: 0;
    }

    .solution-tab:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .solution-feature {
        display: none;
    }

    .solution-feature img {
        min-height: 280px;
        order: -1;
    }

    .legacy-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .legacy-stats div {
        min-height: 96px;
        padding: 12px 6px;
    }

    .legacy-stats strong {
        font-size: 24px;
    }

    .legacy-stats span {
        font-size: 12px;
        line-height: 1.25;
    }

}
