/* ==========================================================================
   Kirsten Book — page sections (patterns)
   Loaded on the front end and inside the editor.
   ========================================================================== */

.kb-section__intro { max-width: 56ch; margin-inline: auto; color: var(--wp--preset--color--grey); font-size: 1.125rem; }
.kb-section .wp-block-image { margin: 0; }

/* Shared script accent */
.kb-hero h1 em,
.kb-cta__script,
.kb-signature {
	font-family: var(--wp--preset--font-family--script);
	font-style: normal;
	font-weight: 400;
	line-height: 1;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.kb-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: grid;
	align-items: center;
	min-height: clamp(560px, 84vh, 880px);
	padding-block: clamp(4.5rem, 11vw, 7.5rem) clamp(8rem, 15vw, 11rem);
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--white);
}
.kb-hero > .kb-hero__media {
	position: absolute; inset: 0; z-index: -2;
	margin: 0; max-width: none; height: 100%;
}
.kb-hero > .kb-hero__media img {
	width: 100%; height: 100%;
	object-fit: cover; object-position: center 30%;
}
/* Soft dark wash so white text stays readable on any photo */
.kb-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgba(47, 47, 47, .30) 0%, rgba(47, 47, 47, .52) 55%, rgba(47, 47, 47, .62) 100%);
	pointer-events: none;
}
/* Double wave into the light-pink intro band.
   Colors = rose/logo pink (#F16CA2) and blush (#FADDE8) from theme.json. Update here if the palette changes. */
.kb-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
	height: clamp(70px, 10vw, 150px);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'%3E%3Cpath d='M0 64C220 16 430 8 720 56s520 92 720 26v68H0z' fill='%23F16CA2' fill-opacity='.45'/%3E%3Cpath d='M0 110c250-48 520-44 770-14s470 36 670-6v60H0z' fill='%23FADDE8'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
	pointer-events: none;
}
.kb-hero__content { position: relative; padding-inline: var(--kb-gutter); }
.kb-hero h1 {
	color: var(--wp--preset--color--white);
	font-size: clamp(2.5rem, 5.6vw, 4.5rem);
	line-height: 1.05;
	margin-bottom: 1.5rem;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .18);
}
.kb-hero h1 em {
	display: block;
	font-size: 1.5em;
	color: var(--wp--preset--color--blush);
	margin-top: .05em;
}
.kb-hero__lead {
	max-width: 50ch; margin-inline: auto;
	font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
	color: rgba(255, 255, 255, .92);
}
.kb-hero .wp-block-buttons { gap: .75rem 1rem; margin-top: 2rem; }
.kb-hero .wp-block-button:not(.is-style-outline) > .wp-block-button__link {
	background: var(--wp--preset--color--blush);
	color: var(--wp--preset--color--black);
}
.kb-hero .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
}
.kb-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--white);
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .8);
}
.kb-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black);
}
.kb-hero__note {
	margin-top: 1.75rem;
	font-size: .875rem;
	color: rgba(255, 255, 255, .78);
	max-width: 52ch; margin-inline: auto;
}

/* --------------------------------------------------------------------------
   What I Treat
   -------------------------------------------------------------------------- */
.kb-treat__grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(1.25rem, 2.5vw, 2rem);
	margin-top: clamp(2rem, 5vw, 3.25rem);
}
.kb-treat__grid > * { margin: 0 !important; }
.kb-treat__card { grid-column: span 3; }
.kb-treat__card--featured { grid-column: span 6; }

/* Featured: ADHD + Eating Disorders get a filled panel */
.kb-treat__card--featured {
	background: var(--wp--preset--color--blush-light);
	border-radius: var(--kb-radius);
	padding: clamp(1.75rem, 3.5vw, 2.75rem);
	border-left: 4px solid var(--wp--preset--color--rose);
}
.kb-treat__card--featured h3 { font-size: var(--wp--preset--font-size--x-large); margin-bottom: .75rem; }
.kb-treat__card--featured p { font-size: 1.0625rem; }

/* Supporting areas: lighter, top rule only */
.kb-treat__card:not(.kb-treat__card--featured) {
	padding-top: 1.25rem;
	border-top: 2px solid var(--wp--preset--color--blush);
}
.kb-treat__card:not(.kb-treat__card--featured) h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.kb-treat__card:not(.kb-treat__card--featured) p { font-size: .975rem; color: var(--wp--preset--color--grey); }

.kb-treat__link { margin: 1rem 0 0; }
.kb-treat__link a { font-weight: 700; color: var(--wp--preset--color--rose-deep); text-underline-offset: .2em; }
.kb-treat__closing {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--charcoal);
}

