/*
Theme Name: Hultan tila by Pencil
Theme URI: http://hultantila-72026.local/
Author: Z-Factory
Author URI: https://www.z-factory.fi/
Description: Hultan tilan oma kevyt teema. Ulkoasu on teeman hallinnassa, ja kaikki sivujen tekstit ja kuvat ovat muokattavissa suoraan sivulta Pencil-editorilla.
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hultan-tila-pencil
*/

:root {
	--ht-green: #6dab3a;
	--ht-olive: #bcba63;
	--ht-dark: #202714;
	--ht-tint: #f2f2f2;
	--ht-text: #5a5a5a;
	--ht-soft-text: #d8d8d2;
	--ht-white: #ffffff;
	--ht-serif: "Roboto Slab", Georgia, serif;
	--ht-sans: Montserrat, "Helvetica Neue", Arial, sans-serif;
	--ht-container: 1140px;
	--ht-gutter: 40px;
	--ht-section-y: 104px;
}

/* Base ------------------------------------------------------------------ */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--ht-white);
	color: var(--ht-text);
	font-family: var(--ht-sans);
	font-size: 18px;
	line-height: 1.857;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--ht-green);
}

a:hover,
a:focus-visible {
	color: var(--ht-olive);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 20px;
	font-family: var(--ht-serif);
	font-weight: 400;
}

p {
	margin: 0 0 1.4em;
}

.ht-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.ht-skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--ht-dark);
	color: var(--ht-white);
}

.ht-skip-link:focus {
	top: 16px;
}

.ht-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	flex: none;
}

/* Rich text ------------------------------------------------------------- */

.pencil-richtext > :last-child {
	margin-bottom: 0;
}

.pencil-richtext ul,
.pencil-richtext ol {
	margin: 0 0 1.4em;
	padding-left: 1.4em;
}

.ht-prose {
	margin-bottom: 1.4em;
}

.ht-lead {
	margin-bottom: 1.4em;
	font-size: 20px;
}

.ht-lead--italic {
	font-style: italic;
}

/* Headings -------------------------------------------------------------- */

.ht-heading-2 {
	color: var(--ht-green);
	font-size: 40px;
	line-height: 1.3;
}

.ht-heading-3 {
	color: var(--ht-green);
	font-size: 32px;
	line-height: 1.3;
}

.ht-heading-5 {
	margin-bottom: 10px;
	color: var(--ht-dark);
	font-size: 18px;
	line-height: 1.2;
}

.ht-kicker {
	margin: 0 0 20px;
	color: var(--ht-olive);
	font-family: var(--ht-serif);
	font-size: 18px;
	line-height: 1.2;
}

/* Layout ---------------------------------------------------------------- */

.ht-container {
	position: relative;
	width: 100%;
	max-width: calc(var(--ht-container) + 2 * var(--ht-gutter));
	margin: 0 auto;
	padding: 0 var(--ht-gutter);
}

.ht-container--narrow {
	max-width: calc(800px + 2 * var(--ht-gutter));
}

.ht-section {
	position: relative;
	padding: var(--ht-section-y) 0;
	background: var(--ht-white);
}

.ht-section--tint {
	background: var(--ht-tint);
}

.ht-section--flush-top {
	padding-top: 0;
}

.ht-has-leaf::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 278px;
	height: 165px;
	background: url("assets/green-leaf.webp") no-repeat right bottom;
	background-size: contain;
	mix-blend-mode: darken;
	pointer-events: none;
}

.ht-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: start;
}

.ht-split__media {
	padding-right: 80px;
}

.ht-split__body {
	position: relative;
	z-index: 1;
	max-width: 538px;
}

/* Image frames: the theme fixes every slot, the uploaded file never sets its size. */

.ht-frame {
	position: relative;
	overflow: hidden;
}

.ht-frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.ht-frame--rounded {
	border-radius: 12px;
}

.ht-frame--soft {
	border-radius: 8px;
}

