/* ============================================================
   VALENTOR GROUP OY – Styles
   Blue-white theme with wave decorations, matching design mockup
   ============================================================ */

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --navy:       #091d3e;
    --blue-dark:  #0c2d5a;
    --blue:       #0f3d7a;
    --blue-mid:   #1a5296;
    --blue-light: #2b6cb0;
    --blue-accent:#3b82f6;
    --blue-pale:  #e0ecfa;
    --white:      #ffffff;
    --off-white:  #f4f7fb;
    --gray-100:   #e2e8f0;
    --gray-200:   #cbd5e1;
    --gray-500:   #64748b;
    --gray-700:   #334155;
    --gold:       #fbbf24;
    --gold-dark:  #d4991a;
    --radius:     12px;
    --radius-sm:  8px;
    --shadow:     0 4px 24px rgba(9, 29, 62, 0.10);
    --shadow-lg:  0 12px 48px rgba(9, 29, 62, 0.16);
    --transition: 0.35s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    line-height: 1.65;
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* === TYPOGRAPHY === */
.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 52px;
    color: var(--navy);
    letter-spacing: -0.02em;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-accent), var(--blue-mid));
    border-radius: 2px;
    margin: 16px auto 0;
}

.section-title--light { color: var(--white); }
.section-title--light::after { background: linear-gradient(90deg, var(--gold), var(--gold-dark)); }
.section-title--left { text-align: left; }
.section-title--left::after { margin-left: 0; }

/* === BUTTON === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 38px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.btn-cta {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    font-size: 1.05rem;
    padding: 17px 44px;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.35);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(251, 191, 36, 0.45);
}

.btn-submit {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
    color: var(--white);
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    box-shadow: 0 4px 16px rgba(15, 61, 122, 0.25);
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(15, 61, 122, 0.35);
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 0;
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background: rgba(9, 29, 62, 0.96);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    flex-direction: column;
    color: var(--white);
    line-height: 1.15;
}

.logo-main {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.logo-sub {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 1px;
}

.nav { display: flex; align-items: center; gap: 36px; }

.nav a {
    color: var(--white);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    position: relative;
    padding-bottom: 4px;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
    border-radius: 1px;
}

.nav a:hover::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 101;
}

.nav-toggle span {
    width: 28px; height: 2.5px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* === LANGUAGE SWITCH === */
.lang-switch {
    display: flex;
    gap: 4px;
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 3px;
}

.lang-switch button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 34px;
}

.lang-switch button:hover { color: var(--white); }

.lang-switch button.active {
    background: var(--gold);
    color: var(--navy);
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 130px 0 100px;
    overflow: hidden;
    background: var(--navy);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Gradient from left (solid blue) to right (transparent, showing image) */
    background:
        linear-gradient(to right,
            var(--navy) 0%,
            var(--navy) 25%,
            rgba(9, 29, 62, 0.85) 45%,
            rgba(9, 29, 62, 0.5) 65%,
            rgba(9, 29, 62, 0.25) 80%,
            rgba(9, 29, 62, 0.15) 100%
        ),
        linear-gradient(to bottom,
            rgba(9, 29, 62, 0.3) 0%,
            transparent 30%,
            transparent 70%,
            rgba(9, 29, 62, 0.6) 100%
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
    color: var(--white);
    margin-left: 40px;
}

.hero-content h1 {
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-checklist {
    list-style: none;
    margin-bottom: 36px;
}

.hero-checklist li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 14px;
}

.check-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 5px;
    flex-shrink: 0;
}

.hero-actions { margin-bottom: 24px; }

.hero-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.hero-phone a {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(251,191,36,0.4);
    text-underline-offset: 3px;
}

.hero-phone a:hover { text-decoration-color: var(--gold); }



.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    z-index: 2;
    line-height: 0;
}

.hero-wave svg { width: 100%; height: 80px; }

/* === MITÄ OSTAMME === */
.section-buy {
    padding: 80px 0 70px;
    background: var(--white);
}

