/*
Theme Name: Askel Management
Theme URI: https://askelmanagement.fi
Author: Askel Management Oy
Description: Askel Management Oy:n teema: tapahtumatekniikka, melumittaukset, RF-koordinointi ja tilitoimisto. Aktivointi luo sivut, etusivun ja päävalikon. Yhteystiedot: Ulkoasu → Mukauta → Askel: yhteystiedot.
Version: 2.4.6
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: askel
*/

:root {
	--green: #33523F;
	--green-dark: #253D2F;
	--beige: #F2EDE1;
	--beige-dark: #E8E0CE;
	--border: #DDD5C4;
	--olive: #857D6B;
	--ink: #1F2421;
	--muted: #5A5F5B;
	--white: #fff;
	--radius: 4px;
	--max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--green); }
a:hover { color: var(--green-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 100;
	background: var(--green); color: var(--white); padding: 8px 14px;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 88px; gap: 24px; }
.brand img { display: block; width: 76px; height: auto; }

.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav .menu > li { position: relative; }
.main-nav a {
	display: block; padding: 10px 14px; text-decoration: none; color: var(--ink);
	font-weight: bold; font-size: 15px; letter-spacing: .01em; border-radius: var(--radius);
}
.main-nav a:hover { color: var(--green); background: var(--beige); }
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_item > a { color: var(--green); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.main-nav .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
}
.main-nav .sub-menu {
	list-style: none; margin: 0; padding: 8px; display: none;
	position: absolute; top: 100%; left: 0; min-width: 230px;
	background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--green);
	box-shadow: 0 10px 24px rgba(31, 36, 33, .08);
}
.main-nav .sub-menu a { font-weight: normal; padding: 9px 12px; }
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: block; }

.nav-toggle {
	display: none; align-items: center; gap: 10px; background: none; border: 1px solid var(--border);
	border-radius: var(--radius); padding: 10px 14px; font: inherit; font-weight: bold; color: var(--ink); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 18px; height: 2px; background: var(--ink); position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn, .wp-block-button__link, .wp-element-button {
	display: inline-block; background: var(--green); color: var(--white); text-decoration: none;
	font-weight: bold; padding: 13px 22px; border-radius: var(--radius); border: 2px solid var(--green);
	line-height: 1.2; transition: background .15s;
}
.btn:hover, .wp-block-button__link:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--green); }
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-light { background: var(--white); color: var(--green); border-color: var(--white); }
.btn-light:hover { background: var(--beige); border-color: var(--beige); color: var(--green-dark); }

/* ---------- Typography helpers ---------- */
.kicker {
	margin: 0 0 12px; font-size: 13px; font-weight: bold; letter-spacing: .14em;
	text-transform: uppercase; color: var(--olive);
}
.lead { font-size: 19px; line-height: 1.55; color: var(--ink); max-width: 62ch; }
.section-title { font-size: 32px; line-height: 1.2; color: var(--green); margin: 0 0 20px; }

/* ---------- Hero ---------- */
.hero { background: var(--beige); overflow: hidden; }
.hero-inner { position: relative; padding-top: 88px; padding-bottom: 96px; }
.hero-text { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { font-size: 48px; line-height: 1.1; color: var(--green); margin: 0 0 22px; letter-spacing: -.01em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }
.hero-mark {
	position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
	width: 440px; opacity: .12; pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-beige { background: var(--beige); }
.section-green { background: var(--green); color: var(--white); }
.section-green .kicker { color: var(--beige-dark); }
.section-green .section-title { color: var(--white); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 12px; }
.card {
	position: relative; display: flex; flex-direction: column; padding: 28px 24px 24px;
	border: 1px solid var(--border); border-top: 4px solid var(--green); border-radius: var(--radius);
	text-decoration: none; color: var(--ink); background: var(--white); transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 12px 28px rgba(31, 36, 33, .08); transform: translateY(-2px); color: var(--ink); }
.card h3 { font-size: 21px; color: var(--green); margin: 0 0 10px; }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 16px; }
.card .more { margin-top: auto; font-weight: bold; color: var(--green); font-size: 15px; }
.card .more::after { content: " →"; }
.badge {
	position: absolute; top: -13px; right: 16px; background: var(--beige); color: var(--green);
	border: 1px solid var(--border); font-size: 12px; font-weight: bold; padding: 3px 10px; border-radius: 99px;
}

.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.split p { max-width: 60ch; }
.checklist { list-style: none; margin: 0; padding: 28px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); }
.checklist li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--beige-dark); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
	content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px;
	border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg);
}

.rekry { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.rekry p { max-width: 62ch; margin-bottom: 0; }
.rekry .section-title { margin-bottom: 12px; }

/* ---------- Yhteistyökumppanit ---------- */
.section-partners .section-intro { max-width: 62ch; margin: 0 0 28px; }
.partners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.partners > li { display: flex; }
.partner { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 22px 24px; background: var(--beige); border-left: 4px solid var(--green); border-radius: var(--radius); text-decoration: none; color: inherit; }
.partner-link { transition: background .15s; }
.partner-link:hover { background: var(--beige-dark); }
.partner-link:focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; }
.partner-url { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: bold; color: var(--green); }
.partner-link:hover .partner-url { text-decoration: underline; }
.partner-name { font-weight: bold; font-size: 18px; line-height: 1.3; color: var(--ink); }
.partner-role { font-size: 15px; line-height: 1.45; color: var(--muted); }

