
/* =========================================================
   FONTS
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

/* =========================================================
   DESIGN TOKENS
   ========================================================= */

:root {
    /* Backgrounds */
    --bg-0: #060912;
    --bg-1: #0a0f1e;
    --bg-2: #0e1628;
    --bg-3: #13203a;
    --bg-4: #1a2e50;

    /* Blue spectrum */
    --blue-deep: #0b3080;
    --blue-mid: #1857d8;
    --blue-primary: #2268ff;
    --blue-bright: #0099ff;
    --blue-glow: #00b8ff;
    --cyan: #00d8ff;

    /* Text */
    --t0: #f0f8ff;
    --t1: #b8d4f0;
    --t2: #6a8eb5;
    --t3: #304d6a;

    /* Borders */
    --b-subtle: rgba(255, 255, 255, 0.05);
    --b-dark:   rgba(255, 255, 255, 0.08);
    --b-blue:   rgba(34, 104, 255, 0.28);
    --b-glow:   rgba(0, 184, 255, 0.55);

    /* Legacy aliases – pages.css uses these */
    --primary:        #2268ff;
    --primary-hover:  #1857d8;
    --primary-soft:   rgba(34, 104, 255, 0.14);
    --primary-dark:   #0b3080;
    --text-dark:      #f0f8ff;
    --text-light:     #b8d4f0;
    --text-muted:     #6a8eb5;
    --surface:        #0e1628;
    --surface-soft:   #0a0f1e;
    --surface-dark:   linear-gradient(135deg, #0a1628 0%, #0e2040 100%);
    --bg-light:       #0e1628;
    --bg-hero:        linear-gradient(135deg, #060912 0%, #0a1628 100%);
    --white:          #ffffff;
    --border:         rgba(34, 104, 255, 0.28);
    --shadow-soft:    0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-strong:  0 16px 48px rgba(0, 184, 255, 0.12);
    --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.45);

    /* All radii → 0 (sharp as a razor) */
    --radius-md: 0px;
    --radius-lg: 0px;
    --radius-xl: 0px;

    --container-width: 1200px;
}

/* =========================================================
   BASE
   ========================================================= */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: var(--t0);
    background-color: var(--bg-0);
    background-image:
        linear-gradient(rgba(34, 104, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 104, 255, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    line-height: 1.6;
    overflow-x: clip;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("/img/logo-mex.svg");
    background-repeat: no-repeat;
    background-position: center 57%;
    background-size: min(640px, 85vw);
    opacity: 0.022;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    filter: saturate(0) brightness(3);
}

a, .main-nav a, .btn, .tile, .tile-link,
.homepage-news__link, .news-card__link,
.homepage-reference-card__title-link,
.reference-card__title-link, .anchor-nav a {
    text-decoration: none;
}

.site-header, main, section, .site-footer {
    position: relative;
    z-index: 1;
}

.container {
    width: min(var(--container-width), calc(100% - 40px));
    margin: 0 auto;
}

/* =========================================================
   TYPOGRAPHY HELPERS
   ========================================================= */

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--blue-glow);
}

.section-eyebrow::before {
    content: "";
    display: block;
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, var(--blue-glow), var(--cyan));
    flex-shrink: 0;
}

.section-heading h2 {
    margin: 0 0 10px;
    color: var(--t0);
    font-size: clamp(1.9rem, 2.2vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.section-heading p {
    margin: 0;
    color: var(--t2);
    line-height: 1.72;
}

/* =========================================================
   SHARED CARD MOTION
   ========================================================= */

.tile, .homepage-news__card, .homepage-reference-card,
.news-card, .reference-card, .about-card,
.category-intro__text, .category-intro__box,
.about-intro__text, .about-intro__box,
.about-segments__content, .about-segments__cards,
.about-history__wrap, .news-intro__text, .news-intro__box,
.news-detail-article, .news-detail-sidebar__box,
.references-intro__text, .references-intro__stats,
.contact-main-card, .contact-side-card, .contact-form-wrap {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#kontaktni-formular { scroll-margin-top: 90px; }

.tile:hover, .homepage-news__card:hover,
.homepage-reference-card:hover, .news-card:hover,
.reference-card:hover, .about-card:hover {
    transform: translateY(-3px);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn, .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 28px;
    background: var(--blue-primary);
    color: var(--white);
    border: 1px solid rgba(34, 104, 255, 0.7);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 0 0 18px rgba(34, 104, 255, 0.35);
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.07) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.btn:hover::before { opacity: 1; }

.btn:hover, .btn-primary:hover {
    background: var(--blue-bright);
    border-color: var(--blue-glow);
    box-shadow: 0 0 28px rgba(0, 184, 255, 0.55);
    transform: translateY(-2px);
    opacity: 1;
}

.btn-outline {
    background: transparent;
    color: var(--t0);
    border-color: rgba(34, 104, 255, 0.55);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(34, 104, 255, 0.1);
    border-color: var(--blue-bright);
    box-shadow: 0 0 14px rgba(34, 104, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--t0);
    border-color: rgba(34, 104, 255, 0.55);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(34, 104, 255, 0.1);
    border-color: var(--blue-bright);
    box-shadow: 0 0 14px rgba(34, 104, 255, 0.3);
}

/* Buttons inside dark hero / project showcase */
.hero .btn, .projects-showcase__content .btn {
    background: rgba(255,255,255,0.92);
    color: var(--bg-2);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 18px rgba(255,255,255,0.2);
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
}

.hero .btn:hover, .projects-showcase__content .btn:hover {
    background: var(--t0);
    border-color: var(--white);
    box-shadow: 0 0 26px rgba(255,255,255,0.3);
    color: var(--bg-1);
}

.hero .btn-outline, .projects-showcase__content .btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255,255,255,0.52);
    box-shadow: none;
}

.hero .btn-outline:hover, .projects-showcase__content .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.82);
}

/* Hero main slider — primary CTA is blue (not white), secondary stays outlined white */
.hero.hero-main-slider .btn:not(.btn-outline):not(.btn-secondary) {
    background: var(--blue-primary);
    color: #ffffff;
    border-color: rgba(34, 104, 255, 0.75);
    box-shadow: 0 0 22px rgba(34, 104, 255, 0.42);
}

