/**
 * Homepage template. Built on design-system.css (tokens, .ql-card,
 * .ql-button, .ql-overline, .ql-heading), so it matches the Classes & Events
 * page; section layouts follow the Figma homepage (split hero with the image
 * bleeding to the right edge, centered section headers, card grids, image
 * and text about section).
 *
 * Eyebrows follow the Figma design rather than the design system's Tipique
 * overline: small bold Roboto capitals in the accent color, the hero's
 * included (Tipique's 1 reads as an I in "10AM").
 *
 * Contrast notes (WCAG 2.x):
 * - Eyebrows in terracotta #B0573A: 4.92:1 on white, 4.69:1 on cream.
 * - Body text #131313 on the cream sections #FEF9F0: 17.7:1.
 */

/* Container: 1400px of content (the Figma homepage's is 1200), and 16px
   body text (the design system defaults are 1140px and 18px, which Events
   & Classes keeps). */
.ql-ds.ql-home {
	--ql-container-width: 1400px;
	--ql-font-size-body: 16px;
	--ql-home-icon-size: 2.5rem; /* Card and badge icons, one size. */
	--ql-home-gutter: var(--ql-space-5); /* 24px side padding at every width. */
	--ql-home-section-space: 60px; /* Top and bottom padding of every section: 60 / 80 / 100. */
	--ql-home-band-space: max(32px, (var(--ql-home-section-space) - 20px) / 2); /* Slim bands (newsletter, badges): 32 / 32 / 40. */
}

@media (min-width: 768px) {
	.ql-ds.ql-home {
		--ql-home-section-space: 80px;
	}
}

@media (min-width: 1024px) {
	.ql-ds.ql-home {
		--ql-home-section-space: 100px;
	}
}

/* Sections --------------------------------------------------------------- */

.ql-home .ql-home-section,
.ql-home .ql-home-hero,
.ql-home .ql-home-badges,
.ql-home .ql-home-contact {
	padding: var(--ql-home-section-space) 0;
}

.ql-home .has-accent-bg {
	background-color: var(--ql-color-accent-bg);
}

.ql-home .has-surface-bg {
	background-color: var(--ql-color-surface);
}

/* Navy band (the newsletter bar): white text, 15.6:1 on #1C2436. */
.ql-home .has-dark-bg {
	background-color: var(--ql-color-dark);
	color: #fff;
}

.ql-home .has-dark-bg .ql-heading {
	color: #fff;
}

/* Terracotta fabric band (the newsletter bar): a seamless 500px tile of
   the fabric from the inner-page heroes, faded 70% toward its own main
   color so the print stays quiet. White text is 5.2:1 on it. */
.ql-home .has-pattern-bg {
	background:
		linear-gradient(rgb(173 83 55 / 70%), rgb(173 83 55 / 70%)),
		url("../img/fabric-terracotta.jpg") repeat;
	background-color: #ad5337; /* The tile's main color, shown while it loads. */
	color: #fff;
}

.ql-home .has-pattern-bg .ql-heading {
	color: #fff;
}

.ql-home .ql-home-newsletter,
.ql-home .ql-home-badges {
	padding: var(--ql-home-band-space) 0;
}

.ql-home .ql-home-section__container {
	max-width: calc(var(--ql-container-width) + 2 * var(--ql-home-gutter));
	margin: 0 auto;
	padding: 0 var(--ql-home-gutter);
}

/* Section header: eyebrow, h2, optional intro. */
.ql-home .ql-home-section__header {
	margin: 0 0 var(--ql-space-7);
}

.ql-home .ql-home-section__header.align-center {
	text-align: center;
}

/* Hero, section and card eyebrows. */
.ql-home .ql-home-hero__overline,
.ql-home .ql-home-section__overline,
.ql-home .ql-home-card__overline {
	margin: 0 0 var(--ql-space-3);
	color: var(--ql-color-button);
	font-family: var(--ql-font-body);
	font-size: max(0.875rem, 14px);
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
}

.ql-home .ql-home-section__title {
	font-size: var(--ql-font-size-h2);
}

.ql-home .ql-home-section__subhead {
	max-width: 80ch;
	margin: var(--ql-space-4) auto 0;
}

.ql-home .ql-home-section__header.align-left .ql-home-section__subhead {
	margin-left: 0;
}

/* Section footer: one button. */
.ql-home .ql-home-section__footer {
	display: flex;
	margin-top: var(--ql-space-7);
}

.ql-home .ql-home-section__footer.align-center {
	justify-content: center;
}

