/* CSS Custom Properties */
:root {
    --color-primary: #F00;
    --color-black: #000;
    --color-white: #fff;
    --color-white-transparent: rgba(255, 255, 255, 0.8);
    --nav-height: 34px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Background Images */
.bg-img {
    position: absolute;
    top: -200px;
    left: -200px;
    width: 100%;
    height: 100%;
    padding: 200px;
    box-sizing: content-box;
    background-size: cover;
    background-position: center center;
    background-color: var(--color-black);
}

.bg-img-1 { background-image: url(../img/1.jpg); }
.bg-img-2 { background-image: url(../img/2.jpg); }
.bg-img-3 { background-image: url(../img/3.jpg); }
.bg-img-4 { background-image: url(../img/case.jpg); }
.bg-img-5 { background-image: url(../img/5.jpg); }

/* Scroll Container */
.st-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.st-container::-webkit-scrollbar {
    display: none;
}

.st-container > input {
    display: none;
}

/* Navigation */
.st-container > a {
    position: fixed;
    bottom: 0;
    width: 20%;
    height: var(--nav-height);
    line-height: var(--nav-height);
    font-size: 20px;
    font-weight: 700;
    background: var(--color-black);
    color: var(--color-white);
    text-align: center;
    text-shadow: 1px 1px 1px rgba(151, 24, 64, 0.2);
    text-decoration: none;
    cursor: pointer;
    z-index: 1000;
    transition: background 0.3s ease;
}

.st-container:before {
    content: '';
    position: fixed;
    bottom: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--color-black);
    z-index: 999;
}

.st-container > a:nth-of-type(1) { left: 0; }
.st-container > a:nth-of-type(2) { left: 20%; }
.st-container > a:nth-of-type(3) { left: 40%; }
.st-container > a:nth-of-type(4) { left: 60%; }
.st-container > a:nth-of-type(5) { left: 80%; }

.st-container > a:hover,
.st-container > a.active {
    background: var(--color-primary);
}

.st-container > a.active:after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -20px;
    border: 20px solid transparent;
    border-bottom-color: var(--color-primary);
    pointer-events: none;
}

/* Panels */
.st-panel {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    background: var(--color-white);
    overflow: hidden;
    padding-bottom: var(--nav-height);
    scroll-snap-align: start;
}

.st-color {
    background: var(--color-black);
}

/* Typography */
.st-panel h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 1200px;
    transform: translate(-50%, -50%);
    margin-top: -250px;
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    color: #e01e1e;
    letter-spacing: 1px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.6s ease-in-out;
}

.st-panel h2 img {
    max-width: 70%;
    height: auto;
    text-transform: none;
    letter-spacing: 0;
}

.st-panel p {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1000px;
    margin-top: 50px;
    font-size: clamp(20px, 2.5vw, 32px);
    line-height: 1.6;
    color: var(--color-white);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
    animation: fadeIn 0.6s ease-in-out;
}

.st-color h2 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.st-color p {
    color: rgba(255, 255, 255, 0.95);
}

.services-text {
    text-align: center;
}

.services-img {
    width: 90%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 30px auto 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Home Section */
#st-panel-1 h2 {
    top: 50%;
    margin-top: 0;
    transform: translate(-50%, -50%);
}

/* About Section */
#st-panel-2 h2 {
    margin-top: -280px;
    font-size: clamp(48px, 7vw, 80px);
}

/* Clients Section */
#st-panel-3 h2 {
    top: 50%;
    margin-top: -350px;
    font-size: clamp(48px, 7vw, 80px);
}

.clients-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 60px;
    width: 85%;
    max-width: 1100px;
    max-height: calc(100vh - 300px);
    padding: 40px 30px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
}

.clients-wrapper::-webkit-scrollbar {
    width: 8px;
}

.clients-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.clients-wrapper::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

.clients-wrapper::-webkit-scrollbar-thumb:hover {
    background: #c00;
}

.clients-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    width: 100%;
}

.clients-column {
    flex: 1;
    max-width: 48%;
}

.clients-list {
    font-size: clamp(18px, 2.2vw, 26px);
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    list-style: none;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.clients-list li {
    padding: 8px 0;
    transition: color 0.3s ease, transform 0.2s ease;
}

.clients-list li:hover {
    color: var(--color-white);
    transform: translateX(5px);
}

/* Gear Section */
.gear-container {
    position: absolute;
    top: 145px;
    bottom: var(--nav-height);
    width: 100%;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
}

#filter {
    display: block;
    position: relative;
    top: 20px;
    height: 101px;
    margin: 25px auto;
    background: url("../img/bar.jpg") repeat-x;
    font-family: 'Permanent Marker', cursive;
    text-align: center;
}