.hero.hero-main-slider .btn:not(.btn-outline):not(.btn-secondary):hover {
    background: var(--blue-bright);
    border-color: var(--blue-glow);
    box-shadow: 0 0 32px rgba(0, 184, 255, 0.55);
    color: #ffffff;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #dce7f5;
    box-shadow: 0 2px 16px rgba(0, 40, 120, 0.08);
}

/* Thin blue accent line at bottom of white header */
.site-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--blue-primary) 25%, var(--blue-glow) 50%, var(--blue-primary) 75%, transparent 100%);
    opacity: 0.6;
    pointer-events: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.topcat { max-height: 20px; }

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img { height: 48px; width: auto; }

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: 1px solid var(--b-blue);
    cursor: pointer;
    color: var(--t0);
    padding: 6px 12px;
    line-height: 1;
    border-radius: 0;
}

.main-nav .menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .menu > li, .has-dropdown, .has-subdropdown {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: 0;
    color: #334d6e;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.15s ease, background-color 0.15s ease;
    border-bottom: 1px solid transparent;
}

.main-nav a:hover {
    color: var(--blue-primary);
    background: rgba(34, 104, 255, 0.06);
    box-shadow: inset 0 -2px 0 var(--blue-primary);
}

/* Dropdown chevrons */
.has-dropdown > a, .has-subdropdown > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.has-dropdown > a::after, .has-subdropdown > a::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid rgba(50, 80, 120, 0.55);
    border-bottom: 1.5px solid rgba(50, 80, 120, 0.55);
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.has-dropdown:hover > a::after {
    transform: rotate(225deg) translateY(-1px);
    border-color: var(--blue-primary);
}

.has-subdropdown > a::after { transform: rotate(-45deg); }

.dropdown .has-subdropdown > a { justify-content: space-between; }
.dropdown .has-subdropdown > a::after {
    width: 6px; height: 6px;
    margin-left: 10px;
    border-right: 1.5px solid rgba(255,255,255,0.6);
    border-bottom: 1.5px solid rgba(255,255,255,0.6);
    transform: rotate(-45deg);
}

.has-dropdown:hover .dropdown { display: block; }
.has-subdropdown:hover > .subdropdown { display: block; }

.dropdown, .subdropdown {
    display: none;
    position: absolute;
    min-width: 252px;
    background: rgba(8, 14, 30, 0.98);
    border: 1px solid var(--b-blue);
    box-shadow: 0 20px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(0, 184, 255, 0.06) inset;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    border-radius: 0;
}

.dropdown { top: 100%; left: 0; z-index: 1000; }
.subdropdown { top: 0; left: 100%; z-index: 1001; }

.dropdown li a, .subdropdown li a {
    display: block;
    padding: 10px 18px;
    color: var(--t1);
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.86rem;
    font-weight: 500;
}

.dropdown li a:hover, .subdropdown li a:hover {
    background: rgba(34, 104, 255, 0.12);
    color: var(--white);
    box-shadow: none;
}

.header-admin,
.header-customer {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-customer-btn {
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
}

.header-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.header-lang-switch a { color: #6a8aac; }
.header-lang-switch a:hover { color: var(--blue-primary); }
.header-lang-switch a.is-active { color: var(--blue-primary); }
.header-lang-switch span { color: #b0c4d8; }

.btn-admin-link { min-height: 38px; padding: 0 14px; font-size: 0.8rem; }

/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    padding: 92px 0 76px;
    background-color: var(--bg-1);
    background-image: url('/img/hero-bg.png');
    background-size: cover;
    background-position: center right;
    overflow: hidden;
}

/* Main slider version — slides carry their own padding */
.hero.hero-main-slider {
    padding: 0;
}

/* Dark overlay over hero photo — multi-layer: text protection + ambient center glow */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        /* Subtle radial ambient — visual bridge between text and machines */
        radial-gradient(
            ellipse 55% 95% at 54% 52%,
            rgba(0, 55, 200, 0.08) 0%,
            rgba(0, 30, 120, 0.04) 55%,
            transparent 100%
        ),
        /* Primary text-protection gradient, left→right */
        linear-gradient(100deg,
            rgba(4, 9, 26, 0.97) 0%,
            rgba(4, 9, 26, 0.84) 22%,
            rgba(4, 9, 26, 0.45) 48%,
            rgba(4, 9, 26, 0.08) 74%,
            rgba(4, 9, 26, 0.00) 100%
        );
    z-index: 1;
    pointer-events: none;
}

/* Grid pattern in hero (above overlay) — extends across more of the hero */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 104, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 104, 255, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(90deg, black 0%, black 28%, transparent 84%);
    pointer-events: none;
    z-index: 2;
}

/* Diagonal ambient sweep — machine-emanated light bridging center */
.hero::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 84%;
    height: 100%;
    background: linear-gradient(130deg,
        transparent 25%,
        rgba(0, 140, 255, 0.04) 42%,
        rgba(0, 184, 255, 0.06) 54%,
        rgba(20, 80, 220, 0.04) 65%,
        transparent 80%
    );
    pointer-events: none;
    z-index: 2;
}

.hero-inner {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content { max-width: 100%; }

.hero-bg-shape { position: absolute; pointer-events: none; z-index: 0; }
.hero-bg-shape-2 {
    width: 340px; height: 340px;
    left: -110px; bottom: -130px;
    background: radial-gradient(circle, rgba(0, 184, 255, 0.06) 0%, transparent 70%);
    border-radius: 0;
}

.hero h1 {
    margin: 0 0 24px;
    font-size: clamp(2.4rem, 3.4vw, 3.6rem);
    line-height: 1.04;
    color: var(--white);
    letter-spacing: -0.03em;
    max-width: min(100%, 640px);
}

.hero p {
    margin: 0;
    max-width: min(100%, 560px);
    font-size: 1.06rem;
    line-height: 1.78;
    color: var(--t1);
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 38px;
    flex-wrap: wrap;
}

.hero-actions .btn:first-child,
.about-preview .btn,
.projects-showcase__content .btn {
    box-shadow: 0 0 18px rgba(34, 104, 255, 0.25);
}

.hero-side { position: relative; }

/* =========================================================
   HERO PRODUCT SLIDER – FUTURISTIC
   ========================================================= */

.hero-product-slider {
    position: relative;
    min-height: 480px;
    background: var(--bg-2);
    border: 1px solid var(--b-blue);
    border-radius: 0;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 184, 255, 0.08) inset,
        0 24px 64px rgba(0, 0, 0, 0.7);
}