.buy-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 720px;
    margin: 0 auto;
}

.buy-row-2 {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 24px;
}

.buy-item--large {
    padding: 36px 20px 30px;
}

.buy-item--large .buy-img-wrap { height: 160px; }
.buy-item--large .buy-img-wrap img { max-height: 150px; }
.buy-item--large span { font-size: 1rem; }

.buy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 28px 16px 24px;
    background: var(--off-white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(24px);
}

.buy-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

.buy-item:nth-child(2).revealed { transition-delay: 0.08s; }
.buy-item:nth-child(3).revealed { transition-delay: 0.16s; }
.buy-item:nth-child(4).revealed { transition-delay: 0.24s; }
.buy-item:nth-child(5).revealed { transition-delay: 0.32s; }
.buy-item:nth-child(6).revealed { transition-delay: 0.40s; }

.buy-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: var(--blue-accent);
    background: var(--white);
}

.buy-img-wrap {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.buy-img-wrap img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    /* Remove dark backgrounds from AI-generated images */
    mix-blend-mode: multiply;
    filter: contrast(1.05);
}

.buy-item span {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.35;
}

/* === NÄIN TOIMII === */
.section-steps {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(160deg, var(--navy) 0%, var(--blue-dark) 40%, var(--blue) 100%);
    overflow: hidden;
}

.section-steps::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            125deg,
            transparent,
            transparent 120px,
            rgba(255,255,255,0.015) 120px,
            rgba(255,255,255,0.015) 122px
        );
}

.steps-wave-top,
.steps-wave-bottom {
    position: absolute;
    left: 0; right: 0;
    z-index: 1;
    line-height: 0;
}

.steps-wave-top { top: -1px; }
.steps-wave-bottom { bottom: -1px; }
.steps-wave-top svg, .steps-wave-bottom svg { width: 100%; height: 80px; }

.steps-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 2;
}

.step-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 36px 24px 28px;
    text-align: center;
    color: var(--white);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(24px);
}

.step-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.step-card:nth-child(2).revealed { transition-delay: 0.1s; }
.step-card:nth-child(3).revealed { transition-delay: 0.2s; }
.step-card:nth-child(4).revealed { transition-delay: 0.3s; }

.step-card:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.step-badge {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.step-divider {
    width: 36px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    margin: 0 auto 14px;
}

.step-details {
    list-style: none;
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0.9;
}

.step-details li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

/* === YHTEYSTIEDOT === */
.section-contact {
    padding: 90px 0;
    background: var(--off-white);
    position: relative;
}

.section-contact::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--blue-accent), var(--blue));
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 48px;
    align-items: start;
}

.contact-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: var(--transition);
}

.contact-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.contact-row:last-child { margin-bottom: 0; }

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    background: var(--blue-pale);
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-row strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.contact-row p {
    font-size: 0.95rem;
    color: var(--gray-500);
}

.contact-row a {
    color: var(--blue);
    font-weight: 600;
}

.contact-row a:hover { text-decoration: underline; }

.contact-right {
    opacity: 0;
    transform: translateX(24px);
    transition: var(--transition);
}

.contact-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--blue), var(--blue-accent));
}

.form-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form input,
.form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    background: var(--off-white);
    color: var(--gray-700);
}

.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    background: var(--white);
}

.form input::placeholder,
.form textarea::placeholder {
    color: var(--gray-200);
    font-weight: 500;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border: 2px dashed var(--gray-100);
    border-radius: var(--radius-sm);
    background: var(--off-white);
    color: var(--gray-300);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.file-label:hover {
    border-color: var(--blue-accent);
    color: var(--blue);
    background: var(--white);
}

.file-label svg {
    flex-shrink: 0;
    color: var(--blue);
}

.file-status {
    margin: 0;
    font-size: 0.85rem;
    color: var(--blue);
    font-weight: 600;
    min-height: 1.1em;
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* === FOOTER === */
.footer {
    background: var(--navy);
    color: var(--white);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--blue-accent), var(--gold));
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 28px 32px;
}

