/* --- PERUSASETUKSET --- */
:root {
    --bg-light: #fcfcfc;
    --bg-card: #ffffff;
    --text-main: #1a1a24;
    --text-muted: #6b7280;
    --primary-gradient: linear-gradient(135deg, #0052D4 0%, #4364F7 50%, #6FB1FC 100%);
    --hover-gradient: linear-gradient(135deg, #4364F7 0%, #0052D4 100%);
    --glow-color: rgba(67, 100, 247, 0.25);
    --font-family: 'Poppins', sans-serif;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* --- TUMMA TEEMA --- */
:root.dark-theme {
    --bg-light: #121212;
    --bg-card: #1e1e24;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
}

.dark-theme .navbar {
    background: rgba(18, 18, 18, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
@media (max-width: 768px) {
    .dark-theme .nav-links {
        background: rgba(18, 18, 18, 0.98);
    }
}
.dark-theme .logo-img-n {
    mix-blend-mode: normal;
    background-color: #000;
}
.dark-theme .services, 
.dark-theme .pricing, 
.dark-theme .contact,
.dark-theme .sub-hero {
    background-color: #16161c;
}
.theme-toggle {
    background: rgba(128, 128, 128, 0.1);
    border: 1px solid rgba(128, 128, 128, 0.3);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: var(--transition);
}
.theme-toggle:hover {
    background: rgba(128, 128, 128, 0.2);
    transform: scale(1.05);
}
.dark-theme .theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.dark-theme .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}


* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; color: var(--text-main); background-color: var(--bg-light); font-family: var(--font-family); }
body { line-height: 1.6; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* --- YLEISET ELEMENTIT --- */
.section-title { font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 1rem; letter-spacing: -1px; color: var(--text-main); }
.gradient-text { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline; }

/* --- NAPIT --- */
.btn-primary, .btn-secondary, .btn-small { display: inline-block; padding: 12px 30px; border-radius: 50px; font-weight: 600; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; position: relative; overflow: hidden; z-index: 1; text-align: center; }
.btn-primary { background: var(--primary-gradient); color: #ffffff; box-shadow: 0 4px 15px var(--glow-color); border: none; cursor: pointer; }
.btn-primary::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--hover-gradient); z-index: -1; opacity: 0; transition: var(--transition); }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px var(--glow-color); color: #ffffff; }
.btn-secondary { background: transparent; border: 2px solid #4364F7; color: #4364F7; }
.btn-secondary:hover { background: rgba(67, 100, 247, 0.05); transform: translateY(-3px); }
.btn-small { padding: 8px 20px; font-size: 0.8rem; background: var(--primary-gradient); color: #ffffff; }
.btn-small:hover { transform: scale(1.05); }

/* --- NAVBAR JA KUVALLINEN LOGO (LOGO.jpg) --- */
.navbar { position: fixed; top: 0; width: 100%; background: rgba(252, 252, 252, 0.85); backdrop-filter: blur(12px); z-index: 1000; padding: 15px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; z-index: 1001; }
.logo-img-n { height: 40px; width: auto; display: block; mix-blend-mode: multiply; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.logo:hover .logo-img-n { transform: scale(1.1) rotate(-5deg); }
.logo-text-container { font-size: 1.6rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; }
.cursor { font-weight: 300; color: #4364F7; margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a:not(.btn-small) { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.nav-links a:not(.btn-small):hover { color: #4364F7; }
.menu-toggle { display: none; cursor: pointer; z-index: 1001; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--text-main); transition: 0.4s; border-radius: 2px; }

/* --- HERO & SUB-HERO --- */
.hero { height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding-top: 80px; overflow: hidden; }
.sub-hero { height: 50vh; height: 50dvh; min-height: 400px; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding-top: 80px; overflow: hidden; background-color: rgba(67, 100, 247, 0.03); border-bottom: 1px solid rgba(0,0,0,0.05); }
.hero-bg-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.shape { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; animation: float 8s infinite alternate ease-in-out; }
.shape-1 { width: 400px; height: 400px; background: #6FB1FC; top: 10%; left: -10%; }
.shape-2 { width: 500px; height: 500px; background: #4364F7; bottom: -10%; right: -10%; animation-delay: -4s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(40px, -40px) scale(1.1); } }
.hero-title { font-size: 4.2rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -2px; }
.sub-hero-title { font-size: 3.5rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -1px; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 2.5rem auto; }
.hero-btns { display: flex; gap: 20px; justify-content: center; }

/* --- SERVICES & PORTFOLIO --- */
.services { padding: 100px 0; background-color: rgba(255, 255, 255, 0.5); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 50px; }
.service-card { background: var(--bg-card); padding: 40px; border-radius: var(--border-radius); border: 1px solid rgba(0, 0, 0, 0.05); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); transition: var(--transition); position: relative; overflow: hidden; z-index: 1; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px var(--glow-color); border-color: rgba(67, 100, 247, 0.1); }
.service-card::after { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 4px; background: var(--primary-gradient); transition: width 0.4s ease; z-index: 2; }
.service-card:hover::after { width: 100%; }
.service-card .icon { font-size: 3rem; margin-bottom: 20px; display: inline-block; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.service-card:hover .icon { transform: scale(1.2) rotate(10deg); }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; font-weight: 700; color: var(--text-main); }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; margin-top: 50px; }
.portfolio-card { background: var(--bg-card); border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); transition: var(--transition); border: 1px solid rgba(0, 0, 0, 0.05); }
.portfolio-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px var(--glow-color); }
.portfolio-img { width: 100%; height: 220px; background: #e5e7eb; display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--text-muted); position: relative; overflow: hidden; }
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.portfolio-card:hover .portfolio-img img { transform: scale(1.05); }
.portfolio-info { padding: 30px; }
.portfolio-info h3 { font-size: 1.4rem; margin-bottom: 10px; }
.portfolio-info p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }

/* --- HINNASTO (KOLMIOSAINEN) --- */
.pricing { padding: 100px 0; background-color: #f3f4f6; text-align: center; }
.pricing-subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 50px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; align-items: center; }
.price-card { background: var(--bg-card); padding: 50px 30px; border-radius: var(--border-radius); border: 1px solid rgba(0, 0, 0, 0.05); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); transition: var(--transition); position: relative; text-align: left; }
.price-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08); }
.price-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 15px; }
.price { font-size: 3rem; font-weight: 800; color: #4364F7; margin-bottom: 10px; }

/* Uusi 'alk.' etuliite */
.price-prefix { font-size: 1.2rem; font-weight: 600; color: var(--text-muted); margin-right: 5px; vertical-align: middle; }

.per-month { font-size: 1.2rem; color: var(--text-muted); font-weight: 500; }
.price-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 30px; }
.price-card ul { text-align: left; margin-bottom: 40px; }
.price-card li { margin-bottom: 15px; font-size: 0.95rem; color: var(--text-main); font-weight: 500; }