/* Scan line animation */
@keyframes sliderScan {
    0%   { top: -80px; }
    100% { top: 110%; }
}

.hero-product-slider .scan-line {
    position: absolute;
    left: 0; right: 0;
    top: -80px;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 184, 255, 0.05) 50%, transparent 100%);
    animation: sliderScan 5s linear infinite;
    pointer-events: none;
    z-index: 4;
}

/* Corner brackets – injected by JS: .slider-corner */
.slider-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 6;
}

.slider-corner--tl { top: 12px; left: 12px; border-top: 2px solid var(--blue-glow); border-left: 2px solid var(--blue-glow); }
.slider-corner--tr { top: 12px; right: 12px; border-top: 2px solid var(--blue-glow); border-right: 2px solid var(--blue-glow); }
.slider-corner--bl { bottom: 12px; left: 12px; border-bottom: 2px solid var(--blue-glow); border-left: 2px solid var(--blue-glow); }
.slider-corner--br { bottom: 12px; right: 12px; border-bottom: 2px solid var(--blue-glow); border-right: 2px solid var(--blue-glow); }

/* Slide counter */
.hero-product-counter {
    position: absolute;
    top: 18px;
    left: 38px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-glow);
    letter-spacing: 0.12em;
    z-index: 6;
    line-height: 1;
    opacity: 0.85;
}

/* Progress bar */
.hero-product-progress {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.05);
    z-index: 6;
}

@keyframes progressFill {
    from { width: 0%; }
    to   { width: 100%; }
}

.hero-product-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blue-primary), var(--cyan));
    box-shadow: 0 0 8px var(--cyan);
    animation: progressFill 4s linear forwards;
}

.hero-product-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px 28px 68px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    color: inherit;
    text-decoration: none;
}

.hero-product-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    background: var(--bg-1);
    border: 1px solid var(--b-dark);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Glow under product */
.hero-product-image::before {
    content: "";
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 180px; height: 60px;
    background: radial-gradient(ellipse, rgba(34, 104, 255, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.hero-product-image img {
    max-width: 100%;
    max-height: 230px;
    object-fit: contain;
    filter: drop-shadow(0 8px 28px rgba(0, 184, 255, 0.2));
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.hero-product-slide:hover .hero-product-image img {
    transform: translateY(-5px) scale(1.02);
}

.hero-product-text { padding: 18px 4px 0; }

.hero-product-text h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    line-height: 1.2;
    color: var(--t0);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hero-product-text p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--t2);
}

.hero-product-controls {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-product-controls button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--b-blue);
    border-radius: 0;
    background: var(--bg-1);
    color: var(--t1);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
    transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.hero-product-controls button:hover {
    background: var(--blue-primary);
    color: var(--white);
    border-color: var(--blue-glow);
    box-shadow: 0 0 14px rgba(34, 104, 255, 0.5);
}

/* =========================================================
   HOMEPAGE – SECTION SPACING
   ========================================================= */

.product-tiles, .projects-showcase, .homepage-news,
.homepage-references, .about-preview {
    position: relative;
}

.product-tiles {
    padding: 72px 0 80px;
    background: var(--bg-2);
    border-top:    1px solid var(--b-blue);
    border-bottom: 1px solid var(--b-subtle);
}

.homepage-news {
    padding: 80px 0;
    background: var(--bg-1);
}

.homepage-references {
    padding: 80px 0;
    background: var(--bg-2);
    border-top: 1px solid var(--b-subtle);
}

.projects-showcase { padding: 80px 0; }

.about-preview {
    padding: 80px 0 88px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--b-subtle);
}

/* Shared heading overrides */
.product-tiles h2, .homepage-news__head h2,
.homepage-references__head h2, .about-preview h2,
.projects-showcase__content h2, .category-intro__text h2,
.about-intro__text h2, .news-intro__text h2,
.references-intro__text h2, .contact-main-card h2 {
    letter-spacing: -0.025em;
    color: var(--t0);
}

.product-tiles h2, .homepage-news__head h2,
.homepage-references__head h2, .about-preview h2,
.projects-showcase__content h2 {
    margin-top: 0;
    margin-bottom: 14px;
}

.homepage-news__head, .homepage-references__head { margin-bottom: 0; }

.homepage-news__head p, .homepage-references__head p,
.about-preview p, .projects-showcase__content p {
    margin-top: 0;
    color: var(--t1);
}

.homepage-news__head p, .homepage-references__head p {
    max-width: 720px;
    line-height: 1.75;
}

.about-preview p { margin-bottom: 22px; }

/* =========================================================
   PRODUCT TILES
   ========================================================= */

.product-tiles h2, .about-preview h2 {
    margin: 0 0 30px;
    font-size: 2rem;
    line-height: 1.15;
}

/* Grid with 1px blue dividers */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--b-blue);
    border: 1px solid var(--b-blue);
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    padding: 28px 24px 22px;
    background: var(--bg-2);
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    backdrop-filter: none;
    transition: background 0.22s ease;
}

/* Left accent bar on hover */
.tile::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 0%;
    background: linear-gradient(180deg, var(--blue-bright), var(--cyan));
    transition: height 0.3s ease;
}

.tile:hover { background: var(--bg-3); transform: none; }
.tile:hover::before { height: 100%; }

/* Chemical formulas — default on light backgrounds */
.chem-formula {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 1.22em;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    vertical-align: baseline;
    letter-spacing: -0.02em;
    color: #071327;
}

.chem-formula sub {
    font-size: 0.62em;
    line-height: 0;
    position: relative;
    bottom: -0.1em;
}

/* Dark sections — light formula text */
.hero .chem-formula,
.category-hero .chem-formula,
.products-dark-section .chem-formula,
.projects-showcase .chem-formula,
.category-cta__box .chem-formula,
.cta-card .chem-formula,
.page-content--dark .chem-formula,
.site-footer .chem-formula {
    color: #ffffff;
}

.hero h1 .chem-formula,
.about-intro__text h2 .chem-formula,
.category-cta__box h2 .chem-formula {
    font-size: 1em;
}

.hero p .chem-formula {
    font-size: 1.95em;
}

