@charset "UTF-8";

/* Reset basic styles & Smooth Scroll */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    /* Varsinainen taustakuva */
    background-image: url('taustakuva.jpg');
    background-attachment: fixed;
    background-position: center 50%;
    background-repeat: no-repeat;
    background-size: cover;
    
    color: #334155;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Kiinteä himmennyskerros (Overlay) - Korjattu ja varmistettu versio */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;       /* Lukitaan tarkasti selaimen ikkunan leveyteen */
    height: 100vh;      /* Lukitaan tarkasti selaimen ikkunan korkeuteen */
    background: linear-gradient(rgba(245, 248, 251, 0.90), rgba(245, 248, 251, 0.90));
    z-index: 0;         /* Nostetaan turvalliseen tasoon, joka pysyy taustan päällä */
    pointer-events: none;
}

/* Varmistetaan, että main-content ja muut osiot nousevat taustakerroksen päälle */
.site-header, .main-content, .site-footer {
    position: relative;
    z-index: 2;        /* Nostetaan z-index arvoon 2, jotta sisältö on aina overlayn päällä */
}

/* Header Styling */
.site-header {
    background-color: #1a252f;
    color: #fff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 40px 10%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    z-index: 10;
}

/* Center Logo Container */
.site-header .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

/* UUSI: Logon kuvan tyylit */
.logo-img {
    height: 60px;          /* Säätää logon korkeutta (muuta tarvittaessa) */
    width: auto;           /* Pitää kuvasuhteen oikeana */
    max-width: 100%;       /* Varmistaa, ettei logo hyppää ruudulta ulos */
    object-fit: contain;
}

/* Right Side Container */
.header-right {
    display: flex;
    align-items: center;
}

/* Language Selector Styling & Underline Animation */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.lang-btn {
    color: #bdc3c7;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-bottom: 2px;
    /* Muutettu: transition koskee nyt kaikkia muutoksia (myös transformia) pehmeällä ajoituksella */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lang-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #3498db;
    transform-origin: bottom right;
    transition: transform 0.30s ease-out;
}

.lang-btn:hover {
    color: #fff;
    /* Lisätty: Suurentaa tekstiä ja lippua pehmeästi 8% hiiren ollessa päällä */
    transform: scale(1.08);
}

.lang-btn:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.lang-btn.active {
    color: #3498db;
    font-weight: bold;
}

.lang-btn.active::after {
    transform: scaleX(1);
}

.lang-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
}

.lang-separator {
    color: #455a64;
    user-select: none;
}

/* Main Content Container Leveyssäätö */
.main-content {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
}

/* --- VISUAALISET ANIMAATIOT (LATAUS JA LEIJUNTA) --- */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slowFloat {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Alkutila rullattaessa ilmestyville elementeille (Pehmeämpi siirtymä) */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1), transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Kun elementti skrollataan näkyviin, tämä aktivoituu */
.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* HERO SECTION (Moderni Glassmorphism-ilme) */
.hero-section {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 30px 60px -15px rgba(15, 34, 58, 0.04), 0 10px 20px -10px rgba(0, 0, 0, 0.02);
}

/* Hero-osion latausanimaatiot viiveellä */
.hero-text-container h1 {
    font-size: 36px;
    color: #1e293b;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* --- LISÄTTY: Luokat yksittäisten kirjainten feidaamiseen alhaalta käsin --- */
.hero-text-container h1 span.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
    animation: charFadeIn 0.4s ease-out forwards;
}

.hero-text-container h1 span.space {
    display: inline-block;
    width: 0.25em;
}

@keyframes charFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* --------------------------------------------------------------------------- */

.main-intro {
    font-size: 18px;
    color: #64748b;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) 0.15s forwards;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s forwards, slowFloat 6s ease-in-out infinite 1.1s;
}

.profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 15px 35px -5px rgba(15, 34, 58, 0.15);
}

/* SERVICES SECTION */
.services-section {
    margin-bottom: 60px;
}

.services-section h2 {
    font-size: 34px;
    color: #1e293b;
    margin-bottom: 45px;
    text-align: center;
}

/* Grid-asettelu korteille */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Palvelukortti 3D-kallistuksella ja haalealla brändivarjolla */
.sub-service-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 40px -15px rgba(15, 34, 58, 0.03);
    border-top: 4px solid #3498db;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, opacity 0.8s ease-out;
}

.sub-service-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 50px -10px rgba(0, 80, 136, 0.12);
}

.service-icon-container {
    text-align: center;
    margin-bottom: 15px;
}

.service-icon {
    height: 65px;
    width: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Mikroanimaatio ikonille, kun kortille viedään hiiri */
.sub-service-item:hover .service-icon {
    transform: scale(1.12) rotate(4deg);
}

.sub-service-item h3 {
    font-size: 18px;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.sub-section-p {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    text-align: left;
}

/* GUARANTEE SECTION */
.guarantee-section {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 60px auto;
    max-width: 750px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 40px;
}

.guarantee-section h2 {
    font-size: 20px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.guarantee-p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    font-style: italic;
}

/* CONTACT SECTION */
.contact-section h2 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

/* Yhteystietokortti Glow-hohteella */
.contact-card {
    background: rgba(255, 255, 255, 0.95);
    max-width: 450px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 40px -15px rgba(15, 34, 58, 0.03);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 50px -10px rgba(52, 152, 219, 0.15);
}

.contact-company {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 15px;
}

.contact-details {
    display: inline-block;
    text-align: left;
}

.email-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.email-img {
    height: 20px;
    width: auto;
}

/* CONTACT LINKEDIN STYLING */
.linkedin-row {
    margin-top: 8px;
}

#contact-linkedin {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

#contact-linkedin::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #3498db;
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

#contact-linkedin:hover {
    color: #1a252f;
}

#contact-linkedin:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
    background-color: #1a252f;
}

/* Footer Styling */
.site-footer {
    background-color: #1a252f;
    color: #bdc3c7;
    text-align: center;
    padding: 25px;
    font-size: 14px;
    margin-top: auto;
    z-index: 10;
}

/* Y-tunnuksen tyyli alatunnisteessa */
.footer-y-tunnus {
    color: #94a3b8;
    margin-left: 5px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    body {
        background-image: none;
        background-color: #f8fafc;
    }
    body::before {
        display: none; /* Poistetaan overlay mobiilissa, koska kuvakin poistuu */
    }
    .site-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    .site-header .logo {
        position: static;
        transform: none;
        text-align: center;
    }
    .logo-img {
        height: 35px; /* Hieman pienempi logo mobiilissa, jotta säästetään tilaa */
    }
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding: 25px;
        gap: 20px;
    }
    .hero-text-container {
        text-align: center;
    }
    .hero-image-container {
        animation: fadeInUp 0.8s ease-out 0.3s forwards;
    }
    .profile-img {
        width: 150px;
        height: 150px;
    }
    .guarantee-section {
        padding: 40px 20px 0 20px;
    }
    .sub-service-item:hover {
        transform: translateY(-4px) scale(1.01);
    }
    .footer-y-tunnus {
        display: block;
        margin-top: 5px;
        margin-left: 0;
    }
}