.ql-home .ql-home-section__footer.align-left {
	justify-content: flex-start;
	margin-top: var(--ql-space-6);
}

/* Hero ------------------------------------------------------------------- */

/* Cream band; text and a rounded 4:3 photo side by side inside the
   container, vertically centered. Stacked below 1024px: text, then photo. */
.ql-home .ql-home-hero {
	background-color: var(--ql-color-accent-bg);
}

/* Stacked (below 1024px) the photo stops at 640px wide, left-aligned
   with the text, so it doesn't fill a tablet screen, and sits 48px from
   the text. */
.ql-home .ql-home-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ql-space-7);
	align-items: center;
}

.ql-home .ql-home-hero__media {
	max-width: 640px;
}

.ql-home .ql-home-hero__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Hero eyebrow: same as the section eyebrows (shared rule above). */

.ql-home .ql-home-hero__title {
	margin-bottom: var(--ql-space-4);
	font-size: clamp(2.5rem, 1.8rem + 2.6vw, 3.5rem);
	line-height: 1.1;
}

.ql-home .ql-home-hero__subhead {
	max-width: 40em;
	margin: 0;
}

.ql-home .ql-home-hero__media {
	position: relative;
}

/* The stitched photos (hero and about) get a very soft shadow, so they
   sit on the page like a piece of fabric. */
.ql-home .ql-home-hero__image,
.ql-home .ql-home-about__image {
	box-shadow: 0 1px 2px rgb(35 47 66 / 8%), 0 4px 12px rgb(35 47 66 / 6%);
}

.ql-home .ql-home-hero__image {
	position: relative; /* For the stitch line. */
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--ql-radius-card);
	background-color: var(--ql-color-secondary); /* Shown while the image loads. */
}

.ql-home .ql-home-hero__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Quilt star in a quilt block like the logo's, centered on the photo's
   top-right corner (HOMEPAGE_HERO_STAR turns it off): white with a drop
   shadow and a light gray dashed stitch line just inside the edge, drawn
   as SVG so the dashes scale with the block and meet in an L at each
   corner (7 dashes a side). Half of it hangs past the photo into the
   right gutter, so it's never wider than twice the gutter: 40px, growing
   to 56px once the gutter allows (the extra 32px of the 1432px covers a
   desktop scrollbar). */
.ql-home .ql-home-hero__star {
	--ql-star-size: 40px;
	position: absolute;
	top: calc(var(--ql-star-size) / -2);
	right: calc(var(--ql-star-size) / -2);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--ql-star-size);
	height: var(--ql-star-size);
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect x='4' y='4' width='92' height='92' fill='none' stroke='%238f9396' stroke-width='2' stroke-dasharray='7.07 6.07' stroke-dashoffset='3.535'/%3E%3C/svg%3E") center / 100% 100% no-repeat,
		#fff;
	box-shadow: 0 2px 6px rgb(35 47 66 / 20%); /* Stronger than the cards': a soft one is lost at this size. */
}

.ql-home .ql-home-hero__star img {
	display: block;
	width: 70%;
	height: auto;
}

@media (min-width: 1024px) {
	.ql-home .ql-home-hero__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 5rem;
	}

	.ql-home .ql-home-hero__media {
		max-width: none;
	}

	.ql-home .ql-home-hero--no-image .ql-home-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.ql-home .ql-home-hero__star {
		--ql-star-size: clamp(40px, 100vw - 1432px, 56px);
	}
}

/* Newsletter bar --------------------------------------------------------- */


.ql-home .ql-home-newsletter__inner {
	display: flex;
	flex-direction: column;
	gap: var(--ql-space-5);
}

.ql-home .ql-home-newsletter__title {
	font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
}

.ql-home .ql-home-newsletter__subhead {
	margin: var(--ql-space-2) 0 0;
}

.ql-home .ql-home-newsletter__embed {
	min-width: 0;
}

/* Text beside the form from 1024px; narrower, the form needs the full width. */
@media (min-width: 1024px) {
	.ql-home .ql-home-newsletter__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: var(--ql-space-6);
	}

	/* The form keeps room for its fields; the text takes the rest of the row. */
	.ql-home .ql-home-newsletter__text {
		flex: 1 1 20rem;
		max-width: 36rem;
	}

	.ql-home .ql-home-newsletter__embed {
		flex: 1 1 32rem;
		max-width: 560px;
	}
}

/* Badges: a slim stripe of centered icon badges (Figma: 32px icon, Tipique
   title, small Roboto line). Icons use the button color for 3:1 contrast on
   cream; the Figma peach is 2.2:1. */