.about-preview p .chem-formula,
.about-intro__text p .chem-formula,
.about-segments__content p .chem-formula,
.news-detail-body p .chem-formula,
.content-narrow .chem-formula,
.page-content--light .chem-formula,
.page-content--soft .chem-formula {
    font-size: 1.95em;
    color: #071327;
}

.tile-icon {
    position: absolute;
    right: 16px;
    bottom: 14px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    line-height: 1;
    color: rgba(34, 104, 255, 0.15);
    pointer-events: none;
    transition: color 0.22s ease;
    letter-spacing: -0.05em;
}

.tile:hover .tile-icon { color: rgba(0, 184, 255, 0.35); }

.tile h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.25;
    color: var(--t0);
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 0.22s ease;
}

.tile:hover h3 { color: var(--white); }

.tile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--t2);
    font-size: 0.88rem;
    line-height: 1.68;
    max-width: 92%;
}

.tile-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    margin-bottom: 2px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-glow);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.tile:hover .tile-link { opacity: 1; transform: translateY(0); }

/* =========================================================
   HOMEPAGE – PROJECTS SHOWCASE
   ========================================================= */

.projects-showcase {
    background: var(--bg-3);
    border-top: 1px solid var(--b-blue);
    border-bottom: 1px solid var(--b-blue);
    overflow: hidden;
}

.projects-showcase__shape {
    position: absolute;
    top: 0; left: 0;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(34, 104, 255, 0.08) 0%, transparent 70%);
    clip-path: none;
    opacity: 1;
}

.projects-showcase__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.projects-showcase__content {
    color: var(--t0);
    max-width: 520px;
    padding-top: 0;
}

.projects-showcase__content .section-eyebrow { color: var(--blue-bright); }

.projects-showcase__content h2 {
    font-size: 2.4rem;
    line-height: 1.1;
    color: var(--white);
}

.projects-showcase__content p {
    margin: 0 0 28px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--t1);
}

.projects-showcase__logos {
    position: relative;
    min-height: 430px;
}

.project-badge {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border: 1px solid var(--b-blue);
    box-shadow: 0 0 20px rgba(34, 104, 255, 0.1);
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-badge:hover {
    transform: translateY(-6px);
    border-color: var(--blue-glow);
    box-shadow: 0 0 30px rgba(0, 184, 255, 0.25);
}

.project-badge img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    filter: brightness(1.1) saturate(1.2);
}

.project-badge:first-child  { top: 0;   left: 80px; }
.project-badge--middle       { top: 140px; left: 240px; }
.project-badge--bottom       { top: 270px; left: 380px; }

/* =========================================================
   HOMEPAGE – NEWS
   ========================================================= */

.homepage-news__head,
.homepage-news .news-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.homepage-news__head h2 {
    margin: 0 0 10px;
    font-size: 2.1rem;
    line-height: 1.12;
    color: var(--t0);
    letter-spacing: -0.025em;
}

.homepage-news__head p { margin: 0; color: var(--t1); }

/* Grid with thin dividers */
.homepage-news__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--b-blue);
    border: 1px solid var(--b-blue);
}

.homepage-news__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    border-radius: 0;
    background: var(--bg-2);
    border: none;
    box-shadow: none;
    transition: background 0.2s;
}

.homepage-news__card:hover { background: var(--bg-3); transform: none; border-color: transparent; box-shadow: none; }

.homepage-news__clickable {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    padding: 24px;
    color: inherit;
    text-decoration: none;
}

.homepage-news__clickable:focus-visible {
    outline: 1px solid var(--blue-glow);
    outline-offset: 0;
    border-radius: 0;
}

.homepage-news__card:hover .homepage-news__image img { transform: scale(1.04); }

.homepage-news__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.homepage-news__category {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 0;
    background: rgba(34, 104, 255, 0.14);
    border: 1px solid var(--b-blue);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-glow);
}

.homepage-news__date {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--t2);
    font-weight: 400;
}

.homepage-news__card h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--t0);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.homepage-news__card p {
    margin: 0 0 20px;
    color: var(--t2);
    line-height: 1.72;
    font-size: 0.9rem;
}

.homepage-news__link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-glow);
    border-bottom: 1px solid rgba(0, 184, 255, 0.3);
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.homepage-news__link::after { content: "→"; font-size: 1em; transition: transform 0.2s; }

.homepage-news__card:hover .homepage-news__link,
.homepage-news__clickable:hover .homepage-news__link {
    color: var(--cyan);
    border-color: var(--cyan);
}

.homepage-news__card:hover .homepage-news__link::after,
.homepage-news__clickable:hover .homepage-news__link::after {
    transform: translateX(3px);
}

.homepage-news__image {
    margin: -24px -24px 20px;
    overflow: hidden;
    border-radius: 0;
}

.homepage-news__image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    filter: brightness(0.88) saturate(1.1);
}

/* =========================================================
   HOMEPAGE – REFERENCES
   ========================================================= */

.homepage-references__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.homepage-references__head h2 {
    margin: 0 0 10px;
    font-size: 2.1rem;
    line-height: 1.12;
    color: var(--t0);
    letter-spacing: -0.025em;
}

.homepage-references__head p { margin: 0; color: var(--t1); }

.homepage-references__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--b-blue);
    border: 1px solid var(--b-blue);
}

.homepage-reference-card {
    padding: 24px;
    border-radius: 0;
    border: none;
    background: var(--bg-2);
    box-shadow: none;
    transition: background 0.2s;
}

.homepage-reference-card:hover { background: var(--bg-3); transform: none; box-shadow: none; }

.homepage-reference-card__category {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 0;
    background: rgba(34, 104, 255, 0.12);
    border: 1px solid var(--b-blue);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-glow);
}

.homepage-reference-card h3 {
    margin: 0 0 6px;
    font-size: 1.18rem;
    line-height: 1.25;
    color: var(--t0);
    letter-spacing: -0.015em;
    font-weight: 700;
}

.homepage-reference-card__location {
    margin: 0 0 16px;
    color: var(--t2);
    font-weight: 500;
    font-size: 0.9rem;
}

.homepage-reference-card__meta {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 0;
    background: var(--bg-1);
    border: 1px solid var(--b-dark);
    box-shadow: none;
}

.homepage-reference-card__meta span {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--t2);
}

.homepage-reference-card__meta strong {
    font-size: 14px;
    color: var(--t0);
    letter-spacing: -0.01em;
}

