/**
 * Torjujat: ilmeen siistiminen (marraskuu 2026).
 * Ladataan main.css:n jälkeen. Jos haluat palata entiseen, poista
 * tj-refresh-tyylin lataus functions.php:stä.
 *
 * 1. Yläpalkki: puhelinnumero ghost-napin tilalle, mobiilissa hampurilaisvalikko
 * 2. Hero: sisältö samaan linjaan logon kanssa
 * 3. Laidan kieleke ja botin teksti vasta vierityksen jälkeen
 * 4. Rauhallisempi taustarytmi etusivulla
 */

/* ============================================================
 * 1. YLÄPALKKI
 * ============================================================ */
.tj-nav__call {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 6px;
	color: var(--contrast);
	font-family: "Kumbh Sans", "Poppins", sans-serif;
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
}
.tj-nav__call:hover { color: var(--accent-3); }
.tj-nav__call svg { width: 18px; height: 18px; flex: none; color: var(--accent-3); }

.tj-nav__toggle {
	display: none;
	position: relative;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--contrast);
	cursor: pointer;
}
.tj-nav__toggle span {
	position: absolute;
	left: 11px;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.25s var(--tj-ease), opacity 0.2s ease, top 0.25s var(--tj-ease);
}
.tj-nav__toggle span:nth-child(1) { top: 15px; }
.tj-nav__toggle span:nth-child(2) { top: 21px; }
.tj-nav__toggle span:nth-child(3) { top: 27px; }
html.tj-nav-open .tj-nav__toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
html.tj-nav-open .tj-nav__toggle span:nth-child(2) { opacity: 0; }
html.tj-nav-open .tj-nav__toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1024px) {
	.tj-site-header__inner {
		flex-wrap: nowrap;
		gap: 8px;
		padding: 10px 12px 10px 16px;
	}
	.tj-logo img { width: 118px; }
	.tj-nav__actions { margin-left: auto; gap: 4px; }
	.tj-nav__cta { display: none; } /* mobiilissa tarjouspyyntö on alapalkissa */
	.tj-nav__call {
		width: 44px;
		height: 44px;
		justify-content: center;
		padding: 0;
		border-radius: 50%;
		background: rgba(101, 172, 146, 0.14);
	}
	.tj-nav__call span { display: none; }
	.tj-nav__toggle { display: inline-block; }

	.tj-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: block;
		max-height: calc(100vh - 64px);
		max-height: calc(100dvh - 64px);
		overflow-y: auto;
		padding: 8px 16px 24px;
		background: var(--base-2);
		border-bottom: 1px solid rgba(44, 44, 44, 0.08);
		box-shadow: 0 18px 40px rgba(20, 32, 28, 0.12);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.2s ease, transform 0.25s var(--tj-ease), visibility 0.2s;
	}
	html.tj-nav-open .tj-nav { opacity: 1; visibility: visible; transform: none; }
	.tj-nav__list { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; }
	.tj-nav__list > li { border-bottom: 1px solid rgba(44, 44, 44, 0.07); }
	.tj-nav__list a {
		display: flex;
		width: 100%;
		padding: 14px 8px;
		font-size: 16px;
		border-radius: 10px;
	}
	.tj-nav__list .menu-item-has-children > a::after { display: none; }
	.tj-nav__list .sub-menu {
		position: static;
		min-width: 0;
		padding: 0 0 10px 12px;
		background: transparent;
		border: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
	.tj-nav__list .sub-menu a {
		padding: 9px 8px;
		font-size: 15px;
		font-weight: 500;
		white-space: normal;
	}
	html.tj-nav-open { overflow: hidden; }
	html.tj-nav-open .tj-lead-bar { transform: translateY(140%); }
}

/* ============================================================
 * 2. HERO
 * Hero on flex-asettelu, jolloin sisältölaatikko kutistui tekstin
 * levyiseksi ja keskittyi. Täysi leveys tuo tekstin logon linjaan.
 * ============================================================ */
.tj-front-hero__inner { width: 100%; }
.tj-front-hero__inner--home { max-width: var(--tj-container-max); }

/* Mobiili: yksi selvä pääkehotus (puhelu on yläpalkissa ja alapalkissa), lupaukset rivissä */
@media (max-width: 640px) {
	.tj-front-hero--home .tj-front-hero__ctas .tj-btn--ghost { display: none; }
	.tj-front-hero--home .tj-front-hero__trust {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 8px 16px;
		margin-top: 20px;
		font-size: 13px;
	}
}

/* ============================================================
 * 3. KIELEKE JA BOTTI VASTA VIERITYKSEN JÄLKEEN
 * ============================================================ */
.tj-lead-tab {
	animation: none;
	transition: transform 0.45s var(--tj-ease), padding 0.25s var(--tj-ease), background-color 0.2s ease, box-shadow 0.25s var(--tj-ease);
}
html:not(.tj-scrolled) .tj-lead-tab {
	transform: translate(-110%, -50%) rotate(180deg);
	box-shadow: none;
}

.tj-bot-launcher { transition: transform 0.25s var(--tj-ease), box-shadow 0.25s var(--tj-ease), padding 0.3s var(--tj-ease), gap 0.3s var(--tj-ease); }
.tj-bot-launcher__text {
	display: inline-block;
	max-width: 200px;
	overflow: hidden;
	white-space: nowrap;
	transition: max-width 0.35s var(--tj-ease), opacity 0.25s ease;
}
html:not(.tj-scrolled) .tj-bot-launcher { padding: 8px; gap: 0; }
html:not(.tj-scrolled) .tj-bot-launcher__text { max-width: 0; opacity: 0; }

