:root {
    --primary: #0066cc;
    --primary-dark: #004d99;
    --secondary: #2ecc71;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f1f3f5;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.bg-light {
    background-color: var(--gray-100);
}

.text-center {
    text-align: center;
}

h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h1 span {
    color: var(--primary);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

p.subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 600px;
}

p.section-desc {
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Header */
header {
    background: #f0f7ff;
    /* Raikas vaaleansininen tausta */
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-300);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin-left: auto;
    margin-right: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.logo span {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

.btn.small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn.lg {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

/* Hero */
.hero {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cta-note {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

/* Phone Mockup & Carousel */
.phone-mockup {
    width: 300px;
    height: 600px;
    background: #000;
    border-radius: 40px;
    padding: 12px;
    position: relative;
    z-index: 2;
    margin: 0 auto;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.phone-screen {
    background: var(--white);
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 100%;
}

.carousel-slide.active {
    left: 0;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading state */
body.loading {
    overflow: hidden;
}

body.loading [data-content] {
    opacity: 0;
}

/* Ensure content is visible if script doesn't run at all or fails */
[data-content] {
    transition: opacity 0.8s ease;
    opacity: 1;
}

.app-header {
    background: var(--primary);
    color: var(--white);
    padding: 2.5rem 1rem 1rem;
    font-weight: 700;
    text-align: center;
}

.app-feed {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feed-item {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
        background: #eef6ff;
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
    border-left: 4px solid var(--primary);
}

.abstract-shape {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Comparison */
.comparison {
    padding: 6rem 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.comp-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--gray-300);
}

.comp-card.premium {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow);
    transform: scale(1.05);
}

.comp-card h3 {
    margin-bottom: 2rem;
}

.comp-card ul {
    list-style: none;
}

.comp-card li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.comp-card li.no::before {
    content: '✕';
    color: #ff4d4d;
    font-weight: bold;
}

.comp-card li.yes::before {
    content: '✓';
    color: var(--secondary);
    font-weight: bold;
}

/* Features */
.features {
    padding: 6rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 2.5rem;
    border-radius: 20px;
    transition: var(--transition);
}

.feature-item:hover {
    background: var(--gray-100);
    transform: translateY(-10px);
}

.feature-item .icon {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.feature-item .icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Use Cases */
.use-cases {
    padding: 6rem 0;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.use-cases-content {
    flex: 1;
}

.use-cases-visual {
    flex: 1;
}

.step-list {
    list-style: none;
    margin-top: 2rem;
}

.step-list li {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.step-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.scene-svg {
    width: 100%;
    height: auto;
}

/* Municipality */
.municipality {
    padding: 6rem 0;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #eef6ff;
    color: var(--primary);
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.max-width-text {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
}

.benefit-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.benefit-tag {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    padding: 6rem 0 3rem;
    background: var(--dark);
    color: var(--white);
}

.footer h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.footer-links {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer .logo {
    color: var(--white);
}

/* Reveal Animations */
[data-reveal] {
    opacity: 0;
    transition: 1s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal="left"] {
    transform: translateX(-50px);
}

[data-reveal="right"] {
    transform: translateX(50px);
}

[data-reveal="bottom"] {
    transform: translateY(50px);
}

[data-reveal].active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Mobile Responsive */
@media (max-width: 991px) {
    h1 {
        font-size: 2.8rem;
    }

    .hero-grid,
    .flex-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    p.subtitle {
        margin: 0 auto 2rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .comp-card.premium {
        transform: scale(1);
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}