.homepage-reference-card__meta--link { display: block; color: inherit; transition: all 0.2s; }
.homepage-reference-card__meta--link:hover { border-color: var(--b-blue); }
.homepage-reference-card__meta--link strong::after { content: " →"; opacity: 0; transition: 0.2s; }
.homepage-reference-card__meta--link:hover strong::after { opacity: 1; }

.homepage-reference-card__description {
    margin: 0;
    line-height: 1.72;
    color: var(--t2);
    font-size: 0.9rem;
}

.homepage-reference-card__title-link { color: inherit; transition: color 0.2s; }
.homepage-reference-card__title-link:hover { color: var(--blue-glow); }
.homepage-reference-card__title-link::after { content: " ↗"; font-size: 0.85em; opacity: 0.6; }

/* Buttons in light-context sections */
.homepage-news__head .btn,
.homepage-news .news-section__cta.btn,
.homepage-references__head .btn {
    background: var(--blue-primary);
    color: var(--white);
    border-color: var(--b-blue);
    box-shadow: 0 0 16px rgba(34, 104, 255, 0.3);
}

.homepage-news__head .btn:hover,
.homepage-news .news-section__cta.btn:hover,
.homepage-references__head .btn:hover {
    box-shadow: 0 0 24px rgba(0, 184, 255, 0.5);
}

/* Reference card image */
.homepage-reference-card__image {
    display: block;
    width: calc(100% + 28px);
    margin: -14px -14px 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-1);
    aspect-ratio: 4/3;
    box-shadow: none;
    cursor: zoom-in;
}

.homepage-reference-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0.88) saturate(1.1);
}

.homepage-reference-card:hover .homepage-reference-card__image img {
    transform: scale(1.04);
    filter: brightness(0.98) saturate(1.2);
}

/* Model tags */
.homepage-reference-card__models { display: flex; flex-wrap: wrap; gap: 6px; }

.homepage-reference-card__models a,
.homepage-reference-card__models strong {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 0;
    background: var(--bg-1);
    border: 1px solid var(--b-blue);
    color: var(--t1);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    clip-path: polygon(5px 0%, 100% 0%, calc(100% - 5px) 100%, 0% 100%);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.homepage-reference-card__models a:hover {
    border-color: var(--blue-glow);
    color: var(--white);
    background: rgba(34, 104, 255, 0.14);
}

.homepage-reference-card__models a::after { content: " →"; margin-left: 2px; opacity: 0.6; }

/* Lightbox */
.reference-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(3, 5, 12, 0.92);
    backdrop-filter: blur(14px);
}

.reference-lightbox.is-open { display: flex; }

.reference-lightbox__image {
    display: block;
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    border-radius: 0;
    border: 1px solid var(--b-blue);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

.reference-lightbox__close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--b-blue);
    border-radius: 0;
    background: var(--bg-2);
    color: var(--t0);
    font-size: 28px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(34, 104, 255, 0.25);
    transition: background 0.2s, color 0.2s;
}

.reference-lightbox__close:hover { background: var(--blue-primary); color: var(--white); }

/* =========================================================
   ABOUT PREVIEW
   ========================================================= */

.about-preview p {
    max-width: 800px;
    color: var(--t1);
    margin: 0 0 24px;
    font-size: 1rem;
}

/* =========================================================
   NEWS SECTION (homepage wrapper)
   ========================================================= */

.news-section { padding: 80px 0; background: var(--bg-1); }

.news-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.news-section__intro h2 {
    margin: 0 0 10px;
    font-size: 2.1rem;
    line-height: 1.12;
    color: var(--t0);
    letter-spacing: -0.025em;
}

.news-section__intro p { margin: 0; color: var(--t1); }

/* =========================================================
   SLIDER SECTION (product pages)
   ========================================================= */

.slider-section { padding: 0 0 72px; }

.slider-wrapper { position: relative; }

.simple-slider {
    position: relative;
    background: var(--bg-2);
    border: 1px solid var(--b-blue);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    min-height: 420px;
}

/* Corner brackets on main slider */
.simple-slider::before {
    content: "";
    position: absolute;
    top: 12px; right: 12px;
    width: 16px; height: 16px;
    border-top: 2px solid var(--blue-glow);
    border-right: 2px solid var(--blue-glow);
    z-index: 3;
    pointer-events: none;
}

.simple-slider::after {
    content: "";
    position: absolute;
    bottom: 12px; left: 12px;
    width: 16px; height: 16px;
    border-bottom: 2px solid var(--blue-glow);
    border-left: 2px solid var(--blue-glow);
    z-index: 3;
    pointer-events: none;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    color: inherit;
    text-decoration: none;
}

.slide.active { opacity: 1; visibility: visible; pointer-events: auto; }

.slide-inner {
    display: grid;
    grid-template-columns: 46% 54%;
    align-items: center;
    min-height: 420px;
}

.slide img {
    width: 100%;
    height: 420px;
    object-fit: contain;
    background: var(--bg-1);
    border-right: 1px solid var(--b-dark);
    padding: 24px;
    filter: brightness(0.95);
}

.slide-text { padding: 48px; }

.slide-text h3 {
    margin: 0 0 16px;
    font-size: 2rem;
    line-height: 1.12;
    color: var(--t0);
    letter-spacing: -0.025em;
}

.slide-text p {
    margin: 0;
    font-size: 1.04rem;
    color: var(--t1);
    max-width: 460px;
    line-height: 1.76;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: -22px; right: -22px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.slider-controls button {
    pointer-events: auto;
    width: 44px; height: 44px;
    border: 1px solid var(--b-blue);
    border-radius: 0;
    background: var(--bg-0);
    color: var(--t0);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(0,0,0,0.5);
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.slider-controls button:hover {
    background: var(--blue-primary);
    color: var(--white);
    border-color: var(--blue-glow);
}

/* =========================================================
   GENERIC PAGE HELPERS
   ========================================================= */

.page-hero {
    padding: 70px 0 40px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--b-blue);
}

.page-hero h1 {
    margin: 0;
    font-size: 2.4rem;
    line-height: 1.15;
    color: var(--t0);
}

.page-intro {
    max-width: 760px;
    margin: 0 0 32px;
    font-size: 1.05rem;
    color: var(--t1);
}

.page-content { padding: 50px 0 80px; }

.product-category-grid { grid-template-columns: repeat(3, 1fr); }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    background: var(--bg-0);
    color: var(--t0);
    padding: 64px 0 0;
    margin-top: 0;
    border-top: 1px solid var(--b-blue);
    position: relative;
}