#filter a {
    display: inline-block;
    margin-top: 10px;
    padding: 0 40px;
    height: 39px;
    line-height: 37px;
    font-size: 30px;
    color: var(--color-black);
    background: url("../img/tape.png") no-repeat;
    background-size: 100% 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#filter a:hover {
    text-decoration: none;
    transform: scale(1.05);
}

#filter a.active {
    opacity: 0.8;
}

.gear-grid,
#container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    list-style: none;
}

.gear-grid li,
#container li {
    width: 180px;
    margin: 8px;
    opacity: 0;
    list-style: none;
    transition: opacity 0.3s ease;
}

.gear-grid li:not(.hidden),
#container li:not(.hidden) {
    opacity: 1;
}

.gear-grid img,
#container img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gear-grid img:hover,
#container img:hover {
    transform: scale(1.05);
}

#container ul {
    overflow: visible;
}

#container ul.hidden {
    display: none;
}

/* Contact Section */
#st-panel-5 h2 {
    top: 18%;
    margin-top: 0;
    font-size: clamp(48px, 7vw, 80px);
}

#st-panel-5 .contact-info {
    position: absolute;
    top: 54%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 520px;
    padding: 20px 24px;
    text-align: center;
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

#st-panel-5 .contact-info p {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    margin: 10px 0;
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.6;
    text-align: center;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

#st-panel-5 .contact-name {
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 4px;
    text-align: left !important;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

#st-panel-5 .contact-name::after {
    content: '';
    display: block;
    width: 72px;
    height: 3px;
    background: var(--color-primary);
    margin: 10px 0 6px 0;
}

#st-panel-5 .contact-info p + p {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 12px;
    margin-top: 12px;
}

#st-panel-5 .contact-info a {
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

#st-panel-5 .contact-info a:hover {
    color: var(--color-primary);
}

/* Reset action link pills (plain links) */
#st-panel-5 .contact-info a[href^="tel:"],
#st-panel-5 .contact-info a[href^="mailto:"] {
    display: inline;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Responsive - mobile & portrait adjustments */
@media screen and (max-width: 900px) {
    .st-container > a { font-size: 14px; }
    .st-container > a.active:after { border-width: 14px; margin-left: -14px; }

    .st-panel h2 { font-size: clamp(28px, 8vw, 42px); margin-top: -200px; }
    .st-panel p { width: 88%; max-width: none; font-size: clamp(16px, 4vw, 22px); margin-top: 24px; }

    /* Clients */
    #st-panel-3 h2 { 
        top: 60px;
        margin-top: 0;
        font-size: clamp(26px, 7vw, 36px);
    }
    .clients-wrapper { 
        top: 45%;
        width: 92%;
        padding: 16px;
        max-height: 70%;
    }
    .clients-container { flex-direction: column; gap: 8px; }
    .clients-column { max-width: 100%; }
    .clients-list { font-size: 18px; }

    /* Gear */
    #filter { 
        position: relative;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        height: auto;
        min-height: 64px;
        width: 100%;
        margin: 12px auto;
        padding: 0;
        top: 8px;
        z-index: 3;
        box-sizing: border-box;
    }
    #filter a { 
        font-size: 16px;
        padding: 0 14px;
        margin: 0;
        display: inline-block;
        height: 34px;
        line-height: 32px;
        flex: 0 0 auto;
    }
    .gear-container { top: 140px; padding: 8px; }
    .gear-grid li, #container li { flex: 0 0 calc(33.333% - 12px); width: calc(33.333% - 12px); margin: 6px; }

    /* Contact */
    #st-panel-5 .contact-info { max-width: 92%; padding: 16px 18px; top: 56%; }
    #st-panel-5 .contact-info p { font-size: clamp(16px, 3.5vw, 22px); margin: 8px 0; }
}

@media screen and (max-width: 520px) {
    .st-container > a { font-size: 12px; }
    .st-panel h2 { font-size: clamp(24px, 9vw, 36px); margin-top: -180px; }
    #filter { 
        padding: 10px 6px;
        gap: 5px;
    }
    #filter a { 
        font-size: 14px;
        padding: 0 12px;
        height: 32px;
        line-height: 30px;
    }
    .gear-container { top: 140px; }
    .gear-grid li, #container li { flex: 0 0 calc(50% - 10px); width: calc(50% - 10px); margin: 5px; }
}

/* Print */
@media print {
    .st-container > a,
    .st-container:before {
        display: none;
    }
}