.ht-frame--shadow {
	box-shadow: 9px 6px 25px rgba(36, 36, 36, 0.84);
}

.ht-split__body .ht-frame {
	margin-top: 10px;
}

/* Caption card: image with a label over its lower edge. */

.ht-caption-card {
	position: relative;
}

.ht-caption-card__label {
	position: absolute;
	left: 18px;
	bottom: 18px;
	z-index: 1;
	max-width: calc(100% - 36px);
	margin: 0;
	padding: 14px 22px;
	border-radius: 0 12px 0 12px;
	background: rgba(32, 39, 20, 0.86);
	color: var(--ht-tint);
	font-family: var(--ht-serif);
	font-size: 18px;
	line-height: 1.4;
	text-decoration: none;
}

a.ht-caption-card__label:hover,
a.ht-caption-card__label:focus-visible {
	color: var(--ht-olive);
}

.ht-divider {
	display: block;
	width: 48px;
	height: 2px;
	margin: 10px auto 0;
	background: var(--ht-olive);
}

.ht-divider--start {
	margin: 0 0 24px;
}

.ht-btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 4px;
	background: var(--ht-green);
	color: var(--ht-white);
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	text-transform: capitalize;
	transition: background-color 0.2s;
}

.ht-btn:hover,
.ht-btn:focus-visible {
	background: var(--ht-dark);
	color: var(--ht-white);
}

/* Header ---------------------------------------------------------------- */

.ht-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
}

.ht-header__inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 18px var(--ht-gutter);
}

.admin-bar .ht-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .ht-header {
		top: 46px;
	}
}

.ht-header__brand .custom-logo-link {
	display: block;
}

.ht-header__brand .custom-logo {
	display: block;
	width: 214px;
	height: auto;
}

.ht-header__site-name {
	color: var(--ht-white);
	font-family: var(--ht-serif);
	font-size: 28px;
	text-decoration: none;
}

.ht-nav__list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ht-nav__list a {
	display: block;
	padding: 0 18px;
	color: var(--ht-white);
	font-size: 18px;
	line-height: 70px;
	text-decoration: none;
	transition: color 0.2s;
}

.ht-nav__list a:hover,
.ht-nav__list a:focus-visible {
	color: var(--ht-olive);
}

.ht-nav__list li:last-child a {
	padding-right: 0;
}

.ht-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 0;
	border-radius: 4px;
	background: rgba(32, 39, 20, 0.6);
	cursor: pointer;
}

.ht-nav-toggle__bar {
	display: block;
	height: 2px;
	background: var(--ht-white);
}

/* Page hero ------------------------------------------------------------- */

.ht-hero {
	position: relative;
	overflow: hidden;
	padding: 160px 0;
	border-radius: 0 0 120px 0;
	background: var(--ht-dark);
	text-align: center;
}

.ht-hero--with-text {
	padding-bottom: 80px;
}

.ht-hero__media,
.ht-home-hero__media,
.ht-sales__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.ht-hero__media img,
.ht-home-hero__media img,
.ht-sales__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.ht-hero__media::after,
.ht-home-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(32, 39, 20, 0.8);
}

.ht-hero__content {
	position: relative;
	z-index: 1;
	max-width: 640px;
	margin: 0 auto;
	padding: 0 20px;
}

.ht-hero__title {
	margin: 0;
	color: var(--ht-white);
	font-size: 64px;
	line-height: 1.4;
}

.ht-hero__text {
	margin-top: 20px;
	color: var(--ht-soft-text);
}

.ht-hero--plain {
	padding: 200px 0 100px;
}

/* Front page ------------------------------------------------------------ */

.ht-home-hero {
	position: relative;
	overflow: hidden;
	padding: 280px 0 240px;
	border-radius: 0 0 150px 0;
	background: var(--ht-tint);
}

.ht-home-hero__media::after {
	background: rgba(32, 39, 20, 0.64);
}

.ht-home-hero__inner {
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
}

