/*
Theme Name: Syysmyrsky by Pencil
Theme URI: https://syysmyrsky.fi/
Description: Syysmyrsky-kilpailun oma teema. Korvaa Astra- ja Elementor-toteutuksen samalla ilmeellä. Tekstit, kuvat ja painikkeet muokataan suoraan sivulla Pencil-lisäosalla.
Version: 1.0.1
Author: Z-Factory
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: syysmyrsky
*/

/* ---------- Fontit ---------- */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/lato-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/lato-400-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/lato-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/lato-700-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Perusteet ---------- */
:root {
	--sm-orange: #d98701;
	--sm-black: #000;
	--sm-header: #030303;
	--sm-white: #fff;
	--sm-text: #0a0a0a;
	--sm-gray: #787676;
	--sm-line: #e5e5e5;
	--sm-font: "Lato", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--sm-black);
	color: var(--sm-text);
	font-family: var(--sm-font);
	font-size: 19px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-family: var(--sm-font); font-weight: 700; line-height: 1.3; color: var(--sm-white); }
p { margin: 0 0 1.25em; }
a { color: inherit; }
.sm-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.sm-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 10px 16px; background: var(--sm-orange); color: var(--sm-white); }
.sm-skip:focus { left: 10px; top: 10px; }
.pencil-richtext > :last-child { margin-bottom: 0; }

/* ---------- Yläpalkki ---------- */
.sm-header { background: var(--sm-header); border-bottom: 1px solid var(--sm-line); }
.sm-header__inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; min-height: 70px; display: flex; align-items: center; justify-content: center; }
.sm-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.sm-nav__list li { margin: 0; }
.sm-nav__list a {
	display: block;
	padding: 0 19px;
	line-height: 70px;
	color: var(--sm-white);
	text-decoration: none;
	text-transform: uppercase;
	font-size: 19px;
}
.sm-nav__list a:hover,
.sm-nav__list a:focus,
.sm-nav__list .current-menu-item > a,
.sm-nav__list .current_page_item > a { color: var(--sm-orange); }
.sm-menu-toggle { display: none; }

