/* ============================================================================
   nqc/group-split  (+ nqc/group-card, styled here)
   Source: Claude Design/family-reunions.html L211–246, L611–676
   Canvas: band top 1610px, height 2080px

   Both arrangements are stated from the comp's absolute boxes:

   flank   L229–234   card 82..461 | photo 477..964 | card 980..1358.667
                      rows at 235 and 470, so 219 tall with 16 between
   side    L241–245   photo 82..660 | card 700..1383
                      rows at 1106, 1314.5 and 1523, so 190 tall with 18.5
   ============================================================================ */

.nqc-gsplit {
	position: relative;
	background: var(--nqc-paper);
	/* The comp's content runs 82 to 1358.667 — a wider rail than the bands',
	   and the padding is stated from it. */
	padding: 20px 82px 60px;
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow: hidden;
	isolation: isolate;
}

.nqc-gsplit.is-photo-ground { background: var(--nqc-sand); }

.nqc-gsplit__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.nqc-gsplit__bg-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
}

.nqc-gsplit__in {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1276.667px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
}

/* ---- head — the comp's shared .sec-hd, L296–303 --------------------------- */
.nqc-gsplit__head {
	width: 100%;
	max-width: 1200px;
	min-height: 157.01px;              /* L239 .plan-hd */
	padding-inline: 40px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	justify-content: center;
	align-items: center;
	text-align: center;
}

/*
   Only a heading in the head, so the comp's fixed 157px becomes 70px of empty
   space above the cards. The head takes its own content's height instead.
*/
.nqc-gsplit.is-head-slim .nqc-gsplit__head {
	min-height: 0;
}

/*
   No head at all, so the cards would open 20px below the band's top edge —
   the comp's top padding assumes a header sits in that space. Matching the
   band's own 60px bottom padding makes it symmetrical and brings the gap from
   the section above to about 108px, the same as the other headless rows.
*/
.nqc-gsplit.is-no-head {
	padding-top: 60px;
}

.nqc-gsplit__kicker {
	margin: 0;
	font: 400 14px/100% var(--nqc-sans);
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--nqc-gold-dk);
	text-align: center;
}

.nqc-gsplit__heading {
	margin: 0;
	font: 600 56px/100% var(--nqc-serif);     /* L298 */
	color: var(--nqc-ink);
	text-align: center;
}

.nqc-gsplit__sub {
	margin: 0;
	font: 400 20px/100% var(--nqc-sans);      /* L302 */
	color: var(--nqc-body-3);
	text-align: center;
}

.nqc-gsplit__orn {
	--nqc-orn-w: 70px;
	min-height: 27.01px;
	justify-content: center;
}

/* ---- the framed photograph — L288–292 (.frame-im) ------------------------- */
.nqc-gsplit__frame {
	position: relative;
	overflow: hidden;
	background: #555;
	box-shadow: inset 0 0 0 12px #fff;
	transition: transform .6s var(--nqc-ease), box-shadow .6s ease;
}

.nqc-gsplit__frame:hover {
	transform: translateY(-5px);
	box-shadow: inset 0 0 0 12px #fff, 0 24px 48px rgba(28, 38, 52, .2);
}

.nqc-gsplit__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
}

/* ---- cards — L216–228 (.card-b) ------------------------------------------ */
.nqc-gsplit__card {
	margin: 0;
	background: var(--nqc-paper);
	box-shadow: inset 0 0 0 1px var(--nqc-rule-2);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	justify-content: center;
	align-items: flex-start;
	transition: box-shadow .45s ease, transform .45s var(--nqc-ease);
}

.nqc-gsplit__card:hover {
	box-shadow: inset 0 0 0 1px var(--nqc-gold), 0 18px 40px rgba(28, 38, 52, .1);
	transform: translateY(-4px);
}

.nqc-gsplit__card-kicker {
	margin: 0;
	align-self: stretch;
	font: 400 14px/100% var(--nqc-sans);      /* L221 */
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--nqc-gold-dk);
}

.nqc-gsplit__card-heading {
	margin: 0;
	align-self: stretch;
	font: 600 30px/48px var(--nqc-serif);     /* L225 */
	color: var(--nqc-ink);
}

.nqc-gsplit__card-body {
	margin: 0;
	align-self: stretch;
	font: 400 18px/28px var(--nqc-sans);      /* L226 */
	color: var(--nqc-body-2);
}

/* ---- the note — L235–238 (.gen-note) ------------------------------------- */
.nqc-gsplit__note {
	background: #FFF3DA;               /* --note */
	box-shadow: inset 0 0 0 1px var(--nqc-rule-2);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	justify-content: center;
	align-items: flex-start;
}

.nqc-gsplit__note-heading {
	margin: 0;
	align-self: stretch;
	font: 600 30px/48px var(--nqc-serif);
	color: var(--nqc-ink);
}

.nqc-gsplit__note-body {
	margin: 0;
	align-self: stretch;
	font: 400 18px/28px var(--nqc-sans);
	color: var(--nqc-body-2);
}

/* ============================================================================
   flank — two cards, the photograph, two cards
   ============================================================================ */
.nqc-gsplit.is-flank .nqc-gsplit__grid {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 379fr) minmax(0, 487fr) minmax(0, 379fr);
	column-gap: 16px;                  /* 477 - 461 */
	row-gap: 16px;                     /* 470 - 454 */
	align-items: stretch;
}

