/*
 * Kunda by Pencilino: homepage sections.
 * Scroll-driven behaviour is added by assets/js/home.js; state classes use the is-* / kd-js-* pattern.
 */

/* ---------- Section themes ---------- */
.kd-section--dark { background: var(--kd-surface); color: var(--kd-text); }
.kd-section--light { background: var(--kd-yellow); color: var(--kd-surface); }
.kd-section--light .kd-lead { color: inherit; }

.kd-lead { font-size: 1.6rem; line-height: 1.2; color: var(--kd-text); font-weight: 300; }
.kd-intro {
	font: 700 4.2vw/1 var(--kd-display);
	letter-spacing: -.01em;
	max-width: 30ch;
	margin-bottom: 0;
	padding-bottom: 90px;
}

.kd-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.kd-split > :first-child { position: sticky; top: 110px; }

/* ---------- Hero ---------- */
.kd-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: 140px 0 80px;
	background: var(--kd-surface);
	color: #fff;
}
.kd-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
	filter: brightness(1.15);
}
.kd-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(22, 22, 25, .48); }
.kd-hero .kd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 33vw; gap: 4vw; align-items: end; }
.kd-hero__title {
	font-size: 13vw;
	line-height: .78;
	letter-spacing: -.04em;
	margin: 0;
	text-transform: uppercase;
	overflow: hidden;
	padding-bottom: .05em;
}
.kd-hero__line { display: block; color: #fff; }
.kd-hero__line--accent { color: var(--kd-accent); }
.kd-hero__text p { margin: 0 0 1.5rem; max-width: none; }

/* ---------- Statement: card grows to fill the screen, About scrolls over it ---------- */
.kd-statement { position: relative; height: 200vh; height: 200svh; padding: 0; overflow: clip; background: var(--kd-yellow); }
.kd-statement__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.kd-statement__card { position: absolute; inset: 0; overflow: hidden; background: var(--kd-bg); will-change: transform; }
.kd-statement__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kd-statement__card::after { content: ""; position: absolute; inset: 0; background: rgba(14, 14, 16, 0); }
.kd-statement__text {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	gap: 2.5vw;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: #fff;
	pointer-events: none;
}
.kd-statement__text p { margin: 0; max-width: 58vw; font: 700 5vw/1.05 var(--kd-display); letter-spacing: -.03em; }
.kd-statement__icon { width: 50px; height: 50px; }

/* ---------- About (#down) ---------- */
.kd-about {
	position: relative;
	z-index: 2;
	margin-top: -100vh;
	margin-top: -100svh;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
}

/* ---------- What we do (#what): native horizontal scroll, scroll-driven once JS adds .is-hscroll ---------- */
.kd-cards { margin-top: 56px; background: var(--kd-surface); color: var(--kd-text); }
.kd-cards__track { display: flex; gap: 0; padding: 0; overflow-x: auto; scroll-snap-type: x mandatory; }
.kd-cards.is-hscroll { height: calc(100vh + var(--kd-dist, 0px)); height: calc(100svh + var(--kd-dist, 0px)); }
.kd-cards.is-hscroll .kd-cards__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.kd-cards.is-hscroll .kd-cards__track { flex: none; width: max-content; overflow: visible; scroll-snap-type: none; will-change: transform; }

.kd-card {
	position: relative;
	flex: 0 0 100vw;
	width: 100vw;
	height: 100vh;
	height: 100svh;
	scroll-snap-align: start;
	background: transparent;
	padding: 0 46vw 0 4vw;
	display: flex;
	flex-direction: column;
	justify-content: center;
	isolation: isolate;
	overflow: hidden;
}
.kd-card:nth-child(even) { background: rgba(255, 255, 255, .03); }
.kd-card__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
/* dark overlay between video and text */
.kd-card::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: rgba(22, 22, 25, .48); }
.kd-card > :not(.kd-card__video) { position: relative; z-index: 1; }
.kd-card h3 { font-size: 4vw; line-height: 1.05; margin-bottom: .5em; }
.kd-card__eyebrow { color: var(--kd-accent); font: 500 1rem var(--kd-body); margin-bottom: 1.2rem; }
.kd-card p { color: var(--kd-text); font-size: clamp(1rem, 1.3vw, 1.3rem); margin-bottom: 0; }
.kd-card .kd-link { margin-top: 1.5rem; }