.ql-home .ql-home-badges__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	gap: var(--ql-space-6) var(--ql-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ql-home .ql-home-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.ql-home .ql-home-badge__icon {
	width: var(--ql-home-icon-size);
	height: var(--ql-home-icon-size);
	margin-bottom: var(--ql-space-4);
	color: var(--ql-color-button);
	stroke-width: 1.5;
}

.ql-home .ql-home-badge__title {
	margin: 0;
	font-family: var(--ql-font-heading);
	font-size: 1.25rem; /* Smaller than the card titles: the stripe is a quiet aside. */
	line-height: var(--ql-line-height-heading);
}

.ql-home .ql-home-badge__text {
	margin: var(--ql-space-2) 0 0;
	line-height: 1.4;
}

/* Big monitors: a step up, so the stripe doesn't look tiny across the
   1400px container. */
@media (min-width: 1440px) {
	.ql-home .ql-home-badge__title {
		font-size: 1.5rem;
	}

	.ql-home .ql-home-badge__text {
		font-size: 1.125rem;
	}
}

/* Klaviyo's embedded form, restyled to match the design system: borderless
   fields and the pill .ql-button look, at one height. Klaviyo styles the form with
   generated single-class rules, so these selectors outrank them. The focus
   ring is white, since the design system's navy ring is lost on the fabric. */
.ql-home .ql-home-newsletter__embed .klaviyo-form input[type="email"],
.ql-home .ql-home-newsletter__embed .klaviyo-form input[type="text"],
.ql-home .ql-home-newsletter__embed .klaviyo-form input[type="tel"] {
	box-sizing: border-box;
	height: 52px;
	padding: 0 var(--ql-space-4);
	border: 0;
	border-radius: var(--ql-radius); /* Same corners as the contact form fields. */
	background-color: #fff;
	color: var(--ql-color-text);
	font-family: var(--ql-font-body);
	font-size: 16px;
}

.ql-home .ql-home-newsletter__embed .klaviyo-form input::placeholder {
	color: #5f6368; /* 6.1:1 on white. */
	font-family: var(--ql-font-body);
	font-size: 16px;
	opacity: 1;
}

.ql-home .ql-home-newsletter__embed .klaviyo-form button {
	box-sizing: border-box;
	height: 52px;
	padding: 0 32px;
	border: 0;
	border-radius: var(--ql-radius-pill);
	background-color: #fff; /* White with terracotta text: a terracotta button would vanish on the fabric. */
	color: var(--ql-color-button); /* 4.9:1 on white. */
	font-family: var(--ql-font-body);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color var(--ql-transition);
}

.ql-home .ql-home-newsletter__embed .klaviyo-form button:hover,
.ql-home .ql-home-newsletter__embed .klaviyo-form button:active {
	background-color: #fdf1ec; /* A peach tint, so the hover shows against white. */
	color: var(--ql-color-button-hover);
}

.ql-home .ql-home-newsletter__embed .klaviyo-form input:focus-visible,
.ql-home .ql-home-newsletter__embed .klaviyo-form button:focus-visible {
	outline: var(--ql-focus-width) solid #fff;
	outline-offset: var(--ql-focus-offset);
	box-shadow: none;
}

/* Klaviyo pads each field cell 32px above and below and gives the form a
   120px minimum height (inline). The band's own padding does that job, so
   both go: the fields sit exactly where the band puts them. */
.ql-home .ql-home-newsletter__embed .klaviyo-form [style*="flex-direction: row"] > div {
	padding-top: 0;
	padding-bottom: 0;
}

.ql-home .ql-home-newsletter__embed .klaviyo-form [style*="min-height"] {
	min-height: 0 !important;
}

/* Stacked (below 1024px, text above the form): more room above and
   below, and an even 20px between the fields and the button (Klaviyo's
   own spacing is 10px of cell padding plus its button margin, uneven). */
@media (max-width: 1023px) {
	.ql-home .ql-home-newsletter {
		padding: var(--ql-space-7) 0;
	}

	.ql-home .ql-home-newsletter__embed .klaviyo-form [style*="flex-direction: row"] {
		gap: 20px;
	}

	.ql-home .ql-home-newsletter__embed .klaviyo-form [style*="flex-direction: row"] > div {
		padding-right: 0;
		padding-left: 0;
	}

	.ql-home .ql-home-newsletter__embed .klaviyo-form button {
		margin: 0 !important;
	}
}

/* Phones: stack the fields and the button, full width. Klaviyo sets the row
   direction inline, hence !important; its mobile layout setting stays on
   "same as desktop" so this is the one place stacking is decided. */
@media (max-width: 639px) {
	.ql-home .ql-home-newsletter__embed .klaviyo-form [style*="flex-direction: row"] {
		flex-direction: column !important;
	}

	/* Klaviyo's cells are flex: 1 0 0, which collapses them to no height in a column. */
	.ql-home .ql-home-newsletter__embed .klaviyo-form [style*="flex-direction: row"] > div {
		flex: 0 0 auto !important;
		width: 100% !important;
		padding: 0 !important;
	}

	.ql-home .ql-home-newsletter__embed .klaviyo-form [style*="flex-direction: row"] > div > div,
	.ql-home .ql-home-newsletter__embed .klaviyo-form input,
	.ql-home .ql-home-newsletter__embed .klaviyo-form button {
		width: 100% !important;
	}
}

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


.ql-home .ql-home-contact__inner {
	display: flex;
	flex-direction: column;
	gap: var(--ql-space-4);
}

.ql-home .ql-home-contact__title {
	font-size: var(--ql-font-size-h3);
}

.ql-home .ql-home-contact__subhead {
	margin: var(--ql-space-2) 0 0;
}

.ql-home .ql-home-contact .ql-home-section__footer {
	margin-top: 0;
}

@media (min-width: 768px) {
	.ql-home .ql-home-contact__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: var(--ql-space-6);
	}
}

