/* ═══════════════════════════════════════════════════════════════
   GLOBAL ANIMATION STABILIZERS
   Fixes "thin lines" and "pixelation" artifacts during transitions
   ═══════════════════════════════════════════════════════════════ */
html.srn-anim {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Prevent sub-pixel jitter and edge-leaks during transforms */
html.srn-anim .srn-reveal,
.srn-tree-breeze,
.srn-collage__cloud,
.hero-rotating-item,
.animate-fade-in-up,
section.relative {
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-webkit-transform-style: preserve-3d;
	transform-style: preserve-3d;
	-webkit-perspective: 1000;
	perspective: 1000;
	/* Fix for hairline gaps/lines on section edges */
	outline: 1px solid transparent;
}

html.srn-anim .srn-reveal.srn-reveal--init {
	will-change: transform, opacity;
}

html.srn-anim .srn-reveal.srn-reveal--hidden {
	opacity: 0;
	transform: translate3d(0, var(--srn-reveal-distance, 14px), 0);
}

html.srn-anim .srn-reveal.srn-reveal--visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition-property: opacity, transform;
	transition-duration: var(--srn-reveal-duration, 600ms);
	transition-timing-function: var(--srn-reveal-ease, cubic-bezier(0.22, 1, 0.36, 1));
	transition-delay: var(--srn-reveal-delay, 0ms);
}

.srn-icon--on-light {
	filter: invert(1);
}

/* Hero Rotation - Optimized to prevent ghosting */
.hero-rotating-item {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, visibility 0.4s;
    pointer-events: none;
    visibility: hidden;
    z-index: 1;
}

.hero-rotating-item.is-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    transition: opacity 0.8s ease-in, transform 0.8s ease-out;
}

.hero-rotating-item:not(.is-active) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

@media (max-width: 767.98px) {
	.process-overview-section .srn-process-card {
		min-height: 260px;
	}
}

@media (hover: hover) and (pointer: fine) {
	.srn-process-card:hover .srn-process-overlay {
		opacity: 1;
		pointer-events: auto;
	}
}

.srn-process-card.srn-process-card--open .srn-process-overlay {
	opacity: 1;
	pointer-events: auto;
}

.srn-collage {
	position: relative;
	line-height: 0;
}

.srn-collage__base {
	display: block;
}

.srn-collage__cloud {
	position: absolute;
	bottom: 2%;
	width: min(160px, 18%);
	height: auto;
	z-index: 5;
	opacity: 0;
	transform: translate3d(0, 0, 0);
	will-change: transform, opacity;
	pointer-events: none;
}

.srn-collage__cloud--left {
	left: 15%;
	transform: translate3d(-70vw, 0, 0);
}

.srn-collage__cloud--right {
	right: 15%;
	transform: translate3d(70vw, 0, 0);
}