.footer-tagline {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.footer-social {
    display: flex;
    gap: 14px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.15);
}

.social-btn:hover {
    background: var(--blue-accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding: 18px 0;
    font-size: 0.82rem;
    opacity: 0.6;
}

/* === SCROLL TO TOP === */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(9, 29, 62, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: var(--transition);
    z-index: 90;
    border: 2px solid rgba(255,255,255,0.15);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--navy);
    transform: translateY(-3px);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .buy-row { gap: 20px; }
    .buy-item { width: 150px; padding: 22px 12px 20px; }
    .steps-row { grid-template-columns: repeat(2, 1fr); }
    .contact-layout { gap: 32px; }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0; right: -100%;
        width: 300px; height: 100vh;
        background: var(--navy);
        flex-direction: column;
        justify-content: center;
        gap: 28px;
        transition: right 0.35s ease;
        box-shadow: -8px 0 40px rgba(0,0,0,0.4);
        z-index: 100;
    }

    .nav.open { right: 0; }
    .nav a { font-size: 1.15rem; }
    .nav-toggle { display: flex; }

    .lang-switch { margin-left: auto; margin-right: 12px; }
    .lang-switch button { padding: 4px 8px; font-size: 0.72rem; min-width: 30px; }

    .hero {
        padding: 110px 0 90px;
        min-height: auto;
    }

    .hero { min-height: 500px; padding: 110px 0 80px; }
    .hero-bg-image { background-position: center; }
    .hero-overlay {
        background:
            linear-gradient(to bottom,
                var(--navy) 0%,
                rgba(9, 29, 62, 0.8) 30%,
                rgba(9, 29, 62, 0.6) 60%,
                var(--navy) 100%
            );
    }
    .hero-content h1 { font-size: 1.6rem; }

    .buy-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    .buy-row-2 { grid-template-columns: repeat(2, 1fr); margin-top: 12px; }
    .buy-item {
        width: auto;
        min-width: 0;
        padding: 18px 8px 16px;
    }
    .buy-img-wrap { height: 100px; }
    .buy-img-wrap img { max-height: 90px; }
    .buy-item span { font-size: 0.78rem; }
    .buy-item--large { padding: 24px 12px 20px; }
    .buy-item--large .buy-img-wrap { height: 130px; }
    .buy-item--large .buy-img-wrap img { max-height: 120px; }
    .buy-item--large span { font-size: 0.92rem; }

    .logo-main { font-size: 1.05rem; }
    .logo-sub { font-size: 0.6rem; }
    .header-inner { gap: 8px; }
    .logo { min-width: 0; flex-shrink: 1; }

    .steps-row { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    .contact-layout { grid-template-columns: 1fr; }
    .section-title--left { text-align: center; }
    .section-title--left::after { margin: 16px auto 0; }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .buy-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .buy-row-2 { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
    .buy-item { padding: 14px 4px 12px; }
    .buy-img-wrap { height: 80px; }
    .buy-img-wrap img { max-height: 72px; }
    .buy-item span { font-size: 0.7rem; }
    .steps-row { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 1.3rem; }
    .form-card { padding: 24px 20px; }
    .step-card { padding: 28px 18px 22px; }

    .logo-main { font-size: 0.92rem; }
    .logo-sub { font-size: 0.55rem; }
    .lang-switch { padding: 2px; margin-left: auto; margin-right: 8px; gap: 2px; }
    .lang-switch button { padding: 3px 6px; font-size: 0.65rem; min-width: 24px; }
    .nav-toggle span { width: 22px; }
}

/* === SCROLL REVEAL INIT STATE === */
.buy-item,
.step-card,
.contact-left,
.contact-right {
    transition: opacity 0.6s var(--transition), transform 0.6s var(--transition);
}