/* Neon top stripe */
.site-footer::before {
    content: "";
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue-glow) 25%, var(--cyan) 50%, var(--blue-glow) 75%, transparent);
    opacity: 0.55;
}

.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    color: rgba(255,255,255,0.99);
    font-size: 0.95rem;
    text-decoration: none;
    opacity: 0.35;
    transition: opacity 0.2s;
}

.footer-admin-link:hover { opacity: 0.9; }

@media (max-width: 640px) {
    .footer-bottom__inner { align-items: flex-start; flex-direction: column; gap: 8px; }
}

.footer-main {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 40px;
}

.footer-column h4 {
    margin: 0 0 16px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-glow);
}

.footer-logo { display: inline-flex; margin-bottom: 18px; }
.footer-logo img { height: 40px; width: auto; }

.footer-company__text {
    margin: 0 0 20px;
    color: var(--t2);
    line-height: 1.75;
    max-width: 400px;
    font-size: 0.9rem;
}

.footer-company__details p { margin: 0 0 8px; color: var(--t2); font-size: 0.9rem; }

.footer-company__details a, .footer-links a {
    color: var(--t2);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-company__details a:hover, .footer-links a:hover { color: var(--white); }

.footer-links {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    gap: 10px;
}

.footer-links li { margin: 0; }
.footer-links a { font-size: 0.9rem; }

.footer-cta {
    margin-top: 24px;
    padding: 18px;
    border-radius: 0;
    background: rgba(34, 104, 255, 0.06);
    border: 1px solid var(--b-blue);
}

.footer-cta p { margin: 0 0 14px; color: var(--t2); line-height: 1.6; font-size: 0.9rem; }

.footer-bottom {
    padding: 20px 0 26px;
    border-top: 1px solid var(--b-subtle);
}

.footer-bottom p { margin: 0; color: var(--t2); font-size: 0.85rem; }

/* Back to top */
.back-to-top {
    position: fixed;
    left: 24px; bottom: 24px;
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: var(--bg-2);
    border: 1px solid var(--b-blue);
    color: var(--t0);
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(34, 104, 255, 0.2);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
    transition: opacity 0.22s, visibility 0.22s, transform 0.22s, background 0.2s, box-shadow 0.2s;
}

.back-to-top:hover {
    background: var(--blue-primary);
    box-shadow: 0 0 20px rgba(34, 104, 255, 0.55);
    transform: translateY(-2px);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* =========================================================
   HERO – NEW ELEMENTS
   ========================================================= */

/* Grid texture div — extends into transition zone as subtle "connective tissue" */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 104, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 104, 255, 0.055) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(90deg, black 0%, black 22%, rgba(0,0,0,0.28) 60%, transparent 86%);
    z-index: 2;
    pointer-events: none;
}

/* Remove the ::before grid since we have .hero-grid now */
.hero::before { display: none; }

/* Eyebrow pill badge */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding: 6px 14px 6px 10px;
    background: rgba(34, 104, 255, 0.14);
    border: 1px solid rgba(34, 104, 255, 0.4);
    color: #60a5fa;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-eyebrow::before {
    content: "";
    display: block;
    width: 16px;
    height: 2px;
    background: var(--blue-glow);
    flex-shrink: 0;
}