/* Contact form: an Elementor form in the Figma "Let's Connect" layout, a
   centered 580px column with white fields and a full-width pill button.
   Departures from the file: 20px between fields, 6px corners, field
   borders #C4B79F (a touch darker than the file's #DDD4C0), placeholders
   #6F6656 (5.6:1), and the button in terracotta (white on the file's
   peach is 2.3:1). Elementor's own form styles are single- or two-class
   rules, so these win without !important. */

.ql-home .ql-home-contact__form-wrap {
	max-width: 580px;
	margin: 0 auto;
}

.ql-home .ql-home-contact--form .ql-home-section__header {
	margin-bottom: var(--ql-space-6);
}

.ql-home .ql-home-contact__form .elementor-form-fields-wrapper {
	margin: 0 -10px;
}

.ql-home .ql-home-contact__form .elementor-field-group {
	margin-bottom: 20px;
	padding: 0 10px;
}

.ql-home .ql-home-contact__form .elementor-field-group .elementor-field-textual {
	box-sizing: border-box;
	min-height: 50px;
	padding: 13px 17px;
	border: 1px solid #c4b79f;
	border-radius: var(--ql-radius);
	background-color: #fff;
	color: var(--ql-color-text);
	font-family: var(--ql-font-body);
	font-size: 16px;
	line-height: 1.4;
}

.ql-home .ql-home-contact__form .elementor-field-group textarea.elementor-field-textual {
	min-height: 8.5rem;
	resize: vertical;
}

.ql-home .ql-home-contact__form .elementor-field-textual::placeholder {
	color: #6f6656;
	opacity: 1;
}

.ql-home .ql-home-contact__form .elementor-field-textual:focus {
	border-color: var(--ql-color-dark);
	outline: var(--ql-focus-width) solid var(--ql-focus-color);
	outline-offset: 1px;
	box-shadow: none;
}

.ql-home .ql-home-contact__form .e-form__buttons {
	margin-top: 4px;
}

.ql-home .ql-home-contact__form .elementor-button {
	width: 100%;
	height: 56px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--ql-radius-pill);
	background-color: var(--ql-color-button);
	color: #fff;
	font-family: var(--ql-font-body);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	transition: background-color var(--ql-transition);
}

.ql-home .ql-home-contact__form .elementor-button:hover,
.ql-home .ql-home-contact__form .elementor-button:active {
	background-color: var(--ql-color-button-hover);
	color: #fff;
}

.ql-home .ql-home-contact__form .elementor-button:focus-visible {
	outline: var(--ql-focus-width) solid var(--ql-focus-color);
	outline-offset: var(--ql-focus-offset);
}

/* Validation and the after-submit message. */
.ql-home .ql-home-contact__form .elementor-message {
	margin-top: var(--ql-space-4);
	font-size: 16px;
	text-align: center;
}

.ql-home .ql-home-contact__form .elementor-message.elementor-message-success {
	color: #2e6b3a; /* 6.4:1 on white. */
}