/* ---------- Built for change ---------- */
.kd-change h2 { font-size: 4.2vw; max-width: 34ch; }

/* ---------- Expertise ---------- */
.kd-exp { display: grid; grid-template-columns: 1fr; gap: 0 56px; margin-top: 0; }
.kd-exp__item { border-top: 1px solid var(--kd-line); padding: 32px 0 40px; }
.kd-exp__title { display: flex; gap: 14px; align-items: baseline; }
.kd-exp__num { font: 800 2.6vw/1 var(--kd-display); color: var(--kd-accent); }
.kd-exp p { color: var(--kd-text); }

/* ---------- Stats ---------- */
.kd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-top: 48px; }
.kd-stat { text-align: center; }
.kd-stat__value { display: block; font: 800 9vw/1 var(--kd-display); color: var(--kd-accent); letter-spacing: -.03em; }
.kd-stat__num { color: var(--kd-surface); }
.kd-stat__label { color: rgba(6, 6, 6, .6); }

/* ---------- Contact ---------- */
.kd-contact { background: var(--kd-accent); color: var(--kd-surface); }
.kd-contact__title { color: var(--kd-surface); margin-bottom: 10px; }
.kd-contact .kd-lead { color: var(--kd-surface); }
.kd-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; max-width: 100%; }
.kd-form__full { grid-column: 1 / -1; }
.kd-form__label { display: block; font-size: .9rem; color: var(--kd-surface); margin-bottom: .4em; }
.kd-form__control {
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid #060606;
	color: var(--kd-surface);
	font: inherit;
	padding: .85em 0;
	border-radius: 0;
}
.kd-form__control:focus { outline: 0; border-bottom-width: 3px; margin-bottom: -2px; }
textarea.kd-form__control { min-height: 140px; resize: vertical; }
.kd-form__msg { grid-column: 1 / -1; color: var(--kd-surface); margin: 0; }
.kd-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kd-contact .kd-btn.kd-btn--dark:hover { background: var(--kd-text); color: var(--kd-surface); }

/* ---------- Scroll reveal and load-in (JS hooks) ---------- */
.kd-reveal .kd-w { display: inline-block; will-change: opacity; opacity: 0; }
.kd-js-reveal .kd-reveal,
.kd-js-hero .kd-hero__line,
.kd-js-hero .kd-hero__text,
.kd-js-hero .kd-hero .kd-btn { opacity: 0; }
.kd-js-hero .kd-statement__card { transform: scale(.7); border-radius: 48px; }

/* ---------- Preloader ---------- */
html:not(.kd-preloading) .kd-preloader { display: none; }
html.kd-preloading { overflow: hidden; }
.kd-preloader { position: fixed; inset: 0; z-index: 200; background: var(--kd-surface); transition: transform .9s cubic-bezier(.7, 0, .2, 1); }
.kd-preloader.is-done { transform: translateY(-100%); }
.kd-preloader__count { position: absolute; left: 4vw; bottom: calc(50% + 2vw); font: 800 13vw/.85 var(--kd-display); letter-spacing: -.04em; color: var(--kd-text); }
.kd-preloader__line { position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; }
.kd-preloader__line i { display: block; height: 100%; background: var(--kd-accent); transform: scaleX(0); transform-origin: left; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.kd-hero .kd-wrap { grid-template-columns: 1fr; gap: 6vw; }
	.kd-hero__title { font-size: 18vw; }
}

@media (max-width: 820px) {
	.kd-split { grid-template-columns: 1fr; gap: 32px; }
	.kd-split > :first-child { position: static; }
	.kd-card { padding: 0 6vw; }
	.kd-card h3 { font-size: 9vw; }
	.kd-hero__title { font-size: 21vw; }
	.kd-statement__text p { font-size: 9vw; max-width: 72vw; }
	.kd-exp__num { font-size: 7vw; }
	.kd-preloader__count { font-size: 21vw; }
	/* match the carousel card headings on phones */
	.kd-intro,
	.kd-change h2 { font-size: 9vw; line-height: 1.05; max-width: none; }
	.kd-stat__value { font-size: 20vw; }
	.kd-form { grid-template-columns: 1fr; }
}
