/* empor.fi etusivu + tietosuoja. Alasivut (tuotteet/*, proxmox.html) käyttävät style.css:ää. */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #fbfaf7;
    --bg-alt: #eef2f8;
    --bg-card: #ffffff;
    --accent: #1f5aa6;
    --accent-dark: #184a8a;
    --text: #1e2a2f;
    --text-muted: #55636a;
    --border: #dde2ea;
    --border-strong: #9aa3b0;
    --radius: 10px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.125rem;
    line-height: 1.7;
    background: var(--bg);
    color: var(--text);
    overflow-wrap: break-word;
}

h1, h2, h3, p, ul { margin: 0; }

h1, h2 {
    font-family: var(--font-heading);
    font-weight: 400;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.skip {
    position: absolute;
    left: -999px;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.5rem 1rem; z-index: 10; }

/* ===== Header ===== */
.site-header { background: var(--bg-card); border-bottom: 1px solid var(--border); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 84px;
}

.logo { display: flex; }
.logo img { display: block; height: 40px; width: auto; }

.site-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.0625rem;
}
.site-nav a:hover { color: var(--text); }

@media (max-width: 640px) {
    .site-nav .nav-optional { display: none; }
    .header-inner { min-height: 68px; }
    .logo img { height: 32px; }
}

@media (max-width: 400px) {
    .container { padding: 0 1.25rem; }
    .logo img { height: 28px; }
    .site-nav a { font-size: 1rem; }
}

/* ===== Hero ===== */
.hero { padding: clamp(4.5rem, 12vw, 8.5rem) 0 clamp(4rem, 10vw, 7.5rem); }

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    max-width: 18ch;
}

.hero p {
    margin-top: 1.75rem;
    max-width: 44ch;
    color: var(--text-muted);
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    line-height: 1.55;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 0.95rem 1.9rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 1.0625rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-outline { color: var(--text); background: var(--bg-card); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Sections ===== */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--bg-alt); }

.section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-sub {
    color: var(--text-muted);
    max-width: 52ch;
    margin-bottom: 3rem;
    font-size: 1.25rem;
}

.subheading {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 3.5rem 0 1rem;
}

/* ===== Palvelukortit ===== */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
}

@media (min-width: 640px) {
    .cards { grid-template-columns: 1fr 1fr; }
}

.card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(30, 42, 47, 0.05);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.card-head img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    flex-shrink: 0;
}

.card h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    line-height: 1.2;
}

.card p { color: var(--text-muted); flex-grow: 1; }

.card-link { font-weight: 600; font-size: 1.0625rem; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* ===== Muut palvelut ===== */
.inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    list-style: none;
    padding: 0;
}

.inline-list a { font-weight: 500; }

.section .inline-list { gap: 0.75rem 2rem; font-size: 1.25rem; }

.agent-note {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* ===== Asiakastyöt ===== */
.refs {
    display: grid;
    gap: 2.5rem;
    list-style: none;
    padding: 0;
}

@media (min-width: 768px) {
    .refs { grid-template-columns: repeat(3, 1fr); }
}

.refs h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 0.6rem;
}
.refs p { color: var(--text-muted); }

/* ===== Yhtiö / tekstiosiot ===== */
.prose { max-width: 42rem; }
#yritys .prose { max-width: 48rem; }
#yritys .prose > p { font-size: 1.25rem; line-height: 1.65; }
.prose h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.prose p + p { margin-top: 1rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; margin-top: 0.5rem; }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }

/* ===== Yhteystiedot ===== */
.contact-grid {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .contact-grid { grid-template-columns: 1fr 1.4fr; gap: 3rem; }
}

.contact-details { font-style: normal; color: var(--text-muted); }
.contact-details { font-size: 1.1875rem; }
.contact-details strong { color: var(--text); display: block; font-size: 1.375rem; font-family: var(--font-heading); font-weight: 400; }
.contact-details p + p { margin-top: 1rem; }

.form-row { display: grid; gap: 0 1rem; }

@media (min-width: 560px) {
    .form-row { grid-template-columns: 1fr 1fr; }
}

.field { margin-bottom: 1rem; }

.field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.field input, .field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text);
    font: inherit;
}

.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.field textarea { resize: vertical; }
.field-captcha input { max-width: 10rem; }

.hp { display: none; }

.form-status { margin-top: 0.75rem; min-height: 1.65em; color: var(--text-muted); }

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.site-footer .inline-list { gap: 0.4rem 1.25rem; }
.site-footer .inline-list a { color: var(--text-muted); font-weight: 400; }
.site-footer .inline-list a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    margin-top: 1.5rem;
}

.site-footer > .footer-bottom { margin-top: 0; }
.footer-bottom a { color: var(--text-muted); }

/* ===== Tuotesivu (tuotteet/agent) ===== */
.eyebrow {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.steps {
    display: grid;
    gap: 2rem;
    list-style: none;
    padding: 0;
    counter-reset: step;
}

@media (min-width: 768px) {
    .steps { grid-template-columns: repeat(4, 1fr); }
}

.steps li { counter-increment: step; }

.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.375rem;
}

.steps h3, .features h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.375rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.steps p, .features p { color: var(--text-muted); }

.features {
    display: grid;
    gap: 2.5rem 3rem;
    list-style: none;
    padding: 0;
}

@media (min-width: 640px) {
    .features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
    .features { grid-template-columns: repeat(3, 1fr); }
}

.faq { max-width: 48rem; }

.faq details {
    border-bottom: 1px solid var(--border);
    padding: 1.1rem 0;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1875rem;
}

.faq details p { margin-top: 0.75rem; color: var(--text-muted); }

.narrow { max-width: 36rem; }