@media (max-width: 1023px) {
	.kb-treat__card--featured { grid-column: span 12; }
	.kb-treat__card { grid-column: span 6; }
}
@media (max-width: 600px) {
	.kb-treat__card { grid-column: span 12; }
}

/* --------------------------------------------------------------------------
   How I Can Help
   -------------------------------------------------------------------------- */
.kb-help { padding-top: 0; }
.kb-help__cols { gap: clamp(2rem, 6vw, 5rem); }
.kb-arch img {
	width: 100%;
	aspect-ratio: 4 / 5; object-fit: cover;
	border-radius: 999px 999px var(--kb-radius) var(--kb-radius);
}
.kb-steps { counter-reset: kb-step; margin-top: 2rem; }
.kb-step {
	counter-increment: kb-step;
	position: relative;
	padding: 0 0 1.5rem 4rem;
	margin: 0 !important;
}
.kb-step + .kb-step { padding-top: 1.5rem; border-top: 1px solid var(--wp--preset--color--blush); }
.kb-step::before {
	content: counter(kb-step);
	position: absolute; left: 0; top: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.6rem; line-height: 1;
	color: var(--wp--preset--color--rose-deep);
}
.kb-step + .kb-step::before { top: 1.5rem; }
.kb-step h3 { margin-bottom: .35rem; }
.kb-step p { margin: 0; color: var(--wp--preset--color--grey); }

@media (max-width: 781px) {
	.kb-help__media-col { max-width: 420px; margin-inline: auto; }
}

/* --------------------------------------------------------------------------
   How I Want You to Feel
   -------------------------------------------------------------------------- */
.kb-feel__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	margin-top: clamp(2rem, 5vw, 3rem);
}
.kb-feel__grid > * { margin: 0 !important; }
.kb-feel__item { padding: .5rem clamp(1rem, 2vw, 1.75rem); text-align: center; }
.kb-feel__item + .kb-feel__item { border-left: 1px solid var(--wp--preset--color--rose); }
.kb-feel__item h3 {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	color: var(--wp--preset--color--rose-deep);
	margin-bottom: .5rem;
}
.kb-feel__item p { margin: 0; font-size: .975rem; }

@media (max-width: 900px) {
	.kb-feel__grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
	.kb-feel__item { padding: 1.25rem 0; }
	.kb-feel__item + .kb-feel__item { border-left: 0; border-top: 1px solid var(--wp--preset--color--rose); }
}

/* --------------------------------------------------------------------------
   Meet Kirsten
   -------------------------------------------------------------------------- */
.kb-story .wp-block-columns { gap: clamp(2rem, 6vw, 5rem); }
.kb-story .is-style-tilted-frame img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.kb-signature {
	font-size: 3.25rem;
	color: var(--wp--preset--color--rose-deep);
	margin: .25rem 0 1.25rem;
}
@media (max-width: 781px) {
	.kb-story .is-style-tilted-frame { max-width: 420px; margin: 1rem auto 0; }
}

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */
.kb-cta { text-align: center; padding-bottom: clamp(3rem, 7vw, 5rem); }
.kb-cta__script { font-size: clamp(2.5rem, 5vw, 3.5rem); color: var(--wp--preset--color--rose-deep); margin-block: .75rem 0; }
.kb-cta p:has(+ .kb-cta__script) { margin-bottom: 0; }
.kb-cta h2 { max-width: 20ch; margin-inline: auto; }
.kb-cta .wp-block-buttons { margin-top: 1.75rem; }
.kb-cta__small { margin-top: 1.25rem; font-size: .9375rem; color: var(--wp--preset--color--grey); }

/* Two white sections in a row: don't double the gap */
.kb-story + .kb-cta { padding-top: clamp(1rem, 3vw, 2rem); }

/* --------------------------------------------------------------------------
   Logo ornaments
   -------------------------------------------------------------------------- */
.kb-intro-band::before,
.kb-cta::before {
	content: "";
	display: block;
	margin: 0 auto 2.25rem;
	background-color: var(--wp--preset--color--rose);
	-webkit-mask: url("../img/leaf-divider.png") center / contain no-repeat;
	        mask: url("../img/leaf-divider.png") center / contain no-repeat;
}
.kb-intro-band::before { width: min(440px, 80%); aspect-ratio: 911 / 136; }
.kb-cta::before {
	width: 64px; aspect-ratio: 190 / 136;
	-webkit-mask-image: url("../img/leaf-branch.png");
	        mask-image: url("../img/leaf-branch.png");
	margin-bottom: 1.5rem;
}