/* Feature badges row */
.hero-features {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 38px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-feature-icon {
    width: 34px;
    height: 34px;
    background: rgba(34, 104, 255, 0.12);
    border: 1px solid rgba(34, 104, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.hero-feature-text strong {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: rgba(220, 235, 255, 0.9);
    line-height: 1.2;
}

.hero-feature-text span {
    font-size: 0.78rem;
    color: rgba(160, 195, 240, 0.6);
}

/* Right: static product image */
.hero-product-wrap {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}

.hero-product-wrap img {
    max-width: 100%;
    max-height: 560px;
    object-fit: contain;
    filter:
        drop-shadow(0 30px 60px rgba(0, 80, 255, 0.35))
        drop-shadow(0 0 80px rgba(0, 180, 255, 0.15));
    position: relative;
    z-index: 1;
}

.hero-product-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 120px;
    background: radial-gradient(ellipse at bottom, rgba(0, 100, 255, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

/* =========================================================
   HERO BACKGROUND LAYERS — per-slide crossfade backgrounds
   ========================================================= */

.hero-bg-layers {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    background-color: var(--bg-1);
    opacity: 0;
    transition: opacity 0.9s ease;
    will-change: opacity;
    /* Soft left-edge fade: image bleeds in from center, avoids hard split */
    -webkit-mask-image: linear-gradient(90deg, transparent 12%, rgba(0,0,0,0.4) 35%, black 55%);
    mask-image:         linear-gradient(90deg, transparent 12%, rgba(0,0,0,0.4) 35%, black 55%);
}

.hero-bg-layer.is-active {
    opacity: 1;
}

.hero-bg-layer[data-slide="0"] { background-image: url('/img/bg-generators.png'); }
.hero-bg-layer[data-slide="1"] { background-image: url('/img/bg-recover.png'); }
.hero-bg-layer[data-slide="2"] { background-image: url('/img/bg-secotec.png'); }

/* ── Large monitors — bring machines toward center + tuned overlay ── */

/* 1440px: stroje posunuté víc ke středu, masku rozšíříme */
@media (min-width: 1440px) {
    .hero-bg-layer {
        background-size: auto 108%;
        background-position: 64% center;
        -webkit-mask-image: linear-gradient(90deg, transparent 14%, rgba(0,0,0,0.45) 36%, black 56%);
        mask-image:         linear-gradient(90deg, transparent 14%, rgba(0,0,0,0.45) 36%, black 56%);
    }

    .hero-overlay {
        background:
            radial-gradient(ellipse 50% 90% at 52% 52%, rgba(0, 55, 200, 0.09) 0%, transparent 100%),
            linear-gradient(100deg,
                rgba(4, 9, 26, 0.96) 0%,
                rgba(4, 9, 26, 0.80) 22%,
                rgba(4, 9, 26, 0.36) 50%,
                rgba(4, 9, 26, 0.04) 76%,
                rgba(4, 9, 26, 0.00) 100%
            );
    }
}

/* 1600px: výška = 100%, pozice strojů ve 2/3 šířky */
@media (min-width: 1600px) {
    .hero-bg-layer {
        background-size: auto 100%;
        background-position: 62% center;
    }
}

/* 1920px – ultra-wide: stroje ve 60%, plně vycentrované v pravé polovině */
@media (min-width: 1920px) {
    .hero-bg-layer {
        background-size: auto 100%;
        background-position: 60% center;
        -webkit-mask-image: linear-gradient(90deg, transparent 16%, rgba(0,0,0,0.45) 40%, black 60%);
        mask-image:         linear-gradient(90deg, transparent 16%, rgba(0,0,0,0.45) 40%, black 60%);
    }
}

/* Main slider — single column, content anchored left */
.hero.hero-main-slider .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
}

.hero.hero-main-slider .hero-content {
    max-width: 56%;
}

/* Hide product-wrap — products live in background images */
.hero.hero-main-slider .hero-product-wrap {
    display: none !important;
}

/* Tablet */
@media (max-width: 1100px) {
    .hero.hero-main-slider .hero-content {
        max-width: 66%;
    }
}

/* Mobile — bg centered, mask removed (full scene visible) */
@media (max-width: 768px) {
    .hero-bg-layer {
        background-position: center center;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .hero.hero-main-slider .hero-content {
        max-width: 100%;
    }
}

/* Vertical ambient text on right edge */
.hero-vertical-text {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.18);
    white-space: nowrap;
    z-index: 4;
}

/* Slide indicator (decorative counter bottom-right) */
.hero-slide-indicator {
    position: absolute;
    right: 24px;
    bottom: 36px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hero-slide-num {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.05em;
}

.hero-slide-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, rgba(34, 104, 255, 0.6), transparent);
}

/* =========================================================
   HERO MAIN SLIDER — 3-SLIDE CATEGORY SLIDER (CZ HOMEPAGE)
   ========================================================= */

/* Slides wrapper — CSS grid stacking trick */
.hero-slides {
    display: grid;
    grid-template-areas: "stack";
    min-height: 620px;
    position: relative;
    z-index: 3;
}

.hero-slide {
    grid-area: stack;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(28px);
    /* delay visibility so fade-out completes before hiding */
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.55s;
    padding: 88px 0 52px;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    /* show immediately when activating */
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0s;
}

.hero-slide.is-leaving {
    opacity: 0;
    visibility: visible; /* stay visible during the fade-out */
    transform: translateX(-28px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}

/* Hero main slider — ensure h1 is bright white and readable */
.hero.hero-main-slider h1 {
    color: #ffffff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.hero.hero-main-slider p {
    color: rgba(215, 232, 255, 0.92);
}

/* Nav bar at bottom of hero */
.hero-nav {
    position: relative;
    z-index: 4;
    border-top: 1px solid rgba(34, 104, 255, 0.22);
    background: rgba(4, 9, 26, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Autoplay progress bar — thin line at top of nav */
.hero-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blue-primary), var(--cyan));
    box-shadow: 0 0 8px rgba(0, 216, 255, 0.5);
}

@keyframes heroProgressFill {
    from { width: 0%; }
    to   { width: 100%; }
}

.hero-progress-fill.is-running {
    animation: heroProgressFill 5s linear forwards;
}

.hero-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
}

/* Tabs */
.hero-tabs {
    display: flex;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.hero-tabs::-webkit-scrollbar { display: none; }

.hero-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(34, 104, 255, 0.14);
    color: rgba(176, 205, 245, 0.52);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.22s, background 0.22s;
}

.hero-tab::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: transparent;
    transition: background 0.22s;
}

.hero-tab.is-active {
    color: #ffffff;
    background: rgba(34, 104, 255, 0.1);
}

.hero-tab.is-active::after {
    background: linear-gradient(90deg, var(--blue-primary), var(--cyan));
}

.hero-tab:hover:not(.is-active) {
    color: var(--t1);
    background: rgba(34, 104, 255, 0.06);
}

.hero-tab:focus-visible {
    outline: 2px solid var(--blue-glow);
    outline-offset: -2px;
}

.hero-tab-num {
    font-family: 'Space Mono', monospace;
    font-size: 9.5px;
    font-weight: 700;
    color: var(--blue-glow);
    opacity: 0.65;
    letter-spacing: 0.12em;
}

.hero-tab.is-active .hero-tab-num { opacity: 1; }

/* Arrows + counter */
.hero-nav-arrows {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    border-left: 1px solid rgba(34, 104, 255, 0.14);
    flex-shrink: 0;
}

.hero-arrow-btn {
    width: 34px;
    height: 34px;
    background: rgba(34, 104, 255, 0.1);
    border: 1px solid rgba(34, 104, 255, 0.32);
    color: var(--t1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.hero-arrow-btn:hover {
    background: rgba(34, 104, 255, 0.28);
    border-color: var(--blue-glow);
    color: #ffffff;
}

.hero-arrow-btn:focus-visible {
    outline: 2px solid var(--blue-glow);
    outline-offset: 2px;
}

.hero-slide-count {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.32);
    letter-spacing: 0.1em;
    white-space: nowrap;
    padding: 0 4px;
}

.hero-count-cur { color: rgba(255, 255, 255, 0.88); }
.hero-count-sep { color: rgba(255, 255, 255, 0.2); }

/* Slide images — CO2 and Secotec use same glow filter as N2 */
.hero-product-wrap--co2 img,
.hero-product-wrap--secotec img {
    filter:
        drop-shadow(0 30px 60px rgba(0, 80, 255, 0.35))
        drop-shadow(0 0 80px rgba(0, 180, 255, 0.15));
}

/* Responsive — hero slider */
@media (max-width: 1024px) {
    .hero-slides { min-height: 500px; }
    .hero-tab { padding: 14px 16px; font-size: 0.78rem; }
}

@media (max-width: 900px) {
    .hero-slides { min-height: 440px; }
    .hero-tab-num { display: none; }
}

@media (max-width: 768px) {
    .hero-slides { min-height: unset; }

    .hero-slide { padding: 52px 0 36px; }

    .hero-slide .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-slide .hero-product-wrap {
        max-height: 280px;
        padding-bottom: 0;
        justify-content: center;
    }

    .hero-slide .hero-product-wrap img {
        max-height: 260px;
    }

    .hero-tab { padding: 12px 14px; font-size: 0.76rem; }
    .hero-tab-label { pointer-events: none; }
}

/* Mobile nav — number-only tabs, no overflow */
@media (max-width: 767px) {
    /* Skryj textové labely kategorií */
    .hero-tab-label {
        display: none;
    }

    /* Obnov čísla (900px breakpoint je skrývá — tady je vrátíme) */
    .hero-tab-num {
        display: inline !important;
        opacity: 1;
        font-size: 10px;
    }

    /* Kompaktní čtvercové taby — jen čísla */
    .hero-tab {
        flex: 0 0 auto;
        min-width: 44px;
        padding: 14px 14px;
        justify-content: center;
        gap: 0;
    }

    /* Šipky a counter zůstanou kompaktní */
    .hero-nav-arrows {
        padding: 0 10px;
        gap: 6px;
    }

    /* Skryj čítač XX/03 — šetří místo */
    .hero-slide-count {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-slide { padding: 40px 0 28px; }

    .hero-slide .hero-product-wrap { max-height: 200px; }

    .hero-slide .hero-product-wrap img { max-height: 185px; }
}

/* =========================================================
   PRODUCT TILES – WHITE 2-COLUMN REDESIGN
   ========================================================= */

/* Override dark background */
.product-tiles {
    background: #ffffff !important;
    border-top: none !important;
    border-bottom: 1px solid #e2eaf5 !important;
    padding: 68px 0 72px !important;
}

.tiles-layout {
    width: min(var(--container-width), calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 28%) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.tiles-left {
    padding-right: 40px;
    border-right: 1px solid #dce8f6;
}

.tiles-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #2268ff;
}

.tiles-eyebrow::before {
    content: "";
    width: 16px;
    height: 2px;
    background: #00b8ff;
    display: block;
    flex-shrink: 0;
}

.tiles-left h2 {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.025em;
    color: #0f172a;
    margin-bottom: 18px;
    margin-top: 0;
}

.tiles-more-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2268ff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.tiles-more-link:hover { text-decoration: underline; }

/* Override old .tiles-grid inside .product-tiles to white style */
.product-tiles .tiles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #dbe8fa;
    border: 1px solid #dbe8fa;
}

.tile-card {
    background: #ffffff;
    padding: 26px 20px 22px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.18s;
    position: relative;
    overflow: hidden;
}

.tile-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, #2268ff, #00d8ff);
    transition: width 0.3s;
}

.tile-card:hover { background: #f4f8ff; transform: none; }
.tile-card:hover::before { width: 100%; }

.tile-icon-box {
    width: 44px;
    height: 44px;
    background: #eef4ff;
    border: 1px solid #d8e6fb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tile-icon-box svg {
    width: 22px;
    height: 22px;
    stroke: #2268ff;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tile-card h3 {
    font-size: 0.93rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 0;
}

.tile-card-arr {
    font-size: 0.85rem;
    color: #2268ff;
    margin-top: auto;
    opacity: 0;
    transition: opacity 0.2s;
}

.tile-card:hover .tile-card-arr { opacity: 1; }

/* =========================================================
   DARK PRODUCTS SECTION
   ========================================================= */

.products-dark-section {
    background: #060f22;
    padding: 64px 0;
    border-top: 1px solid rgba(34, 104, 255, 0.25);
    border-bottom: 1px solid rgba(34, 104, 255, 0.25);
    position: relative;
    z-index: 1;
}

.products-dark-layout {
    width: min(var(--container-width), calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: center;
}

.products-dark-left .pd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blue-glow);
}

.products-dark-left .pd-eyebrow::before {
    content: "";
    width: 16px;
    height: 2px;
    background: var(--blue-glow);
    display: block;
    flex-shrink: 0;
}

.products-dark-left h2 {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--t0);
    margin-bottom: 18px;
    margin-top: 0;
    letter-spacing: -0.02em;
}