.ht-home-hero__portrait,
.ht-home-hero__text {
	padding: 30px;
}

.ht-home-hero__title {
	margin: 0 0 20px;
	color: var(--ht-white);
	font-size: 64px;
	line-height: 1.15;
}

.ht-home-hero__description {
	margin-bottom: 20px;
	color: var(--ht-soft-text);
	font-size: 20px;
}

.ht-home-hero__phone {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	color: var(--ht-white);
}

.ht-home-hero__phone .ht-icon {
	color: var(--ht-olive);
	font-size: 16px;
}

.ht-home-intro {
	padding-bottom: 160px;
}

.ht-home-intro .ht-icon--quote {
	margin-bottom: 10px;
	color: var(--ht-green);
	font-size: 50px;
}

.ht-sales {
	position: relative;
	padding: 64px 0 104px;
	background: var(--ht-tint);
}

.ht-sales .ht-container {
	z-index: 1;
}

.ht-sales__box {
	width: 64%;
	margin: 0 auto;
	padding: 30px;
	border-radius: 19px 0;
	background: rgba(12, 12, 12, 0.7);
	color: #fcfcfc;
	text-align: center;
}

.ht-sales__title {
	color: var(--ht-white);
	font-size: 40px;
	line-height: 1.3;
}

.ht-sales__text strong {
	color: var(--ht-olive);
}

/* About ------------------------------------------------------------------ */

.ht-about {
	padding-bottom: 80px;
}

.ht-about__wide {
	margin: 0 0 60px;
}

.ht-about__cols {
	display: grid;
	grid-template-columns: 490fr 569fr;
	gap: 80px;
	align-items: start;
}

.ht-about__col .ht-frame {
	margin-bottom: 30px;
}

/* Varieties -------------------------------------------------------------- */

.ht-varieties__group {
	padding: 30px 10px 0;
}

.ht-variety {
	display: grid;
	grid-template-columns: 297px 1fr;
}

.ht-variety__media,
.ht-variety__body {
	padding: 10px;
}

.ht-variety__body {
	max-width: 811px;
	padding-left: 20px;
}

/* Contact ---------------------------------------------------------------- */

.ht-contact {
	padding-bottom: 80px;
}

.ht-contact__intro {
	display: grid;
	grid-template-columns: 404px 1fr;
	gap: 24px;
	margin-bottom: 60px;
	padding-left: 25px;
}

.ht-contact__main {
	display: grid;
	grid-template-columns: 249px 1fr;
	gap: 40px;
	align-items: start;
}

.ht-contact__item {
	display: flex;
	gap: 16px;
	margin-bottom: 16px;
}

.ht-contact__item .ht-icon {
	margin-top: 2px;
	color: var(--ht-green);
	font-size: 16px;
}

.ht-contact__value {
	margin: 0;
}

.ht-contact__map {
	justify-self: end;
	width: 100%;
	max-width: 769px;
}

.ht-contact__map iframe {
	display: block;
	width: 100%;
	height: 400px;
	border: 0;
}

/* Gallery ---------------------------------------------------------------- */

.ht-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.ht-cta {
	overflow: hidden;
	background: #dde1e2;
}

.ht-cta__media {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 640px;
	max-width: 50%;
}

.ht-cta__media img {
	display: block;
	width: 100%;
	height: auto;
}

.ht-cta__body {
	position: relative;
	z-index: 1;
	max-width: 570px;
}

/* Fallback entries -------------------------------------------------------- */

.ht-entry {
	margin-bottom: 60px;
}

/* Footer ----------------------------------------------------------------- */

.ht-footer {
	background: var(--ht-dark);
	color: var(--ht-soft-text);
	font-size: 16px;
	line-height: 1.857;
}

.ht-footer a {
	color: var(--ht-olive);
}

.ht-footer a:hover,
.ht-footer a:focus-visible {
	color: var(--ht-white);
}

.ht-footer__main {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 40px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 60px var(--ht-gutter) 40px;
}

