:root {
    --navy: #0d1b2a;
    --navy-mid: #1a2d42;
    --blue: #1e5fa8;
    --blue-bright: #2d7dd2;
    --red-light: #e74c3c;
    --white: #f0f4f8;
    --muted: #8fa3b8;
    --card-bg: rgba(13, 27, 42, 0.88);
    --border: rgba(45, 125, 210, 0.25);
}

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Barlow', sans-serif;
    color: var(--white);
    background-color: var(--navy);
    overflow-x: hidden;
}

/* TAUSTA */
.bg-fixed-layer {
    position: fixed;
    inset: -30px;
    z-index: -2;
    background:
        linear-gradient(160deg, rgba(13,27,42,0.78) 0%, rgba(13,27,42,0.58) 50%, rgba(13,27,42,0.82) 100%),
        url('tausta.jpg') no-repeat center center / cover;
}

.bg-fixed-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 3px,
        rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px
    );
    pointer-events: none;
}

/* HEADER */
header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 66px;
}

.logo {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800; font-size: 1.6rem; letter-spacing: 6px;
    color: var(--white); display: flex; align-items: center; gap: 10px;
}

.logo-dot {
    width: 8px; height: 8px; background: var(--red-light);
    border-radius: 50%; display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.65); }
}

/* Hamburger-nappi — piilotettu desktop */
.nav-toggle {
    display: none;
    background: none; border: none; color: var(--white);
    font-size: 1.6rem; cursor: pointer; padding: 8px;
}

nav ul { display: flex; list-style: none; gap: 8px; align-items: center; }

nav ul li a {
    color: var(--muted); text-decoration: none;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600; font-size: .9rem; letter-spacing: 2px;
    text-transform: uppercase; padding: 8px 14px; border-radius: 4px;
    transition: color .2s, background .2s;
    cursor: pointer; background: none; border: none; display: inline-block;
}

nav ul li a:hover { color: var(--white); background: rgba(45,125,210,.15); }

.nav-cta { border: 1px solid var(--border) !important; color: var(--blue-bright) !important; }
.nav-cta:hover { background: rgba(45,125,210,.25) !important; color: var(--white) !important; }

/* HERO */
.hero {
    min-height: 88vh; display: flex; align-items: center; padding: 80px 24px;
}

.hero-tag {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .75rem; font-weight: 600; letter-spacing: 4px;
    text-transform: uppercase; color: var(--red-light);
    margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
    animation: fadeUp .6s ease both;
}

.hero-tag::before {
    content: ''; display: inline-block;
    width: 32px; height: 2px; background: var(--red-light);
}

.hero h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800; font-size: clamp(2.1rem, 6vw, 4.8rem);
    line-height: 1.05; color: var(--white);
    max-width: 740px; margin-bottom: 24px;
    animation: fadeUp .7s ease .08s both;
}

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

.hero-desc {
    font-size: 1.1rem; font-weight: 300; color: var(--muted);
    max-width: 520px; line-height: 1.75; margin-bottom: 40px;
    animation: fadeUp .7s ease .16s both;
}

.cta-buttons {
    display: flex; gap: 14px; flex-wrap: wrap;
    animation: fadeUp .7s ease .24s both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* NAPIT */
.btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700; font-size: .85rem; letter-spacing: 2px;
    text-transform: uppercase; padding: 14px 32px; border-radius: 4px;
    cursor: pointer; border: none; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.btn-primary {
    background: var(--blue); color: white;
    box-shadow: 0 4px 20px rgba(30,95,168,.45);
}
.btn-primary:hover {
    background: var(--blue-bright); transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(45,125,210,.55);
}

.btn-outline {
    background: transparent; color: var(--white);
    border: 1.5px solid rgba(240,244,248,.3);
}
.btn-outline:hover { border-color: var(--white); transform: translateY(-2px); }

/* FILOSOFIA */
.philosophy-section {
    padding: 80px 24px; text-align: center;
    background: rgba(10,20,34,.65); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

.philosophy-text {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.85rem);
    font-weight: 600; color: var(--white);
    max-width: 820px; margin: 0 auto; line-height: 1.5; opacity: .88;
}

.philosophy-text::before {
    content: '"'; color: var(--blue-bright);
    font-size: 3rem; line-height: 0; vertical-align: -.5rem; margin-right: 4px;
}

/* PALVELUT */
.services { padding: 100px 24px; }
.section-title { margin-bottom: 52px; }

.section-title h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800; font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 1px; color: var(--white);
    display: flex; align-items: center; gap: 16px;
}

