/* ==========================================================================
   GPPH Design System — Mobile-First
   Domain: gpph-group.com
   ========================================================================== */

/* --- TOKENS --- */
:root {
    --font-base: 'Inter', sans-serif;

    /* Colors */
    --color-bg: #ffffff;
    --color-text-main: #0b132b;
    --color-text-muted: #4a5568;
    --color-btn-bg: #0b132b;
    --color-btn-text: #ffffff;
    --color-btn-outline: #e2e8f0;
    --color-surface: #f1f5f9;
    --color-divider: #dadada;
    --color-header-dark: #1a202c;
    --color-text-light: #ffffff;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-x: 50px;
    --space-xl: 80px;

    /* Layout */
    --container-width: 1600px;
    --radius: 2px;
}

/* --- RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- BASE TYPOGRAPHY (mobile sizes first) --- */
body {
    font-family: var(--font-base);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-md);
    color: var(--color-text-main);
    z-index: 2;
}

h1 {
    font-size: 2rem;
    line-height: 1;
}

h2 {
    font-size: 1.75rem;
    line-height: 1;
}

h3 {
    font-size: 1.25rem;
}

p {
    font-weight: 400;
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-sm) 0;
    z-index: 2;
}

/* --- UTILITY --- */
.text-small {
    font-size: 0.875rem;
}