.ht-frame--footer-logo {
	width: 157px;
}

.ht-footer__heading {
	margin-bottom: 20px;
	color: var(--ht-tint);
	font-size: 25px;
	line-height: 1.5;
}

.ht-footer__text p {
	margin-bottom: 1em;
}

.ht-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 20px var(--ht-gutter) 30px;
	font-size: 14px;
}

.ht-footer__bottom p {
	margin: 0;
}

.ht-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 2px;
	background: var(--ht-olive);
	color: var(--ht-white);
	font-size: 14px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
}

.ht-to-top.is-visible {
	opacity: 1;
	visibility: visible;
}

.ht-to-top:hover,
.ht-to-top:focus-visible {
	background: var(--ht-dark);
	color: var(--ht-white);
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1200px) {
	.ht-nav__list a {
		padding: 0 12px;
		font-size: 16px;
	}
}

@media (max-width: 1024px) {
	:root {
		--ht-section-y: 80px;
	}

	.ht-header__brand .custom-logo {
		width: 170px;
	}

	.ht-nav__list a {
		padding: 0 9px;
		font-size: 15px;
	}

	.ht-split__media {
		padding-right: 40px;
	}

	.ht-about__cols {
		gap: 40px;
	}

	.ht-contact__intro {
		grid-template-columns: 1fr 2fr;
		padding-left: 0;
	}
}

@media (max-width: 921px) {
	:root {
		--ht-gutter: 20px;
		--ht-section-y: 60px;
	}

	.ht-header__inner {
		flex-wrap: wrap;
	}

	.ht-header__brand .custom-logo {
		width: 157px;
	}

	.ht-nav-toggle {
		display: flex;
	}

	.ht-nav {
		display: none;
		flex-basis: 100%;
		padding: 10px 0;
		border-radius: 8px;
		background: rgba(32, 39, 20, 0.95);
	}

	.ht-header.is-open .ht-nav {
		display: block;
	}

	.ht-nav__list {
		flex-direction: column;
	}

	.ht-nav__list a,
	.ht-nav__list li:last-child a {
		padding: 0 20px;
		line-height: 48px;
	}

	.ht-hero {
		padding: 170px 0 90px;
		border-radius: 0 0 60px 0;
	}

	.ht-hero--with-text {
		padding-bottom: 60px;
	}

	.ht-hero__title,
	.ht-home-hero__title {
		font-size: 40px;
	}

	.ht-home-hero {
		padding: 160px 0 80px;
		border-radius: 0 0 80px 0;
	}

	.ht-home-hero__inner,
	.ht-split,
	.ht-about__cols,
	.ht-contact__intro,
	.ht-contact__main,
	.ht-footer__main {
		grid-template-columns: 1fr;
	}

	.ht-home-hero__portrait {
		order: 2;
		max-width: 420px;
	}

	.ht-split {
		gap: 40px;
	}

	.ht-split__media {
		padding-right: 0;
	}

	.ht-split__body {
		max-width: none;
	}

	.ht-heading-2,
	.ht-sales__title {
		font-size: 32px;
	}

	.ht-heading-3 {
		font-size: 28px;
	}

	.ht-sales__box {
		width: 100%;
	}

	.ht-variety {
		grid-template-columns: 1fr;
	}

	.ht-variety__media:empty {
		display: none;
	}

	.ht-variety__body {
		padding-left: 10px;
	}

	.ht-gallery {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.ht-has-leaf::after {
		width: 160px;
		height: 95px;
	}

	.ht-cta__media {
		max-width: 60%;
		opacity: 0.35;
	}
}

@media (max-width: 544px) {
	body {
		font-size: 16px;
	}

	.ht-hero__title,
	.ht-home-hero__title {
		font-size: 34px;
	}

	.ht-lead,
	.ht-home-hero__description {
		font-size: 18px;
	}

	.ht-gallery {
		grid-template-columns: 1fr;
	}
}

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