.nqc-gsplit.is-flank .nqc-gsplit__frame {
	grid-column: 2;
	grid-row: 1 / span 2;
	min-height: 454px;                 /* L233 */
}

/*
   nth-of-type, not nth-child: the photograph and the note are a div and an
   aside, so the cards are the only <article>s and count on their own. The comp
   fills left, right, left, right (L229–232), which auto-flow cannot do around
   a spanning centre cell.
*/
.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(2) { grid-column: 3; grid-row: 1; }
.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(3) { grid-column: 1; grid-row: 2; }
.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(4) { grid-column: 3; grid-row: 2; }

.nqc-gsplit.is-flank .nqc-gsplit__note {
	grid-column: 1 / -1;
	grid-row: 3;
	min-height: 162px;                 /* L235 */
}

/* ============================================================================
   side — the photograph beside a stack of cards
   ============================================================================ */
.nqc-gsplit.is-side .nqc-gsplit__grid {
	width: 100%;
	display: grid;
	grid-template-columns: minmax(0, 578fr) minmax(0, 683fr);
	/*
	   The three rows are declared, not left implicit. `grid-row: 1 / -1` on the
	   photograph resolves -1 against the EXPLICIT grid, and with no rows
	   declared that collapsed to a single row: the photograph forced row 1 to
	   607px and the first card stretched to fill it. A fourth card would land
	   in an implicit row beside the photograph rather than under it, which is
	   the graceful way for this to give.
	*/
	grid-template-rows: repeat(3, minmax(190px, auto));
	column-gap: 40px;                  /* 700 - 660 */
	row-gap: 18.5px;                   /* 1314.5 - (1106 + 190) */
	align-items: stretch;
}

.nqc-gsplit.is-side .nqc-gsplit__frame {
	grid-column: 1;
	grid-row: 1 / -1;
	min-height: 607px;                 /* L241 */
}

.nqc-gsplit.is-side .nqc-gsplit__card {
	grid-column: 2;
	min-height: 190px;                 /* L242 */
}

.nqc-gsplit.is-side .nqc-gsplit__note { grid-column: 1 / -1; }

/* ============================================================================
   Responsive

   Every layout rule is restated in each query at matching specificity: at
   (0,3,0) against a (0,1,0) grid they survive their own media query and would
   otherwise keep a desktop column on a phone.
   ============================================================================ */
@media (max-width: 1200px) {
	.nqc-gsplit { padding-inline: var(--nqc-gutter); }

	.nqc-gsplit__heading { font-size: 42px; }

	.nqc-gsplit__card-heading { font-size: 26px; line-height: 36px; }

	.nqc-gsplit__card-body { font-size: 16px; line-height: 26px; }

	.nqc-gsplit.is-flank .nqc-gsplit__frame { min-height: 380px; }

	.nqc-gsplit.is-side .nqc-gsplit__frame { min-height: 480px; }
}

@media (max-width: 900px) {
	.nqc-gsplit { padding-block: 56px; }

	/* Leading, so a wrapped eyebrow does not set two rows on top of each other
	   the way cabin-intro's did. */
	.nqc-gsplit__kicker,
	.nqc-gsplit__card-kicker { line-height: 20px; }

	.nqc-gsplit__head { min-height: 0; padding-inline: 0; }

	.nqc-gsplit__heading { font-size: 32px; line-height: 38px; }

	.nqc-gsplit__sub { font-size: 18px; line-height: 26px; }

	.nqc-gsplit__orn { --nqc-orn-w: 48px; }

	/*
	   One column for both arrangements. The photograph leads, because it is
	   what tells you which section you are in before you have read anything.
	*/
	.nqc-gsplit.is-flank .nqc-gsplit__grid,
	.nqc-gsplit.is-side .nqc-gsplit__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: none;
		row-gap: 16px;
	}

	.nqc-gsplit.is-flank .nqc-gsplit__frame,
	.nqc-gsplit.is-side .nqc-gsplit__frame {
		grid-column: 1;
		grid-row: 1;
		min-height: 260px;
	}

	.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(1),
	.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(2),
	.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(3),
	.nqc-gsplit.is-flank .nqc-gsplit__card:nth-of-type(4),
	.nqc-gsplit.is-side .nqc-gsplit__card {
		grid-column: 1;
		grid-row: auto;
		min-height: 0;
	}

	.nqc-gsplit.is-flank .nqc-gsplit__note,
	.nqc-gsplit.is-side .nqc-gsplit__note {
		grid-column: 1;
		grid-row: auto;
		min-height: 0;
	}

	.nqc-gsplit__note-heading { font-size: 26px; line-height: 36px; }
	.nqc-gsplit__note-body { font-size: 16px; line-height: 26px; }
}

@media (max-width: 600px) {
	.nqc-gsplit { padding-block: 44px; }

	.nqc-gsplit__heading { font-size: 29px; line-height: 34px; }

	.nqc-gsplit__card,
	.nqc-gsplit__note { padding: 20px; }

	.nqc-gsplit.is-flank .nqc-gsplit__frame,
	.nqc-gsplit.is-side .nqc-gsplit__frame { min-height: 200px; }
}
