/*
Theme Name: Tulevaisuus
Theme URI: https://tulevaisuuspuolue.com
Author: Tulevaisuuspuolue
Description: Kevyt ja saavutettava lohkoteema Tulevaisuuspuolueen verkkosivuille. Valmiit osiot etusivulle (hero, tavoitteet, ihmiset, uutiset, liity jäseneksi, uutiskirje), paikalliset fontit ilman ulkoisia palveluita.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tulevaisuus
Tags: block-patterns, full-site-editing, accessibility-ready, one-column, custom-colors
*/

/* Ohita navigaatio -linkki näppäimistökäyttäjille */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	padding: 0.75rem 1rem;
	z-index: 100000;
}

/* Selkeä fokusrengas kaikille interaktiivisille elementeille */
:where(a, button, input, select, textarea, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Ylätunniste pysyy näkyvissä vierittäessä */
.tp-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(180%) blur(10px);
	-webkit-backdrop-filter: saturate(180%) blur(10px);
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent) !important;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .tp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tp-header { top: 46px; } }

/* Hero: violetti–oranssi liukuväri */
.tp-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	background-image:
		radial-gradient(60% 80% at 100% 100%, rgba(255, 140, 60, 0.55) 0%, transparent 60%),
		radial-gradient(50% 70% at 0% 0%, rgba(120, 70, 220, 0.45) 0%, transparent 60%),
		linear-gradient(120deg, #24103F 0%, #4A2590 38%, #9B3F96 68%, #E8652E 100%);
}
/* Liity-laatikko: käänteinen liukuväri */
.has-primary-background-color.tp-hero {
	background-image:
		radial-gradient(60% 90% at 0% 100%, rgba(255, 176, 137, 0.45) 0%, transparent 60%),
		linear-gradient(120deg, #D9541F 0%, #B8457F 50%, #5B2CA0 100%);
}

/* Korostettu sana otsikossa */
.tp-highlight,
.tp-hero mark {
	background: linear-gradient(transparent 68%, var(--wp--preset--color--accent) 68%, var(--wp--preset--color--accent) 90%, transparent 90%);
	padding: 0 0.08em;
	color: inherit;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Pieni yläotsikko (eyebrow) */
.tp-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
}

/* Kortit: nosto hoverilla */
.tp-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	height: 100%;
}
.tp-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--lifted);
}
@media (prefers-reduced-motion: reduce) {
	.tp-card, .tp-card:hover { transition: none; transform: none; }
}

/* Tavoitteiden numerot */
.tp-number {
	font-family: var(--wp--preset--font-family--display);
	font-variant-numeric: tabular-nums;
}

/* Ihmiset: pyöreät kuvat */
.tp-person .wp-block-image img {
	max-width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 999px;
}

/* Uutislistan kuvat */
.tp-news .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

/* Uutiskirjelomake (Listmonk) */
.tp-newsletter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: stretch;
}
.tp-newsletter-form input[type="email"],
.tp-newsletter-form input[type="text"] {
	flex: 1 1 220px;
	min-width: 0;
	padding: 0.95rem 1.1rem;
	border-radius: 999px;
	border: 2px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	font: inherit;
}
.tp-newsletter-form input:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
}
.tp-newsletter-form altcha-widget {
	flex: 1 1 100%;
	--altcha-border-radius: 12px;
	--altcha-max-width: 100%;
	--altcha-color-base: var(--wp--preset--color--base);
	--altcha-color-text: var(--wp--preset--color--ink);
}
.tp-newsletter-form button {
	flex: 0 0 auto;
	padding: 0.95rem 1.75rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease;
}
.tp-newsletter-form button:hover { transform: translateY(-1px); }
@media (max-width: 600px) {
	.tp-newsletter-form button { flex: 1 1 100%; }
}

/* Mobiilissa ylätunnisteen liity-painike piiloon (valikossa on sama linkki) */
@media (max-width: 600px) {
	.tp-header .tp-header-cta { display: none !important; }
}

/* Alatunnisteen linkkilistat ilman luettelomerkkejä */
.tp-footer-links {
	list-style: none;
	padding-left: 0;
}
.tp-footer-links li { margin-bottom: 0.5rem; }
.tp-footer a { text-decoration: none; }
.tp-footer a:hover { text-decoration: underline; }

/* Päivämäärälinkit ilman alleviivausta */
.wp-block-post-date a { text-decoration: none; color: inherit; }

/* Hero-ingressi ei ulotu auringon päälle */
.tp-hero p.has-large-font-size { max-width: 36rem; }