.ql-home .ql-home-contact__form .elementor-message.elementor-message-danger,
.ql-home .ql-home-contact__form .elementor-error .elementor-field-textual {
	border-color: #b3261e;
	color: #b3261e; /* 6.0:1 on white. */
}

/* Card grids ------------------------------------------------------------- */

/* Grid items stretch by default, so every card in a row is the same height. */
.ql-home .ql-home-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ql-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.ql-home .ql-home-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ql-home .ql-home-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ql-home .ql-home-grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Photo cards: the image sits flush in the top of the card. */
.ql-home .ql-home-card {
	--ql-card-padding: 1.75rem;
}

/* Photo cards: the border wraps only the text below the photo. */
.ql-home .ql-home-card.has-image {
	border: 0;
}

.ql-home .ql-home-card.has-image .ql-card__body {
	border: var(--ql-border-width) solid var(--ql-color-card-border);
	border-top: 0;
	border-radius: 0 0 var(--ql-radius-card) var(--ql-radius-card);
}

.ql-home .ql-home-card__image {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--ql-radius-card) var(--ql-radius-card) 0 0;
	background-color: var(--ql-color-accent-bg); /* Shown while the image loads. */
}

.ql-home .ql-home-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ql-home .ql-home-card .ql-card__body {
	gap: var(--ql-space-3);
}

/* The "Learn more" link keeps a 48px tap target, which adds a few pixels of
   space under its text; trim the bottom padding so the gap matches the sides. */
.ql-home .ql-home-card.ql-card--link .ql-card__body {
	padding-bottom: var(--ql-space-5);
}

.ql-home .ql-home-card__overline {
	margin-bottom: 0;
}

/* Icon cards: Lucide line icons at the same size and stroke as the badges. */
.ql-home .ql-home-card .ql-card__icon {
	width: var(--ql-home-icon-size);
	height: var(--ql-home-icon-size);
}

.ql-home .ql-home-card .ql-card__icon svg {
	max-width: var(--ql-home-icon-size);
	max-height: var(--ql-home-icon-size);
	stroke-width: 1.5;
}

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

/* Stacked, the same as the hero: a 640px photo, 48px from the text. */
.ql-home .ql-home-about__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ql-space-7);
	align-items: center;
}

.ql-home .ql-home-about__image {
	position: relative; /* For the stitch line. */
	max-width: 640px;
	aspect-ratio: 605 / 412;
	overflow: hidden;
	border-radius: var(--ql-radius-card);
	background-color: var(--ql-color-accent-bg);
}

/* A cream stitch line just inside a photo's edge (the hero's and the
   about section's), like the quilt block in the logo, its corners rounded
   to follow the photo's. SVG rather than a dashed border, which doesn't
   let you set the dash length. The rect fills the inset box and its
   stroke straddles that edge, hence the visible overflow; rx (13px: the
   photo's 16 less half the inset) is set in the markup. Round caps, with
   the dashes shortened to match, read as thread, and the shadow sits it
   on the photo. The photo's wrapper needs position: relative. */
.ql-home .ql-home-stitch {
	--ql-stitch-inset: 6px;
	position: absolute;
	top: var(--ql-stitch-inset);
	left: var(--ql-stitch-inset);
	width: calc(100% - 2 * var(--ql-stitch-inset));
	height: calc(100% - 2 * var(--ql-stitch-inset));
	overflow: visible;
	pointer-events: none;
	fill: none;
	stroke: #f8f1df; /* The logo block's cream. */
	stroke-width: 1.25px;
	stroke-linecap: round;
	stroke-dasharray: 3.75px 5.25px; /* 5px dashes, 4px gaps once the round caps add their 1.25px. */
	filter: drop-shadow(0 0.75px 0.5px rgb(0 0 0 / 45%));
}

.ql-home .ql-home-about__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ql-home .ql-home-about__text .ql-home-section__header {
	margin-bottom: var(--ql-space-5);
}

.ql-home .ql-home-about__body p {
	margin: 0 0 var(--ql-space-4);
}

.ql-home .ql-home-about__body > :last-child {
	margin-bottom: 0;
}

.ql-home .ql-home-about__body a {
	color: var(--ql-color-link);
	text-decoration: underline;
}

@media (min-width: 1024px) {
	.ql-home .ql-home-about__inner {
		grid-template-columns: minmax(0, 605fr) minmax(0, 515fr);
		gap: 3.5rem;
	}

	.ql-home .ql-home-about__image {
		max-width: none;
	}
}