@media (max-width: 921px) {
	.sm-header__inner { flex-direction: column; align-items: stretch; padding: 0; }
	.sm-menu-toggle {
		display: block;
		align-self: flex-end;
		width: 44px; height: 44px;
		margin: 13px 20px;
		padding: 0;
		background: transparent;
		border: 0;
		cursor: pointer;
		position: relative;
	}
	.sm-menu-toggle__bar,
	.sm-menu-toggle__bar::before,
	.sm-menu-toggle__bar::after {
		position: absolute; left: 10px; width: 24px; height: 2px; background: var(--sm-white); content: "";
	}
	.sm-menu-toggle__bar { top: 21px; }
	.sm-menu-toggle__bar::before { top: -7px; left: 0; }
	.sm-menu-toggle__bar::after { top: 7px; left: 0; }
	.sm-nav { display: none; border-top: 1px solid #222; }
	.sm-nav.is-open { display: block; }
	.sm-nav__list { flex-direction: column; }
	.sm-nav__list a { line-height: 1.6; padding: 12px 20px; border-bottom: 1px solid #222; }
}

/* ---------- Etusivun hero ---------- */
.sm-hero {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	min-height: 809px;
	padding: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.sm-hero__media { position: absolute; inset: 0; }
.sm-hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	aspect-ratio: auto !important;
	object-fit: cover;
}
.sm-hero__content { position: relative; z-index: 1; width: 100%; max-width: 1080px; text-align: center; }
.sm-hero__intro { font-size: 26px; font-weight: 700; color: var(--sm-white); }
.sm-hero__logo { width: 40%; margin: 50px auto 0; }
.sm-hero__logo img { display: block; width: 100%; height: auto; }
.sm-hero__title {
	margin: 0 0 50px;
	color: var(--sm-orange);
	font-size: 65px;
	line-height: 1.4;
	text-transform: uppercase;
}
@media (max-width: 767px) {
	.sm-hero { min-height: 600px; padding: 40px 20px; }
	.sm-hero__intro { font-size: 22px; }
	.sm-hero__logo { width: 70%; }
	.sm-hero__title { font-size: 32px; }
}

/* ---------- Etusivun korttiruudukko ---------- */
.sm-cards { max-width: 1200px; margin: 0 auto; padding: 20px; }
.sm-cards__grid {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 1010px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
.sm-cards__item { margin: 0; }
.sm-cards__link { display: block; aspect-ratio: 1 / 1; overflow: hidden; transition: opacity .2s; }
.sm-cards__link:hover { opacity: .9; }
.sm-cards__link img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
	.sm-cards__grid { grid-template-columns: 1fr; }
}

/* ---------- Etusivun yhteystiedot ---------- */
.sm-contact { max-width: 1200px; margin: 0 auto; background: var(--sm-white); padding: 0 0 5%; }
.sm-contact__inner { max-width: 1050px; margin: 0 auto; padding: 0 10px; text-align: center; }
.sm-rule { border: 0; border-top: 2px solid var(--sm-orange); margin: 0; padding: 15px 0 0; }
.sm-contact__logo { width: 18%; min-width: 140px; margin: 15px auto 0; }
.sm-contact__logo-link { display: block; aspect-ratio: 1080 / 750; overflow: hidden; }
.sm-contact__logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sm-contact__title { margin-top: 50px; color: #050404; font-size: 32px; text-transform: uppercase; }
.sm-contact__details { margin: 20px 0; }
.sm-contact__details p { margin: 0; }
.sm-social { display: flex; justify-content: center; gap: 0; margin-bottom: 20px; }
.sm-social__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	color: var(--sm-orange);
	background: var(--sm-white);
	text-decoration: none;
	transition: opacity .2s;
}
.sm-social__link:hover { opacity: .9; }
.sm-social__link .pencil-button__text {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.sm-map iframe { display: block; width: 100%; height: 450px; border: 0; }

/* ---------- Alasivujen oranssi laatikko ---------- */
.sm-page { max-width: 800px; margin: 0 auto; padding-bottom: 48px; }
.sm-box {
	background: var(--sm-orange);
	padding: 50px 50px 61px;
	box-shadow: 0 0 30px rgba(0, 0, 0, .05);
}
.sm-box + .sm-box { margin-top: 30px; }
.sm-box__image { aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 20px; }
.sm-box__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sm-box__heading { color: var(--sm-white); font-size: 32px; margin-bottom: 20px; }
.sm-box__heading a { text-decoration: none; }
.sm-box__text { margin-bottom: 20px; }
.sm-box__text p { margin: 0 0 20px; }
.sm-box__text a { text-decoration: underline; }
.sm-box__actions { display: flex; flex-wrap: wrap; gap: 20px 10px; margin: 0 0 20px; }
.sm-box__actions--stack { flex-direction: column; align-items: flex-start; }
.sm-box__spacer { height: 50px; }
.sm-box__logo { margin: 0 auto; }
.sm-box__logo--narrow { width: 22%; min-width: 110px; }
.sm-box__logo--wide { width: 32%; min-width: 150px; }
.sm-box__logo img { display: block; width: 100%; height: auto; }
.sm-entry img { max-width: 100%; height: auto; }
@media (max-width: 767px) {
	.sm-box { padding: 40px 20px 20px; }
}

/* Painikkeet */
.sm-btn {
	display: inline-flex;
	align-items: center;
	gap: 15px;
	padding: 15px 30px;
	border-radius: 10px;
	background: var(--sm-white);
	color: #060606;
	font-size: 17px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	transition: color .2s, background-color .2s;
}
.sm-btn:hover, .sm-btn:focus { color: var(--sm-orange); }
.sm-btn--dark { background: var(--sm-black); color: var(--sm-white); }
.sm-btn--dark:hover, .sm-btn--dark:focus { background: var(--sm-gray); color: var(--sm-white); }

/* Plus-erotin */
.sm-pluses {
	border: 0;
	height: 10px;
	margin: 15px 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10' viewBox='0 0 20 10'%3E%3Cpath d='M4 5h6M7 2v6' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: repeat-x;
	background-position: left center;
	background-size: 20px 10px;
}

/* Kuvia-sivun kuvaruudut */
.sm-gallery {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.sm-gallery__item { position: relative; margin: 0; min-height: 326px; overflow: hidden; }
.sm-gallery__media { position: absolute; inset: 0; }
.sm-gallery__media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: auto !important; }
.sm-gallery__item::after { content: ""; position: absolute; inset: 0; background: #1a1a1a; opacity: 0; transition: opacity .2s; pointer-events: none; }
.sm-gallery__item:hover::after { opacity: .14; }
.sm-gallery__title { position: relative; z-index: 1; padding: 130px 20px 20px 45px; font-size: 26px; text-transform: uppercase; }
.sm-gallery__link { color: var(--sm-white); text-decoration: none; }
@media (max-width: 600px) {
	.sm-gallery { grid-template-columns: 1fr; }
	.sm-gallery__title { padding-left: 30px; }
}

/* ---------- Alapalkki ---------- */
.sm-footer {
	background: var(--sm-black);
	border-top: 1px solid var(--sm-line);
	padding: 20px;
	color: var(--sm-white);
	text-align: center;
}
.sm-footer__text { margin: 0; line-height: 81px; }
@media (max-width: 767px) {
	.sm-footer__text { line-height: 1.65; padding: 20px 0; }
}
.sm-to-top {
	position: fixed;
	right: 30px;
	bottom: 30px;
	z-index: 99;
	width: 26px;
	height: 26px;
	line-height: 26px;
	border-radius: 2px;
	background: var(--sm-orange);
	color: var(--sm-white);
	font-size: 13px;
	text-align: center;
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s;
}
.sm-to-top.is-visible { opacity: 1; visibility: visible; }

/* Kuvakkeet */
.sm-icon { display: inline-block; flex: none; background: currentColor; -webkit-mask: var(--sm-icon) center / contain no-repeat; mask: var(--sm-icon) center / contain no-repeat; }
.sm-icon--instagram { --sm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z'/%3E%3C/svg%3E"); }
.sm-icon--facebook { --sm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z'/%3E%3C/svg%3E"); }
.sm-icon--arrow { --sm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zM140 300h116v70.9c0 10.7 13 16.1 20.5 8.5l114.3-114.9c4.7-4.7 4.7-12.2 0-16.9l-114.3-115c-7.6-7.6-20.5-2.2-20.5 8.5V212H140c-6.6 0-12 5.4-12 12v64c0 6.6 5.4 12 12 12z'/%3E%3C/svg%3E"); }
.sm-btn .sm-icon { width: 1em; height: 1em; }
.sm-social__link .sm-icon { width: 44px; height: 44px; }
