/* Kod Sudby — mesmerizing home hero */

:root {
	--ks-cream: #f9f7f2;
	--ks-cream-deep: #f0ebe3;
	--ks-taupe: #967959;
	--ks-taupe-hover: #7e6348;
	--ks-gold: #c4a574;
	--ks-charcoal: #2c2825;
	--ks-muted: #6b635a;
	--ks-line: rgba(150, 121, 89, 0.18);
}

.ks-hero {
	position: relative;
	background: var(--ks-cream);
	overflow: hidden;
	margin: 0 0 0;
	border-radius: 0;
	isolation: isolate;
}

.ks-hero__wash {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 70% 60% at 85% 70%, rgba(196, 165, 116, 0.12), transparent 60%),
		radial-gradient(ellipse 50% 40% at 10% 20%, rgba(150, 121, 89, 0.06), transparent 55%),
		linear-gradient(180deg, var(--ks-cream) 0%, var(--ks-cream-deep) 100%);
	pointer-events: none;
	z-index: 0;
}

.ks-hero__tassel {
	position: absolute;
	top: 0;
	left: 18px;
	z-index: 2;
	opacity: 0.9;
	pointer-events: none;
}

.ks-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: 28px 40px;
	align-items: center;
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px 28px 36px;
}

.ks-hero__copy {
	max-width: 460px;
	padding-left: 28px;
}

.ks-hero__title {
	font-family: Georgia, "Times New Roman", "Noto Serif", serif;
	font-size: clamp(1.85rem, 3.2vw, 2.75rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-weight: 700;
	color: var(--ks-charcoal);
	margin: 0 0 16px;
}

.ks-hero__lead {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--ks-muted);
	margin: 0 0 28px;
	max-width: 38ch;
}

.ks-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--ks-taupe);
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 14px 22px;
	border-radius: 8px;
	box-shadow: 0 10px 28px rgba(150, 121, 89, 0.28);
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ks-hero__cta:hover {
	background: var(--ks-taupe-hover);
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(150, 121, 89, 0.34);
}

.ks-hero__cta-arrow {
	flex-shrink: 0;
}

.ks-hero__stage {
	position: relative;
	min-height: 360px;
	aspect-ratio: 1 / 0.92;
	max-width: 560px;
	margin: 0 auto;
}

.ks-hero__poster {
	position: absolute;
	inset: 0;
	z-index: 20;
	overflow: hidden;
	background: #9a7658;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.75s ease, visibility 0s linear 0s;
}

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

.ks-hero__pano-status {
	position: absolute;
	left: 50%;
	bottom: 22px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100% - 32px);
	padding: 10px 16px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 999px;
	background: rgba(44, 40, 37, 0.76);
	box-shadow: 0 10px 28px rgba(44, 40, 37, 0.22);
	color: #fff;
	font-family: "Manrope", system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	transform: translateX(-50%);
	backdrop-filter: blur(8px);
	white-space: nowrap;
}

.ks-hero__pano-spinner {
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
	border: 2px solid rgba(255, 255, 255, 0.36);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ks-pano-spin 0.9s linear infinite;
}

body.home .ks-hero__stage #ks-pano {
	position: absolute !important;
	inset: 0 !important;
	z-index: 21;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.75s ease;
}

body.home .ks-hero__stage.is-pano-ready #ks-pano {
	opacity: 1;
	pointer-events: auto;
}

.ks-hero__stage.is-pano-ready .ks-hero__poster {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.75s ease, visibility 0s linear 0.75s;
}

.ks-hero__stage.is-pano-delayed .ks-hero__pano-spinner {
	display: none;
}

.ks-hero__chart {
	position: absolute;
	inset: 4% 6% 10% 6%;
	width: auto;
	height: auto;
	opacity: 0.85;
	animation: ks-chart-spin 80s linear infinite;
	pointer-events: none;
}

.ks-hero__mountains {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 28%;
	pointer-events: none;
	z-index: 1;
}

.ks-hero__house-wrap {
	position: absolute;
	inset: 12% 14% 16% 14%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ks-hero__house {
	width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 18px 40px rgba(80, 60, 40, 0.18));
	animation: ks-house-breathe 6s ease-in-out infinite;
}

.ks-hero__links {
	position: absolute;
	inset: 8% 10% 12% 10%;
	width: auto;
	height: auto;
	z-index: 3;
	pointer-events: none;
	overflow: visible;
}

.ks-hero__link {
	stroke: var(--ks-gold);
	stroke-width: 0.35;
	stroke-dasharray: 1.2 1.6;
	opacity: 0.55;
	vector-effect: non-scaling-stroke;
}

.ks-hero__orbit {
	position: absolute;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 72px;
	text-align: center;
	--ks-orbit-x: 0px;
	--ks-orbit-y: 0px;
	transform: translate(var(--ks-orbit-x), var(--ks-orbit-y));
	will-change: transform;
}

