/**
 * Editorial/storytelling section — 2026 redesign. A magazine spread that
 * breaks the site's usual centered container: the image runs full-bleed to
 * the viewport edge, the text column is offset and narrower than half the
 * page, with an oversized quote mark standing in for a pull-quote. This
 * section intentionally has no top border/padding-block from the shared
 * section rhythm (assets/css/sections.css) since it needs to sit flush to
 * the viewport edge; padding is handled here instead.
 */

section.qg-story {
	padding-block: 0;
	border-top: none;
}

.qg-story__grid {
	display: grid;
	grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
	.qg-story__grid {
		grid-template-columns: 58% 42%;
		align-items: stretch;
	}
}

.qg-story__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

@media (min-width: 1024px) {
	.qg-story__media {
		aspect-ratio: auto;
		min-height: 560px;
	}
}

.qg-story__media:not(.qg-story__media--decorative) img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.qg-story__media--decorative {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 25% 25%, var(--qg-color-accent-soft) 0%, transparent 55%),
		linear-gradient(160deg, var(--qg-color-paper) 0%, #ece3d1 100%);
}

.qg-story__media--decorative::before {
	content: '';
	position: absolute;
	inset: -20%;
	background:
		repeating-linear-gradient(45deg, rgba(22, 19, 15, 0.05) 0, rgba(22, 19, 15, 0.05) 1px, transparent 1px, transparent 28px);
	pointer-events: none;
}

.qg-story__media-mark {
	position: relative;
	z-index: 1;
	width: 30%;
	max-width: 160px;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 18px 40px rgba(179, 39, 29, 0.25));
}

.qg-story__content {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--qg-space-6) var(--qg-space-4);
	background: var(--qg-color-surface);
}

@media (min-width: 1024px) {
	.qg-story__content {
		padding: var(--qg-space-6) clamp(2rem, 5vw, 4.5rem);
	}
}

.qg-story__mark {
	display: block;
	font-family: var(--qg-font-heading);
	font-size: 5rem;
	line-height: 1;
	color: var(--qg-color-accent-soft);
	margin-bottom: -1.2rem;
}

.qg-story__heading {
	font-family: var(--qg-font-heading);
	font-size: clamp(1.9rem, 3.4vw, 2.7rem);
	font-weight: 500;
	line-height: 1.25;
	margin: 0 0 var(--qg-space-4);
	color: var(--qg-color-ink);
}

.qg-story__text {
	font-family: var(--qg-font-body);
	font-size: 0.98rem;
	line-height: 1.75;
	color: var(--qg-color-ink-soft);
	max-width: 44ch;
	margin: 0 0 var(--qg-space-5);
}

.qg-story__values {
	display: flex;
	flex-wrap: wrap;
	gap: var(--qg-space-3) var(--qg-space-5);
	list-style: none;
	margin: 0 0 var(--qg-space-5);
	padding: var(--qg-space-4) 0;
	border-top: 1px solid var(--qg-color-line);
	border-bottom: 1px solid var(--qg-color-line);
}

.qg-story__value {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--qg-font-body);
	font-size: 0.86rem;
	font-weight: 500;
	color: var(--qg-color-ink);
}

.qg-story__value .qg-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: var(--qg-color-accent);
}

/* Mission & vision accordion — the homepage's stand-in for a dedicated
   About page moment. A single toggle reveals mission/vision/promise
   blocks; collapsed by default so it doesn't compete with the story copy
   above it. Height is animated via max-height, set inline by
   component.js on click. */

.qg-story__accordion {
	margin: 0 0 var(--qg-space-4);
	border: 1px solid var(--qg-color-line);
	border-radius: var(--qg-radius);
	background: var(--qg-color-paper);
}

.qg-story__accordion-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--qg-space-3);
	width: 100%;
	padding: var(--qg-space-3) var(--qg-space-4);
	border: 0;
	background: none;
	font-family: var(--qg-font-body);
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--qg-color-ink);
	text-align: left;
	cursor: pointer;
}

.qg-story__accordion-toggle:hover {
	color: var(--qg-color-accent);
}

.qg-story__accordion-caret {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	transform: rotate(90deg);
	transition: transform 0.3s var(--qg-ease);
}

.qg-story__accordion-toggle[aria-expanded='true'] .qg-story__accordion-caret {
	transform: rotate(-90deg);
}

.qg-story__accordion-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s var(--qg-ease);
}

.qg-story__accordion-inner {
	display: flex;
	flex-direction: column;
	gap: var(--qg-space-4);
	padding: 0 var(--qg-space-4) var(--qg-space-4);
	border-top: 1px solid var(--qg-color-line);
	margin-top: 0;
	padding-top: var(--qg-space-4);
}

.qg-story__accordion-block h3 {
	margin: 0 0 0.35rem;
	font-family: var(--qg-font-heading);
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--qg-color-ink);
}

.qg-story__accordion-block p {
	margin: 0;
	font-family: var(--qg-font-body);
	font-size: 0.88rem;
	line-height: 1.65;
	color: var(--qg-color-ink-soft);
}

@media (prefers-reduced-motion: reduce) {
	.qg-story__accordion-panel,
	.qg-story__accordion-caret {
		transition: none;
	}
}

.qg-story__content .qg-link {
	align-self: flex-start;
}
