.reveal {
	opacity: 0;
	transform: translateY(28px);
	transition:
		opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1),
		transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}
.reveal.is-in {
	opacity: 1;
	transform: none;
}

.reveal-img {
	clip-path: inset(0 0 12% 0);
	transform: scale(1.06);
	opacity: 0.001;
	transition:
		clip-path 1.3s cubic-bezier(0.22, 1, 0.36, 1),
		transform 1.6s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-img.is-in {
	clip-path: inset(0 0 0 0);
	transform: scale(1);
	opacity: 1;
}

/* ---------------------------------------------------------
   Hover zoom for gallery / tutorial / journal images.
   Add class "zoom-media" to the link or wrapper around the
   image, so the whole card responds to hover, not just the image.
   --------------------------------------------------------- */
.zoom-media img {
	transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.zoom-media:hover img {
	transform: scale(1.045);
}

/* ---------------------------------------------------------
   Caption slide, pairs with "zoom-media". Add class
   "caption-shift" to the caption text next to the image.
   --------------------------------------------------------- */
.caption-shift {
	transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}
.zoom-media:hover .caption-shift {
	transform: translateX(10px);
}

/* ---------------------------------------------------------
   Underline link with an arrow that nudges right on hover.
   Add class "hover-link" to any <a> tag.
   --------------------------------------------------------- */
.hover-link {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	border-bottom: 1px solid currentColor;
	opacity: 0.85;
	padding-bottom: 2px;
	transition: opacity 0.4s ease, border-color 0.4s ease;
}
.hover-link::after {
	content: "\2192"; /* → */
	display: inline-block;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hover-link:hover {
	opacity: 1;
}
.hover-link:hover::after {
	transform: translateX(5px);
}

/* ---------------------------------------------------------
   Custom text-selection color. Change the background color
   below to match your site's accent color.
   --------------------------------------------------------- */
::selection {
	background: #b5451f;
	color: #fff;
}

/* ---------------------------------------------------------
   EDITORIAL GALLERY GRID
   For an unequal, staggered 3-image layout (one big image,
   two smaller ones offset up/down), like a gallery wall.

   HOW TO USE:
   1. Add a Group block (or Row Layout) to hold 3 images.
      Give the Group/Row the class: editorial-grid
   2. Add 3 Image blocks inside it. Give them, in order:
      grid-item-1   grid-item-2   grid-item-3
   3. That's it, no other settings needed.
   --------------------------------------------------------- */
.editorial-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 2rem;
}
.grid-item-1 {
	grid-column: 1 / span 8;
}
.grid-item-2 {
	grid-column: 10 / span 4;
	margin-top: -6rem;
	align-self: end;
}
.grid-item-3 {
	grid-column: 3 / span 6;
	margin-top: -4rem;
}
@media (max-width: 767px) {
	.grid-item-1,
	.grid-item-2,
	.grid-item-3 {
		grid-column: 1 / -1;
		margin-top: 0;
	}
}

/* ---------------------------------------------------------
   STAGGERED CARD GRID
   For 3 equal-size cards with different vertical offsets,
   like a row of tutorial or product cards.

   HOW TO USE:
   1. Add a Group block (or Row Layout) to hold 3 cards.
      Give the Group/Row the class: stagger-grid
   2. Give each card, in order: stagger-item-1  stagger-item-2  stagger-item-3
   --------------------------------------------------------- */
.stagger-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}
.stagger-item-1 {
	margin-top: 0;
}
.stagger-item-2 {
	margin-top: 6rem;
}
.stagger-item-3 {
	margin-top: 2.5rem;
}
@media (max-width: 767px) {
	.stagger-grid {
		grid-template-columns: 1fr;
	}
	.stagger-item-1,
	.stagger-item-2,
	.stagger-item-3 {
		margin-top: 0;
	}
}

/* ---------------------------------------------------------
   TRIO GRID
   3 equal-width columns, all the same height, stretched to
   match each other. Built for things like "2 vertical videos
   + 1 text panel" where everything should line up evenly.

   HOW TO USE:
   1. Add a Group block to hold your 3 items (2 videos + 1 text
      panel, in any order). Give the Group class: trio-grid
   2. Add class: text-panel to whichever inner Group/block
      holds your paragraph text, so it gets the padded,
      centered card treatment instead of sitting bare.
   --------------------------------------------------------- */
.trio-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	align-items: stretch;
}
.trio-grid > * {
	height: 100%;
}
@media (max-width: 767px) {
	.trio-grid {
		grid-template-columns: 1fr;
	}
}

.text-panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	padding: 2.5rem 2rem;
	background: #f5f0e5;
	border-left: 3px solid #b5623b;
	box-sizing: border-box;
}
.text-panel p {
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	line-height: 1.65;
	color: #261f1c;
	margin: 0 0 1rem 0;
}
.text-panel p:last-child {
	margin-bottom: 0;
}
.text-panel em {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-style: italic;
	color: #9f4f2f;
}

@media (prefers-reduced-motion: reduce) {
	.reveal,
	.reveal-img {
		opacity: 1 !important;
		transform: none !important;
		clip-path: none !important;
	}
	.zoom-media img,
	.caption-shift,
	.hover-link::after {
		transition: none !important;
	}
}
