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

:root {
    --primary-color: #31a8ff;
    --primary-dark: #0d75d4;
    --secondary-color: #0f223c;
    --text-dark: #0e1a2b;
    --text-light: #5d6978;
    --bg-light: #eef4f8;
    --bg-white: #ffffff;
    --border-color: #d8e2ec;
    --shadow: 0 10px 30px rgba(8, 20, 35, 0.08);
    --shadow-lg: 0 24px 60px rgba(8, 20, 35, 0.16);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fa 100%);
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigaatio */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(216, 226, 236, 0.8);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    width: clamp(180px, 18vw, 250px);
    height: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero osio */
.hero {
    background:
        linear-gradient(135deg, rgba(7, 17, 31, 0.84), rgba(12, 37, 67, 0.72)),
        url('koodikraft_tausta.png') center/cover no-repeat;
    color: white;
    padding: 140px 0 128px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    line-height: 1.05;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hero-points span {
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Painikkeet */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Palvelut */
.services {
    padding: 100px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Hinnasto */
.pricing {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
    background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.pricing-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.price {
    margin-bottom: 2rem;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.period {
    color: var(--text-light);
    font-size: 1rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-features li {
    padding: 0.8rem 0;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.package-questions {
    margin: 1.5rem 0 2rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: #f5fbff;
    border: 1px solid rgba(49, 168, 255, 0.18);
    text-align: left;
}

.package-questions-title {
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.package-question-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-light);
}

.package-question-list li+li {
    margin-top: 0.45rem;
}

/* Ylläpitopalvelut */
.yllapito-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.yllapito-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.yllapito-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.yllapito-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.yllapito-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.yllapito-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.yllapito-card ul {
    list-style: none;
}

.yllapito-card ul li {
    padding: 0.5rem 0;
    color: var(--text-dark);
}

.yllapito-card ul li::before {
    content: "✓ ";
    color: var(--secondary-color);
    font-weight: bold;
}

/* Lisäpalvelut */
.lisapalvelut-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.lisapalvelut-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.lisapalvelut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.lisapalvelu-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.lisapalvelu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.lisapalvelu-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.lisapalvelu-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.lisapalvelu-items {
    margin-bottom: 1.5rem;
}

.lisapalvelu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.lisapalvelu-item:last-child {
    border-bottom: none;
}

.item-name {
    color: var(--text-dark);
    font-weight: 500;
}

.item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.lisapalvelu-note {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 1rem;
}

/* Yhteystiedot */
.contact {
    padding: 100px 0;
    background: var(--bg-light);
}

.contact-prompt {
    max-width: 760px;
    margin: 0 auto 1.75rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: rgba(49, 168, 255, 0.08);
    border: 1px solid rgba(49, 168, 255, 0.16);
    color: var(--text-light);
    text-align: center;
}

.contact-note {
    max-width: 700px;
    margin: -1rem auto 2rem;
    text-align: center;
    color: var(--text-light);
}

.contact-form {
    max-width: 700px;
    margin: 3rem auto 0;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(216, 226, 236, 0.9);
}

.form-section {
    margin-bottom: 1.75rem;
    padding: 1.4rem;
    border-radius: 14px;
    background: #f8fbfe;
    border: 1px solid rgba(49, 168, 255, 0.14);
}

.form-section-header {
    margin-bottom: 1rem;
}

.form-section-header h3 {
    margin-bottom: 0.35rem;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.form-section-header p {
    color: var(--text-light);
}

.payment-return-note {
    margin: -0.2rem 0 1rem;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    background: rgba(15, 34, 60, 0.06);
    border: 1px solid rgba(15, 34, 60, 0.12);
    color: var(--text-light);
    text-align: center;
}

.checkout-section {
    background: linear-gradient(180deg, #f7fbff 0%, #eef7ff 100%);
}

.checkout-instructions {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-dark);
    display: grid;
    gap: 0.65rem;
}

.checkout-fallback {
    margin-top: 1rem;
    color: var(--text-light);
    text-align: center;
}

.checkout-fallback a {
    color: var(--primary-dark);
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    width: 100%;
    margin-top: 1rem;
}

.form-message {
    max-width: 700px;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsiivisuus */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .services-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .hero-points {
        flex-direction: column;
        align-items: stretch;
    }
}