/* ============================================================
 * 4. TAUSTARYTMI
 * Etusivu: tumma hero, vaalea pohja ja yksi pehmeä minttu vuorotellen.
 * Liikkuvat pallot, aaltokuvio ja pisteet pois "Miksi torjujat" -osiosta.
 * ============================================================ */
:root { --tj-soft: #eef6f2; }

.tj-front-miksi { background: var(--tj-soft); }
.tj-front-miksi::before,
.tj-front-miksi::after,
.tj-front-miksi__orb-1,
.tj-front-miksi__orb-2,
.tj-front-miksi__orb-3 { display: none; }

.tj-section--diagnostiikka { background: var(--tj-soft); }
.tj-section--diagnostiikka::before { display: none; }

@media (prefers-reduced-motion: reduce) {
	.tj-lead-tab, .tj-bot-launcher, .tj-bot-launcher__text, .tj-nav { transition: none; }
}

/* ============================================================
 * 5. HINNASTO: JYRSIJÄKAMPANJA YHTENÄ ISONA KORTTINA
 * ============================================================ */
.tj-rodent-offer {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
	padding: clamp(28px, 4vw, 52px);
	background: var(--base-2);
	border: 1px solid rgba(101, 172, 146, 0.35);
	border-radius: var(--tj-radius-lg);
	box-shadow: var(--tj-shadow);
}
.tj-rodent-offer--campaign {
	background: linear-gradient(135deg, #1f3a31 0%, #2c5546 100%);
	border-color: transparent;
	color: #fff;
}
.tj-rodent-offer__badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: var(--tj-radius-pill);
	background: var(--accent-3);
	color: #fff;
	font-family: "Kumbh Sans", sans-serif;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.tj-rodent-offer--campaign .tj-rodent-offer__badge { background: #f9ca9f; color: #1f3a31; }
.tj-rodent-offer__title {
	margin: 16px 0 12px;
	font-family: "Kumbh Sans", "Poppins", sans-serif;
	font-size: clamp(28px, 3.6vw, 42px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: inherit;
}
.tj-rodent-offer__lead { margin: 0 0 20px; font-size: 16px; line-height: 1.6; opacity: 0.85; max-width: 46ch; }
.tj-rodent-offer__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tj-rodent-offer__list li { position: relative; padding-left: 30px; font-weight: 600; }
.tj-rodent-offer__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--accent-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.tj-rodent-offer__price {
	display: grid;
	gap: 12px;
	padding: clamp(20px, 3vw, 32px);
	background: #fff;
	border-radius: var(--tj-radius-lg);
	color: var(--contrast);
	box-shadow: 0 18px 40px rgba(10, 24, 19, 0.18);
}
.tj-rodent-offer__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(44, 44, 44, 0.08);
}
.tj-rodent-offer__row span { font-weight: 600; opacity: 0.75; }
.tj-rodent-offer__row strong {
	font-family: "Kumbh Sans", sans-serif;
	font-size: clamp(30px, 3.4vw, 40px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--accent-3);
	white-space: nowrap;
}
.tj-rodent-offer__note { margin: 0; font-size: 13.5px; opacity: 0.7; }
.tj-rodent-offer__cta { justify-content: center; width: 100%; margin-top: 4px; }

@media (max-width: 820px) {
	.tj-rodent-offer { grid-template-columns: 1fr; }
}

/* ============================================================
 * 6. HERON VAIHTUVA SANA
 * Leveys mitattiin JS:llä ennen fontin latautumista, jolloin
 * "kutsumattomat" leikkautui lopusta. Nyt sanat pinotaan samaan
 * grid-soluun: laatikko on aina pisimmän sanan levyinen, myös kun
 * fontti latautuu tai ruudun koko muuttuu. clip-path rajaa vain
 * pystysuunnassa, joten kursiivin kallistus ei leikkaudu.
 * ============================================================ */
.tj-rotator {
	overflow: visible;
	clip-path: inset(-0.05em -0.4em -0.12em -0.2em);
	min-width: 0 !important;
}
.tj-rotator__list { display: grid; }
.tj-rotator__item { position: relative; grid-area: 1 / 1; padding-right: 0.06em; }
/* Kolme riviä samaan vasempaan linjaan (sanavälit ja marginaalit sisensivät) */
.tj-front-hero__title--home { display: flex; flex-direction: column; align-items: flex-start; }
.tj-front-hero__title--home .tj-rotator,
.tj-front-hero__title--home .tj-front-hero__pair { margin-left: 0; margin-right: 0; }

/* ============================================================
 * 7. FOOTERIN VAALEA LOGO (sisältää sloganin, siksi leveämpi)
 * ============================================================ */
.tj-logo--footer img { width: 240px; max-width: 100%; height: auto; }

/* ============================================================
 * 8. YLÄPALKIN LOGO (logopaketin 1_teksti, SVG)
 * ============================================================ */
.tj-site-header .tj-logo img { width: 138px; height: auto; }
@media (max-width: 1024px) {
	.tj-site-header .tj-logo img { width: 118px; }
}
