/* === GLOBAL RESET & BODY STYLES === */

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

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

ul {
    list-style: none;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}



/* === HERO SECTION === */
.hero-section {

    color: var(--color-white);
    text-align: center;
    padding: 100px 0;
}

.hero-container h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-container p {
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    opacity: 0.95;
}

/* === PRODUCTS GRID (HARDWARE + SOFTWARE COLUMNS) === */
.products-overview {
    padding: 60px 0;
    background-color: var(--color-white);
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin: 3rem 0;
}

.product-category {
    background: var(--color-light-bg);
    border: 1px solid var(--color-border-blue);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgb(var(--color-black-rgb) / 0.03);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;

    flex-direction: column;
}

.category-icon {
    height: 50px;
    width: auto;
}

.product-category h2 {
    font-size: 1.8rem;
    color: var(--color-dark);
    margin: 0;
}

.product-category p {
    color: var(--color-text-body);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* === PRODUCT CARDS === */
.cards-column {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.product-card {
    background: var(--color-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgb(var(--color-black-rgb) / 0.04);
    border-top: 4px solid var(--color-accent);
}

.product-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.product-card p {
    color: var(--color-text-body);
    margin-bottom: 1.2rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Buttons */
.product-card button,
.cta-section .btn-primary {
    background: var(--color-surface-blue);
    color: var(--color-primary);
    border: 2px solid var(--color-dark);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.parent-container {
    display: flex;
    justify-content: center;
    /* centers horizontally */
    /* align-items: center; */
    /* uncomment to center vertically too */
}

.product-card button:hover,
.cta-section .btn-primary:hover {
    background: var(--color-dark);
    color: var(--color-bg)
}

/* === CTA SECTION === */
.cta-section {
    text-align: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px dashed var(--color-border-light);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-primary {
    padding: 14px 36px;
    border-radius: 30px;
    font-size: 1.05rem;
}


/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .hero-container h1 {
        font-size: 2.2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .category-header {
        flex-direction: column;
        text-align: center;
    }

    .category-icon {
        height: 40px;
    }

    .product-card {
        padding: 1.5rem;
    }

    .cta-section .btn-primary {
        width: 100%;
        max-width: 300px;
    }
}

/* Product page redesign: aligned with the editorial homepage and About page. */
.products-page {
    background: var(--color-white);
    color: var(--color-text);
}

.products-page .products-hero {
    position: relative;
    display: flex;
    min-height: clamp(560px, 76vh, 760px);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(90px, 11vw, 150px) 0;
    background:
        linear-gradient(90deg, rgb(var(--color-night-rgb) / 0.78) 0%, rgb(var(--color-night-rgb) / 0.9) 50%, rgb(var(--color-night-rgb) / 0.78) 100%),
        url('image/products.png') center 44% / cover no-repeat;
    color: var(--color-white);
    overflow: hidden;
}

.products-page .products-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 12% 22%, rgb(var(--color-accent-rgb) / 0.2), transparent 26rem);
    pointer-events: none;
}

.products-page .hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 1240px;
    align-items: center;
    flex-direction: column;
    margin: 0 auto;
    padding-inline: clamp(20px, 5vw, 64px);
    text-align: center;
}

.products-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 1.15rem;
    color: var(--color-primary-soft);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.products-eyebrow::before {
    content: '';
    width: 30px;
    height: 2px;
    flex: 0 0 30px;
    background: currentColor;
}

.products-page .hero-container h1 {
    max-width: 850px;
    margin: 0 auto 1.5rem;
    color: var(--color-white);
    font-family: var(--page-hero-title-font);
    font-size: var(--page-hero-title-size);
    font-weight: 600;
    line-height: 1.01;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.products-page .hero-container .products-lead {
    max-width: 690px;
    margin: 0 auto;
    color: rgb(var(--color-white-rgb) / 0.78);
    font-size: clamp(1rem, 1.5vw, 1.16rem);
    line-height: 1.78;
    opacity: 1;
}

.products-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin-top: 2.15rem;
}

.products-hero-actions .btn-primary {
    margin: 0;
}

.products-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--color-white);
    font-size: 0.96rem;
    font-weight: 600;
}

.products-text-link::after {
    content: '';
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 1.1em;
    background: currentColor;
    -webkit-mask: url('Vector/arrow.svg') center / contain no-repeat;
    mask: url('Vector/arrow.svg') center / contain no-repeat;
    transition: transform 180ms ease;
}

.products-text-link:hover::after,
.products-text-link:focus-visible::after {
    transform: translateX(5px);
}

.products-page .products-overview {
    padding: clamp(76px, 9vw, 128px) 0;
    background:
        linear-gradient(90deg, rgb(var(--color-darker-rgb) / 0.035), transparent 12%, transparent 88%, rgb(var(--color-darker-rgb) / 0.035)),
        var(--color-white);
}

.products-page .products-overview>.container {
    max-width: 1320px;
    padding-inline: clamp(20px, 4vw, 52px);
}

.products-page .products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    margin: 0;
}

.products-page .product-category {
    min-width: 0;
    scroll-margin-top: calc(var(--nav-height) + 1rem);
    padding: clamp(2.25rem, 5vw, 5rem);
    border: 1px solid rgb(var(--color-darker-rgb) / 0.1);
    border-radius: 24px;
    background: linear-gradient(145deg, var(--color-surface-rose-muted) 0%, var(--color-surface-rose-muted) 100%);
    box-shadow: 0 24px 70px rgb(var(--color-shadow-soft-rgb) / 0.08);
}