.facts { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); }
.facts-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-inner > div { padding: 26px 20px; border-left: 1px solid var(--border); font-weight: bold; color: var(--ink); overflow-wrap: anywhere; }
.facts-inner > div:first-child { border-left: 0; padding-left: 0; }
.facts-inner span { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); margin-bottom: 4px; }
.facts-inner a { color: var(--green); text-decoration: none; }

/* ---------- Media ---------- */
.hero.has-media, .page-hero.has-media { position: relative; background: var(--green-dark); color: var(--white); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media video, .hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(37, 61, 47, .94) 0%, rgba(37, 61, 47, .82) 45%, rgba(37, 61, 47, .35) 100%);
}
.hero.has-media .hero-inner { padding-top: 120px; padding-bottom: 128px; }
.has-media .hero-inner, .has-media .page-hero-inner { position: relative; z-index: 1; }
.hero.has-media h1, .page-hero.has-media h1, .hero.has-media .lead, .page-hero.has-media .lead { color: var(--white); }
.has-media .kicker { color: var(--beige-dark); }
.hero.has-media .hero-mark { display: none; }
.has-media .btn { background: var(--white); color: var(--green); border-color: var(--white); }
.has-media .btn:hover { background: var(--beige); border-color: var(--beige); }
.has-media .btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.has-media .btn-outline:hover { background: var(--white); color: var(--green); }

.card { padding: 0; overflow: hidden; }
.card-visual { display: block; aspect-ratio: 16 / 10; background: var(--beige); overflow: hidden; border-bottom: 1px solid var(--border); }
.card-visual img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.card:hover .card-visual img { transform: scale(1.03); }
.card h3 { margin: 22px 24px 10px; }
.card p { margin: 0 24px 18px; }
.card .more { margin: auto 24px 24px; }
.badge { top: 12px; left: 12px; right: auto; z-index: 1; }

.page-hero-inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.page-hero.has-illu .page-hero-inner { grid-template-columns: 1fr 340px; }
.page-illu { width: 340px; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--beige); }
.page-hero.has-media { padding: 96px 0 88px; }

.entry-content .wp-block-image, .entry-content figure { margin: 28px 0; }
.entry-content .wp-block-image img, .entry-content .wp-block-gallery img { border-radius: var(--radius); }
.entry-content figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.entry-content .wp-block-video video { width: 100%; border-radius: var(--radius); }
.entry-content .wp-block-media-text { margin: 32px 0; gap: 24px; }

/* ---------- Pages ---------- */
.page-hero { background: var(--beige); padding: 64px 0 56px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: 42px; line-height: 1.15; color: var(--green); margin: 0 0 14px; }
.page-hero .lead { margin: 0; }

.entry { padding-top: 56px; padding-bottom: 88px; }
.entry-content { max-width: 760px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 26px; line-height: 1.25; color: var(--green); margin: 44px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--green); }
.entry-content h3 { font-size: 20px; color: var(--ink); margin: 30px 0 8px; }
.entry-content p { margin: 0 0 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 20px; padding-left: 22px; }
.entry-content li { margin-bottom: 8px; }
.entry-content li::marker { color: var(--green); }
.entry-content .wp-block-buttons { margin: 28px 0 8px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; }
.entry-content th { background: var(--green); color: var(--white); text-align: left; padding: 9px 12px; }
.entry-content td { border: 1px solid var(--border); padding: 9px 12px; }

.cta-box {
	max-width: 760px; margin-top: 56px; padding: 28px 30px; background: var(--beige);
	border-left: 4px solid var(--green); border-radius: var(--radius);
}
.cta-box h2 { margin: 0 0 6px; font-size: 22px; color: var(--green); }
.cta-box p { margin: 0 0 8px; }
.cta-contacts { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: bold; }