/* Suosituin-paketti */
.price-card.popular { border: 2px solid #4364F7; transform: scale(1.05); box-shadow: 0 15px 35px var(--glow-color); padding: 60px 30px; z-index: 10; }
.price-card.popular:hover { transform: scale(1.05) translateY(-10px); }
.popular-badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--primary-gradient); color: white; padding: 5px 20px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 4px 10px var(--glow-color); }

/* ULTIMATE-paketti */
.price-card.ultimate { background: #0a0e17; border: 1px solid rgba(67, 100, 247, 0.3); color: #ffffff; }
.price-card.ultimate h3 { color: #ffffff; }
.price-card.ultimate .price { color: #6FB1FC; }
.price-card.ultimate .price-prefix { color: #8b949e; }
.price-card.ultimate .price-desc, .price-card.ultimate li { color: #c9d1d9; }
.price-card.ultimate li { font-weight: 400; }
.ultimate-btn { background: transparent; border: 2px solid #6FB1FC; color: #6FB1FC; box-shadow: none; }
.ultimate-btn:hover { background: rgba(111, 177, 252, 0.1); color: #ffffff; box-shadow: 0 8px 25px rgba(111, 177, 252, 0.2); }

/* --- TEAM & CODE-BOX --- */
.team { padding: 100px 0; }
.team-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.team-content p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.1rem; }
.code-box { background: #0d1117; padding: 30px; border-radius: 12px; font-family: 'Courier New', Courier, monospace; font-size: 0.95rem; color: #c9d1d9; border-left: 4px solid #4364F7; box-shadow: 0 20px 40px rgba(0,0,0,0.15); overflow-x: auto; }
.code-box code { color: #7ee787; }

/* --- CONTACT --- */
.contact { padding: 100px 0; text-align: center; background-color: #f3f4f6; }
.contact .section-title { max-width: 600px; margin: 0 auto 1rem auto; }
.contact p { color: var(--text-muted); max-width: 500px; margin: 0 auto 3rem auto; }
.contact-box { margin-top: 50px; }
.btn-large { padding: 20px 50px; font-size: 1.1rem; }
.alternative { margin-top: 20px; font-size: 1rem; }
.alternative a { color: #4364F7; font-weight: 700; }

/* --- FOOTER --- */
.footer { padding: 30px 0; border-top: 1px solid rgba(0, 0, 0, 0.05); background-color: var(--bg-light); text-align: center; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }

/* --- RESPONSIVISUUS JA MOBIILI --- */
@media (max-width: 992px) {
    html { font-size: 15px; }
    .hero-title { font-size: 3.5rem; }
    .sub-hero-title { font-size: 3rem; }
    .price-card.popular { transform: scale(1); padding: 50px 30px; }
    .price-card.popular:hover { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .services, .pricing, .team, .contact { padding: 40px 0; }
    .section-title { font-size: 2rem; }
    .hero-title { font-size: 2.6rem; }
    .sub-hero-title { font-size: 2.2rem; }
    
    .menu-toggle { display: block; padding: 10px; margin-right: -10px; }
    .nav-links { position: absolute; top: 100%; left: 0; width: 100%; background: rgba(252, 252, 252, 0.98); backdrop-filter: blur(15px); flex-direction: column; padding: 20px 0; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); transform: translateY(-150%); opacity: 0; transition: 0.4s ease-in-out; }
    .nav-links.active { transform: translateY(0); opacity: 1; }
    .nav-links li { text-align: center; width: 100%; }
    .nav-links a:not(.btn-small) { font-size: 1.1rem; display: block; padding: 15px; min-height: 48px; }
    .nav-links .theme-toggle { margin: 10px auto; }
    
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .team-wrapper { grid-template-columns: 1fr; text-align: center; }
    .hero-btns { flex-direction: column; gap: 15px; width: 100%; }
    .btn-primary, .btn-secondary { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; } 
    .btn-small.nav-item { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; letter-spacing: -1px; }
    .section-title { font-size: 1.8rem; }
    .sub-hero-title { font-size: 2rem; }
    .btn-large { width: 100%; padding: 15px 30px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
    .price-card { padding: 30px 20px; }
    .price-card.popular { padding: 40px 20px; }
    .services-grid, .portfolio-grid { grid-template-columns: 1fr; }
}