.products-dark-link {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--blue-glow);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.04em;
}

.products-dark-link:hover { text-decoration: underline; }

/* 4-product grid with blue dividers */
.products-dark-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(34, 104, 255, 0.22);
    border: 1px solid rgba(34, 104, 255, 0.22);
}

.pdc {
    background: #0a1628;
    padding: 20px 18px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background 0.18s;
    position: relative;
    overflow: hidden;
}

.pdc::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--blue-primary), var(--cyan));
    transition: width 0.3s;
}

.pdc:hover { background: #0e1e38; transform: none; }
.pdc:hover::before { width: 100%; }

.pdc__img {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    border: 1px solid rgba(20, 99, 255, 0.18);
}

.pdc__img img {
    max-height: 90px;
    max-width: 90%;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 30, 80, 0.15));
}

.pdc__name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--t0);
}

.pdc__specs {
    font-size: 0.8rem;
    color: rgba(176, 212, 252, 0.82);
    line-height: 1.65;
}

.pdc__arr {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-glow);
    margin-top: auto;
    opacity: 0.42;
    transition: opacity 0.2s;
}

.pdc:hover .pdc__arr { opacity: 1; }

/* =========================================================
   HOMEPAGE NEWS – 2-COLUMN LAYOUT
   ========================================================= */

.news-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 52px;
    align-items: start;
}

.news-left {
    padding-right: 32px;
    border-right: 1px solid var(--b-blue);
    position: sticky;
    top: 100px;
}

.news-left h2 {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--t0);
    margin-top: 0;
    margin-bottom: 12px;
}

.news-left p {
    color: var(--t2);
    font-size: 0.93rem;
    line-height: 1.72;
    margin: 0 0 24px;
}

/* =========================================================
   RESPONSIVE – NEW SECTIONS
   ========================================================= */

@media (max-width: 900px) {
    .tiles-layout {
        grid-template-columns: 1fr;
    }

    .tiles-left {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #dce8f6;
        padding-bottom: 28px;
    }

    .product-tiles .tiles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-dark-layout {
        grid-template-columns: 1fr;
    }

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

    .news-layout {
        grid-template-columns: 1fr;
    }

    .news-left {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--b-blue);
        padding-bottom: 28px;
        position: static;
    }
}

@media (max-width: 600px) {
    .product-tiles .tiles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-dark-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-vertical-text,
    .hero-slide-indicator { display: none; }
}
