@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --bg: #0d0d0f;
    --bg-card: #151518;
    --bg-warm: #111114;
    --accent: #06d2d1;
    --accent-dim: rgba(6, 210, 209, 0.12);
    --accent-glow: rgba(6, 210, 209, 0.06);
    --text: #e8e8ec;
    --text-muted: #9a9aaa;
    --border: rgba(255, 255, 255, 0.06);
    --radius: 12px;
    --font-mono: 'Space Mono', 'Courier New', monospace;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 1.05rem;
    -webkit-font-smoothing: antialiased;
}

/* ===== Nav ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.1rem 0;
    transition: all 0.3s;
}

.nav.scrolled {
    background: rgba(13, 13, 15, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
}

.nav-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 36px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.75rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
    background: var(--accent);
    color: var(--bg) !important;
    padding: 0.45rem 1.15rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.84rem !important;
    transition: opacity 0.2s !important;
}

.nav-cta:hover { opacity: 0.85; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

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

/* ===== Container ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    padding: 8rem 2rem 6rem;
    position: relative;
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
    gap: 2rem;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Hero animated grid */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(6, 210, 209, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 210, 209, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 50%, black 20%, transparent 70%);
    z-index: 0;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-visual svg {
    width: 100%;
    max-width: 380px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.75rem;
    letter-spacing: -0.03em;
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-gradient {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(6, 210, 209, 0.06) 0%, transparent 65%);
    pointer-events: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover { opacity: 0.85; }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Sections ===== */
.section {
    padding: 7rem 0;
}

.section-warm {
    background: var(--bg-warm);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 3.5rem;
    max-width: 560px;
    line-height: 1.75;
}

/* ===== Scroll hint ===== */
.scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    margin-bottom: 2.5rem;
    animation: hintBounce 2s ease-in-out infinite;
    transition: opacity 0.4s;
}

.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-hint svg {
    color: var(--accent);
}

@keyframes hintBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* ===== Palvelut (flow layout) ===== */
.services-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.service-block {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: center;
    padding: 3.5rem 0;
}

.service-block + .service-block {
    border-top: 1px solid var(--border);
}

.service-block:first-child {
    padding-top: 0;
}

.service-block:nth-child(even) {
    direction: rtl;
}

.service-block:nth-child(even) > * {
    direction: ltr;
}

.service-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.service-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.service-text p:last-child {
    margin-bottom: 0;
}

.service-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.5rem;
}

.service-visual svg {
    width: 100%;
    max-width: 320px;
    height: auto;
}

/* ===== Prosessi (timeline) ===== */
.process-steps {
    max-width: 640px;
    display: flex;
    flex-direction: column;
}

.process-step {
    display: flex;
    gap: 1.75rem;
    align-items: stretch;
}

.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 20px;
}

.step-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg-warm);
    flex-shrink: 0;
    margin-top: 0.3rem;
    transition: background 0.3s;
}

.process-step:hover .step-dot {
    background: var(--accent);
}

.step-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, var(--accent), transparent);
    opacity: 0.15;
    margin: 0.4rem 0;
}

.step-content {
    padding-bottom: 2.5rem;
}

.step-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
}

/* ===== Referenssit ===== */
.refs-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ref-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: baseline;
}

.ref-item:first-child {
    padding-top: 0;
}

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

.ref-item h3 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
}

.ref-item p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

/* ===== Meistä ===== */
.about-text-wide {
    max-width: 680px;
}

.about-text-wide p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    line-height: 1.85;
}

.about-text-wide strong {
    color: var(--text);
}

/* ===== Yhteystiedot ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

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

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

.form-group label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

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

.form-group textarea { resize: vertical; }

.captcha-group input { max-width: 140px; }

.contact-info {
    padding-top: 0.5rem;
}

.contact-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-role {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.contact-links a {
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.contact-links a:hover { opacity: 0.7; }

.contact-note {
    color: var(--text-muted);
    font-size: 0.92rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--accent-glow);
    line-height: 1.65;
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-copy {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

/* ===== Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-block.reveal:nth-child(2) { transition-delay: 0.08s; }
.service-block.reveal:nth-child(3) { transition-delay: 0.16s; }
.service-block.reveal:nth-child(4) { transition-delay: 0.24s; }
.service-block.reveal:nth-child(5) { transition-delay: 0.32s; }

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

.ref-item.reveal:nth-child(2) { transition-delay: 0.06s; }
.ref-item.reveal:nth-child(3) { transition-delay: 0.12s; }
.ref-item.reveal:nth-child(4) { transition-delay: 0.18s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(13, 13, 15, 0.97);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open { display: flex; }

    .hero {
        padding: 6rem 1.5rem 4rem;
        min-height: 90vh;
        grid-template-columns: 1fr;
    }

    .hero-visual { display: none; }
    .hero-grid { display: none; }

    .section { padding: 4.5rem 0; }

    .service-block {
        grid-template-columns: 1fr;
    }

    .service-block:nth-child(even) {
        direction: ltr;
    }

    .service-visual {
        max-width: 160px;
    }

    .process-flow { grid-template-columns: 1fr; gap: 1.5rem; }

    .ref-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    body { font-size: 1rem; }
}