.ks-hero__orbit-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	animation: ks-orbit-float 5.5s ease-in-out infinite;
}

.ks-hero__orbit:nth-of-type(odd) .ks-hero__orbit-inner {
	animation-duration: 6.2s;
	animation-delay: -1.2s;
}

.ks-hero__orbit--top-left {
	top: 4%;
	left: 2%;
}

.ks-hero__orbit--top-right {
	top: 2%;
	right: 4%;
}

.ks-hero__orbit--top-right .ks-hero__orbit-inner {
	animation-delay: -0.6s;
}

.ks-hero__orbit--mid-right {
	top: 42%;
	right: 0;
}

.ks-hero__orbit--mid-right .ks-hero__orbit-inner {
	animation-delay: -1.8s;
}

.ks-hero__orbit--bottom-right {
	bottom: 8%;
	right: 8%;
}

.ks-hero__orbit--bottom-right .ks-hero__orbit-inner {
	animation-delay: -2.4s;
}

.ks-hero__orbit--bottom-left {
	bottom: 10%;
	left: 2%;
}

.ks-hero__orbit--bottom-left .ks-hero__orbit-inner {
	animation-delay: -0.9s;
}

.ks-hero__orbit-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--ks-line);
	box-shadow: 0 8px 22px rgba(120, 95, 70, 0.12);
	backdrop-filter: blur(6px);
}

.ks-hero__orbit-icon svg {
	width: 22px;
	height: 22px;
}

.ks-hero__orbit-label {
	font-size: 0.72rem;
	line-height: 1.2;
	color: var(--ks-muted);
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* Stats bar */
.ks-stats {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px 16px;
	align-items: center;
	background: #f3efe8;
	border-top: 1px solid var(--ks-line);
	border-bottom: 1px solid var(--ks-line);
	padding: 18px 24px;
	max-width: 1180px;
	margin: 0 auto 24px;
}

.ks-stats__item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 0;
}

.ks-stats__icon {
	display: flex;
	color: var(--ks-taupe);
	flex-shrink: 0;
}

.ks-stats__icon svg {
	width: 22px;
	height: 22px;
}

.ks-stats__text {
	/* px: inherited rem root is ~10px — rem sizes collapse on mobile */
	font-size: 15px;
	line-height: 1.35;
	color: var(--ks-charcoal);
	font-weight: 600;
}

.ks-stats__cta {
	flex: 0 0 auto;
	margin-left: auto;
	white-space: nowrap;
}

@keyframes ks-orbit-float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-7px);
	}
}

@keyframes ks-house-breathe {
	0%,
	100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-4px) scale(1.012);
	}
}

@keyframes ks-chart-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes ks-pano-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ks-hero__chart,
	.ks-hero__house,
	.ks-hero__orbit-inner,
	.ks-hero__pano-spinner {
		animation: none !important;
	}

	.ks-hero__poster,
	body.home .ks-hero__stage #ks-pano {
		transition: none !important;
	}
}

/* Fit inside Dashwall column layout */
.page-col-featured .ks-hero,
.page-col-featured .ks-stats {
	width: 100%;
}

.page-col-featured .ks-hero {
	border-radius: 16px;
	margin-bottom: 0;
}

.page-col-featured .ks-stats {
	border-radius: 0 0 16px 16px;
	margin-bottom: 20px;
}

@media (max-width: 960px) {
	.ks-hero__inner {
		grid-template-columns: 1fr;
		padding: 36px 20px 28px;
		gap: 20px;
	}

	.ks-hero__copy {
		padding-left: 12px;
		max-width: none;
		text-align: left;
	}

	.ks-hero__stage {
		min-height: 300px;
		max-width: 440px;
	}

	.ks-hero__tassel {
		left: 8px;
		transform: scale(0.85);
		transform-origin: top left;
	}

	.ks-stats {
		grid-template-columns: 1fr 1fr;
		gap: 14px 12px;
		padding: 16px 18px;
	}

	.ks-stats__item:last-child {
		grid-column: 1 / -1;
		justify-content: center;
	}
}

@media (max-width: 560px) {
	.ks-hero__pano-status {
		bottom: 14px;
		max-width: calc(100% - 24px);
		padding: 9px 12px;
		font-size: 12px;
		white-space: normal;
	}

	.ks-hero__title {
		font-size: 1.65rem;
	}

	.ks-hero__orbit {
		width: 60px;
	}

	.ks-hero__orbit-icon {
		width: 40px;
		height: 40px;
	}

	.ks-hero__orbit-label {
		font-size: 0.65rem;
	}

	.ks-stats {
		grid-template-columns: 1fr;
	}

	.ks-stats__item,
	.ks-stats__item:last-child {
		justify-content: flex-start;
		grid-column: auto;
	}
}

/*
 * Panoramic 360° hero.
 * Site-level pannellum replaces the static house with a canvas.
 * #page is display:flex — .ks-stats must stretch full width or it collapses.
 */