.post-summary { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-summary h2 { border: 0; padding: 0; margin: 0 0 4px; }
.post-summary h2 a { text-decoration: none; }
.post-date { color: var(--olive); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: var(--beige); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand img { width: 72px; margin-bottom: 14px; }
.footer-brand p { margin: 0; line-height: 1.7; }
.footer-title { font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: var(--beige-dark); margin: 6px 0 14px; opacity: .8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(242, 237, 225, .18); padding-top: 18px; padding-bottom: 22px; }
.footer-bottom p { margin: 0; font-size: 13px; opacity: .75; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
	.cards { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.hero-mark { width: 360px; right: -90px; }
	.page-hero.has-illu .page-hero-inner { grid-template-columns: 1fr 260px; }
	.page-illu { width: 260px; }
}

@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--white); border-bottom: 1px solid var(--border); box-shadow: 0 12px 24px rgba(31, 36, 33, .08);
	}
	.nav-open .main-nav { display: block; }
	.main-nav .menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
	.main-nav a { padding: 13px 8px; border-bottom: 1px solid var(--beige-dark); border-radius: 0; }
	.main-nav .current-menu-item > a, .main-nav .current_page_item > a { box-shadow: none; }
	.main-nav .menu-item-has-children > a::after { display: none; }
	.main-nav .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
	.split { grid-template-columns: 1fr; gap: 28px; }
	.rekry { flex-direction: column; align-items: flex-start; gap: 20px; }
	.facts-inner { grid-template-columns: 1fr 1fr; }
	.facts-inner > div { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--border); }
	.facts-inner > div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.header-inner { min-height: 72px; }
	.brand img { width: 60px; }
	.hero-inner { padding-top: 56px; padding-bottom: 64px; }
	.hero h1 { font-size: 34px; }
	.lead { font-size: 17px; }
	.hero-mark { display: none; }
	.hero.has-media .hero-inner { padding-top: 72px; padding-bottom: 80px; }
	.hero-overlay { background: linear-gradient(180deg, rgba(37, 61, 47, .86) 0%, rgba(37, 61, 47, .72) 100%); }
	.page-hero.has-illu .page-hero-inner { grid-template-columns: 1fr; }
	.page-illu { display: none; }
	.section { padding: 56px 0; }
	.section-title { font-size: 26px; }
	.cards { grid-template-columns: 1fr; gap: 24px; }
	.page-hero { padding: 44px 0 40px; }
	.page-hero h1 { font-size: 32px; }
	.entry { padding-top: 40px; padding-bottom: 64px; }
	.entry-content h2 { font-size: 22px; }
	.facts-inner { grid-template-columns: 1fr; }
	.facts-inner > div, .facts-inner > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
	.facts-inner > div:last-child { border-bottom: 0; }
	.footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.card, .btn { transition: none; }
}

/* ---------- Yritystiedot ---------- */
.company-info, .entry-content .company-info { list-style: none; padding: 0; margin: 0 0 24px; }
.company-info li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.company-info .company-label { display: inline-block; min-width: 170px; color: var(--green); font-size: 14px; font-weight: 600; }
.footer-company { line-height: 1.7; }
@media (max-width: 600px) {
	.company-info .company-label { display: block; min-width: 0; }
}

/* ---------- Keikoilta-galleria ---------- */
.section-gallery { padding-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.gallery-grid figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--green-dark); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.gallery-grid figure:hover img { transform: scale(1.04); }
@media (max-width: 900px) {
	.gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.gallery-grid img, .card-visual img { transition: none; }
}

/* ---------- Yhteydenottolomake ---------- */
.askel-form { margin: 8px 0 12px; }
.askel-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.askel-form .askel-field { margin: 0 0 18px; }
.askel-form label { display: block; font-weight: bold; font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.askel-form .askel-optional { font-weight: normal; color: var(--muted); }
.askel-form input[type="text"],
.askel-form input[type="email"],
.askel-form input[type="tel"],
.askel-form select,
.askel-form textarea {
	display: block; width: 100%; margin: 0; font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink);
	background-color: var(--white); border: 1px solid var(--olive); border-radius: var(--radius); padding: 11px 12px;
}
.askel-form select {
	-webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2333523F' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center;
}
.askel-form textarea { min-height: 170px; resize: vertical; }
.askel-form input:focus,
.askel-form select:focus,
.askel-form textarea:focus { outline: 3px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.askel-form .askel-hint { font-size: 14px; color: var(--muted); margin: -2px 0 8px; }
.askel-form .askel-error { color: #A12622; font-size: 14px; font-weight: bold; margin: 0 0 6px; }
.askel-form .has-error input,
.askel-form .has-error select,
.askel-form .has-error textarea { border: 2px solid #A12622; padding: 10px 11px; }
.askel-form .has-error select { padding-right: 39px; }
.askel-form-errors { background: #FBEDEB; border-left: 4px solid #A12622; border-radius: var(--radius); padding: 14px 18px; margin: 0 0 22px; }
.askel-form-errors p { margin: 0; }
.askel-form-errors:focus, .askel-form-done:focus { outline: none; }
#yhteydenotto { scroll-margin-top: 24px; }
.askel-form .askel-privacy { font-size: 14px; color: var(--muted); margin: 2px 0 18px; }
.askel-form .askel-submit { margin: 0; }
.askel-form button.btn { font: inherit; font-weight: bold; cursor: pointer; }
.askel-form button.btn:disabled { opacity: .7; cursor: default; }
.askel-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.askel-form-done { background: var(--beige); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 12px; }
.askel-form-done .askel-form-done-title { font-size: 20px; font-weight: bold; color: var(--green); margin: 0 0 6px; }
.askel-form-done p:last-child { margin: 0; }
.cta-box .cta-action { margin: 14px 0 12px; }
@media (max-width: 600px) {
	.askel-form-grid { grid-template-columns: 1fr; }
	.askel-form button.btn { width: 100%; }
}