.products-page .product-category#software {
    position: relative;
    background:
        radial-gradient(circle at 96% 2%, rgb(var(--color-accent-rgb) / 0.2), transparent 30rem),
        var(--color-night);
    box-shadow: 0 28px 75px rgb(var(--color-night-rgb) / 0.2);
    overflow: hidden;
}

.products-page .category-header {
    display: block;
    max-width: 850px;
    margin: 0 0 clamp(2.5rem, 5vw, 4rem);
    text-align: left;
}

.products-page .category-header .section-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.products-page .category-header .section-header h2 {
    margin: 0;
    color: var(--color-darker);
    font-size: clamp(2.5rem, 5vw, 4.75rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.05em;
    text-align: left;
}

.products-page #software .category-header .section-header h2 {
    color: var(--color-white);
}

.products-page .category-header .side-image {
    height: clamp(40px, 5vw, 58px);
}

.products-page .category-header>p {
    max-width: 800px;
    margin: 0;
    color: var(--color-text-muted);
    font-size: clamp(1rem, 1.3vw, 1.08rem);
    line-height: 1.8;
}

.products-page #software .category-header>p {
    color: rgb(var(--color-white-rgb) / 0.68);
}

.products-page .product-category .cards-column {
    display: grid;
    counter-reset: product-item;
    align-items: stretch;
    gap: clamp(1.1rem, 2.3vw, 1.75rem);
}

.products-page #hardware .cards-column {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.products-page #hardware .product-card {
    grid-column: span 2;
}

.products-page #hardware .product-card:nth-child(4),
.products-page #hardware .product-card:nth-child(5) {
    grid-column: span 3;
}

.products-page #software .cards-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.products-page .product-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 300px;
    flex-direction: column;
    padding: clamp(1.6rem, 3vw, 2.25rem);
    border: 1px solid rgb(var(--color-darker-rgb) / 0.11);
    border-top: 4px solid var(--color-accent);
    border-radius: 16px;
    background: var(--color-white);
    box-shadow: 0 14px 34px rgb(var(--color-shadow-soft-rgb) / 0.07);
    counter-increment: product-item;
    text-align: left;
    transform: none;
}

.products-page .product-card::before {
    content: '0' counter(product-item);
    position: absolute;
    top: 1.35rem;
    right: 1.5rem;
    color: rgb(var(--color-darker-rgb) / 0.24);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.products-page .product-card h3 {
    max-width: calc(100% - 2.5rem);
    margin: 0 0 1rem;
    color: var(--color-darker);
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.025em;
}

.products-page .product-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.93rem;
    line-height: 1.72;
}

.products-page #software .product-card {
    min-height: 360px;
    border-color: rgb(var(--color-white-rgb) / 0.13);
    border-top-color: var(--color-secondary);
    background: rgb(var(--color-white-rgb) / 0.055);
    box-shadow: none;
}

.products-page #software .product-card::before {
    color: rgb(var(--color-white-rgb) / 0.28);
}

.products-page #software .product-card h3 {
    color: var(--color-primary-soft);
}

.products-page #software .product-card p {
    color: rgb(var(--color-white-rgb) / 0.68);
}

.products-page #software .product-card .card-cta {
    justify-content: flex-start;
    margin-top: auto;
    padding-top: 1.5rem;
    color: var(--color-white);
}

.products-page .product-card.interactive-card:hover,
.products-page .product-card.interactive-card:focus-visible {
    border-color: rgb(var(--color-primary-rgb) / 0.48);
    box-shadow: 0 22px 48px rgb(var(--color-black-rgb) / 0.26);
    outline: none;
    transform: translateY(-6px) scale(1.05);
}

.products-page .product-card.interactive-card:focus-visible {
    box-shadow: var(--focus-ring), 0 22px 48px rgb(var(--color-black-rgb) / 0.26);
}

@media (max-width: 1020px) {

    .products-page #hardware .cards-column,
    .products-page #software .cards-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-page #hardware .product-card,
    .products-page #hardware .product-card:nth-child(4) {
        grid-column: auto;
    }

    .products-page #hardware .product-card:nth-child(5) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .products-page .products-hero {
        min-height: 600px;
        padding: 82px 0;
        background:
            linear-gradient(90deg, rgb(var(--color-night-rgb) / 0.96), rgb(var(--color-night-rgb) / 0.78)),
            url('image/products.png') center / cover no-repeat;
    }

    .products-page .hero-container h1 {
        padding: 0;
    }

    .products-page .hero-container .products-lead {
        padding: 0;
    }

    .products-page .product-category {
        padding: 2rem 1.25rem;
        border-radius: 18px;
    }

    .products-page .category-header .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .products-page #software .category-header .section-header {
        flex-direction: column-reverse;
    }

    .products-page #hardware .cards-column,
    .products-page #software .cards-column {
        grid-template-columns: 1fr;
    }

    .products-page #hardware .product-card,
    .products-page #hardware .product-card:nth-child(4),
    .products-page #hardware .product-card:nth-child(5) {
        grid-column: auto;
    }

    .products-page .product-card,
    .products-page #software .product-card {
        min-height: 0;
    }

}

@media (max-width: 480px) {
    .products-hero-actions {
        align-items: center;
        flex-direction: column;
    }
}