.text-md {
    font-size: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

/* --- LAYOUT --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* --- Top Bar (hidden on mobile by default) --- */
.header-top {
    display: none;
    background-color: var(--color-header-dark);
    color: var(--color-text-light);
    font-size: 0.875rem;
    padding: var(--space-sm) 0;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact {
    display: flex;
    gap: var(--space-md);
}

.header-contact a {
    color: var(--color-text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-tools {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.search-form {
    display: flex;
}

.search-input {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
    font-family: var(--font-base);
    font-size: 0.875rem;
}

.search-btn {
    background-color: #2d3748;
    color: var(--color-text-light);
    border: none;
    padding: 6px 12px;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
}

.tool-link {
    color: var(--color-text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.cart-icon-wrapper {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

/* --- Main Nav Bar --- */
.header-main {
    background-color: var(--color-bg);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-btn-outline);
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* --- Mobile Nav Toggle (visible by default) --- */
.nav-toggle {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-text-main);
}

/* --- Mobile Nav Menu (off-screen by default) --- */
.nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background-color: var(--color-bg);
    width: 100%;
    list-style: none;
    text-align: center;
    padding: var(--space-lg) 0;
    transition: left 0.3s ease;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-menu.active {
    left: 0;
}

.nav-menu .btn {
    margin-top: var(--space-md);
}

.nav-link {
    color: var(--color-text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
}

.nav-link:hover {
    color: var(--color-text-muted);
}


/* ==========================================================================
   SECTION — Base
   ========================================================================== */
.section {
    padding: var(--space-lg) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-family: var(--font-base);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background-color: var(--color-btn-bg);
    color: var(--color-btn-text);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-text-main);
    border-color: var(--color-btn-outline);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    max-width: 300px;
    margin: var(--space-md) auto var(--space-sm);
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    max-width: 200px;
    margin: 0 auto var(--space-md);
}


/* ==========================================================================
   VIDEO WRAPPERS
   ========================================================================== */
.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    margin: var(--space-lg) auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-md {
    max-width: 800px;
}

.video-lg {
    max-width: 1200px;
}

.video-full {
    max-width: 100%;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ==========================================================================
   GRID SYSTEM — Mobile-First (1 column base)
   ========================================================================== */
.grid {
    display: grid;
    gap: var(--space-lg);
    width: 100%;
    margin-top: var(--space-lg);
    grid-template-columns: 1fr;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-item b {
    font-weight: 800;
}

.grid-item-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--color-surface);
    border-radius: var(--radius);
    object-fit: contain;
    margin-bottom: var(--space-md);
}

.price-label {
    font-size: 0.875rem;
    margin-top: var(--space-sm);
}


/* ==========================================================================
   DIVIDER
   ========================================================================== */
.section-divider {
    width: 50%;
    background-color: var(--color-divider);
    height: 2px;
    border: none;
    margin: 15px auto;
    margin-bottom: var(--space-xl);
}


/* ==========================================================================
   SECTION — Hero
   ========================================================================== */
.section-hero {
    min-height: 80vh;
    justify-content: center;
}

.section-hero .video-wrapper {
    margin-top: -3vh;
}


/* ==========================================================================
   SECTION — Showcase (scroll-reveal video + labels)
   ========================================================================== */
.section-showcase {
    min-height: auto;
    padding-bottom: var(--space-xl);
}

.section-showcase .video-wrapper {
    margin-bottom: 0;
    margin-top: 0;
}

.section-showcase .showcase-description {
    max-width: 90%;
    padding-top: var(--space-lg);
    margin: 0 auto;
}

.section-showcase .showcase-description strong {
    font-weight: 400;
}


/* ==========================================================================
   SECTION — Split (text + media side-by-side)
   Reusable: add .section-split--reverse to swap sides
   ========================================================================== */
.section-split {
    position: relative;
    overflow: hidden;
    padding: var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: auto;
}

.section-split__content {
    max-width: 100%;
    margin: 0;
    z-index: 3;
}

.section-split__content h2,
.section-split__content p {
    text-align: left;
}

.section-split .btn-group {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: 0;
}

.section-split__media {
    position: relative;
    width: 100%;
    margin-top: var(--space-lg);
    z-index: 2;
}

.section-split__media img {
    width: 100%;
    height: auto;
    display: block;
}


/* ==========================================================================
   SECTION — Blob Background (decorative)
   ========================================================================== */
.blob-bg {
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg);
    z-index: 1;
    background-image: url("https://gpph-group.com/wp-content/uploads/2023/09/zastosowanie_sog-e1742209282635.png");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 55%;
}

.blob-bg::before,
.blob-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: -1;
}

.blob-bg::before {
    top: 25%;
    left: 15%;
    transform: translate(-50%, -50%);
    width: 75vw;
    max-width: 900px;
    height: 600px;
    background:
        radial-gradient(circle at 20% 70%, rgba(0, 160, 227, 0.15) 0%, transparent 75%),
        radial-gradient(circle at 80% 50%, rgba(76, 189, 180, 0.15) 0%, transparent 50%);
    filter: blur(60px);
}

.blob-bg::after {
    bottom: 45%;
    right: 15%;
    transform: translate(50%, 50%);
    width: 45vw;
    max-width: 600px;
    height: 600px;
    background:
        radial-gradient(circle at 20% 70%, rgba(0, 160, 227, 0.25) 0%, transparent 75%),
        radial-gradient(circle at 80% 50%, rgba(76, 189, 180, 0.25) 0%, transparent 50%);
    filter: blur(60px);
}

.blob-bg__blur-img {
    filter: blur(80px);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(50%, 50%);
    z-index: 2;
}


/* ==========================================================================
   SECTION — Product Grid (product series cards)
   ========================================================================== */
.section-product-grid {
    padding: var(--space-x) 0;
}

.section-product-grid .grid-videos .video-wrapper {
    aspect-ratio: 3 / 4;
    height: auto;
    max-height: 350px;
}


/* ==========================================================================
   SECTION — Feature Cards
   ========================================================================== */
.section-feature-cards {
    padding: var(--space-x) 0;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.card .video-wrapper {
    margin: 0 0 var(--space-md) 0;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

.card h4,
.card p {
    text-align: left;
    margin-bottom: var(--space-sm);
}


/* ==========================================================================
   TEXT CONTENT WRAPPER
   ========================================================================== */
.text-content-wrapper {
    max-width: 100%;
    margin: 0;
}


/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

/* Scroll-reveal entrance */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Fade in from top */
.fade-in-down {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--delay, 0s);
}

/* Fade in from bottom */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: var(--delay, 0s);
}

.fade-in-down.is-visible,
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hidden labels (showcase section) */
.hidden-labels {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hidden-labels.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delayed entrance within visible parent */
.delay-500 {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s;
}

.is-visible .delay-500 {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   TABLET — min-width: 768px
   ========================================================================== */
@media (min-width: 768px) {

    /* Typography scales up */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .text-md {
        font-size: 1.5rem;
    }

    /* Container gets more breathing room */
    .container {
        padding: 0 var(--space-lg);
    }

    /* Sections */
    .section {
        padding: var(--space-x) 0;
    }

    /* Header: show top bar */
    .header-top {
        display: block;
    }

    .logo {
        font-size: 1.75rem;
    }

    /* Button group goes horizontal */
    .btn-group {
        flex-direction: row;
        gap: var(--space-md);
        max-width: none;
        justify-content: center;
    }

    /* Grids go 2-col */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Split section → side by side */
    .section-split {
        flex-direction: row;
        align-items: center;
        padding: var(--space-x) var(--space-lg);
        min-height: 60vh;
    }

    .section-split__content {
        flex: 1 1 50%;
        max-width: 550px;
    }

    .section-split__media {
        flex: 1 1 50%;
        margin-top: 0;
    }

    .section-split--reverse {
        flex-direction: row-reverse;
    }

    /* Text content wrapper */
    .text-content-wrapper {
        max-width: 600px;
    }

    /* Showcase description */
    .section-showcase .showcase-description {
        max-width: 75%;
    }

    /* Product grid video heights */
    .section-product-grid .grid-videos .video-wrapper {
        max-height: 400px;
    }
}


/* ==========================================================================
   DESKTOP — min-width: 1024px
   ========================================================================== */
@media (min-width: 1024px) {

    /* Typography scales up again */
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    /* Header: hide burger, show inline nav */
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        display: flex;
        flex-direction: row;
        gap: var(--space-lg);
        align-items: center;
        width: auto;
        padding: 0;
        box-shadow: none;
    }

    .nav-link {
        justify-content: flex-start;
        padding: 0;
    }

    /* Hero */
    .section-hero {
        min-height: 90vh;
    }

    .section-hero .video-wrapper {
        margin-top: -10vh;
    }

    /* Showcase */
    .section-showcase .video-wrapper {
        margin-bottom: -200px;
        margin-top: -100px;
    }

    /* Grids go full columns */
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-5 {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Split section gets more height */
    .section-split {
        min-height: 75vh;
        padding: var(--space-x);
    }

    .section-split__content {
        max-width: 600px;
    }
}


/* ==========================================================================
   LARGE DESKTOP — min-width: 1440px
   ========================================================================== */
@media (min-width: 1440px) {
    .section-showcase .video-wrapper {
        margin-bottom: -300px;
        margin-top: -200px;
    }
}