html.srn-anim .srn-collage.srn-collage--animate .srn-collage__cloud {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition-property: transform, opacity;
	transition-duration: 1800ms;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

html.srn-anim .srn-collage.srn-collage--animate .srn-collage__cloud--left {
	transition-delay: 0ms;
}

html.srn-anim .srn-collage.srn-collage--animate .srn-collage__cloud--right {
	transition-delay: 80ms;
}

@keyframes srn-tree-breeze-sway {
	0% {
		transform: translate3d(0, 0, 0) rotate(0deg) skewX(0deg);
	}
	25% {
		transform: translate3d(0, -2px, 0) rotate(1.2deg) skewX(0.25deg);
	}
	50% {
		transform: translate3d(0, 0, 0) rotate(0deg) skewX(0deg);
	}
	75% {
		transform: translate3d(0, 2px, 0) rotate(-1.2deg) skewX(-0.25deg);
	}
	100% {
		transform: translate3d(0, 0, 0) rotate(0deg) skewX(0deg);
	}
}

.srn-tree-breeze {
	transform-origin: 22% 92%;
	animation: srn-tree-breeze-sway 6.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
	will-change: transform;
}

.srn-tree-breeze--right {
	transform-origin: 78% 92%;
	animation-duration: 9.0s;
	animation-delay: -1.6s;
}

.srn-tree-breeze--bonsai {
	transform-origin: 18% 88%;
	animation-duration: 7.6s;
	animation-delay: -2.4s;
}

@keyframes srn-typewriter-reveal {
	from {
		clip-path: inset(0 100% 0 0);
	}
	to {
		clip-path: inset(0 0 0 0);
	}
}

@keyframes srn-typewriter-caret {
	0%,
	100% {
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
}

@keyframes srn-typewriter-caret-hide {
	to {
		opacity: 0;
	}
}

@keyframes srn-typewriter-caret-move {
	from {
		left: 0;
	}
	to {
		left: 100%;
	}
}

.about-hero-section .srn-typewriter {
	display: inline-block;
	position: relative;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	--srn-typewriter-width: 48ch;
	--srn-typewriter-steps: 53;
	--srn-typewriter-duration: 3.8s;
	width: var(--srn-typewriter-width);
	clip-path: inset(0 100% 0 0);
	font-size: clamp(14px, 2.0vw, 22px);
	line-height: 1.2;
	letter-spacing: 0.01em;
	animation: srn-typewriter-reveal var(--srn-typewriter-duration) steps(var(--srn-typewriter-steps), end) forwards;
}

.about-hero-section .srn-typewriter__line {
	display: inline;
}

.about-hero-section .srn-typewriter__line--2 {
	margin-left: 0.35ch;
}

.about-hero-section .srn-typewriter::after {
	content: "";
	position: absolute;
	top: 0;
	height: 1.2em;
	width: 2px;
	background: currentColor;
	left: 0;
	animation:
		srn-typewriter-caret-move var(--srn-typewriter-duration) steps(var(--srn-typewriter-steps), end) forwards,
		srn-typewriter-caret 700ms step-end infinite,
		srn-typewriter-caret-hide 1ms linear var(--srn-typewriter-duration) forwards;
}

@media (max-width: 767.98px) {
	.about-hero-section .srn-typewriter {
		--srn-typewriter-width: 49ch;
	}
}

@media (max-width: 399.98px) {
	.about-hero-section .srn-typewriter {
		width: auto;
		max-width: 92vw;
		white-space: normal;
		text-align: center;
		clip-path: none;
		animation: none;
	}

	.about-hero-section .srn-typewriter::after {
		content: none;
	}

	.about-hero-section .srn-typewriter__line {
		display: block;
		position: relative;
		width: fit-content;
		max-width: 92vw;
		margin-left: auto;
		margin-right: auto;
		white-space: nowrap;
		overflow: hidden;
		clip-path: inset(0 100% 0 0);
	}

	.about-hero-section .srn-typewriter__line--1 {
		--srn-typewriter-width: 40ch;
		--srn-typewriter-steps: 40;
		--srn-typewriter-duration: 2.6s;
		animation: srn-typewriter-reveal var(--srn-typewriter-duration) steps(var(--srn-typewriter-steps), end) forwards;
	}

	.about-hero-section .srn-typewriter__line--2 {
		margin-left: auto;
		--srn-typewriter-width: 16ch;
		--srn-typewriter-steps: 16;
		--srn-typewriter-duration: 1.6s;
		animation: srn-typewriter-reveal var(--srn-typewriter-duration) steps(var(--srn-typewriter-steps), end) forwards;
		animation-delay: 2.7s;
	}

	.about-hero-section .srn-typewriter__line::after {
		content: "";
		position: absolute;
		top: 0;
		height: 1.2em;
		width: 2px;
		background: currentColor;
		left: 0;
		animation:
			srn-typewriter-caret-move var(--srn-typewriter-duration) steps(var(--srn-typewriter-steps), end) forwards,
			srn-typewriter-caret 700ms step-end infinite,
			srn-typewriter-caret-hide 1ms linear var(--srn-typewriter-duration) forwards;
	}

	.about-hero-section .srn-typewriter__line--2::after {
		animation-delay: 2.7s, 2.7s, calc(2.7s + var(--srn-typewriter-duration));
	}
}

@media (min-width: 768px) and (max-width: 1023.98px) {
	.about-hero-section .about-hero-circle {
		width: 360px;
		height: 360px;
	}

	.about-hero-section .about-hero-pagoda {
		left: 6%;
		bottom: 34px;
		width: 150px;
	}

	.about-hero-section .about-hero-torii {
		right: 4%;
		bottom: 34px;
		width: 160px;
	}
}

@keyframes srn-gallery-shine {
	0% {
		transform: translate3d(-140%, 0, 0) skewX(-18deg);
		opacity: 0;
	}
	15% {
		opacity: 0.35;
	}
	100% {
		transform: translate3d(140%, 0, 0) skewX(-18deg);
		opacity: 0;
	}
}

html.srn-anim .our-gallery-section.srn-reveal--init .grid > div {
	position: relative;
	overflow: hidden;
	will-change: transform, opacity, clip-path;
}

html.srn-anim .our-gallery-section.srn-reveal--init .grid > div::after {
	content: "";
	position: absolute;
	top: -15%;
	bottom: -15%;
	left: 0;
	width: 45%;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.55) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	transform: translate3d(-140%, 0, 0) skewX(-18deg);
	opacity: 0;
	pointer-events: none;
}

html.srn-anim .our-gallery-section.srn-reveal--hidden .grid > div {
	opacity: 0.001;
	transform: translate3d(0, 14px, 0) scale(0.985);
	clip-path: var(--srn-gallery-clip, inset(0 100% 0 0));
}

html.srn-anim .our-gallery-section.srn-reveal--visible .grid > div {
	opacity: 1;
	transform: translate3d(0, 0, 0) scale(1);
	clip-path: inset(0 0 0 0);
	transition-property: opacity, transform, clip-path;
	transition-duration: 900ms;
	transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--srn-gallery-delay, 0ms);
}