body.home .ks-hero,
body.home .ks-stats {
	width: 100%;
	max-width: none;
	align-self: stretch;
	box-sizing: border-box;
}

/* Hide pannellum chrome — zoom/fullscreen look like broken map UI on mobile */
body.home .ks-hero__stage .pnlm-controls-container,
body.home .ks-hero__stage .pnlm-zoom-controls,
body.home .ks-hero__stage .pnlm-fullscreen-toggle-button,
body.home .ks-hero__stage .pnlm-orientation-button,
body.home .ks-hero__stage .pnlm-load-box,
body.home .ks-hero__stage .pnlm-about-msg {
	display: none !important;
}

body.home .ks-hero__stage .pnlm-container,
body.home .ks-hero__stage .pnlm-render-container,
body.home .ks-hero__stage .pnlm-render-container canvas {
	border-radius: inherit;
}

/* Panoramic “Key point” seals are 256px in the embed; keep them proportional. */
@media (max-width: 960px) {
	body.home .ks-hero__stage .ks-pano-logo,
	body.home .ks-hero__stage .ks-pano-logo img {
		width: 96px !important;
		height: 96px !important;
		max-width: 96px !important;
		max-height: 96px !important;
	}
}

@media (max-width: 480px) {
	body.home .ks-hero__stage .ks-pano-logo,
	body.home .ks-hero__stage .ks-pano-logo img {
		width: 78px !important;
		height: 78px !important;
		max-width: 78px !important;
		max-height: 78px !important;
	}
}

@media (min-width: 961px) {
	body.home .ks-hero__inner {
		display: block !important;
		width: 100%;
		max-width: none !important;
		padding: 0 24px !important;
	}

	body.home .ks-hero__stage {
		width: 100% !important;
		max-width: none !important;
		min-height: 0 !important;
		max-height: 560px;
		aspect-ratio: 16 / 5 !important;
		border-radius: 22px;
		overflow: hidden;
	}

	body.home .ks-stats {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: center;
		width: calc(100% - 48px);
		max-width: none;
		gap: 14px 24px;
		margin: 0 24px 24px;
		padding: 16px 22px;
		border-radius: 0 0 22px 22px;
	}

	body.home .ks-stats__item {
		justify-content: flex-start;
		flex: 0 1 auto;
	}

	body.home .ks-stats__text {
		font-size: 15px;
		white-space: nowrap;
	}
}

@media (max-width: 960px) {
	body.home .ks-hero {
		padding: 0 16px;
		flex: 0 0 auto;
	}

	body.home .ks-hero__inner {
		padding: 0 !important;
		gap: 0;
	}

	body.home .ks-hero__stage {
		width: 100% !important;
		max-width: none !important;
		min-height: 220px !important;
		aspect-ratio: 16 / 10 !important;
		border-radius: 16px 16px 0 0;
		overflow: hidden;
	}

	body.home .ks-hero__tassel {
		display: none;
	}

	body.home .ks-stats {
		display: grid !important;
		grid-template-columns: 1fr !important;
		flex: 0 0 auto !important;
		align-self: auto !important;
		width: calc(100% - 32px) !important;
		min-width: 0 !important;
		max-width: none !important;
		margin: 0 16px 20px !important;
		padding: 18px 18px 20px !important;
		gap: 14px !important;
		border-radius: 0 0 16px 16px;
		box-sizing: border-box !important;
	}

	body.home .ks-stats__item {
		justify-content: flex-start !important;
		grid-column: auto !important;
		gap: 12px;
	}

	body.home .ks-stats__icon svg {
		width: 22px;
		height: 22px;
	}

	body.home .ks-stats__text {
		font-size: 16px;
		line-height: 1.35;
		white-space: normal;
	}

	body.home .ks-stats__cta {
		grid-column: 1 / -1 !important;
		width: 100%;
		justify-content: center;
		margin: 8px 0 0 !important;
		justify-self: stretch;
	}
}

@media (max-width: 560px) {
	body.home .ks-hero {
		padding: 0 12px;
	}

	body.home .ks-hero__stage {
		aspect-ratio: 4 / 3 !important;
		min-height: 200px !important;
	}

	body.home .ks-stats {
		width: calc(100% - 24px) !important;
		margin-left: 12px !important;
		margin-right: 12px !important;
		padding: 16px 14px 18px !important;
	}
}

/* Ticker: avoid clipped marquee edge on narrow screens */
@media (max-width: 960px) {
	#ticker {
		padding: 0 12px;
		box-sizing: border-box;
	}

	.ticker-slider-items {
		margin: 1rem 0 0.75rem;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.ticker-slider-items .ticker-title {
		display: none;
	}

	.ticker-slide-item .slide-inner h6 {
		font-size: 1.35rem;
		line-height: 1.35;
	}
}