.section-title h2::after {
    content: ''; flex: 1; height: 1px;
    background: var(--border); max-width: 200px;
}

.section-title p { margin-top: 10px; color: var(--muted); font-weight: 300; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 10px; padding: 36px 32px; backdrop-filter: blur(12px);
    transition: border-color .3s, transform .3s, box-shadow .3s;
    position: relative; overflow: hidden;
}

.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--blue-bright));
    transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}

.card:hover {
    border-color: rgba(45,125,210,.55); transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(0,0,0,.45);
}

.card:hover::before { transform: scaleX(1); }

.card-icon {
    width: 48px; height: 48px; background: rgba(45,125,210,.12);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 20px; border: 1px solid var(--border);
}

.card h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700; font-size: 1.3rem; color: var(--white); margin-bottom: 12px;
}

.card p { font-size: .9rem; font-weight: 300; color: var(--muted); line-height: 1.7; margin-top: 6px; }

/* BOTTOM HERO */
.bottom-hero {
    background: rgba(8,16,26,.75); backdrop-filter: blur(6px);
    border-top: 1px solid var(--border); padding: 120px 24px; text-align: center;
}

.bottom-hero h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--white); margin-bottom: 32px; letter-spacing: .5px;
}

.container { max-width: 1100px; margin: 0 auto; }

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    background: rgba(8,16,26,.96); padding: 48px 24px 24px;
}

.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px; padding-bottom: 32px;
}

.footer-col h4 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700; font-size: 1rem; letter-spacing: 2px;
    text-transform: uppercase; color: var(--blue-bright); margin-bottom: 16px;
}

.footer-col p { font-size: .85rem; font-weight: 300; color: var(--muted); margin-bottom: 8px; }
.footer-col a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: var(--white); }

.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; }
.footer-bottom p { font-size: .78rem; color: var(--muted); letter-spacing: .5px; }

/* MODAL */
.modal {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.72); backdrop-filter: blur(8px);
    z-index: 10001; justify-content: center; align-items: center; padding: 20px;
}

.modal-content {
    background: var(--navy-mid); border: 1px solid var(--border);
    border-radius: 14px; max-width: 520px; width: 100%;
    padding: 48px 40px; position: relative;
    box-shadow: 0 28px 70px rgba(0,0,0,.65);
    animation: slideUp .3s cubic-bezier(.16,1,.3,1) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute; right: 20px; top: 16px;
    font-size: 28px; cursor: pointer; color: var(--muted);
    transition: color .2s; line-height: 1; user-select: none; font-weight: bold;
}
.close-btn:hover { color: var(--white); }

.contact-info h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800; font-size: 1.8rem; color: var(--white);
    margin-bottom: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px;
}

.header-email { color: var(--blue-bright); font-size: .95rem; font-weight: 400; }
.contact-info p { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }

/* LOMAKE */
.modern-form .input-group { margin-bottom: 16px; }

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

.modern-form label {
    display: block; font-size: .7rem; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}

.modern-form input,
.modern-form textarea {
    width: 100%; padding: 11px 14px;
    background: rgba(0,0,0,.35); border: 1px solid var(--border);
    border-radius: 6px; color: var(--white);
    font-family: 'Barlow', sans-serif; font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
}

.modern-form input::placeholder,
.modern-form textarea::placeholder { color: rgba(143,163,184,.45); }

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none; border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(45,125,210,.18);
}

.modern-form textarea { resize: vertical; min-height: 100px; }

.submit-btn-modern {
    width: 100%; margin-top: 8px; padding: 14px;
    background: var(--blue); color: white; border: none; border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700; font-size: .9rem; letter-spacing: 2px;
    text-transform: uppercase; cursor: pointer; transition: background .2s, transform .2s;
}
.submit-btn-modern:hover { background: var(--blue-bright); transform: translateY(-1px); }

.hp-field { display: none !important; }

/* MOBIILI */
@media (max-width: 768px) {
    nav { height: auto; padding: 0 20px; flex-wrap: wrap; }
    nav > .logo { height: 66px; }
    .nav-toggle { display: block; }

    nav ul {
        display: none; flex-direction: column;
        width: 100%; gap: 4px; padding: 10px 0 16px;
    }
    nav ul.nav-open { display: flex; }
    nav ul li { width: 100%; }
    nav ul li a { font-size: .85rem; padding: 10px 12px; display: block; }

    .hero { text-align: center; }
    .hero-tag { justify-content: center; }
    .cta-buttons { justify-content: center; }
    .bottom-hero { padding: 80px 24px; }
    .footer-grid { text-align: center; }
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .modal-content { padding: 32px 24px; }
}