html.srn-anim .our-gallery-section.srn-reveal--visible .grid > div::after {
	animation: srn-gallery-shine 950ms cubic-bezier(0.22, 1, 0.36, 1) both;
	animation-delay: calc(var(--srn-gallery-delay, 0ms) + 140ms);
}

html.srn-anim .our-gallery-section .grid > div:nth-child(1) { --srn-gallery-delay: 0ms; --srn-gallery-clip: inset(0 100% 0 0); }
html.srn-anim .our-gallery-section .grid > div:nth-child(2) { --srn-gallery-delay: 70ms; --srn-gallery-clip: inset(0 0 0 100%); }
html.srn-anim .our-gallery-section .grid > div:nth-child(3) { --srn-gallery-delay: 140ms; --srn-gallery-clip: inset(100% 0 0 0); }
html.srn-anim .our-gallery-section .grid > div:nth-child(4) { --srn-gallery-delay: 210ms; --srn-gallery-clip: inset(0 0 100% 0); }
html.srn-anim .our-gallery-section .grid > div:nth-child(5) { --srn-gallery-delay: 280ms; --srn-gallery-clip: inset(0 100% 0 0); }
html.srn-anim .our-gallery-section .grid > div:nth-child(6) { --srn-gallery-delay: 350ms; --srn-gallery-clip: inset(0 0 0 100%); }
html.srn-anim .our-gallery-section .grid > div:nth-child(7) { --srn-gallery-delay: 420ms; --srn-gallery-clip: inset(100% 0 0 0); }
html.srn-anim .our-gallery-section .grid > div:nth-child(8) { --srn-gallery-delay: 490ms; --srn-gallery-clip: inset(0 0 100% 0); }
html.srn-anim .our-gallery-section .grid > div:nth-child(9) { --srn-gallery-delay: 560ms; --srn-gallery-clip: inset(0 100% 0 0); }
html.srn-anim .our-gallery-section .grid > div:nth-child(10) { --srn-gallery-delay: 630ms; --srn-gallery-clip: inset(0 0 0 100%); }

@media (prefers-reduced-motion: reduce) {
	html.srn-anim .srn-reveal.srn-reveal--hidden,
	html.srn-anim .srn-reveal.srn-reveal--visible {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.srn-collage__cloud,
	html.srn-anim .srn-collage.srn-collage--animate .srn-collage__cloud {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.srn-tree-breeze {
		animation: none;
		transform: none;
	}

	.about-hero-section .srn-typewriter {
		animation: none;
		width: auto;
		clip-path: none;
	}

	.about-hero-section .srn-typewriter::after {
		content: none;
	}

	html.srn-anim .our-gallery-section.srn-reveal--hidden .grid > div,
	html.srn-anim .our-gallery-section.srn-reveal--visible .grid > div {
		opacity: 1;
		transform: none;
		clip-path: none;
		transition: none;
	}

	html.srn-anim .our-gallery-section.srn-reveal--init .grid > div::after {
		animation: none;
		opacity: 0;
	}
}
